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/examples/jsm/capabilities/WebGL.js"],"sourcesContent":["/**\n * @license\n * Copyright 2010-2023 Three.js Authors\n * SPDX-License-Identifier: MIT\n */ const $d5b33d7c30034067$export$3545e07a80636437 = \"155\";\nconst $d5b33d7c30034067$export$7177b3e430c2d7ca = {\n LEFT: 0,\n MIDDLE: 1,\n RIGHT: 2,\n ROTATE: 0,\n DOLLY: 1,\n PAN: 2\n};\nconst $d5b33d7c30034067$export$d46bd3ead7cc759b = {\n ROTATE: 0,\n PAN: 1,\n DOLLY_PAN: 2,\n DOLLY_ROTATE: 3\n};\nconst $d5b33d7c30034067$export$3237e1f2c1ea1f44 = 0;\nconst $d5b33d7c30034067$export$b9a7b4fc5cb15f9b = 1;\nconst $d5b33d7c30034067$export$b8058bcc7037d3f3 = 2;\nconst $d5b33d7c30034067$export$f24be24dcddeac0d = 3;\nconst $d5b33d7c30034067$export$346307dbae2b7447 = 0;\nconst $d5b33d7c30034067$export$5813f879eee7cd88 = 1;\nconst $d5b33d7c30034067$export$a47c4b43a1be34f0 = 2;\nconst $d5b33d7c30034067$export$896ae1ade6c829c4 = 3;\nconst $d5b33d7c30034067$export$2ede184fc2998901 = 0;\nconst $d5b33d7c30034067$export$d9f0486e75b5ace = 1;\nconst $d5b33d7c30034067$export$3b296b6f144d5b03 = 2;\nconst $d5b33d7c30034067$export$211211c00f97204d = 2; // r149\nconst $d5b33d7c30034067$export$63b8d6b580fc65ba = 0;\nconst $d5b33d7c30034067$export$5b29a26d96ee6af0 = 1;\nconst $d5b33d7c30034067$export$777d8f9551c2216b = 2;\nconst $d5b33d7c30034067$export$cdfa06f868e2e467 = 3;\nconst $d5b33d7c30034067$export$4138e1c684b46a20 = 4;\nconst $d5b33d7c30034067$export$eda4864c68df1fa2 = 5;\nconst $d5b33d7c30034067$export$20183a0484ce21a0 = 100;\nconst $d5b33d7c30034067$export$73e0df5177988548 = 101;\nconst $d5b33d7c30034067$export$28e582859cbec660 = 102;\nconst $d5b33d7c30034067$export$c8c1508da8d0600c = 103;\nconst $d5b33d7c30034067$export$99948c02fb51055f = 104;\nconst $d5b33d7c30034067$export$2110f05edf778d3d = 200;\nconst $d5b33d7c30034067$export$8805bad65e24940e = 201;\nconst $d5b33d7c30034067$export$7fbe15b28d28cf52 = 202;\nconst $d5b33d7c30034067$export$947829af9f2c17f6 = 203;\nconst $d5b33d7c30034067$export$d5773124e86cf28c = 204;\nconst $d5b33d7c30034067$export$11d468cc7f19e971 = 205;\nconst $d5b33d7c30034067$export$a78aed1ca2a87192 = 206;\nconst $d5b33d7c30034067$export$5d0fe17fd8773bac = 207;\nconst $d5b33d7c30034067$export$ef5f2dd8ffac5574 = 208;\nconst $d5b33d7c30034067$export$56b85b2686ab16 = 209;\nconst $d5b33d7c30034067$export$c05e2a1fc8609506 = 210;\nconst $d5b33d7c30034067$export$69025ce147cee220 = 0;\nconst $d5b33d7c30034067$export$7182eb52ea3b3f04 = 1;\nconst $d5b33d7c30034067$export$eedccec66ab7ebe = 2;\nconst $d5b33d7c30034067$export$296f78a0b892f81a = 3;\nconst $d5b33d7c30034067$export$a60d398fc7b7590e = 4;\nconst $d5b33d7c30034067$export$7d7234c1240a1fc4 = 5;\nconst $d5b33d7c30034067$export$c5e2c52991f30937 = 6;\nconst $d5b33d7c30034067$export$2f843afa843d8916 = 7;\nconst $d5b33d7c30034067$export$e50ac29801f1774d = 0;\nconst $d5b33d7c30034067$export$9f9d94f963c85479 = 1;\nconst $d5b33d7c30034067$export$e641dc52bc3494aa = 2;\nconst $d5b33d7c30034067$export$9fcb6b4294603b2 = 0;\nconst $d5b33d7c30034067$export$98f52c2a46c598ca = 1;\nconst $d5b33d7c30034067$export$74b25e54b3bcd548 = 2;\nconst $d5b33d7c30034067$export$932b3dd283d4a366 = 3;\nconst $d5b33d7c30034067$export$a0d98fe6d7e4af64 = 4;\nconst $d5b33d7c30034067$export$2c7b09c1e9abfb5e = 5;\nconst $d5b33d7c30034067$export$1beec6768cbb3d2d = 300;\nconst $d5b33d7c30034067$export$8759762a6477f2c4 = 301;\nconst $d5b33d7c30034067$export$dc59f8aed047f61d = 302;\nconst $d5b33d7c30034067$export$d64030b316d3b087 = 303;\nconst $d5b33d7c30034067$export$ee99d97d46898098 = 304;\nconst $d5b33d7c30034067$export$dbf3e70ff37af79 = 306;\nconst $d5b33d7c30034067$export$533346c8e8dac0f5 = 1000;\nconst $d5b33d7c30034067$export$9d9334239a5a5e06 = 1001;\nconst $d5b33d7c30034067$export$c7e7c00b14f51a4f = 1002;\nconst $d5b33d7c30034067$export$727aa5ec3fe39bf0 = 1003;\nconst $d5b33d7c30034067$export$d129e38cf6feaa8c = 1004;\nconst $d5b33d7c30034067$export$14a4936464a36496 = 1004;\nconst $d5b33d7c30034067$export$d2327c1afe5bfdf2 = 1005;\nconst $d5b33d7c30034067$export$cbc5b7f5647595d8 = 1005;\nconst $d5b33d7c30034067$export$8a72f490b25c56c8 = 1006;\nconst $d5b33d7c30034067$export$19a719f377145a13 = 1007;\nconst $d5b33d7c30034067$export$dbe96bee3fe9dbf0 = 1007;\nconst $d5b33d7c30034067$export$5d8599b6a933fb1b = 1008;\nconst $d5b33d7c30034067$export$90d80f1e3506775f = 1008;\nconst $d5b33d7c30034067$export$2e8ce08d3f6f5e10 = 1009;\nconst $d5b33d7c30034067$export$545fce0311a9796a = 1010;\nconst $d5b33d7c30034067$export$88572337f312435f = 1011;\nconst $d5b33d7c30034067$export$c63dc51868b06a9d = 1012;\nconst $d5b33d7c30034067$export$5c612977753abe2 = 1013;\nconst $d5b33d7c30034067$export$c3c7fc4518ebba96 = 1014;\nconst $d5b33d7c30034067$export$f6d331659b644596 = 1015;\nconst $d5b33d7c30034067$export$2697304443f382bc = 1016;\nconst $d5b33d7c30034067$export$b3969b01faf587f2 = 1017;\nconst $d5b33d7c30034067$export$18886f8ae33e90de = 1018;\nconst $d5b33d7c30034067$export$6c8ea339bfab1301 = 1020;\nconst $d5b33d7c30034067$export$988473390501ed4b = 1021;\nconst $d5b33d7c30034067$export$3f8bb04b555a363c = 1023;\nconst $d5b33d7c30034067$export$cc09ccbf6d1ed449 = 1024;\nconst $d5b33d7c30034067$export$9053a81c4a69c289 = 1025;\nconst $d5b33d7c30034067$export$c1b6b5136be58045 = 1026;\nconst $d5b33d7c30034067$export$1e113ac2d0905829 = 1027;\nconst $d5b33d7c30034067$export$4e041a7967d15c4b = 1028;\nconst $d5b33d7c30034067$export$aa92e870a709d190 = 1029;\nconst $d5b33d7c30034067$export$6cdf0b461c7ce8a0 = 1030;\nconst $d5b33d7c30034067$export$1ba1c45f9f77d4d7 = 1031;\nconst $d5b33d7c30034067$export$c200e7d26f592f21 = 1033;\nconst $d5b33d7c30034067$export$21d1799c6d552fc0 = 33776;\nconst $d5b33d7c30034067$export$afa304c3e981b668 = 33777;\nconst $d5b33d7c30034067$export$d2a1a68024a3e56c = 33778;\nconst $d5b33d7c30034067$export$9a79c424327dacf9 = 33779;\nconst $d5b33d7c30034067$export$19ada9bbb1af3573 = 35840;\nconst $d5b33d7c30034067$export$d0f0355bb3d948e4 = 35841;\nconst $d5b33d7c30034067$export$b82296714358084c = 35842;\nconst $d5b33d7c30034067$export$b71692456c47b6c3 = 35843;\nconst $d5b33d7c30034067$export$6ab91af2d757aee7 = 36196;\nconst $d5b33d7c30034067$export$7800993ef8106a6a = 37492;\nconst $d5b33d7c30034067$export$23ed8300a860e7d8 = 37496;\nconst $d5b33d7c30034067$export$dc5570b4a2b92d48 = 37808;\nconst $d5b33d7c30034067$export$68880cd325f8b2fb = 37809;\nconst $d5b33d7c30034067$export$7d2c0be323373d95 = 37810;\nconst $d5b33d7c30034067$export$22b52da301fc3a3e = 37811;\nconst $d5b33d7c30034067$export$c009e2cb4a66485e = 37812;\nconst $d5b33d7c30034067$export$118fff5afa255b63 = 37813;\nconst $d5b33d7c30034067$export$120713c829ae0667 = 37814;\nconst $d5b33d7c30034067$export$c79eeabbf53313e9 = 37815;\nconst $d5b33d7c30034067$export$443cf6567cdd6424 = 37816;\nconst $d5b33d7c30034067$export$6573984fc9840780 = 37817;\nconst $d5b33d7c30034067$export$e7aee563f30091de = 37818;\nconst $d5b33d7c30034067$export$2eb8634622ddeab7 = 37819;\nconst $d5b33d7c30034067$export$202b1ce7b5d25742 = 37820;\nconst $d5b33d7c30034067$export$18ab77abd087e467 = 37821;\nconst $d5b33d7c30034067$export$ce40b115e188bc81 = 36492;\nconst $d5b33d7c30034067$export$b1688df4c4c21670 = 36283;\nconst $d5b33d7c30034067$export$fc15e5d8261eed58 = 36284;\nconst $d5b33d7c30034067$export$d220f6ade8463a0f = 36285;\nconst $d5b33d7c30034067$export$768646d09dc1b6ef = 36286;\nconst $d5b33d7c30034067$export$d62fdc9d1b1cccad = 2200;\nconst $d5b33d7c30034067$export$dfaf4422ce096e29 = 2201;\nconst $d5b33d7c30034067$export$f8f6f2041b78e210 = 2202;\nconst $d5b33d7c30034067$export$995b32462a65e855 = 2300;\nconst $d5b33d7c30034067$export$30fac1aace31cf4d = 2301;\nconst $d5b33d7c30034067$export$198b11ff4c72bb30 = 2302;\nconst $d5b33d7c30034067$export$7f795934b84ab523 = 2400;\nconst $d5b33d7c30034067$export$24a4ccb5099273b5 = 2401;\nconst $d5b33d7c30034067$export$8e8c3ecdcd8e1fee = 2402;\nconst $d5b33d7c30034067$export$bcfbbdcf8de7f8cd = 2500;\nconst $d5b33d7c30034067$export$d875e029ef558d3 = 2501;\nconst $d5b33d7c30034067$export$4c28c87c2dc84758 = 0;\nconst $d5b33d7c30034067$export$b23a071aa286eb29 = 1;\nconst $d5b33d7c30034067$export$f0d8293634f88842 = 2;\n/** @deprecated Use LinearSRGBColorSpace or NoColorSpace in three.js r152+. */ const $d5b33d7c30034067$export$7207336e4151a112 = 3000;\n/** @deprecated Use SRGBColorSpace in three.js r152+. */ const $d5b33d7c30034067$export$f32388edbb32674 = 3001;\nconst $d5b33d7c30034067$export$deeb383078690b50 = 3200;\nconst $d5b33d7c30034067$export$8f910f4c4f73df11 = 3201;\nconst $d5b33d7c30034067$export$2852a58ebdac27b8 = 0;\nconst $d5b33d7c30034067$export$9990ad26f9db5b2c = 1;\n// Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available.\nconst $d5b33d7c30034067$export$bfcb490c2dd3db51 = \"\";\nconst $d5b33d7c30034067$export$561f394b24edfcaa = \"srgb\";\nconst $d5b33d7c30034067$export$42429b3acfb233a4 = \"srgb-linear\";\nconst $d5b33d7c30034067$export$626af19ae879bdf6 = \"display-p3\";\nconst $d5b33d7c30034067$export$69433f11f42d5527 = 0;\nconst $d5b33d7c30034067$export$9f542ae4b5baca34 = 7680;\nconst $d5b33d7c30034067$export$8a4f28336ef203d3 = 7681;\nconst $d5b33d7c30034067$export$2928c0231297c036 = 7682;\nconst $d5b33d7c30034067$export$c0e9611c8a15f9a8 = 7683;\nconst $d5b33d7c30034067$export$9c2c08927385dcc4 = 34055;\nconst $d5b33d7c30034067$export$7c74ea00fa1315e6 = 34056;\nconst $d5b33d7c30034067$export$22e2e5726612443 = 5386;\nconst $d5b33d7c30034067$export$1343870698229224 = 512;\nconst $d5b33d7c30034067$export$8e1d8ed281997fa6 = 513;\nconst $d5b33d7c30034067$export$55648a1cde8329a7 = 514;\nconst $d5b33d7c30034067$export$2dff107857e6aca2 = 515;\nconst $d5b33d7c30034067$export$6f93765ab2f451a2 = 516;\nconst $d5b33d7c30034067$export$6f3fb2d2440f2b76 = 517;\nconst $d5b33d7c30034067$export$4119cf7b4c98fd5a = 518;\nconst $d5b33d7c30034067$export$14cf96713ddd97a8 = 519;\nconst $d5b33d7c30034067$export$d9e2d19a747baaab = 512;\nconst $d5b33d7c30034067$export$36bcf49c713b3eb7 = 513;\nconst $d5b33d7c30034067$export$66f28d946fc6a0d5 = 514;\nconst $d5b33d7c30034067$export$64eea11eb407ddf1 = 515;\nconst $d5b33d7c30034067$export$155af022118f3a38 = 516;\nconst $d5b33d7c30034067$export$67ab95dde6bed156 = 517;\nconst $d5b33d7c30034067$export$1cdcb70d53d65f61 = 518;\nconst $d5b33d7c30034067$export$187b73a3e352c145 = 519;\nconst $d5b33d7c30034067$export$763e8360f4d7f77d = 35044;\nconst $d5b33d7c30034067$export$8505d14ac8546ca = 35048;\nconst $d5b33d7c30034067$export$721e63549e51d81e = 35040;\nconst $d5b33d7c30034067$export$415731dc4f48e299 = 35045;\nconst $d5b33d7c30034067$export$9e809946455f13bc = 35049;\nconst $d5b33d7c30034067$export$2ed9499a35b5f832 = 35041;\nconst $d5b33d7c30034067$export$32ab2503ea19469a = 35046;\nconst $d5b33d7c30034067$export$ab4022c2c3f86315 = 35050;\nconst $d5b33d7c30034067$export$ba7f1db36a76a970 = 35042;\nconst $d5b33d7c30034067$export$43600cc67fabd9f = \"100\";\nconst $d5b33d7c30034067$export$f63012db5506e7dd = \"300 es\";\nconst $d5b33d7c30034067$export$ca1dce8b5e1de74d = 1035; // fallback for WebGL 1\nconst $d5b33d7c30034067$export$5a0e9190d10875d3 = 2000;\nconst $d5b33d7c30034067$export$cc83beedcb9be9ac = 2001;\n/**\n * https://github.com/mrdoob/eventdispatcher.js/\n */ class $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n addEventListener(type, listener) {\n if (this._listeners === undefined) this._listeners = {};\n const listeners = this._listeners;\n if (listeners[type] === undefined) listeners[type] = [];\n if (listeners[type].indexOf(listener) === -1) listeners[type].push(listener);\n }\n hasEventListener(type, listener) {\n if (this._listeners === undefined) return false;\n const listeners = this._listeners;\n return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;\n }\n removeEventListener(type, listener) {\n if (this._listeners === undefined) return;\n const listeners = this._listeners;\n const listenerArray = listeners[type];\n if (listenerArray !== undefined) {\n const index = listenerArray.indexOf(listener);\n if (index !== -1) listenerArray.splice(index, 1);\n }\n }\n dispatchEvent(event) {\n if (this._listeners === undefined) return;\n const listeners = this._listeners;\n const listenerArray = listeners[event.type];\n if (listenerArray !== undefined) {\n event.target = this;\n // Make a copy, in case listeners are removed while iterating.\n const array = listenerArray.slice(0);\n for(let i = 0, l = array.length; i < l; i++)array[i].call(this, event);\n event.target = null;\n }\n }\n}\nconst $d5b33d7c30034067$var$_lut = [\n \"00\",\n \"01\",\n \"02\",\n \"03\",\n \"04\",\n \"05\",\n \"06\",\n \"07\",\n \"08\",\n \"09\",\n \"0a\",\n \"0b\",\n \"0c\",\n \"0d\",\n \"0e\",\n \"0f\",\n \"10\",\n \"11\",\n \"12\",\n \"13\",\n \"14\",\n \"15\",\n \"16\",\n \"17\",\n \"18\",\n \"19\",\n \"1a\",\n \"1b\",\n \"1c\",\n \"1d\",\n \"1e\",\n \"1f\",\n \"20\",\n \"21\",\n \"22\",\n \"23\",\n \"24\",\n \"25\",\n \"26\",\n \"27\",\n \"28\",\n \"29\",\n \"2a\",\n \"2b\",\n \"2c\",\n \"2d\",\n \"2e\",\n \"2f\",\n \"30\",\n \"31\",\n \"32\",\n \"33\",\n \"34\",\n \"35\",\n \"36\",\n \"37\",\n \"38\",\n \"39\",\n \"3a\",\n \"3b\",\n \"3c\",\n \"3d\",\n \"3e\",\n \"3f\",\n \"40\",\n \"41\",\n \"42\",\n \"43\",\n \"44\",\n \"45\",\n \"46\",\n \"47\",\n \"48\",\n \"49\",\n \"4a\",\n \"4b\",\n \"4c\",\n \"4d\",\n \"4e\",\n \"4f\",\n \"50\",\n \"51\",\n \"52\",\n \"53\",\n \"54\",\n \"55\",\n \"56\",\n \"57\",\n \"58\",\n \"59\",\n \"5a\",\n \"5b\",\n \"5c\",\n \"5d\",\n \"5e\",\n \"5f\",\n \"60\",\n \"61\",\n \"62\",\n \"63\",\n \"64\",\n \"65\",\n \"66\",\n \"67\",\n \"68\",\n \"69\",\n \"6a\",\n \"6b\",\n \"6c\",\n \"6d\",\n \"6e\",\n \"6f\",\n \"70\",\n \"71\",\n \"72\",\n \"73\",\n \"74\",\n \"75\",\n \"76\",\n \"77\",\n \"78\",\n \"79\",\n \"7a\",\n \"7b\",\n \"7c\",\n \"7d\",\n \"7e\",\n \"7f\",\n \"80\",\n \"81\",\n \"82\",\n \"83\",\n \"84\",\n \"85\",\n \"86\",\n \"87\",\n \"88\",\n \"89\",\n \"8a\",\n \"8b\",\n \"8c\",\n \"8d\",\n \"8e\",\n \"8f\",\n \"90\",\n \"91\",\n \"92\",\n \"93\",\n \"94\",\n \"95\",\n \"96\",\n \"97\",\n \"98\",\n \"99\",\n \"9a\",\n \"9b\",\n \"9c\",\n \"9d\",\n \"9e\",\n \"9f\",\n \"a0\",\n \"a1\",\n \"a2\",\n \"a3\",\n \"a4\",\n \"a5\",\n \"a6\",\n \"a7\",\n \"a8\",\n \"a9\",\n \"aa\",\n \"ab\",\n \"ac\",\n \"ad\",\n \"ae\",\n \"af\",\n \"b0\",\n \"b1\",\n \"b2\",\n \"b3\",\n \"b4\",\n \"b5\",\n \"b6\",\n \"b7\",\n \"b8\",\n \"b9\",\n \"ba\",\n \"bb\",\n \"bc\",\n \"bd\",\n \"be\",\n \"bf\",\n \"c0\",\n \"c1\",\n \"c2\",\n \"c3\",\n \"c4\",\n \"c5\",\n \"c6\",\n \"c7\",\n \"c8\",\n \"c9\",\n \"ca\",\n \"cb\",\n \"cc\",\n \"cd\",\n \"ce\",\n \"cf\",\n \"d0\",\n \"d1\",\n \"d2\",\n \"d3\",\n \"d4\",\n \"d5\",\n \"d6\",\n \"d7\",\n \"d8\",\n \"d9\",\n \"da\",\n \"db\",\n \"dc\",\n \"dd\",\n \"de\",\n \"df\",\n \"e0\",\n \"e1\",\n \"e2\",\n \"e3\",\n \"e4\",\n \"e5\",\n \"e6\",\n \"e7\",\n \"e8\",\n \"e9\",\n \"ea\",\n \"eb\",\n \"ec\",\n \"ed\",\n \"ee\",\n \"ef\",\n \"f0\",\n \"f1\",\n \"f2\",\n \"f3\",\n \"f4\",\n \"f5\",\n \"f6\",\n \"f7\",\n \"f8\",\n \"f9\",\n \"fa\",\n \"fb\",\n \"fc\",\n \"fd\",\n \"fe\",\n \"ff\"\n];\nlet $d5b33d7c30034067$var$_seed = 1234567;\nconst $d5b33d7c30034067$var$DEG2RAD = Math.PI / 180;\nconst $d5b33d7c30034067$var$RAD2DEG = 180 / Math.PI;\n// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\nfunction $d5b33d7c30034067$var$generateUUID() {\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n const uuid = $d5b33d7c30034067$var$_lut[d0 & 0xff] + $d5b33d7c30034067$var$_lut[d0 >> 8 & 0xff] + $d5b33d7c30034067$var$_lut[d0 >> 16 & 0xff] + $d5b33d7c30034067$var$_lut[d0 >> 24 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d1 & 0xff] + $d5b33d7c30034067$var$_lut[d1 >> 8 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d1 >> 16 & 0x0f | 0x40] + $d5b33d7c30034067$var$_lut[d1 >> 24 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d2 & 0x3f | 0x80] + $d5b33d7c30034067$var$_lut[d2 >> 8 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d2 >> 16 & 0xff] + $d5b33d7c30034067$var$_lut[d2 >> 24 & 0xff] + $d5b33d7c30034067$var$_lut[d3 & 0xff] + $d5b33d7c30034067$var$_lut[d3 >> 8 & 0xff] + $d5b33d7c30034067$var$_lut[d3 >> 16 & 0xff] + $d5b33d7c30034067$var$_lut[d3 >> 24 & 0xff];\n // .toLowerCase() here flattens concatenated strings to save heap memory space.\n return uuid.toLowerCase();\n}\nfunction $d5b33d7c30034067$var$clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n// compute euclidean modulo of m % n\n// https://en.wikipedia.org/wiki/Modulo_operation\nfunction $d5b33d7c30034067$var$euclideanModulo(n, m) {\n return (n % m + m) % m;\n}\n// Linear mapping from range to range \nfunction $d5b33d7c30034067$var$mapLinear(x, a1, a2, b1, b2) {\n return b1 + (x - a1) * (b2 - b1) / (a2 - a1);\n}\n// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/\nfunction $d5b33d7c30034067$var$inverseLerp(x, y, value) {\n if (x !== y) return (value - x) / (y - x);\n else return 0;\n}\n// https://en.wikipedia.org/wiki/Linear_interpolation\nfunction $d5b33d7c30034067$var$lerp(x, y, t) {\n return (1 - t) * x + t * y;\n}\n// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\nfunction $d5b33d7c30034067$var$damp(x, y, lambda, dt) {\n return $d5b33d7c30034067$var$lerp(x, y, 1 - Math.exp(-lambda * dt));\n}\n// https://www.desmos.com/calculator/vcsjnyz7x4\nfunction $d5b33d7c30034067$var$pingpong(x, length = 1) {\n return length - Math.abs($d5b33d7c30034067$var$euclideanModulo(x, length * 2) - length);\n}\n// http://en.wikipedia.org/wiki/Smoothstep\nfunction $d5b33d7c30034067$var$smoothstep(x, min, max) {\n if (x <= min) return 0;\n if (x >= max) return 1;\n x = (x - min) / (max - min);\n return x * x * (3 - 2 * x);\n}\nfunction $d5b33d7c30034067$var$smootherstep(x, min, max) {\n if (x <= min) return 0;\n if (x >= max) return 1;\n x = (x - min) / (max - min);\n return x * x * x * (x * (x * 6 - 15) + 10);\n}\n// Random integer from interval\nfunction $d5b33d7c30034067$var$randInt(low, high) {\n return low + Math.floor(Math.random() * (high - low + 1));\n}\n// Random float from interval\nfunction $d5b33d7c30034067$var$randFloat(low, high) {\n return low + Math.random() * (high - low);\n}\n// Random float from <-range/2, range/2> interval\nfunction $d5b33d7c30034067$var$randFloatSpread(range) {\n return range * (0.5 - Math.random());\n}\n// Deterministic pseudo-random float in the interval [ 0, 1 ]\nfunction $d5b33d7c30034067$var$seededRandom(s) {\n if (s !== undefined) $d5b33d7c30034067$var$_seed = s;\n // Mulberry32 generator\n let t = $d5b33d7c30034067$var$_seed += 0x6D2B79F5;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n}\nfunction $d5b33d7c30034067$var$degToRad(degrees) {\n return degrees * $d5b33d7c30034067$var$DEG2RAD;\n}\nfunction $d5b33d7c30034067$var$radToDeg(radians) {\n return radians * $d5b33d7c30034067$var$RAD2DEG;\n}\nfunction $d5b33d7c30034067$var$isPowerOfTwo(value) {\n return (value & value - 1) === 0 && value !== 0;\n}\nfunction $d5b33d7c30034067$var$ceilPowerOfTwo(value) {\n return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n}\nfunction $d5b33d7c30034067$var$floorPowerOfTwo(value) {\n return Math.pow(2, Math.floor(Math.log(value) / Math.LN2));\n}\nfunction $d5b33d7c30034067$var$setQuaternionFromProperEuler(q, a, b, c, order) {\n // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n // rotations are applied to the axes in the order specified by 'order'\n // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n // angles are in radians\n const cos = Math.cos;\n const sin = Math.sin;\n const c2 = cos(b / 2);\n const s2 = sin(b / 2);\n const c13 = cos((a + c) / 2);\n const s13 = sin((a + c) / 2);\n const c1_3 = cos((a - c) / 2);\n const s1_3 = sin((a - c) / 2);\n const c3_1 = cos((c - a) / 2);\n const s3_1 = sin((c - a) / 2);\n switch(order){\n case \"XYX\":\n q.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13);\n break;\n case \"YZY\":\n q.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13);\n break;\n case \"ZXZ\":\n q.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13);\n break;\n case \"XZX\":\n q.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13);\n break;\n case \"YXY\":\n q.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13);\n break;\n case \"ZYZ\":\n q.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13);\n break;\n default:\n console.warn(\"THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: \" + order);\n }\n}\nfunction $d5b33d7c30034067$var$denormalize(value, array) {\n switch(array.constructor){\n case Float32Array:\n return value;\n case Uint32Array:\n return value / 4294967295.0;\n case Uint16Array:\n return value / 65535.0;\n case Uint8Array:\n return value / 255.0;\n case Int32Array:\n return Math.max(value / 2147483647.0, -1);\n case Int16Array:\n return Math.max(value / 32767.0, -1);\n case Int8Array:\n return Math.max(value / 127.0, -1);\n default:\n throw new Error(\"Invalid component type.\");\n }\n}\nfunction $d5b33d7c30034067$var$normalize(value, array) {\n switch(array.constructor){\n case Float32Array:\n return value;\n case Uint32Array:\n return Math.round(value * 4294967295.0);\n case Uint16Array:\n return Math.round(value * 65535.0);\n case Uint8Array:\n return Math.round(value * 255.0);\n case Int32Array:\n return Math.round(value * 2147483647.0);\n case Int16Array:\n return Math.round(value * 32767.0);\n case Int8Array:\n return Math.round(value * 127.0);\n default:\n throw new Error(\"Invalid component type.\");\n }\n}\nconst $d5b33d7c30034067$export$6a7ef315a0d1ef07 = {\n DEG2RAD: $d5b33d7c30034067$var$DEG2RAD,\n RAD2DEG: $d5b33d7c30034067$var$RAD2DEG,\n generateUUID: $d5b33d7c30034067$var$generateUUID,\n clamp: $d5b33d7c30034067$var$clamp,\n euclideanModulo: $d5b33d7c30034067$var$euclideanModulo,\n mapLinear: $d5b33d7c30034067$var$mapLinear,\n inverseLerp: $d5b33d7c30034067$var$inverseLerp,\n lerp: $d5b33d7c30034067$var$lerp,\n damp: $d5b33d7c30034067$var$damp,\n pingpong: $d5b33d7c30034067$var$pingpong,\n smoothstep: $d5b33d7c30034067$var$smoothstep,\n smootherstep: $d5b33d7c30034067$var$smootherstep,\n randInt: $d5b33d7c30034067$var$randInt,\n randFloat: $d5b33d7c30034067$var$randFloat,\n randFloatSpread: $d5b33d7c30034067$var$randFloatSpread,\n seededRandom: $d5b33d7c30034067$var$seededRandom,\n degToRad: $d5b33d7c30034067$var$degToRad,\n radToDeg: $d5b33d7c30034067$var$radToDeg,\n isPowerOfTwo: $d5b33d7c30034067$var$isPowerOfTwo,\n ceilPowerOfTwo: $d5b33d7c30034067$var$ceilPowerOfTwo,\n floorPowerOfTwo: $d5b33d7c30034067$var$floorPowerOfTwo,\n setQuaternionFromProperEuler: $d5b33d7c30034067$var$setQuaternionFromProperEuler,\n normalize: $d5b33d7c30034067$var$normalize,\n denormalize: $d5b33d7c30034067$var$denormalize\n};\nclass $d5b33d7c30034067$export$c977b3e384af9ae1 {\n constructor(x = 0, y = 0){\n $d5b33d7c30034067$export$c977b3e384af9ae1.prototype.isVector2 = true;\n this.x = x;\n this.y = y;\n }\n get width() {\n return this.x;\n }\n set width(value) {\n this.x = value;\n }\n get height() {\n return this.y;\n }\n set height(value) {\n this.y = value;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n setScalar(scalar) {\n this.x = scalar;\n this.y = scalar;\n return this;\n }\n setX(x) {\n this.x = x;\n return this;\n }\n setY(y) {\n this.y = y;\n return this;\n }\n setComponent(index, value) {\n switch(index){\n case 0:\n this.x = value;\n break;\n case 1:\n this.y = value;\n break;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n return this;\n }\n getComponent(index) {\n switch(index){\n case 0:\n return this.x;\n case 1:\n return this.y;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n }\n clone() {\n return new this.constructor(this.x, this.y);\n }\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n return this;\n }\n addScalar(s) {\n this.x += s;\n this.y += s;\n return this;\n }\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n return this;\n }\n addScaledVector(v, s) {\n this.x += v.x * s;\n this.y += v.y * s;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n return this;\n }\n subScalar(s) {\n this.x -= s;\n this.y -= s;\n return this;\n }\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n return this;\n }\n multiply(v) {\n this.x *= v.x;\n this.y *= v.y;\n return this;\n }\n multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n return this;\n }\n divide(v) {\n this.x /= v.x;\n this.y /= v.y;\n return this;\n }\n divideScalar(scalar) {\n return this.multiplyScalar(1 / scalar);\n }\n applyMatrix3(m) {\n const x = this.x, y = this.y;\n const e = m.elements;\n this.x = e[0] * x + e[3] * y + e[6];\n this.y = e[1] * x + e[4] * y + e[7];\n return this;\n }\n min(v) {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n return this;\n }\n max(v) {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n return this;\n }\n clamp(min, max) {\n // assumes min < max, componentwise\n this.x = Math.max(min.x, Math.min(max.x, this.x));\n this.y = Math.max(min.y, Math.min(max.y, this.y));\n return this;\n }\n clampScalar(minVal, maxVal) {\n this.x = Math.max(minVal, Math.min(maxVal, this.x));\n this.y = Math.max(minVal, Math.min(maxVal, this.y));\n return this;\n }\n clampLength(min, max) {\n const length = this.length();\n return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n }\n floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n return this;\n }\n ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n return this;\n }\n round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n roundToZero() {\n this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n return this;\n }\n negate() {\n this.x = -this.x;\n this.y = -this.y;\n return this;\n }\n dot(v) {\n return this.x * v.x + this.y * v.y;\n }\n cross(v) {\n return this.x * v.y - this.y * v.x;\n }\n lengthSq() {\n return this.x * this.x + this.y * this.y;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n manhattanLength() {\n return Math.abs(this.x) + Math.abs(this.y);\n }\n normalize() {\n return this.divideScalar(this.length() || 1);\n }\n angle() {\n // computes the angle in radians with respect to the positive x-axis\n const angle = Math.atan2(-this.y, -this.x) + Math.PI;\n return angle;\n }\n angleTo(v) {\n const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());\n if (denominator === 0) return Math.PI / 2;\n const theta = this.dot(v) / denominator;\n // clamp, to handle numerical problems\n return Math.acos($d5b33d7c30034067$var$clamp(theta, -1, 1));\n }\n distanceTo(v) {\n return Math.sqrt(this.distanceToSquared(v));\n }\n distanceToSquared(v) {\n const dx = this.x - v.x, dy = this.y - v.y;\n return dx * dx + dy * dy;\n }\n manhattanDistanceTo(v) {\n return Math.abs(this.x - v.x) + Math.abs(this.y - v.y);\n }\n setLength(length) {\n return this.normalize().multiplyScalar(length);\n }\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n return this;\n }\n lerpVectors(v1, v2, alpha) {\n this.x = v1.x + (v2.x - v1.x) * alpha;\n this.y = v1.y + (v2.y - v1.y) * alpha;\n return this;\n }\n equals(v) {\n return v.x === this.x && v.y === this.y;\n }\n fromArray(array, offset = 0) {\n this.x = array[offset];\n this.y = array[offset + 1];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.x;\n array[offset + 1] = this.y;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.x = attribute.getX(index);\n this.y = attribute.getY(index);\n return this;\n }\n rotateAround(center, angle) {\n const c = Math.cos(angle), s = Math.sin(angle);\n const x = this.x - center.x;\n const y = this.y - center.y;\n this.x = x * c - y * s + center.x;\n this.y = x * s + y * c + center.y;\n return this;\n }\n random() {\n this.x = Math.random();\n this.y = Math.random();\n return this;\n }\n *[Symbol.iterator]() {\n yield this.x;\n yield this.y;\n }\n}\nclass $d5b33d7c30034067$export$8ff26dafa08918 {\n constructor(n11, n12, n13, n21, n22, n23, n31, n32, n33){\n $d5b33d7c30034067$export$8ff26dafa08918.prototype.isMatrix3 = true;\n this.elements = [\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1\n ];\n if (n11 !== undefined) this.set(n11, n12, n13, n21, n22, n23, n31, n32, n33);\n }\n set(n11, n12, n13, n21, n22, n23, n31, n32, n33) {\n const te = this.elements;\n te[0] = n11;\n te[1] = n21;\n te[2] = n31;\n te[3] = n12;\n te[4] = n22;\n te[5] = n32;\n te[6] = n13;\n te[7] = n23;\n te[8] = n33;\n return this;\n }\n identity() {\n this.set(1, 0, 0, 0, 1, 0, 0, 0, 1);\n return this;\n }\n copy(m) {\n const te = this.elements;\n const me = m.elements;\n te[0] = me[0];\n te[1] = me[1];\n te[2] = me[2];\n te[3] = me[3];\n te[4] = me[4];\n te[5] = me[5];\n te[6] = me[6];\n te[7] = me[7];\n te[8] = me[8];\n return this;\n }\n extractBasis(xAxis, yAxis, zAxis) {\n xAxis.setFromMatrix3Column(this, 0);\n yAxis.setFromMatrix3Column(this, 1);\n zAxis.setFromMatrix3Column(this, 2);\n return this;\n }\n setFromMatrix4(m) {\n const me = m.elements;\n this.set(me[0], me[4], me[8], me[1], me[5], me[9], me[2], me[6], me[10]);\n return this;\n }\n multiply(m) {\n return this.multiplyMatrices(this, m);\n }\n premultiply(m) {\n return this.multiplyMatrices(m, this);\n }\n multiplyMatrices(a, b) {\n const ae = a.elements;\n const be = b.elements;\n const te = this.elements;\n const a11 = ae[0], a12 = ae[3], a13 = ae[6];\n const a21 = ae[1], a22 = ae[4], a23 = ae[7];\n const a31 = ae[2], a32 = ae[5], a33 = ae[8];\n const b11 = be[0], b12 = be[3], b13 = be[6];\n const b21 = be[1], b22 = be[4], b23 = be[7];\n const b31 = be[2], b32 = be[5], b33 = be[8];\n te[0] = a11 * b11 + a12 * b21 + a13 * b31;\n te[3] = a11 * b12 + a12 * b22 + a13 * b32;\n te[6] = a11 * b13 + a12 * b23 + a13 * b33;\n te[1] = a21 * b11 + a22 * b21 + a23 * b31;\n te[4] = a21 * b12 + a22 * b22 + a23 * b32;\n te[7] = a21 * b13 + a22 * b23 + a23 * b33;\n te[2] = a31 * b11 + a32 * b21 + a33 * b31;\n te[5] = a31 * b12 + a32 * b22 + a33 * b32;\n te[8] = a31 * b13 + a32 * b23 + a33 * b33;\n return this;\n }\n multiplyScalar(s) {\n const te = this.elements;\n te[0] *= s;\n te[3] *= s;\n te[6] *= s;\n te[1] *= s;\n te[4] *= s;\n te[7] *= s;\n te[2] *= s;\n te[5] *= s;\n te[8] *= s;\n return this;\n }\n determinant() {\n const te = this.elements;\n const a = te[0], b = te[1], c = te[2], d = te[3], e = te[4], f = te[5], g = te[6], h = te[7], i = te[8];\n return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n }\n invert() {\n const te = this.elements, n11 = te[0], n21 = te[1], n31 = te[2], n12 = te[3], n22 = te[4], n32 = te[5], n13 = te[6], n23 = te[7], n33 = te[8], t11 = n33 * n22 - n32 * n23, t12 = n32 * n13 - n33 * n12, t13 = n23 * n12 - n22 * n13, det = n11 * t11 + n21 * t12 + n31 * t13;\n if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);\n const detInv = 1 / det;\n te[0] = t11 * detInv;\n te[1] = (n31 * n23 - n33 * n21) * detInv;\n te[2] = (n32 * n21 - n31 * n22) * detInv;\n te[3] = t12 * detInv;\n te[4] = (n33 * n11 - n31 * n13) * detInv;\n te[5] = (n31 * n12 - n32 * n11) * detInv;\n te[6] = t13 * detInv;\n te[7] = (n21 * n13 - n23 * n11) * detInv;\n te[8] = (n22 * n11 - n21 * n12) * detInv;\n return this;\n }\n transpose() {\n let tmp;\n const m = this.elements;\n tmp = m[1];\n m[1] = m[3];\n m[3] = tmp;\n tmp = m[2];\n m[2] = m[6];\n m[6] = tmp;\n tmp = m[5];\n m[5] = m[7];\n m[7] = tmp;\n return this;\n }\n getNormalMatrix(matrix4) {\n return this.setFromMatrix4(matrix4).invert().transpose();\n }\n transposeIntoArray(r) {\n const m = this.elements;\n r[0] = m[0];\n r[1] = m[3];\n r[2] = m[6];\n r[3] = m[1];\n r[4] = m[4];\n r[5] = m[7];\n r[6] = m[2];\n r[7] = m[5];\n r[8] = m[8];\n return this;\n }\n setUvTransform(tx, ty, sx, sy, rotation, cx, cy) {\n const c = Math.cos(rotation);\n const s = Math.sin(rotation);\n this.set(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c, -sy * (-s * cx + c * cy) + cy + ty, 0, 0, 1);\n return this;\n }\n //\n scale(sx, sy) {\n this.premultiply($d5b33d7c30034067$var$_m3.makeScale(sx, sy));\n return this;\n }\n rotate(theta) {\n this.premultiply($d5b33d7c30034067$var$_m3.makeRotation(-theta));\n return this;\n }\n translate(tx, ty) {\n this.premultiply($d5b33d7c30034067$var$_m3.makeTranslation(tx, ty));\n return this;\n }\n // for 2D Transforms\n makeTranslation(x, y) {\n if (x.isVector2) this.set(1, 0, x.x, 0, 1, x.y, 0, 0, 1);\n else this.set(1, 0, x, 0, 1, y, 0, 0, 1);\n return this;\n }\n makeRotation(theta) {\n // counterclockwise\n const c = Math.cos(theta);\n const s = Math.sin(theta);\n this.set(c, -s, 0, s, c, 0, 0, 0, 1);\n return this;\n }\n makeScale(x, y) {\n this.set(x, 0, 0, 0, y, 0, 0, 0, 1);\n return this;\n }\n //\n equals(matrix) {\n const te = this.elements;\n const me = matrix.elements;\n for(let i = 0; i < 9; i++){\n if (te[i] !== me[i]) return false;\n }\n return true;\n }\n fromArray(array, offset = 0) {\n for(let i = 0; i < 9; i++)this.elements[i] = array[i + offset];\n return this;\n }\n toArray(array = [], offset = 0) {\n const te = this.elements;\n array[offset] = te[0];\n array[offset + 1] = te[1];\n array[offset + 2] = te[2];\n array[offset + 3] = te[3];\n array[offset + 4] = te[4];\n array[offset + 5] = te[5];\n array[offset + 6] = te[6];\n array[offset + 7] = te[7];\n array[offset + 8] = te[8];\n return array;\n }\n clone() {\n return new this.constructor().fromArray(this.elements);\n }\n}\nconst $d5b33d7c30034067$var$_m3 = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918();\nfunction $d5b33d7c30034067$var$arrayNeedsUint32(array) {\n // assumes larger values usually on last\n for(let i = array.length - 1; i >= 0; --i){\n if (array[i] >= 65535) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565\n }\n return false;\n}\nconst $d5b33d7c30034067$var$TYPED_ARRAYS = {\n Int8Array: Int8Array,\n Uint8Array: Uint8Array,\n Uint8ClampedArray: Uint8ClampedArray,\n Int16Array: Int16Array,\n Uint16Array: Uint16Array,\n Int32Array: Int32Array,\n Uint32Array: Uint32Array,\n Float32Array: Float32Array,\n Float64Array: Float64Array\n};\nfunction $d5b33d7c30034067$var$getTypedArray(type, buffer) {\n return new $d5b33d7c30034067$var$TYPED_ARRAYS[type](buffer);\n}\nfunction $d5b33d7c30034067$var$createElementNS(name) {\n return document.createElementNS(\"http://www.w3.org/1999/xhtml\", name);\n}\nconst $d5b33d7c30034067$var$_cache = {};\nfunction $d5b33d7c30034067$var$warnOnce(message) {\n if (message in $d5b33d7c30034067$var$_cache) return;\n $d5b33d7c30034067$var$_cache[message] = true;\n console.warn(message);\n}\nfunction $d5b33d7c30034067$var$SRGBToLinear(c) {\n return c < 0.04045 ? c * 0.0773993808 : Math.pow(c * 0.9478672986 + 0.0521327014, 2.4);\n}\nfunction $d5b33d7c30034067$var$LinearToSRGB(c) {\n return c < 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 0.41666) - 0.055;\n}\n/**\n * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping\n * or clipping. Based on W3C specifications for sRGB and Display P3,\n * and ICC specifications for the D50 connection space. Values in/out\n * are _linear_ sRGB and _linear_ Display P3.\n *\n * Note that both sRGB and Display P3 use the sRGB transfer functions.\n *\n * Reference:\n * - http://www.russellcottrell.com/photo/matrixCalculator.htm\n */ const $d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918().fromArray([\n 0.8224621,\n 0.0331941,\n 0.0170827,\n 0.1775380,\n 0.9668058,\n 0.0723974,\n -0.0000001,\n 0.0000001,\n 0.9105199\n]);\nconst $d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918().fromArray([\n 1.2249401,\n -0.0420569,\n -0.0196376,\n -0.2249404,\n 1.0420571,\n -0.0786361,\n 0.0000001,\n 0.0000000,\n 1.0982735\n]);\nfunction $d5b33d7c30034067$var$DisplayP3ToLinearSRGB(color) {\n // Display P3 uses the sRGB transfer functions\n return color.convertSRGBToLinear().applyMatrix3($d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB);\n}\nfunction $d5b33d7c30034067$var$LinearSRGBToDisplayP3(color) {\n // Display P3 uses the sRGB transfer functions\n return color.applyMatrix3($d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3).convertLinearToSRGB();\n}\n// Conversions from to Linear-sRGB reference space.\nconst $d5b33d7c30034067$var$TO_LINEAR = {\n [$d5b33d7c30034067$export$42429b3acfb233a4]: (color)=>color,\n [$d5b33d7c30034067$export$561f394b24edfcaa]: (color)=>color.convertSRGBToLinear(),\n [$d5b33d7c30034067$export$626af19ae879bdf6]: $d5b33d7c30034067$var$DisplayP3ToLinearSRGB\n};\n// Conversions to from Linear-sRGB reference space.\nconst $d5b33d7c30034067$var$FROM_LINEAR = {\n [$d5b33d7c30034067$export$42429b3acfb233a4]: (color)=>color,\n [$d5b33d7c30034067$export$561f394b24edfcaa]: (color)=>color.convertLinearToSRGB(),\n [$d5b33d7c30034067$export$626af19ae879bdf6]: $d5b33d7c30034067$var$LinearSRGBToDisplayP3\n};\nconst $d5b33d7c30034067$export$5e6fd513f44698c = {\n enabled: true,\n get legacyMode () {\n console.warn(\"THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.\");\n return !this.enabled;\n },\n set legacyMode (legacyMode){\n console.warn(\"THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.\");\n this.enabled = !legacyMode;\n },\n get workingColorSpace () {\n return $d5b33d7c30034067$export$42429b3acfb233a4;\n },\n set workingColorSpace (colorSpace){\n console.warn(\"THREE.ColorManagement: .workingColorSpace is readonly.\");\n },\n convert: function(color, sourceColorSpace, targetColorSpace) {\n if (this.enabled === false || sourceColorSpace === targetColorSpace || !sourceColorSpace || !targetColorSpace) return color;\n const sourceToLinear = $d5b33d7c30034067$var$TO_LINEAR[sourceColorSpace];\n const targetFromLinear = $d5b33d7c30034067$var$FROM_LINEAR[targetColorSpace];\n if (sourceToLinear === undefined || targetFromLinear === undefined) throw new Error(`Unsupported color space conversion, \"${sourceColorSpace}\" to \"${targetColorSpace}\".`);\n return targetFromLinear(sourceToLinear(color));\n },\n fromWorkingColorSpace: function(color, targetColorSpace) {\n return this.convert(color, this.workingColorSpace, targetColorSpace);\n },\n toWorkingColorSpace: function(color, sourceColorSpace) {\n return this.convert(color, sourceColorSpace, this.workingColorSpace);\n }\n};\nlet $d5b33d7c30034067$var$_canvas;\nclass $d5b33d7c30034067$export$698882cf06df44aa {\n static getDataURL(image) {\n if (/^data:/i.test(image.src)) return image.src;\n if (typeof HTMLCanvasElement === \"undefined\") return image.src;\n let canvas;\n if (image instanceof HTMLCanvasElement) canvas = image;\n else {\n if ($d5b33d7c30034067$var$_canvas === undefined) $d5b33d7c30034067$var$_canvas = $d5b33d7c30034067$var$createElementNS(\"canvas\");\n $d5b33d7c30034067$var$_canvas.width = image.width;\n $d5b33d7c30034067$var$_canvas.height = image.height;\n const context = $d5b33d7c30034067$var$_canvas.getContext(\"2d\");\n if (image instanceof ImageData) context.putImageData(image, 0, 0);\n else context.drawImage(image, 0, 0, image.width, image.height);\n canvas = $d5b33d7c30034067$var$_canvas;\n }\n if (canvas.width > 2048 || canvas.height > 2048) {\n console.warn(\"THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons\", image);\n return canvas.toDataURL(\"image/jpeg\", 0.6);\n } else return canvas.toDataURL(\"image/png\");\n }\n static sRGBToLinear(image) {\n if (typeof HTMLImageElement !== \"undefined\" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== \"undefined\" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== \"undefined\" && image instanceof ImageBitmap) {\n const canvas = $d5b33d7c30034067$var$createElementNS(\"canvas\");\n canvas.width = image.width;\n canvas.height = image.height;\n const context = canvas.getContext(\"2d\");\n context.drawImage(image, 0, 0, image.width, image.height);\n const imageData = context.getImageData(0, 0, image.width, image.height);\n const data = imageData.data;\n for(let i = 0; i < data.length; i++)data[i] = $d5b33d7c30034067$var$SRGBToLinear(data[i] / 255) * 255;\n context.putImageData(imageData, 0, 0);\n return canvas;\n } else if (image.data) {\n const data = image.data.slice(0);\n for(let i = 0; i < data.length; i++)if (data instanceof Uint8Array || data instanceof Uint8ClampedArray) data[i] = Math.floor($d5b33d7c30034067$var$SRGBToLinear(data[i] / 255) * 255);\n else // assuming float\n data[i] = $d5b33d7c30034067$var$SRGBToLinear(data[i]);\n return {\n data: data,\n width: image.width,\n height: image.height\n };\n } else {\n console.warn(\"THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.\");\n return image;\n }\n }\n}\nlet $d5b33d7c30034067$var$sourceId = 0;\nclass $d5b33d7c30034067$export$1d2df86270c81ecb {\n constructor(data = null){\n this.isSource = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$sourceId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.data = data;\n this.version = 0;\n }\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n toJSON(meta) {\n const isRootObject = meta === undefined || typeof meta === \"string\";\n if (!isRootObject && meta.images[this.uuid] !== undefined) return meta.images[this.uuid];\n const output = {\n uuid: this.uuid,\n url: \"\"\n };\n const data = this.data;\n if (data !== null) {\n let url;\n if (Array.isArray(data)) {\n // cube texture\n url = [];\n for(let i = 0, l = data.length; i < l; i++)if (data[i].isDataTexture) url.push($d5b33d7c30034067$var$serializeImage(data[i].image));\n else url.push($d5b33d7c30034067$var$serializeImage(data[i]));\n } else // texture\n url = $d5b33d7c30034067$var$serializeImage(data);\n output.url = url;\n }\n if (!isRootObject) meta.images[this.uuid] = output;\n return output;\n }\n}\nfunction $d5b33d7c30034067$var$serializeImage(image) {\n if (typeof HTMLImageElement !== \"undefined\" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== \"undefined\" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== \"undefined\" && image instanceof ImageBitmap) // default images\n return $d5b33d7c30034067$export$698882cf06df44aa.getDataURL(image);\n else {\n if (image.data) // images of DataTexture\n return {\n data: Array.from(image.data),\n width: image.width,\n height: image.height,\n type: image.data.constructor.name\n };\n else {\n console.warn(\"THREE.Texture: Unable to serialize Texture.\");\n return {};\n }\n }\n}\nlet $d5b33d7c30034067$var$textureId = 0;\nclass $d5b33d7c30034067$export$5431306cf43de24a extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(image = $d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_IMAGE, mapping = $d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_MAPPING, wrapS = $d5b33d7c30034067$export$9d9334239a5a5e06, wrapT = $d5b33d7c30034067$export$9d9334239a5a5e06, magFilter = $d5b33d7c30034067$export$8a72f490b25c56c8, minFilter = $d5b33d7c30034067$export$5d8599b6a933fb1b, format = $d5b33d7c30034067$export$3f8bb04b555a363c, type = $d5b33d7c30034067$export$2e8ce08d3f6f5e10, anisotropy = $d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_ANISOTROPY, colorSpace1 = $d5b33d7c30034067$export$bfcb490c2dd3db51){\n super();\n this.isTexture = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$textureId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.source = new $d5b33d7c30034067$export$1d2df86270c81ecb(image);\n this.mipmaps = [];\n this.mapping = mapping;\n this.channel = 0;\n this.wrapS = wrapS;\n this.wrapT = wrapT;\n this.magFilter = magFilter;\n this.minFilter = minFilter;\n this.anisotropy = anisotropy;\n this.format = format;\n this.internalFormat = null;\n this.type = type;\n this.offset = new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0);\n this.repeat = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.center = new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0);\n this.rotation = 0;\n this.matrixAutoUpdate = true;\n this.matrix = new $d5b33d7c30034067$export$8ff26dafa08918();\n this.generateMipmaps = true;\n this.premultiplyAlpha = false;\n this.flipY = true;\n this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n if (typeof colorSpace1 === \"string\") this.colorSpace = colorSpace1;\n else {\n $d5b33d7c30034067$var$warnOnce(\"THREE.Texture: Property .encoding has been replaced by .colorSpace.\");\n this.colorSpace = colorSpace1 === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n this.userData = {};\n this.version = 0;\n this.onUpdate = null;\n this.isRenderTargetTexture = false; // indicates whether a texture belongs to a render target or not\n this.needsPMREMUpdate = false; // indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target textures)\n }\n get image() {\n return this.source.data;\n }\n set image(value = null) {\n this.source.data = value;\n }\n updateMatrix() {\n this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.name = source.name;\n this.source = source.source;\n this.mipmaps = source.mipmaps.slice(0);\n this.mapping = source.mapping;\n this.channel = source.channel;\n this.wrapS = source.wrapS;\n this.wrapT = source.wrapT;\n this.magFilter = source.magFilter;\n this.minFilter = source.minFilter;\n this.anisotropy = source.anisotropy;\n this.format = source.format;\n this.internalFormat = source.internalFormat;\n this.type = source.type;\n this.offset.copy(source.offset);\n this.repeat.copy(source.repeat);\n this.center.copy(source.center);\n this.rotation = source.rotation;\n this.matrixAutoUpdate = source.matrixAutoUpdate;\n this.matrix.copy(source.matrix);\n this.generateMipmaps = source.generateMipmaps;\n this.premultiplyAlpha = source.premultiplyAlpha;\n this.flipY = source.flipY;\n this.unpackAlignment = source.unpackAlignment;\n this.colorSpace = source.colorSpace;\n this.userData = JSON.parse(JSON.stringify(source.userData));\n this.needsUpdate = true;\n return this;\n }\n toJSON(meta) {\n const isRootObject = meta === undefined || typeof meta === \"string\";\n if (!isRootObject && meta.textures[this.uuid] !== undefined) return meta.textures[this.uuid];\n const output = {\n metadata: {\n version: 4.6,\n type: \"Texture\",\n generator: \"Texture.toJSON\"\n },\n uuid: this.uuid,\n name: this.name,\n image: this.source.toJSON(meta).uuid,\n mapping: this.mapping,\n channel: this.channel,\n repeat: [\n this.repeat.x,\n this.repeat.y\n ],\n offset: [\n this.offset.x,\n this.offset.y\n ],\n center: [\n this.center.x,\n this.center.y\n ],\n rotation: this.rotation,\n wrap: [\n this.wrapS,\n this.wrapT\n ],\n format: this.format,\n internalFormat: this.internalFormat,\n type: this.type,\n colorSpace: this.colorSpace,\n minFilter: this.minFilter,\n magFilter: this.magFilter,\n anisotropy: this.anisotropy,\n flipY: this.flipY,\n generateMipmaps: this.generateMipmaps,\n premultiplyAlpha: this.premultiplyAlpha,\n unpackAlignment: this.unpackAlignment\n };\n if (Object.keys(this.userData).length > 0) output.userData = this.userData;\n if (!isRootObject) meta.textures[this.uuid] = output;\n return output;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n transformUv(uv) {\n if (this.mapping !== $d5b33d7c30034067$export$1beec6768cbb3d2d) return uv;\n uv.applyMatrix3(this.matrix);\n if (uv.x < 0 || uv.x > 1) switch(this.wrapS){\n case $d5b33d7c30034067$export$533346c8e8dac0f5:\n uv.x = uv.x - Math.floor(uv.x);\n break;\n case $d5b33d7c30034067$export$9d9334239a5a5e06:\n uv.x = uv.x < 0 ? 0 : 1;\n break;\n case $d5b33d7c30034067$export$c7e7c00b14f51a4f:\n if (Math.abs(Math.floor(uv.x) % 2) === 1) uv.x = Math.ceil(uv.x) - uv.x;\n else uv.x = uv.x - Math.floor(uv.x);\n break;\n }\n if (uv.y < 0 || uv.y > 1) switch(this.wrapT){\n case $d5b33d7c30034067$export$533346c8e8dac0f5:\n uv.y = uv.y - Math.floor(uv.y);\n break;\n case $d5b33d7c30034067$export$9d9334239a5a5e06:\n uv.y = uv.y < 0 ? 0 : 1;\n break;\n case $d5b33d7c30034067$export$c7e7c00b14f51a4f:\n if (Math.abs(Math.floor(uv.y) % 2) === 1) uv.y = Math.ceil(uv.y) - uv.y;\n else uv.y = uv.y - Math.floor(uv.y);\n break;\n }\n if (this.flipY) uv.y = 1 - uv.y;\n return uv;\n }\n set needsUpdate(value) {\n if (value === true) {\n this.version++;\n this.source.needsUpdate = true;\n }\n }\n get encoding() {\n $d5b33d7c30034067$var$warnOnce(\"THREE.Texture: Property .encoding has been replaced by .colorSpace.\");\n return this.colorSpace === $d5b33d7c30034067$export$561f394b24edfcaa ? $d5b33d7c30034067$export$f32388edbb32674 : $d5b33d7c30034067$export$7207336e4151a112;\n }\n set encoding(encoding) {\n $d5b33d7c30034067$var$warnOnce(\"THREE.Texture: Property .encoding has been replaced by .colorSpace.\");\n this.colorSpace = encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n}\n$d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_IMAGE = null;\n$d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_MAPPING = $d5b33d7c30034067$export$1beec6768cbb3d2d;\n$d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_ANISOTROPY = 1;\nclass $d5b33d7c30034067$export$fa7daccca11cdbe3 {\n constructor(x = 0, y = 0, z = 0, w = 1){\n $d5b33d7c30034067$export$fa7daccca11cdbe3.prototype.isVector4 = true;\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n get width() {\n return this.z;\n }\n set width(value) {\n this.z = value;\n }\n get height() {\n return this.w;\n }\n set height(value) {\n this.w = value;\n }\n set(x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n return this;\n }\n setScalar(scalar) {\n this.x = scalar;\n this.y = scalar;\n this.z = scalar;\n this.w = scalar;\n return this;\n }\n setX(x) {\n this.x = x;\n return this;\n }\n setY(y) {\n this.y = y;\n return this;\n }\n setZ(z) {\n this.z = z;\n return this;\n }\n setW(w) {\n this.w = w;\n return this;\n }\n setComponent(index, value) {\n switch(index){\n case 0:\n this.x = value;\n break;\n case 1:\n this.y = value;\n break;\n case 2:\n this.z = value;\n break;\n case 3:\n this.w = value;\n break;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n return this;\n }\n getComponent(index) {\n switch(index){\n case 0:\n return this.x;\n case 1:\n return this.y;\n case 2:\n return this.z;\n case 3:\n return this.w;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n }\n clone() {\n return new this.constructor(this.x, this.y, this.z, this.w);\n }\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n this.w = v.w !== undefined ? v.w : 1;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n return this;\n }\n addScalar(s) {\n this.x += s;\n this.y += s;\n this.z += s;\n this.w += s;\n return this;\n }\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n this.w = a.w + b.w;\n return this;\n }\n addScaledVector(v, s) {\n this.x += v.x * s;\n this.y += v.y * s;\n this.z += v.z * s;\n this.w += v.w * s;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n return this;\n }\n subScalar(s) {\n this.x -= s;\n this.y -= s;\n this.z -= s;\n this.w -= s;\n return this;\n }\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n this.z = a.z - b.z;\n this.w = a.w - b.w;\n return this;\n }\n multiply(v) {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n this.w *= v.w;\n return this;\n }\n multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n this.w *= scalar;\n return this;\n }\n applyMatrix4(m) {\n const x = this.x, y = this.y, z = this.z, w = this.w;\n const e = m.elements;\n this.x = e[0] * x + e[4] * y + e[8] * z + e[12] * w;\n this.y = e[1] * x + e[5] * y + e[9] * z + e[13] * w;\n this.z = e[2] * x + e[6] * y + e[10] * z + e[14] * w;\n this.w = e[3] * x + e[7] * y + e[11] * z + e[15] * w;\n return this;\n }\n divideScalar(scalar) {\n return this.multiplyScalar(1 / scalar);\n }\n setAxisAngleFromQuaternion(q) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n // q is assumed to be normalized\n this.w = 2 * Math.acos(q.w);\n const s = Math.sqrt(1 - q.w * q.w);\n if (s < 0.0001) {\n this.x = 1;\n this.y = 0;\n this.z = 0;\n } else {\n this.x = q.x / s;\n this.y = q.y / s;\n this.z = q.z / s;\n }\n return this;\n }\n setAxisAngleFromRotationMatrix(m) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n let angle, x, y, z; // variables for result\n const epsilon = 0.01, epsilon2 = 0.1, te = m.elements, m11 = te[0], m12 = te[4], m13 = te[8], m21 = te[1], m22 = te[5], m23 = te[9], m31 = te[2], m32 = te[6], m33 = te[10];\n if (Math.abs(m12 - m21) < epsilon && Math.abs(m13 - m31) < epsilon && Math.abs(m23 - m32) < epsilon) {\n // singularity found\n // first check for identity matrix which must have +1 for all terms\n // in leading diagonal and zero in other terms\n if (Math.abs(m12 + m21) < epsilon2 && Math.abs(m13 + m31) < epsilon2 && Math.abs(m23 + m32) < epsilon2 && Math.abs(m11 + m22 + m33 - 3) < epsilon2) {\n // this singularity is identity matrix so angle = 0\n this.set(1, 0, 0, 0);\n return this; // zero angle, arbitrary axis\n }\n // otherwise this singularity is angle = 180\n angle = Math.PI;\n const xx = (m11 + 1) / 2;\n const yy = (m22 + 1) / 2;\n const zz = (m33 + 1) / 2;\n const xy = (m12 + m21) / 4;\n const xz = (m13 + m31) / 4;\n const yz = (m23 + m32) / 4;\n if (xx > yy && xx > zz) {\n // m11 is the largest diagonal term\n if (xx < epsilon) {\n x = 0;\n y = 0.707106781;\n z = 0.707106781;\n } else {\n x = Math.sqrt(xx);\n y = xy / x;\n z = xz / x;\n }\n } else if (yy > zz) {\n // m22 is the largest diagonal term\n if (yy < epsilon) {\n x = 0.707106781;\n y = 0;\n z = 0.707106781;\n } else {\n y = Math.sqrt(yy);\n x = xy / y;\n z = yz / y;\n }\n } else // m33 is the largest diagonal term so base result on this\n if (zz < epsilon) {\n x = 0.707106781;\n y = 0.707106781;\n z = 0;\n } else {\n z = Math.sqrt(zz);\n x = xz / z;\n y = yz / z;\n }\n this.set(x, y, z, angle);\n return this; // return 180 deg rotation\n }\n // as we have reached here there are no singularities so we can handle normally\n let s = Math.sqrt((m32 - m23) * (m32 - m23) + (m13 - m31) * (m13 - m31) + (m21 - m12) * (m21 - m12)); // used to normalize\n if (Math.abs(s) < 0.001) s = 1;\n // prevent divide by zero, should not happen if matrix is orthogonal and should be\n // caught by singularity test above, but I've left it in just in case\n this.x = (m32 - m23) / s;\n this.y = (m13 - m31) / s;\n this.z = (m21 - m12) / s;\n this.w = Math.acos((m11 + m22 + m33 - 1) / 2);\n return this;\n }\n min(v) {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n this.w = Math.min(this.w, v.w);\n return this;\n }\n max(v) {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\n this.w = Math.max(this.w, v.w);\n return this;\n }\n clamp(min, max) {\n // assumes min < max, componentwise\n this.x = Math.max(min.x, Math.min(max.x, this.x));\n this.y = Math.max(min.y, Math.min(max.y, this.y));\n this.z = Math.max(min.z, Math.min(max.z, this.z));\n this.w = Math.max(min.w, Math.min(max.w, this.w));\n return this;\n }\n clampScalar(minVal, maxVal) {\n this.x = Math.max(minVal, Math.min(maxVal, this.x));\n this.y = Math.max(minVal, Math.min(maxVal, this.y));\n this.z = Math.max(minVal, Math.min(maxVal, this.z));\n this.w = Math.max(minVal, Math.min(maxVal, this.w));\n return this;\n }\n clampLength(min, max) {\n const length = this.length();\n return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n }\n floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n this.z = Math.floor(this.z);\n this.w = Math.floor(this.w);\n return this;\n }\n ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n this.z = Math.ceil(this.z);\n this.w = Math.ceil(this.w);\n return this;\n }\n round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n this.z = Math.round(this.z);\n this.w = Math.round(this.w);\n return this;\n }\n roundToZero() {\n this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w);\n return this;\n }\n negate() {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n return this;\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n }\n lengthSq() {\n return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }\n manhattanLength() {\n return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);\n }\n normalize() {\n return this.divideScalar(this.length() || 1);\n }\n setLength(length) {\n return this.normalize().multiplyScalar(length);\n }\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n this.z += (v.z - this.z) * alpha;\n this.w += (v.w - this.w) * alpha;\n return this;\n }\n lerpVectors(v1, v2, alpha) {\n this.x = v1.x + (v2.x - v1.x) * alpha;\n this.y = v1.y + (v2.y - v1.y) * alpha;\n this.z = v1.z + (v2.z - v1.z) * alpha;\n this.w = v1.w + (v2.w - v1.w) * alpha;\n return this;\n }\n equals(v) {\n return v.x === this.x && v.y === this.y && v.z === this.z && v.w === this.w;\n }\n fromArray(array, offset = 0) {\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\n this.w = array[offset + 3];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.x;\n array[offset + 1] = this.y;\n array[offset + 2] = this.z;\n array[offset + 3] = this.w;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.x = attribute.getX(index);\n this.y = attribute.getY(index);\n this.z = attribute.getZ(index);\n this.w = attribute.getW(index);\n return this;\n }\n random() {\n this.x = Math.random();\n this.y = Math.random();\n this.z = Math.random();\n this.w = Math.random();\n return this;\n }\n *[Symbol.iterator]() {\n yield this.x;\n yield this.y;\n yield this.z;\n yield this.w;\n }\n}\n/*\n In options, we can specify:\n * Texture parameters for an auto-generated target texture\n * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n*/ class $d5b33d7c30034067$export$efcb1f8bf367cbfb extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(width = 1, height = 1, options = {}){\n super();\n this.isRenderTarget = true;\n this.width = width;\n this.height = height;\n this.depth = 1;\n this.scissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, width, height);\n this.scissorTest = false;\n this.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, width, height);\n const image = {\n width: width,\n height: height,\n depth: 1\n };\n if (options.encoding !== undefined) {\n // @deprecated, r152\n $d5b33d7c30034067$var$warnOnce(\"THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace.\");\n options.colorSpace = options.encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n this.texture = new $d5b33d7c30034067$export$5431306cf43de24a(image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace);\n this.texture.isRenderTargetTexture = true;\n this.texture.flipY = false;\n this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n this.texture.internalFormat = options.internalFormat !== undefined ? options.internalFormat : null;\n this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;\n this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;\n this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;\n this.samples = options.samples !== undefined ? options.samples : 0;\n }\n setSize(width, height, depth = 1) {\n if (this.width !== width || this.height !== height || this.depth !== depth) {\n this.width = width;\n this.height = height;\n this.depth = depth;\n this.texture.image.width = width;\n this.texture.image.height = height;\n this.texture.image.depth = depth;\n this.dispose();\n }\n this.viewport.set(0, 0, width, height);\n this.scissor.set(0, 0, width, height);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.width = source.width;\n this.height = source.height;\n this.depth = source.depth;\n this.scissor.copy(source.scissor);\n this.scissorTest = source.scissorTest;\n this.viewport.copy(source.viewport);\n this.texture = source.texture.clone();\n this.texture.isRenderTargetTexture = true;\n // ensure image object is not shared, see #20328\n const image = Object.assign({}, source.texture.image);\n this.texture.source = new $d5b33d7c30034067$export$1d2df86270c81ecb(image);\n this.depthBuffer = source.depthBuffer;\n this.stencilBuffer = source.stencilBuffer;\n if (source.depthTexture !== null) this.depthTexture = source.depthTexture.clone();\n this.samples = source.samples;\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n}\nclass $d5b33d7c30034067$export$3c052beb2e51e23f extends $d5b33d7c30034067$export$efcb1f8bf367cbfb {\n constructor(width = 1, height = 1, options = {}){\n super(width, height, options);\n this.isWebGLRenderTarget = true;\n }\n}\nclass $d5b33d7c30034067$export$dfac6c8e811406a3 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(data = null, width = 1, height = 1, depth = 1){\n super(null);\n this.isDataArrayTexture = true;\n this.image = {\n data: data,\n width: width,\n height: height,\n depth: depth\n };\n this.magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.wrapR = $d5b33d7c30034067$export$9d9334239a5a5e06;\n this.generateMipmaps = false;\n this.flipY = false;\n this.unpackAlignment = 1;\n }\n}\nclass $d5b33d7c30034067$export$c77a02c11ed180c7 extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(width = 1, height = 1, depth = 1){\n super(width, height);\n this.isWebGLArrayRenderTarget = true;\n this.depth = depth;\n this.texture = new $d5b33d7c30034067$export$dfac6c8e811406a3(null, width, height, depth);\n this.texture.isRenderTargetTexture = true;\n }\n}\nclass $d5b33d7c30034067$export$d7a3086320f856db extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(data = null, width = 1, height = 1, depth = 1){\n // We're going to add .setXXX() methods for setting properties later.\n // Users can still set in DataTexture3D directly.\n //\n //\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n // \ttexture.anisotropy = 16;\n //\n // See #14839\n super(null);\n this.isData3DTexture = true;\n this.image = {\n data: data,\n width: width,\n height: height,\n depth: depth\n };\n this.magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.wrapR = $d5b33d7c30034067$export$9d9334239a5a5e06;\n this.generateMipmaps = false;\n this.flipY = false;\n this.unpackAlignment = 1;\n }\n}\nclass $d5b33d7c30034067$export$7ee06591009639df extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(width = 1, height = 1, depth = 1){\n super(width, height);\n this.isWebGL3DRenderTarget = true;\n this.depth = depth;\n this.texture = new $d5b33d7c30034067$export$d7a3086320f856db(null, width, height, depth);\n this.texture.isRenderTargetTexture = true;\n }\n}\nclass $d5b33d7c30034067$export$bd934554fb721730 extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(width = 1, height = 1, count = 1, options = {}){\n super(width, height, options);\n this.isWebGLMultipleRenderTargets = true;\n const texture = this.texture;\n this.texture = [];\n for(let i = 0; i < count; i++){\n this.texture[i] = texture.clone();\n this.texture[i].isRenderTargetTexture = true;\n }\n }\n setSize(width, height, depth = 1) {\n if (this.width !== width || this.height !== height || this.depth !== depth) {\n this.width = width;\n this.height = height;\n this.depth = depth;\n for(let i = 0, il = this.texture.length; i < il; i++){\n this.texture[i].image.width = width;\n this.texture[i].image.height = height;\n this.texture[i].image.depth = depth;\n }\n this.dispose();\n }\n this.viewport.set(0, 0, width, height);\n this.scissor.set(0, 0, width, height);\n }\n copy(source) {\n this.dispose();\n this.width = source.width;\n this.height = source.height;\n this.depth = source.depth;\n this.scissor.copy(source.scissor);\n this.scissorTest = source.scissorTest;\n this.viewport.copy(source.viewport);\n this.depthBuffer = source.depthBuffer;\n this.stencilBuffer = source.stencilBuffer;\n if (source.depthTexture !== null) this.depthTexture = source.depthTexture.clone();\n this.texture.length = 0;\n for(let i = 0, il = source.texture.length; i < il; i++){\n this.texture[i] = source.texture[i].clone();\n this.texture[i].isRenderTargetTexture = true;\n }\n return this;\n }\n}\nclass $d5b33d7c30034067$export$23d6a54f0bbc85a3 {\n constructor(x = 0, y = 0, z = 0, w = 1){\n this.isQuaternion = true;\n this._x = x;\n this._y = y;\n this._z = z;\n this._w = w;\n }\n static slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) {\n // fuzz-free, array-based Quaternion SLERP operation\n let x0 = src0[srcOffset0 + 0], y0 = src0[srcOffset0 + 1], z0 = src0[srcOffset0 + 2], w0 = src0[srcOffset0 + 3];\n const x1 = src1[srcOffset1 + 0], y1 = src1[srcOffset1 + 1], z1 = src1[srcOffset1 + 2], w1 = src1[srcOffset1 + 3];\n if (t === 0) {\n dst[dstOffset + 0] = x0;\n dst[dstOffset + 1] = y0;\n dst[dstOffset + 2] = z0;\n dst[dstOffset + 3] = w0;\n return;\n }\n if (t === 1) {\n dst[dstOffset + 0] = x1;\n dst[dstOffset + 1] = y1;\n dst[dstOffset + 2] = z1;\n dst[dstOffset + 3] = w1;\n return;\n }\n if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) {\n let s = 1 - t;\n const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, dir = cos >= 0 ? 1 : -1, sqrSin = 1 - cos * cos;\n // Skip the Slerp for tiny steps to avoid numeric problems:\n if (sqrSin > Number.EPSILON) {\n const sin = Math.sqrt(sqrSin), len = Math.atan2(sin, cos * dir);\n s = Math.sin(s * len) / sin;\n t = Math.sin(t * len) / sin;\n }\n const tDir = t * dir;\n x0 = x0 * s + x1 * tDir;\n y0 = y0 * s + y1 * tDir;\n z0 = z0 * s + z1 * tDir;\n w0 = w0 * s + w1 * tDir;\n // Normalize in case we just did a lerp:\n if (s === 1 - t) {\n const f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0);\n x0 *= f;\n y0 *= f;\n z0 *= f;\n w0 *= f;\n }\n }\n dst[dstOffset] = x0;\n dst[dstOffset + 1] = y0;\n dst[dstOffset + 2] = z0;\n dst[dstOffset + 3] = w0;\n }\n static multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) {\n const x0 = src0[srcOffset0];\n const y0 = src0[srcOffset0 + 1];\n const z0 = src0[srcOffset0 + 2];\n const w0 = src0[srcOffset0 + 3];\n const x1 = src1[srcOffset1];\n const y1 = src1[srcOffset1 + 1];\n const z1 = src1[srcOffset1 + 2];\n const w1 = src1[srcOffset1 + 3];\n dst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n dst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n dst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n dst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n return dst;\n }\n get x() {\n return this._x;\n }\n set x(value) {\n this._x = value;\n this._onChangeCallback();\n }\n get y() {\n return this._y;\n }\n set y(value) {\n this._y = value;\n this._onChangeCallback();\n }\n get z() {\n return this._z;\n }\n set z(value) {\n this._z = value;\n this._onChangeCallback();\n }\n get w() {\n return this._w;\n }\n set w(value) {\n this._w = value;\n this._onChangeCallback();\n }\n set(x, y, z, w) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._w = w;\n this._onChangeCallback();\n return this;\n }\n clone() {\n return new this.constructor(this._x, this._y, this._z, this._w);\n }\n copy(quaternion) {\n this._x = quaternion.x;\n this._y = quaternion.y;\n this._z = quaternion.z;\n this._w = quaternion.w;\n this._onChangeCallback();\n return this;\n }\n setFromEuler(euler, update) {\n const x = euler._x, y = euler._y, z = euler._z, order = euler._order;\n // http://www.mathworks.com/matlabcentral/fileexchange/\n // \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n //\tcontent/SpinCalc.m\n const cos = Math.cos;\n const sin = Math.sin;\n const c1 = cos(x / 2);\n const c2 = cos(y / 2);\n const c3 = cos(z / 2);\n const s1 = sin(x / 2);\n const s2 = sin(y / 2);\n const s3 = sin(z / 2);\n switch(order){\n case \"XYZ\":\n this._x = s1 * c2 * c3 + c1 * s2 * s3;\n this._y = c1 * s2 * c3 - s1 * c2 * s3;\n this._z = c1 * c2 * s3 + s1 * s2 * c3;\n this._w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case \"YXZ\":\n this._x = s1 * c2 * c3 + c1 * s2 * s3;\n this._y = c1 * s2 * c3 - s1 * c2 * s3;\n this._z = c1 * c2 * s3 - s1 * s2 * c3;\n this._w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n case \"ZXY\":\n this._x = s1 * c2 * c3 - c1 * s2 * s3;\n this._y = c1 * s2 * c3 + s1 * c2 * s3;\n this._z = c1 * c2 * s3 + s1 * s2 * c3;\n this._w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case \"ZYX\":\n this._x = s1 * c2 * c3 - c1 * s2 * s3;\n this._y = c1 * s2 * c3 + s1 * c2 * s3;\n this._z = c1 * c2 * s3 - s1 * s2 * c3;\n this._w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n case \"YZX\":\n this._x = s1 * c2 * c3 + c1 * s2 * s3;\n this._y = c1 * s2 * c3 + s1 * c2 * s3;\n this._z = c1 * c2 * s3 - s1 * s2 * c3;\n this._w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case \"XZY\":\n this._x = s1 * c2 * c3 - c1 * s2 * s3;\n this._y = c1 * s2 * c3 - s1 * c2 * s3;\n this._z = c1 * c2 * s3 + s1 * s2 * c3;\n this._w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n default:\n console.warn(\"THREE.Quaternion: .setFromEuler() encountered an unknown order: \" + order);\n }\n if (update !== false) this._onChangeCallback();\n return this;\n }\n setFromAxisAngle(axis, angle) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n // assumes axis is normalized\n const halfAngle = angle / 2, s = Math.sin(halfAngle);\n this._x = axis.x * s;\n this._y = axis.y * s;\n this._z = axis.z * s;\n this._w = Math.cos(halfAngle);\n this._onChangeCallback();\n return this;\n }\n setFromRotationMatrix(m) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n const te = m.elements, m11 = te[0], m12 = te[4], m13 = te[8], m21 = te[1], m22 = te[5], m23 = te[9], m31 = te[2], m32 = te[6], m33 = te[10], trace = m11 + m22 + m33;\n if (trace > 0) {\n const s = 0.5 / Math.sqrt(trace + 1.0);\n this._w = 0.25 / s;\n this._x = (m32 - m23) * s;\n this._y = (m13 - m31) * s;\n this._z = (m21 - m12) * s;\n } else if (m11 > m22 && m11 > m33) {\n const s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n this._w = (m32 - m23) / s;\n this._x = 0.25 * s;\n this._y = (m12 + m21) / s;\n this._z = (m13 + m31) / s;\n } else if (m22 > m33) {\n const s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n this._w = (m13 - m31) / s;\n this._x = (m12 + m21) / s;\n this._y = 0.25 * s;\n this._z = (m23 + m32) / s;\n } else {\n const s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n this._w = (m21 - m12) / s;\n this._x = (m13 + m31) / s;\n this._y = (m23 + m32) / s;\n this._z = 0.25 * s;\n }\n this._onChangeCallback();\n return this;\n }\n setFromUnitVectors(vFrom, vTo) {\n // assumes direction vectors vFrom and vTo are normalized\n let r = vFrom.dot(vTo) + 1;\n if (r < Number.EPSILON) {\n // vFrom and vTo point in opposite directions\n r = 0;\n if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {\n this._x = -vFrom.y;\n this._y = vFrom.x;\n this._z = 0;\n this._w = r;\n } else {\n this._x = 0;\n this._y = -vFrom.z;\n this._z = vFrom.y;\n this._w = r;\n }\n } else {\n // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n this._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n this._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n this._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n this._w = r;\n }\n return this.normalize();\n }\n angleTo(q) {\n return 2 * Math.acos(Math.abs($d5b33d7c30034067$var$clamp(this.dot(q), -1, 1)));\n }\n rotateTowards(q, step) {\n const angle = this.angleTo(q);\n if (angle === 0) return this;\n const t = Math.min(1, step / angle);\n this.slerp(q, t);\n return this;\n }\n identity() {\n return this.set(0, 0, 0, 1);\n }\n invert() {\n // quaternion is assumed to have unit length\n return this.conjugate();\n }\n conjugate() {\n this._x *= -1;\n this._y *= -1;\n this._z *= -1;\n this._onChangeCallback();\n return this;\n }\n dot(v) {\n return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n }\n lengthSq() {\n return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n }\n length() {\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);\n }\n normalize() {\n let l = this.length();\n if (l === 0) {\n this._x = 0;\n this._y = 0;\n this._z = 0;\n this._w = 1;\n } else {\n l = 1 / l;\n this._x = this._x * l;\n this._y = this._y * l;\n this._z = this._z * l;\n this._w = this._w * l;\n }\n this._onChangeCallback();\n return this;\n }\n multiply(q) {\n return this.multiplyQuaternions(this, q);\n }\n premultiply(q) {\n return this.multiplyQuaternions(q, this);\n }\n multiplyQuaternions(a, b) {\n // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n const qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;\n const qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;\n this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n this._onChangeCallback();\n return this;\n }\n slerp(qb, t) {\n if (t === 0) return this;\n if (t === 1) return this.copy(qb);\n const x = this._x, y = this._y, z = this._z, w = this._w;\n // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n if (cosHalfTheta < 0) {\n this._w = -qb._w;\n this._x = -qb._x;\n this._y = -qb._y;\n this._z = -qb._z;\n cosHalfTheta = -cosHalfTheta;\n } else this.copy(qb);\n if (cosHalfTheta >= 1.0) {\n this._w = w;\n this._x = x;\n this._y = y;\n this._z = z;\n return this;\n }\n const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n if (sqrSinHalfTheta <= Number.EPSILON) {\n const s = 1 - t;\n this._w = s * w + t * this._w;\n this._x = s * x + t * this._x;\n this._y = s * y + t * this._y;\n this._z = s * z + t * this._z;\n this.normalize();\n this._onChangeCallback();\n return this;\n }\n const sinHalfTheta = Math.sqrt(sqrSinHalfTheta);\n const halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta);\n const ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta, ratioB = Math.sin(t * halfTheta) / sinHalfTheta;\n this._w = w * ratioA + this._w * ratioB;\n this._x = x * ratioA + this._x * ratioB;\n this._y = y * ratioA + this._y * ratioB;\n this._z = z * ratioA + this._z * ratioB;\n this._onChangeCallback();\n return this;\n }\n slerpQuaternions(qa, qb, t) {\n return this.copy(qa).slerp(qb, t);\n }\n random() {\n // Derived from http://planning.cs.uiuc.edu/node198.html\n // Note, this source uses w, x, y, z ordering,\n // so we swap the order below.\n const u1 = Math.random();\n const sqrt1u1 = Math.sqrt(1 - u1);\n const sqrtu1 = Math.sqrt(u1);\n const u2 = 2 * Math.PI * Math.random();\n const u3 = 2 * Math.PI * Math.random();\n return this.set(sqrt1u1 * Math.cos(u2), sqrtu1 * Math.sin(u3), sqrtu1 * Math.cos(u3), sqrt1u1 * Math.sin(u2));\n }\n equals(quaternion) {\n return quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w;\n }\n fromArray(array, offset = 0) {\n this._x = array[offset];\n this._y = array[offset + 1];\n this._z = array[offset + 2];\n this._w = array[offset + 3];\n this._onChangeCallback();\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this._x;\n array[offset + 1] = this._y;\n array[offset + 2] = this._z;\n array[offset + 3] = this._w;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this._x = attribute.getX(index);\n this._y = attribute.getY(index);\n this._z = attribute.getZ(index);\n this._w = attribute.getW(index);\n return this;\n }\n toJSON() {\n return this.toArray();\n }\n _onChange(callback) {\n this._onChangeCallback = callback;\n return this;\n }\n _onChangeCallback() {}\n *[Symbol.iterator]() {\n yield this._x;\n yield this._y;\n yield this._z;\n yield this._w;\n }\n}\nclass $d5b33d7c30034067$export$64b5c384219d3699 {\n constructor(x = 0, y = 0, z = 0){\n $d5b33d7c30034067$export$64b5c384219d3699.prototype.isVector3 = true;\n this.x = x;\n this.y = y;\n this.z = z;\n }\n set(x, y, z) {\n if (z === undefined) z = this.z; // sprite.scale.set(x,y)\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n setScalar(scalar) {\n this.x = scalar;\n this.y = scalar;\n this.z = scalar;\n return this;\n }\n setX(x) {\n this.x = x;\n return this;\n }\n setY(y) {\n this.y = y;\n return this;\n }\n setZ(z) {\n this.z = z;\n return this;\n }\n setComponent(index, value) {\n switch(index){\n case 0:\n this.x = value;\n break;\n case 1:\n this.y = value;\n break;\n case 2:\n this.z = value;\n break;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n return this;\n }\n getComponent(index) {\n switch(index){\n case 0:\n return this.x;\n case 1:\n return this.y;\n case 2:\n return this.z;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n }\n clone() {\n return new this.constructor(this.x, this.y, this.z);\n }\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n }\n addScalar(s) {\n this.x += s;\n this.y += s;\n this.z += s;\n return this;\n }\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n return this;\n }\n addScaledVector(v, s) {\n this.x += v.x * s;\n this.y += v.y * s;\n this.z += v.z * s;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n }\n subScalar(s) {\n this.x -= s;\n this.y -= s;\n this.z -= s;\n return this;\n }\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n this.z = a.z - b.z;\n return this;\n }\n multiply(v) {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n return this;\n }\n multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n return this;\n }\n multiplyVectors(a, b) {\n this.x = a.x * b.x;\n this.y = a.y * b.y;\n this.z = a.z * b.z;\n return this;\n }\n applyEuler(euler) {\n return this.applyQuaternion($d5b33d7c30034067$var$_quaternion$4.setFromEuler(euler));\n }\n applyAxisAngle(axis, angle) {\n return this.applyQuaternion($d5b33d7c30034067$var$_quaternion$4.setFromAxisAngle(axis, angle));\n }\n applyMatrix3(m) {\n const x = this.x, y = this.y, z = this.z;\n const e = m.elements;\n this.x = e[0] * x + e[3] * y + e[6] * z;\n this.y = e[1] * x + e[4] * y + e[7] * z;\n this.z = e[2] * x + e[5] * y + e[8] * z;\n return this;\n }\n applyNormalMatrix(m) {\n return this.applyMatrix3(m).normalize();\n }\n applyMatrix4(m) {\n const x = this.x, y = this.y, z = this.z;\n const e = m.elements;\n const w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);\n this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w;\n this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w;\n this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w;\n return this;\n }\n applyQuaternion(q) {\n const x = this.x, y = this.y, z = this.z;\n const qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n // calculate quat * vector\n const ix = qw * x + qy * z - qz * y;\n const iy = qw * y + qz * x - qx * z;\n const iz = qw * z + qx * y - qy * x;\n const iw = -qx * x - qy * y - qz * z;\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return this;\n }\n project(camera) {\n return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix);\n }\n unproject(camera) {\n return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld);\n }\n transformDirection(m) {\n // input: THREE.Matrix4 affine matrix\n // vector interpreted as a direction\n const x = this.x, y = this.y, z = this.z;\n const e = m.elements;\n this.x = e[0] * x + e[4] * y + e[8] * z;\n this.y = e[1] * x + e[5] * y + e[9] * z;\n this.z = e[2] * x + e[6] * y + e[10] * z;\n return this.normalize();\n }\n divide(v) {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z;\n return this;\n }\n divideScalar(scalar) {\n return this.multiplyScalar(1 / scalar);\n }\n min(v) {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n return this;\n }\n max(v) {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\n return this;\n }\n clamp(min, max) {\n // assumes min < max, componentwise\n this.x = Math.max(min.x, Math.min(max.x, this.x));\n this.y = Math.max(min.y, Math.min(max.y, this.y));\n this.z = Math.max(min.z, Math.min(max.z, this.z));\n return this;\n }\n clampScalar(minVal, maxVal) {\n this.x = Math.max(minVal, Math.min(maxVal, this.x));\n this.y = Math.max(minVal, Math.min(maxVal, this.y));\n this.z = Math.max(minVal, Math.min(maxVal, this.z));\n return this;\n }\n clampLength(min, max) {\n const length = this.length();\n return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n }\n floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n this.z = Math.floor(this.z);\n return this;\n }\n ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n this.z = Math.ceil(this.z);\n return this;\n }\n round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n this.z = Math.round(this.z);\n return this;\n }\n roundToZero() {\n this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n return this;\n }\n negate() {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n return this;\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n // TODO lengthSquared?\n lengthSq() {\n return this.x * this.x + this.y * this.y + this.z * this.z;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n manhattanLength() {\n return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);\n }\n normalize() {\n return this.divideScalar(this.length() || 1);\n }\n setLength(length) {\n return this.normalize().multiplyScalar(length);\n }\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n this.z += (v.z - this.z) * alpha;\n return this;\n }\n lerpVectors(v1, v2, alpha) {\n this.x = v1.x + (v2.x - v1.x) * alpha;\n this.y = v1.y + (v2.y - v1.y) * alpha;\n this.z = v1.z + (v2.z - v1.z) * alpha;\n return this;\n }\n cross(v) {\n return this.crossVectors(this, v);\n }\n crossVectors(a, b) {\n const ax = a.x, ay = a.y, az = a.z;\n const bx = b.x, by = b.y, bz = b.z;\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n return this;\n }\n projectOnVector(v) {\n const denominator = v.lengthSq();\n if (denominator === 0) return this.set(0, 0, 0);\n const scalar = v.dot(this) / denominator;\n return this.copy(v).multiplyScalar(scalar);\n }\n projectOnPlane(planeNormal) {\n $d5b33d7c30034067$var$_vector$b.copy(this).projectOnVector(planeNormal);\n return this.sub($d5b33d7c30034067$var$_vector$b);\n }\n reflect(normal) {\n // reflect incident vector off plane orthogonal to normal\n // normal is assumed to have unit length\n return this.sub($d5b33d7c30034067$var$_vector$b.copy(normal).multiplyScalar(2 * this.dot(normal)));\n }\n angleTo(v) {\n const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());\n if (denominator === 0) return Math.PI / 2;\n const theta = this.dot(v) / denominator;\n // clamp, to handle numerical problems\n return Math.acos($d5b33d7c30034067$var$clamp(theta, -1, 1));\n }\n distanceTo(v) {\n return Math.sqrt(this.distanceToSquared(v));\n }\n distanceToSquared(v) {\n const dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;\n return dx * dx + dy * dy + dz * dz;\n }\n manhattanDistanceTo(v) {\n return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z);\n }\n setFromSpherical(s) {\n return this.setFromSphericalCoords(s.radius, s.phi, s.theta);\n }\n setFromSphericalCoords(radius, phi, theta) {\n const sinPhiRadius = Math.sin(phi) * radius;\n this.x = sinPhiRadius * Math.sin(theta);\n this.y = Math.cos(phi) * radius;\n this.z = sinPhiRadius * Math.cos(theta);\n return this;\n }\n setFromCylindrical(c) {\n return this.setFromCylindricalCoords(c.radius, c.theta, c.y);\n }\n setFromCylindricalCoords(radius, theta, y) {\n this.x = radius * Math.sin(theta);\n this.y = y;\n this.z = radius * Math.cos(theta);\n return this;\n }\n setFromMatrixPosition(m) {\n const e = m.elements;\n this.x = e[12];\n this.y = e[13];\n this.z = e[14];\n return this;\n }\n setFromMatrixScale(m) {\n const sx = this.setFromMatrixColumn(m, 0).length();\n const sy = this.setFromMatrixColumn(m, 1).length();\n const sz = this.setFromMatrixColumn(m, 2).length();\n this.x = sx;\n this.y = sy;\n this.z = sz;\n return this;\n }\n setFromMatrixColumn(m, index) {\n return this.fromArray(m.elements, index * 4);\n }\n setFromMatrix3Column(m, index) {\n return this.fromArray(m.elements, index * 3);\n }\n setFromEuler(e) {\n this.x = e._x;\n this.y = e._y;\n this.z = e._z;\n return this;\n }\n setFromColor(c) {\n this.x = c.r;\n this.y = c.g;\n this.z = c.b;\n return this;\n }\n equals(v) {\n return v.x === this.x && v.y === this.y && v.z === this.z;\n }\n fromArray(array, offset = 0) {\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.x;\n array[offset + 1] = this.y;\n array[offset + 2] = this.z;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.x = attribute.getX(index);\n this.y = attribute.getY(index);\n this.z = attribute.getZ(index);\n return this;\n }\n random() {\n this.x = Math.random();\n this.y = Math.random();\n this.z = Math.random();\n return this;\n }\n randomDirection() {\n // Derived from https://mathworld.wolfram.com/SpherePointPicking.html\n const u = (Math.random() - 0.5) * 2;\n const t = Math.random() * Math.PI * 2;\n const f = Math.sqrt(1 - u ** 2);\n this.x = f * Math.cos(t);\n this.y = f * Math.sin(t);\n this.z = u;\n return this;\n }\n *[Symbol.iterator]() {\n yield this.x;\n yield this.y;\n yield this.z;\n }\n}\nconst $d5b33d7c30034067$var$_vector$b = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nclass $d5b33d7c30034067$export$6f7d5a9418ab2aa3 {\n constructor(min = new $d5b33d7c30034067$export$64b5c384219d3699(Infinity, Infinity, Infinity), max = new $d5b33d7c30034067$export$64b5c384219d3699(-Infinity, -Infinity, -Infinity)){\n this.isBox3 = true;\n this.min = min;\n this.max = max;\n }\n set(min, max) {\n this.min.copy(min);\n this.max.copy(max);\n return this;\n }\n setFromArray(array) {\n this.makeEmpty();\n for(let i = 0, il = array.length; i < il; i += 3)this.expandByPoint($d5b33d7c30034067$var$_vector$a.fromArray(array, i));\n return this;\n }\n setFromBufferAttribute(attribute) {\n this.makeEmpty();\n for(let i = 0, il = attribute.count; i < il; i++)this.expandByPoint($d5b33d7c30034067$var$_vector$a.fromBufferAttribute(attribute, i));\n return this;\n }\n setFromPoints(points) {\n this.makeEmpty();\n for(let i = 0, il = points.length; i < il; i++)this.expandByPoint(points[i]);\n return this;\n }\n setFromCenterAndSize(center, size) {\n const halfSize = $d5b33d7c30034067$var$_vector$a.copy(size).multiplyScalar(0.5);\n this.min.copy(center).sub(halfSize);\n this.max.copy(center).add(halfSize);\n return this;\n }\n setFromObject(object, precise = false) {\n this.makeEmpty();\n return this.expandByObject(object, precise);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(box) {\n this.min.copy(box.min);\n this.max.copy(box.max);\n return this;\n }\n makeEmpty() {\n this.min.x = this.min.y = this.min.z = Infinity;\n this.max.x = this.max.y = this.max.z = -Infinity;\n return this;\n }\n isEmpty() {\n // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;\n }\n getCenter(target) {\n return this.isEmpty() ? target.set(0, 0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n }\n getSize(target) {\n return this.isEmpty() ? target.set(0, 0, 0) : target.subVectors(this.max, this.min);\n }\n expandByPoint(point) {\n this.min.min(point);\n this.max.max(point);\n return this;\n }\n expandByVector(vector) {\n this.min.sub(vector);\n this.max.add(vector);\n return this;\n }\n expandByScalar(scalar) {\n this.min.addScalar(-scalar);\n this.max.addScalar(scalar);\n return this;\n }\n expandByObject(object, precise = false) {\n // Computes the world-axis-aligned bounding box of an object (including its children),\n // accounting for both the object's, and children's, world transforms\n object.updateWorldMatrix(false, false);\n if (object.boundingBox !== undefined) {\n if (object.boundingBox === null) object.computeBoundingBox();\n $d5b33d7c30034067$var$_box$3.copy(object.boundingBox);\n $d5b33d7c30034067$var$_box$3.applyMatrix4(object.matrixWorld);\n this.union($d5b33d7c30034067$var$_box$3);\n } else {\n const geometry = object.geometry;\n if (geometry !== undefined) {\n if (precise && geometry.attributes !== undefined && geometry.attributes.position !== undefined) {\n const position = geometry.attributes.position;\n for(let i = 0, l = position.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$a.fromBufferAttribute(position, i).applyMatrix4(object.matrixWorld);\n this.expandByPoint($d5b33d7c30034067$var$_vector$a);\n }\n } else {\n if (geometry.boundingBox === null) geometry.computeBoundingBox();\n $d5b33d7c30034067$var$_box$3.copy(geometry.boundingBox);\n $d5b33d7c30034067$var$_box$3.applyMatrix4(object.matrixWorld);\n this.union($d5b33d7c30034067$var$_box$3);\n }\n }\n }\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)this.expandByObject(children[i], precise);\n return this;\n }\n containsPoint(point) {\n return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y || point.z < this.min.z || point.z > this.max.z ? false : true;\n }\n containsBox(box) {\n return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y && this.min.z <= box.min.z && box.max.z <= this.max.z;\n }\n getParameter(point, target) {\n // This can potentially have a divide by zero if the box\n // has a size dimension of 0.\n return target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y), (point.z - this.min.z) / (this.max.z - this.min.z));\n }\n intersectsBox(box) {\n // using 6 splitting planes to rule out intersections.\n return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y || box.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n }\n intersectsSphere(sphere) {\n // Find the point on the AABB closest to the sphere center.\n this.clampPoint(sphere.center, $d5b33d7c30034067$var$_vector$a);\n // If that point is inside the sphere, the AABB and sphere intersect.\n return $d5b33d7c30034067$var$_vector$a.distanceToSquared(sphere.center) <= sphere.radius * sphere.radius;\n }\n intersectsPlane(plane) {\n // We compute the minimum and maximum dot product values. If those values\n // are on the same side (back or front) of the plane, then there is no intersection.\n let min, max;\n if (plane.normal.x > 0) {\n min = plane.normal.x * this.min.x;\n max = plane.normal.x * this.max.x;\n } else {\n min = plane.normal.x * this.max.x;\n max = plane.normal.x * this.min.x;\n }\n if (plane.normal.y > 0) {\n min += plane.normal.y * this.min.y;\n max += plane.normal.y * this.max.y;\n } else {\n min += plane.normal.y * this.max.y;\n max += plane.normal.y * this.min.y;\n }\n if (plane.normal.z > 0) {\n min += plane.normal.z * this.min.z;\n max += plane.normal.z * this.max.z;\n } else {\n min += plane.normal.z * this.max.z;\n max += plane.normal.z * this.min.z;\n }\n return min <= -plane.constant && max >= -plane.constant;\n }\n intersectsTriangle(triangle) {\n if (this.isEmpty()) return false;\n // compute box center and extents\n this.getCenter($d5b33d7c30034067$var$_center);\n $d5b33d7c30034067$var$_extents.subVectors(this.max, $d5b33d7c30034067$var$_center);\n // translate triangle to aabb origin\n $d5b33d7c30034067$var$_v0$2.subVectors(triangle.a, $d5b33d7c30034067$var$_center);\n $d5b33d7c30034067$var$_v1$7.subVectors(triangle.b, $d5b33d7c30034067$var$_center);\n $d5b33d7c30034067$var$_v2$4.subVectors(triangle.c, $d5b33d7c30034067$var$_center);\n // compute edge vectors for triangle\n $d5b33d7c30034067$var$_f0.subVectors($d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v0$2);\n $d5b33d7c30034067$var$_f1.subVectors($d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_v1$7);\n $d5b33d7c30034067$var$_f2.subVectors($d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v2$4);\n // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n let axes = [\n 0,\n -$d5b33d7c30034067$var$_f0.z,\n $d5b33d7c30034067$var$_f0.y,\n 0,\n -$d5b33d7c30034067$var$_f1.z,\n $d5b33d7c30034067$var$_f1.y,\n 0,\n -$d5b33d7c30034067$var$_f2.z,\n $d5b33d7c30034067$var$_f2.y,\n $d5b33d7c30034067$var$_f0.z,\n 0,\n -$d5b33d7c30034067$var$_f0.x,\n $d5b33d7c30034067$var$_f1.z,\n 0,\n -$d5b33d7c30034067$var$_f1.x,\n $d5b33d7c30034067$var$_f2.z,\n 0,\n -$d5b33d7c30034067$var$_f2.x,\n -$d5b33d7c30034067$var$_f0.y,\n $d5b33d7c30034067$var$_f0.x,\n 0,\n -$d5b33d7c30034067$var$_f1.y,\n $d5b33d7c30034067$var$_f1.x,\n 0,\n -$d5b33d7c30034067$var$_f2.y,\n $d5b33d7c30034067$var$_f2.x,\n 0\n ];\n if (!$d5b33d7c30034067$var$satForAxes(axes, $d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_extents)) return false;\n // test 3 face normals from the aabb\n axes = [\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1\n ];\n if (!$d5b33d7c30034067$var$satForAxes(axes, $d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_extents)) return false;\n // finally testing the face normal of the triangle\n // use already existing triangle edge vectors here\n $d5b33d7c30034067$var$_triangleNormal.crossVectors($d5b33d7c30034067$var$_f0, $d5b33d7c30034067$var$_f1);\n axes = [\n $d5b33d7c30034067$var$_triangleNormal.x,\n $d5b33d7c30034067$var$_triangleNormal.y,\n $d5b33d7c30034067$var$_triangleNormal.z\n ];\n return $d5b33d7c30034067$var$satForAxes(axes, $d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_extents);\n }\n clampPoint(point, target) {\n return target.copy(point).clamp(this.min, this.max);\n }\n distanceToPoint(point) {\n return this.clampPoint(point, $d5b33d7c30034067$var$_vector$a).distanceTo(point);\n }\n getBoundingSphere(target) {\n if (this.isEmpty()) target.makeEmpty();\n else {\n this.getCenter(target.center);\n target.radius = this.getSize($d5b33d7c30034067$var$_vector$a).length() * 0.5;\n }\n return target;\n }\n intersect(box) {\n this.min.max(box.min);\n this.max.min(box.max);\n // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n if (this.isEmpty()) this.makeEmpty();\n return this;\n }\n union(box) {\n this.min.min(box.min);\n this.max.max(box.max);\n return this;\n }\n applyMatrix4(matrix) {\n // transform of empty box is an empty box.\n if (this.isEmpty()) return this;\n // NOTE: I am using a binary pattern to specify all 2^3 combinations below\n $d5b33d7c30034067$var$_points[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(matrix); // 000\n $d5b33d7c30034067$var$_points[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(matrix); // 001\n $d5b33d7c30034067$var$_points[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(matrix); // 010\n $d5b33d7c30034067$var$_points[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(matrix); // 011\n $d5b33d7c30034067$var$_points[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(matrix); // 100\n $d5b33d7c30034067$var$_points[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(matrix); // 101\n $d5b33d7c30034067$var$_points[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(matrix); // 110\n $d5b33d7c30034067$var$_points[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(matrix); // 111\n this.setFromPoints($d5b33d7c30034067$var$_points);\n return this;\n }\n translate(offset) {\n this.min.add(offset);\n this.max.add(offset);\n return this;\n }\n equals(box) {\n return box.min.equals(this.min) && box.max.equals(this.max);\n }\n}\nconst $d5b33d7c30034067$var$_points = [\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699()\n];\nconst $d5b33d7c30034067$var$_vector$a = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_box$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n// triangle centered vertices\nconst $d5b33d7c30034067$var$_v0$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v1$7 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\n// triangle edge vectors\nconst $d5b33d7c30034067$var$_f0 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_f1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_f2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_center = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_extents = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_triangleNormal = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_testAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nfunction $d5b33d7c30034067$var$satForAxes(axes, v0, v1, v2, extents) {\n for(let i = 0, j = axes.length - 3; i <= j; i += 3){\n $d5b33d7c30034067$var$_testAxis.fromArray(axes, i);\n // project the aabb onto the separating axis\n const r = extents.x * Math.abs($d5b33d7c30034067$var$_testAxis.x) + extents.y * Math.abs($d5b33d7c30034067$var$_testAxis.y) + extents.z * Math.abs($d5b33d7c30034067$var$_testAxis.z);\n // project all 3 vertices of the triangle onto the separating axis\n const p0 = v0.dot($d5b33d7c30034067$var$_testAxis);\n const p1 = v1.dot($d5b33d7c30034067$var$_testAxis);\n const p2 = v2.dot($d5b33d7c30034067$var$_testAxis);\n // actual test, basically see if either of the most extreme of the triangle points intersects r\n if (Math.max(-Math.max(p0, p1, p2), Math.min(p0, p1, p2)) > r) // points of the projected triangle are outside the projected half-length of the aabb\n // the axis is separating and we can exit\n return false;\n }\n return true;\n}\nconst $d5b33d7c30034067$var$_box$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_v1$6 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$805e8b72413ccaba {\n constructor(center = new $d5b33d7c30034067$export$64b5c384219d3699(), radius = -1){\n this.center = center;\n this.radius = radius;\n }\n set(center, radius) {\n this.center.copy(center);\n this.radius = radius;\n return this;\n }\n setFromPoints(points, optionalCenter) {\n const center = this.center;\n if (optionalCenter !== undefined) center.copy(optionalCenter);\n else $d5b33d7c30034067$var$_box$2.setFromPoints(points).getCenter(center);\n let maxRadiusSq = 0;\n for(let i = 0, il = points.length; i < il; i++)maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(points[i]));\n this.radius = Math.sqrt(maxRadiusSq);\n return this;\n }\n copy(sphere) {\n this.center.copy(sphere.center);\n this.radius = sphere.radius;\n return this;\n }\n isEmpty() {\n return this.radius < 0;\n }\n makeEmpty() {\n this.center.set(0, 0, 0);\n this.radius = -1;\n return this;\n }\n containsPoint(point) {\n return point.distanceToSquared(this.center) <= this.radius * this.radius;\n }\n distanceToPoint(point) {\n return point.distanceTo(this.center) - this.radius;\n }\n intersectsSphere(sphere) {\n const radiusSum = this.radius + sphere.radius;\n return sphere.center.distanceToSquared(this.center) <= radiusSum * radiusSum;\n }\n intersectsBox(box) {\n return box.intersectsSphere(this);\n }\n intersectsPlane(plane) {\n return Math.abs(plane.distanceToPoint(this.center)) <= this.radius;\n }\n clampPoint(point, target) {\n const deltaLengthSq = this.center.distanceToSquared(point);\n target.copy(point);\n if (deltaLengthSq > this.radius * this.radius) {\n target.sub(this.center).normalize();\n target.multiplyScalar(this.radius).add(this.center);\n }\n return target;\n }\n getBoundingBox(target) {\n if (this.isEmpty()) {\n // Empty sphere produces empty bounding box\n target.makeEmpty();\n return target;\n }\n target.set(this.center, this.center);\n target.expandByScalar(this.radius);\n return target;\n }\n applyMatrix4(matrix) {\n this.center.applyMatrix4(matrix);\n this.radius = this.radius * matrix.getMaxScaleOnAxis();\n return this;\n }\n translate(offset) {\n this.center.add(offset);\n return this;\n }\n expandByPoint(point) {\n if (this.isEmpty()) {\n this.center.copy(point);\n this.radius = 0;\n return this;\n }\n $d5b33d7c30034067$var$_v1$6.subVectors(point, this.center);\n const lengthSq = $d5b33d7c30034067$var$_v1$6.lengthSq();\n if (lengthSq > this.radius * this.radius) {\n // calculate the minimal sphere\n const length = Math.sqrt(lengthSq);\n const delta = (length - this.radius) * 0.5;\n this.center.addScaledVector($d5b33d7c30034067$var$_v1$6, delta / length);\n this.radius += delta;\n }\n return this;\n }\n union(sphere) {\n if (sphere.isEmpty()) return this;\n if (this.isEmpty()) {\n this.copy(sphere);\n return this;\n }\n if (this.center.equals(sphere.center) === true) this.radius = Math.max(this.radius, sphere.radius);\n else {\n $d5b33d7c30034067$var$_v2$3.subVectors(sphere.center, this.center).setLength(sphere.radius);\n this.expandByPoint($d5b33d7c30034067$var$_v1$6.copy(sphere.center).add($d5b33d7c30034067$var$_v2$3));\n this.expandByPoint($d5b33d7c30034067$var$_v1$6.copy(sphere.center).sub($d5b33d7c30034067$var$_v2$3));\n }\n return this;\n }\n equals(sphere) {\n return sphere.center.equals(this.center) && sphere.radius === this.radius;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_vector$9 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_segCenter = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_segDir = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_diff = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_edge1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_edge2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normal$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$a186db52eed6d40e {\n constructor(origin = new $d5b33d7c30034067$export$64b5c384219d3699(), direction = new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, -1)){\n this.origin = origin;\n this.direction = direction;\n }\n set(origin, direction) {\n this.origin.copy(origin);\n this.direction.copy(direction);\n return this;\n }\n copy(ray) {\n this.origin.copy(ray.origin);\n this.direction.copy(ray.direction);\n return this;\n }\n at(t, target) {\n return target.copy(this.origin).addScaledVector(this.direction, t);\n }\n lookAt(v) {\n this.direction.copy(v).sub(this.origin).normalize();\n return this;\n }\n recast(t) {\n this.origin.copy(this.at(t, $d5b33d7c30034067$var$_vector$9));\n return this;\n }\n closestPointToPoint(point, target) {\n target.subVectors(point, this.origin);\n const directionDistance = target.dot(this.direction);\n if (directionDistance < 0) return target.copy(this.origin);\n return target.copy(this.origin).addScaledVector(this.direction, directionDistance);\n }\n distanceToPoint(point) {\n return Math.sqrt(this.distanceSqToPoint(point));\n }\n distanceSqToPoint(point) {\n const directionDistance = $d5b33d7c30034067$var$_vector$9.subVectors(point, this.origin).dot(this.direction);\n // point behind the ray\n if (directionDistance < 0) return this.origin.distanceToSquared(point);\n $d5b33d7c30034067$var$_vector$9.copy(this.origin).addScaledVector(this.direction, directionDistance);\n return $d5b33d7c30034067$var$_vector$9.distanceToSquared(point);\n }\n distanceSqToSegment(v0, v1, optionalPointOnRay, optionalPointOnSegment) {\n // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteDistRaySegment.h\n // It returns the min distance between the ray and the segment\n // defined by v0 and v1\n // It can also set two optional targets :\n // - The closest point on the ray\n // - The closest point on the segment\n $d5b33d7c30034067$var$_segCenter.copy(v0).add(v1).multiplyScalar(0.5);\n $d5b33d7c30034067$var$_segDir.copy(v1).sub(v0).normalize();\n $d5b33d7c30034067$var$_diff.copy(this.origin).sub($d5b33d7c30034067$var$_segCenter);\n const segExtent = v0.distanceTo(v1) * 0.5;\n const a01 = -this.direction.dot($d5b33d7c30034067$var$_segDir);\n const b0 = $d5b33d7c30034067$var$_diff.dot(this.direction);\n const b1 = -$d5b33d7c30034067$var$_diff.dot($d5b33d7c30034067$var$_segDir);\n const c = $d5b33d7c30034067$var$_diff.lengthSq();\n const det = Math.abs(1 - a01 * a01);\n let s0, s1, sqrDist, extDet;\n if (det > 0) {\n // The ray and segment are not parallel.\n s0 = a01 * b1 - b0;\n s1 = a01 * b0 - b1;\n extDet = segExtent * det;\n if (s0 >= 0) {\n if (s1 >= -extDet) {\n if (s1 <= extDet) {\n // region 0\n // Minimum at interior points of ray and segment.\n const invDet = 1 / det;\n s0 *= invDet;\n s1 *= invDet;\n sqrDist = s0 * (s0 + a01 * s1 + 2 * b0) + s1 * (a01 * s0 + s1 + 2 * b1) + c;\n } else {\n // region 1\n s1 = segExtent;\n s0 = Math.max(0, -(a01 * s1 + b0));\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n } else {\n // region 5\n s1 = -segExtent;\n s0 = Math.max(0, -(a01 * s1 + b0));\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n } else {\n if (s1 <= -extDet) {\n // region 4\n s0 = Math.max(0, -(-a01 * segExtent + b0));\n s1 = s0 > 0 ? -segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n } else if (s1 <= extDet) {\n // region 3\n s0 = 0;\n s1 = Math.min(Math.max(-segExtent, -b1), segExtent);\n sqrDist = s1 * (s1 + 2 * b1) + c;\n } else {\n // region 2\n s0 = Math.max(0, -(a01 * segExtent + b0));\n s1 = s0 > 0 ? segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n }\n } else {\n // Ray and segment are parallel.\n s1 = a01 > 0 ? -segExtent : segExtent;\n s0 = Math.max(0, -(a01 * s1 + b0));\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n if (optionalPointOnRay) optionalPointOnRay.copy(this.origin).addScaledVector(this.direction, s0);\n if (optionalPointOnSegment) optionalPointOnSegment.copy($d5b33d7c30034067$var$_segCenter).addScaledVector($d5b33d7c30034067$var$_segDir, s1);\n return sqrDist;\n }\n intersectSphere(sphere, target) {\n $d5b33d7c30034067$var$_vector$9.subVectors(sphere.center, this.origin);\n const tca = $d5b33d7c30034067$var$_vector$9.dot(this.direction);\n const d2 = $d5b33d7c30034067$var$_vector$9.dot($d5b33d7c30034067$var$_vector$9) - tca * tca;\n const radius2 = sphere.radius * sphere.radius;\n if (d2 > radius2) return null;\n const thc = Math.sqrt(radius2 - d2);\n // t0 = first intersect point - entrance on front of sphere\n const t0 = tca - thc;\n // t1 = second intersect point - exit point on back of sphere\n const t1 = tca + thc;\n // test to see if t1 is behind the ray - if so, return null\n if (t1 < 0) return null;\n // test to see if t0 is behind the ray:\n // if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n // in order to always return an intersect point that is in front of the ray.\n if (t0 < 0) return this.at(t1, target);\n // else t0 is in front of the ray, so return the first collision point scaled by t0\n return this.at(t0, target);\n }\n intersectsSphere(sphere) {\n return this.distanceSqToPoint(sphere.center) <= sphere.radius * sphere.radius;\n }\n distanceToPlane(plane) {\n const denominator = plane.normal.dot(this.direction);\n if (denominator === 0) {\n // line is coplanar, return origin\n if (plane.distanceToPoint(this.origin) === 0) return 0;\n // Null is preferable to undefined since undefined means.... it is undefined\n return null;\n }\n const t = -(this.origin.dot(plane.normal) + plane.constant) / denominator;\n // Return if the ray never intersects the plane\n return t >= 0 ? t : null;\n }\n intersectPlane(plane, target) {\n const t = this.distanceToPlane(plane);\n if (t === null) return null;\n return this.at(t, target);\n }\n intersectsPlane(plane) {\n // check if the ray lies on the plane first\n const distToPoint = plane.distanceToPoint(this.origin);\n if (distToPoint === 0) return true;\n const denominator = plane.normal.dot(this.direction);\n if (denominator * distToPoint < 0) return true;\n // ray origin is behind the plane (and is pointing behind it)\n return false;\n }\n intersectBox(box, target) {\n let tmin, tmax, tymin, tymax, tzmin, tzmax;\n const invdirx = 1 / this.direction.x, invdiry = 1 / this.direction.y, invdirz = 1 / this.direction.z;\n const origin = this.origin;\n if (invdirx >= 0) {\n tmin = (box.min.x - origin.x) * invdirx;\n tmax = (box.max.x - origin.x) * invdirx;\n } else {\n tmin = (box.max.x - origin.x) * invdirx;\n tmax = (box.min.x - origin.x) * invdirx;\n }\n if (invdiry >= 0) {\n tymin = (box.min.y - origin.y) * invdiry;\n tymax = (box.max.y - origin.y) * invdiry;\n } else {\n tymin = (box.max.y - origin.y) * invdiry;\n tymax = (box.min.y - origin.y) * invdiry;\n }\n if (tmin > tymax || tymin > tmax) return null;\n if (tymin > tmin || isNaN(tmin)) tmin = tymin;\n if (tymax < tmax || isNaN(tmax)) tmax = tymax;\n if (invdirz >= 0) {\n tzmin = (box.min.z - origin.z) * invdirz;\n tzmax = (box.max.z - origin.z) * invdirz;\n } else {\n tzmin = (box.max.z - origin.z) * invdirz;\n tzmax = (box.min.z - origin.z) * invdirz;\n }\n if (tmin > tzmax || tzmin > tmax) return null;\n if (tzmin > tmin || tmin !== tmin) tmin = tzmin;\n if (tzmax < tmax || tmax !== tmax) tmax = tzmax;\n //return point closest to the ray (positive side)\n if (tmax < 0) return null;\n return this.at(tmin >= 0 ? tmin : tmax, target);\n }\n intersectsBox(box) {\n return this.intersectBox(box, $d5b33d7c30034067$var$_vector$9) !== null;\n }\n intersectTriangle(a, b, c, backfaceCulling, target) {\n // Compute the offset origin, edges, and normal.\n // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n $d5b33d7c30034067$var$_edge1.subVectors(b, a);\n $d5b33d7c30034067$var$_edge2.subVectors(c, a);\n $d5b33d7c30034067$var$_normal$1.crossVectors($d5b33d7c30034067$var$_edge1, $d5b33d7c30034067$var$_edge2);\n // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n // E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n // |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n // |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n // |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n let DdN = this.direction.dot($d5b33d7c30034067$var$_normal$1);\n let sign;\n if (DdN > 0) {\n if (backfaceCulling) return null;\n sign = 1;\n } else if (DdN < 0) {\n sign = -1;\n DdN = -DdN;\n } else return null;\n $d5b33d7c30034067$var$_diff.subVectors(this.origin, a);\n const DdQxE2 = sign * this.direction.dot($d5b33d7c30034067$var$_edge2.crossVectors($d5b33d7c30034067$var$_diff, $d5b33d7c30034067$var$_edge2));\n // b1 < 0, no intersection\n if (DdQxE2 < 0) return null;\n const DdE1xQ = sign * this.direction.dot($d5b33d7c30034067$var$_edge1.cross($d5b33d7c30034067$var$_diff));\n // b2 < 0, no intersection\n if (DdE1xQ < 0) return null;\n // b1+b2 > 1, no intersection\n if (DdQxE2 + DdE1xQ > DdN) return null;\n // Line intersects triangle, check if ray does.\n const QdN = -sign * $d5b33d7c30034067$var$_diff.dot($d5b33d7c30034067$var$_normal$1);\n // t < 0, no intersection\n if (QdN < 0) return null;\n // Ray intersects triangle.\n return this.at(QdN / DdN, target);\n }\n applyMatrix4(matrix4) {\n this.origin.applyMatrix4(matrix4);\n this.direction.transformDirection(matrix4);\n return this;\n }\n equals(ray) {\n return ray.origin.equals(this.origin) && ray.direction.equals(this.direction);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nclass $d5b33d7c30034067$export$2ae72fc923e5eb5 {\n constructor(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44){\n $d5b33d7c30034067$export$2ae72fc923e5eb5.prototype.isMatrix4 = true;\n this.elements = [\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n if (n11 !== undefined) this.set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44);\n }\n set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {\n const te = this.elements;\n te[0] = n11;\n te[4] = n12;\n te[8] = n13;\n te[12] = n14;\n te[1] = n21;\n te[5] = n22;\n te[9] = n23;\n te[13] = n24;\n te[2] = n31;\n te[6] = n32;\n te[10] = n33;\n te[14] = n34;\n te[3] = n41;\n te[7] = n42;\n te[11] = n43;\n te[15] = n44;\n return this;\n }\n identity() {\n this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n return this;\n }\n clone() {\n return new $d5b33d7c30034067$export$2ae72fc923e5eb5().fromArray(this.elements);\n }\n copy(m) {\n const te = this.elements;\n const me = m.elements;\n te[0] = me[0];\n te[1] = me[1];\n te[2] = me[2];\n te[3] = me[3];\n te[4] = me[4];\n te[5] = me[5];\n te[6] = me[6];\n te[7] = me[7];\n te[8] = me[8];\n te[9] = me[9];\n te[10] = me[10];\n te[11] = me[11];\n te[12] = me[12];\n te[13] = me[13];\n te[14] = me[14];\n te[15] = me[15];\n return this;\n }\n copyPosition(m) {\n const te = this.elements, me = m.elements;\n te[12] = me[12];\n te[13] = me[13];\n te[14] = me[14];\n return this;\n }\n setFromMatrix3(m) {\n const me = m.elements;\n this.set(me[0], me[3], me[6], 0, me[1], me[4], me[7], 0, me[2], me[5], me[8], 0, 0, 0, 0, 1);\n return this;\n }\n extractBasis(xAxis, yAxis, zAxis) {\n xAxis.setFromMatrixColumn(this, 0);\n yAxis.setFromMatrixColumn(this, 1);\n zAxis.setFromMatrixColumn(this, 2);\n return this;\n }\n makeBasis(xAxis, yAxis, zAxis) {\n this.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1);\n return this;\n }\n extractRotation(m) {\n // this method does not support reflection matrices\n const te = this.elements;\n const me = m.elements;\n const scaleX = 1 / $d5b33d7c30034067$var$_v1$5.setFromMatrixColumn(m, 0).length();\n const scaleY = 1 / $d5b33d7c30034067$var$_v1$5.setFromMatrixColumn(m, 1).length();\n const scaleZ = 1 / $d5b33d7c30034067$var$_v1$5.setFromMatrixColumn(m, 2).length();\n te[0] = me[0] * scaleX;\n te[1] = me[1] * scaleX;\n te[2] = me[2] * scaleX;\n te[3] = 0;\n te[4] = me[4] * scaleY;\n te[5] = me[5] * scaleY;\n te[6] = me[6] * scaleY;\n te[7] = 0;\n te[8] = me[8] * scaleZ;\n te[9] = me[9] * scaleZ;\n te[10] = me[10] * scaleZ;\n te[11] = 0;\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n return this;\n }\n makeRotationFromEuler(euler) {\n const te = this.elements;\n const x = euler.x, y = euler.y, z = euler.z;\n const a = Math.cos(x), b = Math.sin(x);\n const c = Math.cos(y), d = Math.sin(y);\n const e = Math.cos(z), f = Math.sin(z);\n if (euler.order === \"XYZ\") {\n const ae = a * e, af = a * f, be = b * e, bf = b * f;\n te[0] = c * e;\n te[4] = -c * f;\n te[8] = d;\n te[1] = af + be * d;\n te[5] = ae - bf * d;\n te[9] = -b * c;\n te[2] = bf - ae * d;\n te[6] = be + af * d;\n te[10] = a * c;\n } else if (euler.order === \"YXZ\") {\n const ce = c * e, cf = c * f, de = d * e, df = d * f;\n te[0] = ce + df * b;\n te[4] = de * b - cf;\n te[8] = a * d;\n te[1] = a * f;\n te[5] = a * e;\n te[9] = -b;\n te[2] = cf * b - de;\n te[6] = df + ce * b;\n te[10] = a * c;\n } else if (euler.order === \"ZXY\") {\n const ce = c * e, cf = c * f, de = d * e, df = d * f;\n te[0] = ce - df * b;\n te[4] = -a * f;\n te[8] = de + cf * b;\n te[1] = cf + de * b;\n te[5] = a * e;\n te[9] = df - ce * b;\n te[2] = -a * d;\n te[6] = b;\n te[10] = a * c;\n } else if (euler.order === \"ZYX\") {\n const ae = a * e, af = a * f, be = b * e, bf = b * f;\n te[0] = c * e;\n te[4] = be * d - af;\n te[8] = ae * d + bf;\n te[1] = c * f;\n te[5] = bf * d + ae;\n te[9] = af * d - be;\n te[2] = -d;\n te[6] = b * c;\n te[10] = a * c;\n } else if (euler.order === \"YZX\") {\n const ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n te[0] = c * e;\n te[4] = bd - ac * f;\n te[8] = bc * f + ad;\n te[1] = f;\n te[5] = a * e;\n te[9] = -b * e;\n te[2] = -d * e;\n te[6] = ad * f + bc;\n te[10] = ac - bd * f;\n } else if (euler.order === \"XZY\") {\n const ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n te[0] = c * e;\n te[4] = -f;\n te[8] = d * e;\n te[1] = ac * f + bd;\n te[5] = a * e;\n te[9] = ad * f - bc;\n te[2] = bc * f - ad;\n te[6] = b * e;\n te[10] = bd * f + ac;\n }\n // bottom row\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n // last column\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n return this;\n }\n makeRotationFromQuaternion(q) {\n return this.compose($d5b33d7c30034067$var$_zero, q, $d5b33d7c30034067$var$_one);\n }\n lookAt(eye, target, up) {\n const te = this.elements;\n $d5b33d7c30034067$var$_z.subVectors(eye, target);\n if ($d5b33d7c30034067$var$_z.lengthSq() === 0) // eye and target are in the same position\n $d5b33d7c30034067$var$_z.z = 1;\n $d5b33d7c30034067$var$_z.normalize();\n $d5b33d7c30034067$var$_x.crossVectors(up, $d5b33d7c30034067$var$_z);\n if ($d5b33d7c30034067$var$_x.lengthSq() === 0) {\n // up and z are parallel\n if (Math.abs(up.z) === 1) $d5b33d7c30034067$var$_z.x += 0.0001;\n else $d5b33d7c30034067$var$_z.z += 0.0001;\n $d5b33d7c30034067$var$_z.normalize();\n $d5b33d7c30034067$var$_x.crossVectors(up, $d5b33d7c30034067$var$_z);\n }\n $d5b33d7c30034067$var$_x.normalize();\n $d5b33d7c30034067$var$_y.crossVectors($d5b33d7c30034067$var$_z, $d5b33d7c30034067$var$_x);\n te[0] = $d5b33d7c30034067$var$_x.x;\n te[4] = $d5b33d7c30034067$var$_y.x;\n te[8] = $d5b33d7c30034067$var$_z.x;\n te[1] = $d5b33d7c30034067$var$_x.y;\n te[5] = $d5b33d7c30034067$var$_y.y;\n te[9] = $d5b33d7c30034067$var$_z.y;\n te[2] = $d5b33d7c30034067$var$_x.z;\n te[6] = $d5b33d7c30034067$var$_y.z;\n te[10] = $d5b33d7c30034067$var$_z.z;\n return this;\n }\n multiply(m) {\n return this.multiplyMatrices(this, m);\n }\n premultiply(m) {\n return this.multiplyMatrices(m, this);\n }\n multiplyMatrices(a, b) {\n const ae = a.elements;\n const be = b.elements;\n const te = this.elements;\n const a11 = ae[0], a12 = ae[4], a13 = ae[8], a14 = ae[12];\n const a21 = ae[1], a22 = ae[5], a23 = ae[9], a24 = ae[13];\n const a31 = ae[2], a32 = ae[6], a33 = ae[10], a34 = ae[14];\n const a41 = ae[3], a42 = ae[7], a43 = ae[11], a44 = ae[15];\n const b11 = be[0], b12 = be[4], b13 = be[8], b14 = be[12];\n const b21 = be[1], b22 = be[5], b23 = be[9], b24 = be[13];\n const b31 = be[2], b32 = be[6], b33 = be[10], b34 = be[14];\n const b41 = be[3], b42 = be[7], b43 = be[11], b44 = be[15];\n te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n return this;\n }\n multiplyScalar(s) {\n const te = this.elements;\n te[0] *= s;\n te[4] *= s;\n te[8] *= s;\n te[12] *= s;\n te[1] *= s;\n te[5] *= s;\n te[9] *= s;\n te[13] *= s;\n te[2] *= s;\n te[6] *= s;\n te[10] *= s;\n te[14] *= s;\n te[3] *= s;\n te[7] *= s;\n te[11] *= s;\n te[15] *= s;\n return this;\n }\n determinant() {\n const te = this.elements;\n const n11 = te[0], n12 = te[4], n13 = te[8], n14 = te[12];\n const n21 = te[1], n22 = te[5], n23 = te[9], n24 = te[13];\n const n31 = te[2], n32 = te[6], n33 = te[10], n34 = te[14];\n const n41 = te[3], n42 = te[7], n43 = te[11], n44 = te[15];\n //TODO: make this more efficient\n //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n return n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31);\n }\n transpose() {\n const te = this.elements;\n let tmp;\n tmp = te[1];\n te[1] = te[4];\n te[4] = tmp;\n tmp = te[2];\n te[2] = te[8];\n te[8] = tmp;\n tmp = te[6];\n te[6] = te[9];\n te[9] = tmp;\n tmp = te[3];\n te[3] = te[12];\n te[12] = tmp;\n tmp = te[7];\n te[7] = te[13];\n te[13] = tmp;\n tmp = te[11];\n te[11] = te[14];\n te[14] = tmp;\n return this;\n }\n setPosition(x, y, z) {\n const te = this.elements;\n if (x.isVector3) {\n te[12] = x.x;\n te[13] = x.y;\n te[14] = x.z;\n } else {\n te[12] = x;\n te[13] = y;\n te[14] = z;\n }\n return this;\n }\n invert() {\n // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n const te = this.elements, n11 = te[0], n21 = te[1], n31 = te[2], n41 = te[3], n12 = te[4], n22 = te[5], n32 = te[6], n42 = te[7], n13 = te[8], n23 = te[9], n33 = te[10], n43 = te[11], n14 = te[12], n24 = te[13], n34 = te[14], n44 = te[15], t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44, t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44, t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44, t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n const det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n const detInv = 1 / det;\n te[0] = t11 * detInv;\n te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv;\n te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv;\n te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv;\n te[4] = t12 * detInv;\n te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv;\n te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv;\n te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv;\n te[8] = t13 * detInv;\n te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv;\n te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv;\n te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv;\n te[12] = t14 * detInv;\n te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv;\n te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv;\n te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv;\n return this;\n }\n scale(v) {\n const te = this.elements;\n const x = v.x, y = v.y, z = v.z;\n te[0] *= x;\n te[4] *= y;\n te[8] *= z;\n te[1] *= x;\n te[5] *= y;\n te[9] *= z;\n te[2] *= x;\n te[6] *= y;\n te[10] *= z;\n te[3] *= x;\n te[7] *= y;\n te[11] *= z;\n return this;\n }\n getMaxScaleOnAxis() {\n const te = this.elements;\n const scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2];\n const scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6];\n const scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10];\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n makeTranslation(x, y, z) {\n if (x.isVector3) this.set(1, 0, 0, x.x, 0, 1, 0, x.y, 0, 0, 1, x.z, 0, 0, 0, 1);\n else this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1);\n return this;\n }\n makeRotationX(theta) {\n const c = Math.cos(theta), s = Math.sin(theta);\n this.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1);\n return this;\n }\n makeRotationY(theta) {\n const c = Math.cos(theta), s = Math.sin(theta);\n this.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1);\n return this;\n }\n makeRotationZ(theta) {\n const c = Math.cos(theta), s = Math.sin(theta);\n this.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n return this;\n }\n makeRotationAxis(axis, angle) {\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\n const c = Math.cos(angle);\n const s = Math.sin(angle);\n const t = 1 - c;\n const x = axis.x, y = axis.y, z = axis.z;\n const tx = t * x, ty = t * y;\n this.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1);\n return this;\n }\n makeScale(x, y, z) {\n this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);\n return this;\n }\n makeShear(xy, xz, yx, yz, zx, zy) {\n this.set(1, yx, zx, 0, xy, 1, zy, 0, xz, yz, 1, 0, 0, 0, 0, 1);\n return this;\n }\n compose(position, quaternion, scale) {\n const te = this.elements;\n const x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;\n const x2 = x + x, y2 = y + y, z2 = z + z;\n const xx = x * x2, xy = x * y2, xz = x * z2;\n const yy = y * y2, yz = y * z2, zz = z * z2;\n const wx = w * x2, wy = w * y2, wz = w * z2;\n const sx = scale.x, sy = scale.y, sz = scale.z;\n te[0] = (1 - (yy + zz)) * sx;\n te[1] = (xy + wz) * sx;\n te[2] = (xz - wy) * sx;\n te[3] = 0;\n te[4] = (xy - wz) * sy;\n te[5] = (1 - (xx + zz)) * sy;\n te[6] = (yz + wx) * sy;\n te[7] = 0;\n te[8] = (xz + wy) * sz;\n te[9] = (yz - wx) * sz;\n te[10] = (1 - (xx + yy)) * sz;\n te[11] = 0;\n te[12] = position.x;\n te[13] = position.y;\n te[14] = position.z;\n te[15] = 1;\n return this;\n }\n decompose(position, quaternion, scale) {\n const te = this.elements;\n let sx = $d5b33d7c30034067$var$_v1$5.set(te[0], te[1], te[2]).length();\n const sy = $d5b33d7c30034067$var$_v1$5.set(te[4], te[5], te[6]).length();\n const sz = $d5b33d7c30034067$var$_v1$5.set(te[8], te[9], te[10]).length();\n // if determine is negative, we need to invert one scale\n const det = this.determinant();\n if (det < 0) sx = -sx;\n position.x = te[12];\n position.y = te[13];\n position.z = te[14];\n // scale the rotation part\n $d5b33d7c30034067$var$_m1$2.copy(this);\n const invSX = 1 / sx;\n const invSY = 1 / sy;\n const invSZ = 1 / sz;\n $d5b33d7c30034067$var$_m1$2.elements[0] *= invSX;\n $d5b33d7c30034067$var$_m1$2.elements[1] *= invSX;\n $d5b33d7c30034067$var$_m1$2.elements[2] *= invSX;\n $d5b33d7c30034067$var$_m1$2.elements[4] *= invSY;\n $d5b33d7c30034067$var$_m1$2.elements[5] *= invSY;\n $d5b33d7c30034067$var$_m1$2.elements[6] *= invSY;\n $d5b33d7c30034067$var$_m1$2.elements[8] *= invSZ;\n $d5b33d7c30034067$var$_m1$2.elements[9] *= invSZ;\n $d5b33d7c30034067$var$_m1$2.elements[10] *= invSZ;\n quaternion.setFromRotationMatrix($d5b33d7c30034067$var$_m1$2);\n scale.x = sx;\n scale.y = sy;\n scale.z = sz;\n return this;\n }\n makePerspective(left, right, top, bottom, near, far, coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3) {\n const te = this.elements;\n const x = 2 * near / (right - left);\n const y = 2 * near / (top - bottom);\n const a = (right + left) / (right - left);\n const b = (top + bottom) / (top - bottom);\n let c, d;\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) {\n c = -(far + near) / (far - near);\n d = -2 * far * near / (far - near);\n } else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) {\n c = -far / (far - near);\n d = -far * near / (far - near);\n } else throw new Error(\"THREE.Matrix4.makePerspective(): Invalid coordinate system: \" + coordinateSystem);\n te[0] = x;\n te[4] = 0;\n te[8] = a;\n te[12] = 0;\n te[1] = 0;\n te[5] = y;\n te[9] = b;\n te[13] = 0;\n te[2] = 0;\n te[6] = 0;\n te[10] = c;\n te[14] = d;\n te[3] = 0;\n te[7] = 0;\n te[11] = -1;\n te[15] = 0;\n return this;\n }\n makeOrthographic(left, right, top, bottom, near, far, coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3) {\n const te = this.elements;\n const w = 1.0 / (right - left);\n const h = 1.0 / (top - bottom);\n const p = 1.0 / (far - near);\n const x = (right + left) * w;\n const y = (top + bottom) * h;\n let z, zInv;\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) {\n z = (far + near) * p;\n zInv = -2 * p;\n } else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) {\n z = near * p;\n zInv = -1 * p;\n } else throw new Error(\"THREE.Matrix4.makeOrthographic(): Invalid coordinate system: \" + coordinateSystem);\n te[0] = 2 * w;\n te[4] = 0;\n te[8] = 0;\n te[12] = -x;\n te[1] = 0;\n te[5] = 2 * h;\n te[9] = 0;\n te[13] = -y;\n te[2] = 0;\n te[6] = 0;\n te[10] = zInv;\n te[14] = -z;\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n te[15] = 1;\n return this;\n }\n equals(matrix) {\n const te = this.elements;\n const me = matrix.elements;\n for(let i = 0; i < 16; i++){\n if (te[i] !== me[i]) return false;\n }\n return true;\n }\n fromArray(array, offset = 0) {\n for(let i = 0; i < 16; i++)this.elements[i] = array[i + offset];\n return this;\n }\n toArray(array = [], offset = 0) {\n const te = this.elements;\n array[offset] = te[0];\n array[offset + 1] = te[1];\n array[offset + 2] = te[2];\n array[offset + 3] = te[3];\n array[offset + 4] = te[4];\n array[offset + 5] = te[5];\n array[offset + 6] = te[6];\n array[offset + 7] = te[7];\n array[offset + 8] = te[8];\n array[offset + 9] = te[9];\n array[offset + 10] = te[10];\n array[offset + 11] = te[11];\n array[offset + 12] = te[12];\n array[offset + 13] = te[13];\n array[offset + 14] = te[14];\n array[offset + 15] = te[15];\n return array;\n }\n}\nconst $d5b33d7c30034067$var$_v1$5 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_m1$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_zero = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 0);\nconst $d5b33d7c30034067$var$_one = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 1);\nconst $d5b33d7c30034067$var$_x = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_y = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_z = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_matrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_quaternion$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nclass $d5b33d7c30034067$export$d93cc409a0768c5f {\n constructor(x = 0, y = 0, z = 0, order = $d5b33d7c30034067$export$d93cc409a0768c5f.DEFAULT_ORDER){\n this.isEuler = true;\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n }\n get x() {\n return this._x;\n }\n set x(value) {\n this._x = value;\n this._onChangeCallback();\n }\n get y() {\n return this._y;\n }\n set y(value) {\n this._y = value;\n this._onChangeCallback();\n }\n get z() {\n return this._z;\n }\n set z(value) {\n this._z = value;\n this._onChangeCallback();\n }\n get order() {\n return this._order;\n }\n set order(value) {\n this._order = value;\n this._onChangeCallback();\n }\n set(x, y, z, order = this._order) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n this._onChangeCallback();\n return this;\n }\n clone() {\n return new this.constructor(this._x, this._y, this._z, this._order);\n }\n copy(euler) {\n this._x = euler._x;\n this._y = euler._y;\n this._z = euler._z;\n this._order = euler._order;\n this._onChangeCallback();\n return this;\n }\n setFromRotationMatrix(m, order = this._order, update = true) {\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n const te = m.elements;\n const m11 = te[0], m12 = te[4], m13 = te[8];\n const m21 = te[1], m22 = te[5], m23 = te[9];\n const m31 = te[2], m32 = te[6], m33 = te[10];\n switch(order){\n case \"XYZ\":\n this._y = Math.asin($d5b33d7c30034067$var$clamp(m13, -1, 1));\n if (Math.abs(m13) < 0.9999999) {\n this._x = Math.atan2(-m23, m33);\n this._z = Math.atan2(-m12, m11);\n } else {\n this._x = Math.atan2(m32, m22);\n this._z = 0;\n }\n break;\n case \"YXZ\":\n this._x = Math.asin(-$d5b33d7c30034067$var$clamp(m23, -1, 1));\n if (Math.abs(m23) < 0.9999999) {\n this._y = Math.atan2(m13, m33);\n this._z = Math.atan2(m21, m22);\n } else {\n this._y = Math.atan2(-m31, m11);\n this._z = 0;\n }\n break;\n case \"ZXY\":\n this._x = Math.asin($d5b33d7c30034067$var$clamp(m32, -1, 1));\n if (Math.abs(m32) < 0.9999999) {\n this._y = Math.atan2(-m31, m33);\n this._z = Math.atan2(-m12, m22);\n } else {\n this._y = 0;\n this._z = Math.atan2(m21, m11);\n }\n break;\n case \"ZYX\":\n this._y = Math.asin(-$d5b33d7c30034067$var$clamp(m31, -1, 1));\n if (Math.abs(m31) < 0.9999999) {\n this._x = Math.atan2(m32, m33);\n this._z = Math.atan2(m21, m11);\n } else {\n this._x = 0;\n this._z = Math.atan2(-m12, m22);\n }\n break;\n case \"YZX\":\n this._z = Math.asin($d5b33d7c30034067$var$clamp(m21, -1, 1));\n if (Math.abs(m21) < 0.9999999) {\n this._x = Math.atan2(-m23, m22);\n this._y = Math.atan2(-m31, m11);\n } else {\n this._x = 0;\n this._y = Math.atan2(m13, m33);\n }\n break;\n case \"XZY\":\n this._z = Math.asin(-$d5b33d7c30034067$var$clamp(m12, -1, 1));\n if (Math.abs(m12) < 0.9999999) {\n this._x = Math.atan2(m32, m22);\n this._y = Math.atan2(m13, m11);\n } else {\n this._x = Math.atan2(-m23, m33);\n this._y = 0;\n }\n break;\n default:\n console.warn(\"THREE.Euler: .setFromRotationMatrix() encountered an unknown order: \" + order);\n }\n this._order = order;\n if (update === true) this._onChangeCallback();\n return this;\n }\n setFromQuaternion(q, order, update) {\n $d5b33d7c30034067$var$_matrix.makeRotationFromQuaternion(q);\n return this.setFromRotationMatrix($d5b33d7c30034067$var$_matrix, order, update);\n }\n setFromVector3(v, order = this._order) {\n return this.set(v.x, v.y, v.z, order);\n }\n reorder(newOrder) {\n // WARNING: this discards revolution information -bhouston\n $d5b33d7c30034067$var$_quaternion$3.setFromEuler(this);\n return this.setFromQuaternion($d5b33d7c30034067$var$_quaternion$3, newOrder);\n }\n equals(euler) {\n return euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order;\n }\n fromArray(array) {\n this._x = array[0];\n this._y = array[1];\n this._z = array[2];\n if (array[3] !== undefined) this._order = array[3];\n this._onChangeCallback();\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this._x;\n array[offset + 1] = this._y;\n array[offset + 2] = this._z;\n array[offset + 3] = this._order;\n return array;\n }\n _onChange(callback) {\n this._onChangeCallback = callback;\n return this;\n }\n _onChangeCallback() {}\n *[Symbol.iterator]() {\n yield this._x;\n yield this._y;\n yield this._z;\n yield this._order;\n }\n}\n$d5b33d7c30034067$export$d93cc409a0768c5f.DEFAULT_ORDER = \"XYZ\";\nclass $d5b33d7c30034067$export$89312ce47c0ca777 {\n constructor(){\n this.mask = 1;\n }\n set(channel) {\n this.mask = (1 << channel | 0) >>> 0;\n }\n enable(channel) {\n this.mask |= 1 << channel | 0;\n }\n enableAll() {\n this.mask = -1;\n }\n toggle(channel) {\n this.mask ^= 1 << channel | 0;\n }\n disable(channel) {\n this.mask &= ~(1 << channel | 0);\n }\n disableAll() {\n this.mask = 0;\n }\n test(layers) {\n return (this.mask & layers.mask) !== 0;\n }\n isEnabled(channel) {\n return (this.mask & (1 << channel | 0)) !== 0;\n }\n}\nlet $d5b33d7c30034067$var$_object3DId = 0;\nconst $d5b33d7c30034067$var$_v1$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_q1 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_m1$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_target = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_position$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_scale$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_xAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 0, 0);\nconst $d5b33d7c30034067$var$_yAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0);\nconst $d5b33d7c30034067$var$_zAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1);\nconst $d5b33d7c30034067$var$_addedEvent = {\n type: \"added\"\n};\nconst $d5b33d7c30034067$var$_removedEvent = {\n type: \"removed\"\n};\nclass $d5b33d7c30034067$export$e4dd07dff30cc924 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isObject3D = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_object3DId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.type = \"Object3D\";\n this.parent = null;\n this.children = [];\n this.up = $d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP.clone();\n const position = new $d5b33d7c30034067$export$64b5c384219d3699();\n const rotation = new $d5b33d7c30034067$export$d93cc409a0768c5f();\n const quaternion = new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\n const scale = new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 1);\n function onRotationChange() {\n quaternion.setFromEuler(rotation, false);\n }\n function onQuaternionChange() {\n rotation.setFromQuaternion(quaternion, undefined, false);\n }\n rotation._onChange(onRotationChange);\n quaternion._onChange(onQuaternionChange);\n Object.defineProperties(this, {\n position: {\n configurable: true,\n enumerable: true,\n value: position\n },\n rotation: {\n configurable: true,\n enumerable: true,\n value: rotation\n },\n quaternion: {\n configurable: true,\n enumerable: true,\n value: quaternion\n },\n scale: {\n configurable: true,\n enumerable: true,\n value: scale\n },\n modelViewMatrix: {\n value: new $d5b33d7c30034067$export$2ae72fc923e5eb5()\n },\n normalMatrix: {\n value: new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n });\n this.matrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.matrixWorld = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.matrixAutoUpdate = $d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_AUTO_UPDATE;\n this.matrixWorldNeedsUpdate = false;\n this.matrixWorldAutoUpdate = $d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer\n this.layers = new $d5b33d7c30034067$export$89312ce47c0ca777();\n this.visible = true;\n this.castShadow = false;\n this.receiveShadow = false;\n this.frustumCulled = true;\n this.renderOrder = 0;\n this.animations = [];\n this.userData = {};\n }\n onBeforeRender() {}\n onAfterRender() {}\n applyMatrix4(matrix) {\n if (this.matrixAutoUpdate) this.updateMatrix();\n this.matrix.premultiply(matrix);\n this.matrix.decompose(this.position, this.quaternion, this.scale);\n }\n applyQuaternion(q) {\n this.quaternion.premultiply(q);\n return this;\n }\n setRotationFromAxisAngle(axis, angle) {\n // assumes axis is normalized\n this.quaternion.setFromAxisAngle(axis, angle);\n }\n setRotationFromEuler(euler) {\n this.quaternion.setFromEuler(euler, true);\n }\n setRotationFromMatrix(m) {\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n this.quaternion.setFromRotationMatrix(m);\n }\n setRotationFromQuaternion(q) {\n // assumes q is normalized\n this.quaternion.copy(q);\n }\n rotateOnAxis(axis, angle) {\n // rotate object on axis in object space\n // axis is assumed to be normalized\n $d5b33d7c30034067$var$_q1.setFromAxisAngle(axis, angle);\n this.quaternion.multiply($d5b33d7c30034067$var$_q1);\n return this;\n }\n rotateOnWorldAxis(axis, angle) {\n // rotate object on axis in world space\n // axis is assumed to be normalized\n // method assumes no rotated parent\n $d5b33d7c30034067$var$_q1.setFromAxisAngle(axis, angle);\n this.quaternion.premultiply($d5b33d7c30034067$var$_q1);\n return this;\n }\n rotateX(angle) {\n return this.rotateOnAxis($d5b33d7c30034067$var$_xAxis, angle);\n }\n rotateY(angle) {\n return this.rotateOnAxis($d5b33d7c30034067$var$_yAxis, angle);\n }\n rotateZ(angle) {\n return this.rotateOnAxis($d5b33d7c30034067$var$_zAxis, angle);\n }\n translateOnAxis(axis, distance) {\n // translate object by distance along axis in object space\n // axis is assumed to be normalized\n $d5b33d7c30034067$var$_v1$4.copy(axis).applyQuaternion(this.quaternion);\n this.position.add($d5b33d7c30034067$var$_v1$4.multiplyScalar(distance));\n return this;\n }\n translateX(distance) {\n return this.translateOnAxis($d5b33d7c30034067$var$_xAxis, distance);\n }\n translateY(distance) {\n return this.translateOnAxis($d5b33d7c30034067$var$_yAxis, distance);\n }\n translateZ(distance) {\n return this.translateOnAxis($d5b33d7c30034067$var$_zAxis, distance);\n }\n localToWorld(vector) {\n this.updateWorldMatrix(true, false);\n return vector.applyMatrix4(this.matrixWorld);\n }\n worldToLocal(vector) {\n this.updateWorldMatrix(true, false);\n return vector.applyMatrix4($d5b33d7c30034067$var$_m1$1.copy(this.matrixWorld).invert());\n }\n lookAt(x, y, z) {\n // This method does not support objects having non-uniformly-scaled parent(s)\n if (x.isVector3) $d5b33d7c30034067$var$_target.copy(x);\n else $d5b33d7c30034067$var$_target.set(x, y, z);\n const parent = this.parent;\n this.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_position$3.setFromMatrixPosition(this.matrixWorld);\n if (this.isCamera || this.isLight) $d5b33d7c30034067$var$_m1$1.lookAt($d5b33d7c30034067$var$_position$3, $d5b33d7c30034067$var$_target, this.up);\n else $d5b33d7c30034067$var$_m1$1.lookAt($d5b33d7c30034067$var$_target, $d5b33d7c30034067$var$_position$3, this.up);\n this.quaternion.setFromRotationMatrix($d5b33d7c30034067$var$_m1$1);\n if (parent) {\n $d5b33d7c30034067$var$_m1$1.extractRotation(parent.matrixWorld);\n $d5b33d7c30034067$var$_q1.setFromRotationMatrix($d5b33d7c30034067$var$_m1$1);\n this.quaternion.premultiply($d5b33d7c30034067$var$_q1.invert());\n }\n }\n add(object) {\n if (arguments.length > 1) {\n for(let i = 0; i < arguments.length; i++)this.add(arguments[i]);\n return this;\n }\n if (object === this) {\n console.error(\"THREE.Object3D.add: object can't be added as a child of itself.\", object);\n return this;\n }\n if (object && object.isObject3D) {\n if (object.parent !== null) object.parent.remove(object);\n object.parent = this;\n this.children.push(object);\n object.dispatchEvent($d5b33d7c30034067$var$_addedEvent);\n } else console.error(\"THREE.Object3D.add: object not an instance of THREE.Object3D.\", object);\n return this;\n }\n remove(object) {\n if (arguments.length > 1) {\n for(let i = 0; i < arguments.length; i++)this.remove(arguments[i]);\n return this;\n }\n const index = this.children.indexOf(object);\n if (index !== -1) {\n object.parent = null;\n this.children.splice(index, 1);\n object.dispatchEvent($d5b33d7c30034067$var$_removedEvent);\n }\n return this;\n }\n removeFromParent() {\n const parent = this.parent;\n if (parent !== null) parent.remove(this);\n return this;\n }\n clear() {\n for(let i = 0; i < this.children.length; i++){\n const object = this.children[i];\n object.parent = null;\n object.dispatchEvent($d5b33d7c30034067$var$_removedEvent);\n }\n this.children.length = 0;\n return this;\n }\n attach(object) {\n // adds object as a child of this, while maintaining the object's world transform\n // Note: This method does not support scene graphs having non-uniformly-scaled nodes(s)\n this.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_m1$1.copy(this.matrixWorld).invert();\n if (object.parent !== null) {\n object.parent.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_m1$1.multiply(object.parent.matrixWorld);\n }\n object.applyMatrix4($d5b33d7c30034067$var$_m1$1);\n this.add(object);\n object.updateWorldMatrix(false, true);\n return this;\n }\n getObjectById(id) {\n return this.getObjectByProperty(\"id\", id);\n }\n getObjectByName(name) {\n return this.getObjectByProperty(\"name\", name);\n }\n getObjectByProperty(name, value) {\n if (this[name] === value) return this;\n for(let i = 0, l = this.children.length; i < l; i++){\n const child = this.children[i];\n const object = child.getObjectByProperty(name, value);\n if (object !== undefined) return object;\n }\n return undefined;\n }\n getObjectsByProperty(name, value) {\n let result = [];\n if (this[name] === value) result.push(this);\n for(let i = 0, l = this.children.length; i < l; i++){\n const childResult = this.children[i].getObjectsByProperty(name, value);\n if (childResult.length > 0) result = result.concat(childResult);\n }\n return result;\n }\n getWorldPosition(target) {\n this.updateWorldMatrix(true, false);\n return target.setFromMatrixPosition(this.matrixWorld);\n }\n getWorldQuaternion(target) {\n this.updateWorldMatrix(true, false);\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position$3, target, $d5b33d7c30034067$var$_scale$2);\n return target;\n }\n getWorldScale(target) {\n this.updateWorldMatrix(true, false);\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position$3, $d5b33d7c30034067$var$_quaternion$2, target);\n return target;\n }\n getWorldDirection(target) {\n this.updateWorldMatrix(true, false);\n const e = this.matrixWorld.elements;\n return target.set(e[8], e[9], e[10]).normalize();\n }\n raycast() {}\n traverse(callback) {\n callback(this);\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++)children[i].traverse(callback);\n }\n traverseVisible(callback) {\n if (this.visible === false) return;\n callback(this);\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++)children[i].traverseVisible(callback);\n }\n traverseAncestors(callback) {\n const parent = this.parent;\n if (parent !== null) {\n callback(parent);\n parent.traverseAncestors(callback);\n }\n }\n updateMatrix() {\n this.matrix.compose(this.position, this.quaternion, this.scale);\n this.matrixWorldNeedsUpdate = true;\n }\n updateMatrixWorld(force) {\n if (this.matrixAutoUpdate) this.updateMatrix();\n if (this.matrixWorldNeedsUpdate || force) {\n if (this.parent === null) this.matrixWorld.copy(this.matrix);\n else this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n this.matrixWorldNeedsUpdate = false;\n force = true;\n }\n // update children\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++){\n const child = children[i];\n if (child.matrixWorldAutoUpdate === true || force === true) child.updateMatrixWorld(force);\n }\n }\n updateWorldMatrix(updateParents, updateChildren) {\n const parent = this.parent;\n if (updateParents === true && parent !== null && parent.matrixWorldAutoUpdate === true) parent.updateWorldMatrix(true, false);\n if (this.matrixAutoUpdate) this.updateMatrix();\n if (this.parent === null) this.matrixWorld.copy(this.matrix);\n else this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n // update children\n if (updateChildren === true) {\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++){\n const child = children[i];\n if (child.matrixWorldAutoUpdate === true) child.updateWorldMatrix(false, true);\n }\n }\n }\n toJSON(meta) {\n // meta is a string when called from JSON.stringify\n const isRootObject = meta === undefined || typeof meta === \"string\";\n const output = {};\n // meta is a hash used to collect geometries, materials.\n // not providing it implies that this is the root object\n // being serialized.\n if (isRootObject) {\n // initialize meta obj\n meta = {\n geometries: {},\n materials: {},\n textures: {},\n images: {},\n shapes: {},\n skeletons: {},\n animations: {},\n nodes: {}\n };\n output.metadata = {\n version: 4.6,\n type: \"Object\",\n generator: \"Object3D.toJSON\"\n };\n }\n // standard Object3D serialization\n const object = {};\n object.uuid = this.uuid;\n object.type = this.type;\n if (this.name !== \"\") object.name = this.name;\n if (this.castShadow === true) object.castShadow = true;\n if (this.receiveShadow === true) object.receiveShadow = true;\n if (this.visible === false) object.visible = false;\n if (this.frustumCulled === false) object.frustumCulled = false;\n if (this.renderOrder !== 0) object.renderOrder = this.renderOrder;\n if (Object.keys(this.userData).length > 0) object.userData = this.userData;\n object.layers = this.layers.mask;\n object.matrix = this.matrix.toArray();\n object.up = this.up.toArray();\n if (this.matrixAutoUpdate === false) object.matrixAutoUpdate = false;\n // object specific properties\n if (this.isInstancedMesh) {\n object.type = \"InstancedMesh\";\n object.count = this.count;\n object.instanceMatrix = this.instanceMatrix.toJSON();\n if (this.instanceColor !== null) object.instanceColor = this.instanceColor.toJSON();\n }\n //\n function serialize(library, element) {\n if (library[element.uuid] === undefined) library[element.uuid] = element.toJSON(meta);\n return element.uuid;\n }\n if (this.isScene) {\n if (this.background) {\n if (this.background.isColor) object.background = this.background.toJSON();\n else if (this.background.isTexture) object.background = this.background.toJSON(meta).uuid;\n }\n if (this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== true) object.environment = this.environment.toJSON(meta).uuid;\n } else if (this.isMesh || this.isLine || this.isPoints) {\n object.geometry = serialize(meta.geometries, this.geometry);\n const parameters = this.geometry.parameters;\n if (parameters !== undefined && parameters.shapes !== undefined) {\n const shapes = parameters.shapes;\n if (Array.isArray(shapes)) for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n serialize(meta.shapes, shape);\n }\n else serialize(meta.shapes, shapes);\n }\n }\n if (this.isSkinnedMesh) {\n object.bindMode = this.bindMode;\n object.bindMatrix = this.bindMatrix.toArray();\n if (this.skeleton !== undefined) {\n serialize(meta.skeletons, this.skeleton);\n object.skeleton = this.skeleton.uuid;\n }\n }\n if (this.material !== undefined) {\n if (Array.isArray(this.material)) {\n const uuids = [];\n for(let i = 0, l = this.material.length; i < l; i++)uuids.push(serialize(meta.materials, this.material[i]));\n object.material = uuids;\n } else object.material = serialize(meta.materials, this.material);\n }\n //\n if (this.children.length > 0) {\n object.children = [];\n for(let i = 0; i < this.children.length; i++)object.children.push(this.children[i].toJSON(meta).object);\n }\n //\n if (this.animations.length > 0) {\n object.animations = [];\n for(let i = 0; i < this.animations.length; i++){\n const animation = this.animations[i];\n object.animations.push(serialize(meta.animations, animation));\n }\n }\n if (isRootObject) {\n const geometries = extractFromCache(meta.geometries);\n const materials = extractFromCache(meta.materials);\n const textures = extractFromCache(meta.textures);\n const images = extractFromCache(meta.images);\n const shapes = extractFromCache(meta.shapes);\n const skeletons = extractFromCache(meta.skeletons);\n const animations = extractFromCache(meta.animations);\n const nodes = extractFromCache(meta.nodes);\n if (geometries.length > 0) output.geometries = geometries;\n if (materials.length > 0) output.materials = materials;\n if (textures.length > 0) output.textures = textures;\n if (images.length > 0) output.images = images;\n if (shapes.length > 0) output.shapes = shapes;\n if (skeletons.length > 0) output.skeletons = skeletons;\n if (animations.length > 0) output.animations = animations;\n if (nodes.length > 0) output.nodes = nodes;\n }\n output.object = object;\n return output;\n // extract data from the cache hash\n // remove metadata on each item\n // and return as array\n function extractFromCache(cache) {\n const values = [];\n for(const key in cache){\n const data = cache[key];\n delete data.metadata;\n values.push(data);\n }\n return values;\n }\n }\n clone(recursive) {\n return new this.constructor().copy(this, recursive);\n }\n copy(source, recursive = true) {\n this.name = source.name;\n this.up.copy(source.up);\n this.position.copy(source.position);\n this.rotation.order = source.rotation.order;\n this.quaternion.copy(source.quaternion);\n this.scale.copy(source.scale);\n this.matrix.copy(source.matrix);\n this.matrixWorld.copy(source.matrixWorld);\n this.matrixAutoUpdate = source.matrixAutoUpdate;\n this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n this.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate;\n this.layers.mask = source.layers.mask;\n this.visible = source.visible;\n this.castShadow = source.castShadow;\n this.receiveShadow = source.receiveShadow;\n this.frustumCulled = source.frustumCulled;\n this.renderOrder = source.renderOrder;\n this.animations = source.animations.slice();\n this.userData = JSON.parse(JSON.stringify(source.userData));\n if (recursive === true) for(let i = 0; i < source.children.length; i++){\n const child = source.children[i];\n this.add(child.clone());\n }\n return this;\n }\n}\n$d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0);\n$d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_AUTO_UPDATE = true;\n$d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;\nconst $d5b33d7c30034067$var$_v0$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v1$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v3$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vab = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vac = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vbc = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vap = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vbp = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vcp = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nlet $d5b33d7c30034067$var$warnedGetUV = false;\nclass $d5b33d7c30034067$export$5a465592bfe74b48 {\n constructor(a = new $d5b33d7c30034067$export$64b5c384219d3699(), b = new $d5b33d7c30034067$export$64b5c384219d3699(), c = new $d5b33d7c30034067$export$64b5c384219d3699()){\n this.a = a;\n this.b = b;\n this.c = c;\n }\n static getNormal(a, b, c, target) {\n target.subVectors(c, b);\n $d5b33d7c30034067$var$_v0$1.subVectors(a, b);\n target.cross($d5b33d7c30034067$var$_v0$1);\n const targetLengthSq = target.lengthSq();\n if (targetLengthSq > 0) return target.multiplyScalar(1 / Math.sqrt(targetLengthSq));\n return target.set(0, 0, 0);\n }\n // static/instance method to calculate barycentric coordinates\n // based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n static getBarycoord(point, a, b, c, target) {\n $d5b33d7c30034067$var$_v0$1.subVectors(c, a);\n $d5b33d7c30034067$var$_v1$3.subVectors(b, a);\n $d5b33d7c30034067$var$_v2$2.subVectors(point, a);\n const dot00 = $d5b33d7c30034067$var$_v0$1.dot($d5b33d7c30034067$var$_v0$1);\n const dot01 = $d5b33d7c30034067$var$_v0$1.dot($d5b33d7c30034067$var$_v1$3);\n const dot02 = $d5b33d7c30034067$var$_v0$1.dot($d5b33d7c30034067$var$_v2$2);\n const dot11 = $d5b33d7c30034067$var$_v1$3.dot($d5b33d7c30034067$var$_v1$3);\n const dot12 = $d5b33d7c30034067$var$_v1$3.dot($d5b33d7c30034067$var$_v2$2);\n const denom = dot00 * dot11 - dot01 * dot01;\n // collinear or singular triangle\n if (denom === 0) // arbitrary location outside of triangle?\n // not sure if this is the best idea, maybe should be returning undefined\n return target.set(-2, -1, -1);\n const invDenom = 1 / denom;\n const u = (dot11 * dot02 - dot01 * dot12) * invDenom;\n const v = (dot00 * dot12 - dot01 * dot02) * invDenom;\n // barycentric coordinates must always sum to 1\n return target.set(1 - u - v, v, u);\n }\n static containsPoint(point, a, b, c) {\n this.getBarycoord(point, a, b, c, $d5b33d7c30034067$var$_v3$1);\n return $d5b33d7c30034067$var$_v3$1.x >= 0 && $d5b33d7c30034067$var$_v3$1.y >= 0 && $d5b33d7c30034067$var$_v3$1.x + $d5b33d7c30034067$var$_v3$1.y <= 1;\n }\n static getUV(point, p1, p2, p3, uv1, uv2, uv3, target) {\n if ($d5b33d7c30034067$var$warnedGetUV === false) {\n console.warn(\"THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().\");\n $d5b33d7c30034067$var$warnedGetUV = true;\n }\n return this.getInterpolation(point, p1, p2, p3, uv1, uv2, uv3, target);\n }\n static getInterpolation(point, p1, p2, p3, v1, v2, v3, target) {\n this.getBarycoord(point, p1, p2, p3, $d5b33d7c30034067$var$_v3$1);\n target.setScalar(0);\n target.addScaledVector(v1, $d5b33d7c30034067$var$_v3$1.x);\n target.addScaledVector(v2, $d5b33d7c30034067$var$_v3$1.y);\n target.addScaledVector(v3, $d5b33d7c30034067$var$_v3$1.z);\n return target;\n }\n static isFrontFacing(a, b, c, direction) {\n $d5b33d7c30034067$var$_v0$1.subVectors(c, b);\n $d5b33d7c30034067$var$_v1$3.subVectors(a, b);\n // strictly front facing\n return $d5b33d7c30034067$var$_v0$1.cross($d5b33d7c30034067$var$_v1$3).dot(direction) < 0 ? true : false;\n }\n set(a, b, c) {\n this.a.copy(a);\n this.b.copy(b);\n this.c.copy(c);\n return this;\n }\n setFromPointsAndIndices(points, i0, i1, i2) {\n this.a.copy(points[i0]);\n this.b.copy(points[i1]);\n this.c.copy(points[i2]);\n return this;\n }\n setFromAttributeAndIndices(attribute, i0, i1, i2) {\n this.a.fromBufferAttribute(attribute, i0);\n this.b.fromBufferAttribute(attribute, i1);\n this.c.fromBufferAttribute(attribute, i2);\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(triangle) {\n this.a.copy(triangle.a);\n this.b.copy(triangle.b);\n this.c.copy(triangle.c);\n return this;\n }\n getArea() {\n $d5b33d7c30034067$var$_v0$1.subVectors(this.c, this.b);\n $d5b33d7c30034067$var$_v1$3.subVectors(this.a, this.b);\n return $d5b33d7c30034067$var$_v0$1.cross($d5b33d7c30034067$var$_v1$3).length() * 0.5;\n }\n getMidpoint(target) {\n return target.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);\n }\n getNormal(target) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.getNormal(this.a, this.b, this.c, target);\n }\n getPlane(target) {\n return target.setFromCoplanarPoints(this.a, this.b, this.c);\n }\n getBarycoord(point, target) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.getBarycoord(point, this.a, this.b, this.c, target);\n }\n getUV(point, uv1, uv2, uv3, target) {\n if ($d5b33d7c30034067$var$warnedGetUV === false) {\n console.warn(\"THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().\");\n $d5b33d7c30034067$var$warnedGetUV = true;\n }\n return $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation(point, this.a, this.b, this.c, uv1, uv2, uv3, target);\n }\n getInterpolation(point, v1, v2, v3, target) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation(point, this.a, this.b, this.c, v1, v2, v3, target);\n }\n containsPoint(point) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.containsPoint(point, this.a, this.b, this.c);\n }\n isFrontFacing(direction) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.isFrontFacing(this.a, this.b, this.c, direction);\n }\n intersectsBox(box) {\n return box.intersectsTriangle(this);\n }\n closestPointToPoint(p, target) {\n const a = this.a, b = this.b, c = this.c;\n let v, w;\n // algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n // published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n // under the accompanying license; see chapter 5.1.5 for detailed explanation.\n // basically, we're distinguishing which of the voronoi regions of the triangle\n // the point lies in with the minimum amount of redundant computation.\n $d5b33d7c30034067$var$_vab.subVectors(b, a);\n $d5b33d7c30034067$var$_vac.subVectors(c, a);\n $d5b33d7c30034067$var$_vap.subVectors(p, a);\n const d1 = $d5b33d7c30034067$var$_vab.dot($d5b33d7c30034067$var$_vap);\n const d2 = $d5b33d7c30034067$var$_vac.dot($d5b33d7c30034067$var$_vap);\n if (d1 <= 0 && d2 <= 0) // vertex region of A; barycentric coords (1, 0, 0)\n return target.copy(a);\n $d5b33d7c30034067$var$_vbp.subVectors(p, b);\n const d3 = $d5b33d7c30034067$var$_vab.dot($d5b33d7c30034067$var$_vbp);\n const d4 = $d5b33d7c30034067$var$_vac.dot($d5b33d7c30034067$var$_vbp);\n if (d3 >= 0 && d4 <= d3) // vertex region of B; barycentric coords (0, 1, 0)\n return target.copy(b);\n const vc = d1 * d4 - d3 * d2;\n if (vc <= 0 && d1 >= 0 && d3 <= 0) {\n v = d1 / (d1 - d3);\n // edge region of AB; barycentric coords (1-v, v, 0)\n return target.copy(a).addScaledVector($d5b33d7c30034067$var$_vab, v);\n }\n $d5b33d7c30034067$var$_vcp.subVectors(p, c);\n const d5 = $d5b33d7c30034067$var$_vab.dot($d5b33d7c30034067$var$_vcp);\n const d6 = $d5b33d7c30034067$var$_vac.dot($d5b33d7c30034067$var$_vcp);\n if (d6 >= 0 && d5 <= d6) // vertex region of C; barycentric coords (0, 0, 1)\n return target.copy(c);\n const vb = d5 * d2 - d1 * d6;\n if (vb <= 0 && d2 >= 0 && d6 <= 0) {\n w = d2 / (d2 - d6);\n // edge region of AC; barycentric coords (1-w, 0, w)\n return target.copy(a).addScaledVector($d5b33d7c30034067$var$_vac, w);\n }\n const va = d3 * d6 - d5 * d4;\n if (va <= 0 && d4 - d3 >= 0 && d5 - d6 >= 0) {\n $d5b33d7c30034067$var$_vbc.subVectors(c, b);\n w = (d4 - d3) / (d4 - d3 + (d5 - d6));\n // edge region of BC; barycentric coords (0, 1-w, w)\n return target.copy(b).addScaledVector($d5b33d7c30034067$var$_vbc, w); // edge region of BC\n }\n // face region\n const denom = 1 / (va + vb + vc);\n // u = va * denom\n v = vb * denom;\n w = vc * denom;\n return target.copy(a).addScaledVector($d5b33d7c30034067$var$_vab, v).addScaledVector($d5b33d7c30034067$var$_vac, w);\n }\n equals(triangle) {\n return triangle.a.equals(this.a) && triangle.b.equals(this.b) && triangle.c.equals(this.c);\n }\n}\nlet $d5b33d7c30034067$var$materialId = 0;\nclass $d5b33d7c30034067$export$a2d8b23205c25948 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isMaterial = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$materialId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.type = \"Material\";\n this.blending = $d5b33d7c30034067$export$5b29a26d96ee6af0;\n this.side = $d5b33d7c30034067$export$2ede184fc2998901;\n this.vertexColors = false;\n this.opacity = 1;\n this.transparent = false;\n this.alphaHash = false;\n this.blendSrc = $d5b33d7c30034067$export$d5773124e86cf28c;\n this.blendDst = $d5b33d7c30034067$export$11d468cc7f19e971;\n this.blendEquation = $d5b33d7c30034067$export$20183a0484ce21a0;\n this.blendSrcAlpha = null;\n this.blendDstAlpha = null;\n this.blendEquationAlpha = null;\n this.depthFunc = $d5b33d7c30034067$export$296f78a0b892f81a;\n this.depthTest = true;\n this.depthWrite = true;\n this.stencilWriteMask = 0xff;\n this.stencilFunc = $d5b33d7c30034067$export$14cf96713ddd97a8;\n this.stencilRef = 0;\n this.stencilFuncMask = 0xff;\n this.stencilFail = $d5b33d7c30034067$export$9f542ae4b5baca34;\n this.stencilZFail = $d5b33d7c30034067$export$9f542ae4b5baca34;\n this.stencilZPass = $d5b33d7c30034067$export$9f542ae4b5baca34;\n this.stencilWrite = false;\n this.clippingPlanes = null;\n this.clipIntersection = false;\n this.clipShadows = false;\n this.shadowSide = null;\n this.colorWrite = true;\n this.precision = null; // override the renderer's default precision for this material\n this.polygonOffset = false;\n this.polygonOffsetFactor = 0;\n this.polygonOffsetUnits = 0;\n this.dithering = false;\n this.alphaToCoverage = false;\n this.premultipliedAlpha = false;\n this.forceSinglePass = false;\n this.visible = true;\n this.toneMapped = true;\n this.userData = {};\n this.version = 0;\n this._alphaTest = 0;\n }\n get alphaTest() {\n return this._alphaTest;\n }\n set alphaTest(value) {\n if (this._alphaTest > 0 !== value > 0) this.version++;\n this._alphaTest = value;\n }\n onBuild() {}\n onBeforeRender() {}\n onBeforeCompile() {}\n customProgramCacheKey() {\n return this.onBeforeCompile.toString();\n }\n setValues(values) {\n if (values === undefined) return;\n for(const key in values){\n const newValue = values[key];\n if (newValue === undefined) {\n console.warn(`THREE.Material: parameter '${key}' has value of undefined.`);\n continue;\n }\n const currentValue = this[key];\n if (currentValue === undefined) {\n console.warn(`THREE.Material: '${key}' is not a property of THREE.${this.type}.`);\n continue;\n }\n if (currentValue && currentValue.isColor) currentValue.set(newValue);\n else if (currentValue && currentValue.isVector3 && newValue && newValue.isVector3) currentValue.copy(newValue);\n else this[key] = newValue;\n }\n }\n toJSON(meta) {\n const isRootObject = meta === undefined || typeof meta === \"string\";\n if (isRootObject) meta = {\n textures: {},\n images: {}\n };\n const data = {\n metadata: {\n version: 4.6,\n type: \"Material\",\n generator: \"Material.toJSON\"\n }\n };\n // standard Material serialization\n data.uuid = this.uuid;\n data.type = this.type;\n if (this.name !== \"\") data.name = this.name;\n if (this.color && this.color.isColor) data.color = this.color.getHex();\n if (this.roughness !== undefined) data.roughness = this.roughness;\n if (this.metalness !== undefined) data.metalness = this.metalness;\n if (this.sheen !== undefined) data.sheen = this.sheen;\n if (this.sheenColor && this.sheenColor.isColor) data.sheenColor = this.sheenColor.getHex();\n if (this.sheenRoughness !== undefined) data.sheenRoughness = this.sheenRoughness;\n if (this.emissive && this.emissive.isColor) data.emissive = this.emissive.getHex();\n if (this.emissiveIntensity && this.emissiveIntensity !== 1) data.emissiveIntensity = this.emissiveIntensity;\n if (this.specular && this.specular.isColor) data.specular = this.specular.getHex();\n if (this.specularIntensity !== undefined) data.specularIntensity = this.specularIntensity;\n if (this.specularColor && this.specularColor.isColor) data.specularColor = this.specularColor.getHex();\n if (this.shininess !== undefined) data.shininess = this.shininess;\n if (this.clearcoat !== undefined) data.clearcoat = this.clearcoat;\n if (this.clearcoatRoughness !== undefined) data.clearcoatRoughness = this.clearcoatRoughness;\n if (this.clearcoatMap && this.clearcoatMap.isTexture) data.clearcoatMap = this.clearcoatMap.toJSON(meta).uuid;\n if (this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture) data.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(meta).uuid;\n if (this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture) {\n data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(meta).uuid;\n data.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n }\n if (this.iridescence !== undefined) data.iridescence = this.iridescence;\n if (this.iridescenceIOR !== undefined) data.iridescenceIOR = this.iridescenceIOR;\n if (this.iridescenceThicknessRange !== undefined) data.iridescenceThicknessRange = this.iridescenceThicknessRange;\n if (this.iridescenceMap && this.iridescenceMap.isTexture) data.iridescenceMap = this.iridescenceMap.toJSON(meta).uuid;\n if (this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture) data.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(meta).uuid;\n if (this.anisotropy !== undefined) data.anisotropy = this.anisotropy;\n if (this.anisotropyRotation !== undefined) data.anisotropyRotation = this.anisotropyRotation;\n if (this.anisotropyMap && this.anisotropyMap.isTexture) data.anisotropyMap = this.anisotropyMap.toJSON(meta).uuid;\n if (this.map && this.map.isTexture) data.map = this.map.toJSON(meta).uuid;\n if (this.matcap && this.matcap.isTexture) data.matcap = this.matcap.toJSON(meta).uuid;\n if (this.alphaMap && this.alphaMap.isTexture) data.alphaMap = this.alphaMap.toJSON(meta).uuid;\n if (this.lightMap && this.lightMap.isTexture) {\n data.lightMap = this.lightMap.toJSON(meta).uuid;\n data.lightMapIntensity = this.lightMapIntensity;\n }\n if (this.aoMap && this.aoMap.isTexture) {\n data.aoMap = this.aoMap.toJSON(meta).uuid;\n data.aoMapIntensity = this.aoMapIntensity;\n }\n if (this.bumpMap && this.bumpMap.isTexture) {\n data.bumpMap = this.bumpMap.toJSON(meta).uuid;\n data.bumpScale = this.bumpScale;\n }\n if (this.normalMap && this.normalMap.isTexture) {\n data.normalMap = this.normalMap.toJSON(meta).uuid;\n data.normalMapType = this.normalMapType;\n data.normalScale = this.normalScale.toArray();\n }\n if (this.displacementMap && this.displacementMap.isTexture) {\n data.displacementMap = this.displacementMap.toJSON(meta).uuid;\n data.displacementScale = this.displacementScale;\n data.displacementBias = this.displacementBias;\n }\n if (this.roughnessMap && this.roughnessMap.isTexture) data.roughnessMap = this.roughnessMap.toJSON(meta).uuid;\n if (this.metalnessMap && this.metalnessMap.isTexture) data.metalnessMap = this.metalnessMap.toJSON(meta).uuid;\n if (this.emissiveMap && this.emissiveMap.isTexture) data.emissiveMap = this.emissiveMap.toJSON(meta).uuid;\n if (this.specularMap && this.specularMap.isTexture) data.specularMap = this.specularMap.toJSON(meta).uuid;\n if (this.specularIntensityMap && this.specularIntensityMap.isTexture) data.specularIntensityMap = this.specularIntensityMap.toJSON(meta).uuid;\n if (this.specularColorMap && this.specularColorMap.isTexture) data.specularColorMap = this.specularColorMap.toJSON(meta).uuid;\n if (this.envMap && this.envMap.isTexture) {\n data.envMap = this.envMap.toJSON(meta).uuid;\n if (this.combine !== undefined) data.combine = this.combine;\n }\n if (this.envMapIntensity !== undefined) data.envMapIntensity = this.envMapIntensity;\n if (this.reflectivity !== undefined) data.reflectivity = this.reflectivity;\n if (this.refractionRatio !== undefined) data.refractionRatio = this.refractionRatio;\n if (this.gradientMap && this.gradientMap.isTexture) data.gradientMap = this.gradientMap.toJSON(meta).uuid;\n if (this.transmission !== undefined) data.transmission = this.transmission;\n if (this.transmissionMap && this.transmissionMap.isTexture) data.transmissionMap = this.transmissionMap.toJSON(meta).uuid;\n if (this.thickness !== undefined) data.thickness = this.thickness;\n if (this.thicknessMap && this.thicknessMap.isTexture) data.thicknessMap = this.thicknessMap.toJSON(meta).uuid;\n if (this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity) data.attenuationDistance = this.attenuationDistance;\n if (this.attenuationColor !== undefined) data.attenuationColor = this.attenuationColor.getHex();\n if (this.size !== undefined) data.size = this.size;\n if (this.shadowSide !== null) data.shadowSide = this.shadowSide;\n if (this.sizeAttenuation !== undefined) data.sizeAttenuation = this.sizeAttenuation;\n if (this.blending !== $d5b33d7c30034067$export$5b29a26d96ee6af0) data.blending = this.blending;\n if (this.side !== $d5b33d7c30034067$export$2ede184fc2998901) data.side = this.side;\n if (this.vertexColors) data.vertexColors = true;\n if (this.opacity < 1) data.opacity = this.opacity;\n if (this.transparent === true) data.transparent = this.transparent;\n data.depthFunc = this.depthFunc;\n data.depthTest = this.depthTest;\n data.depthWrite = this.depthWrite;\n data.colorWrite = this.colorWrite;\n data.stencilWrite = this.stencilWrite;\n data.stencilWriteMask = this.stencilWriteMask;\n data.stencilFunc = this.stencilFunc;\n data.stencilRef = this.stencilRef;\n data.stencilFuncMask = this.stencilFuncMask;\n data.stencilFail = this.stencilFail;\n data.stencilZFail = this.stencilZFail;\n data.stencilZPass = this.stencilZPass;\n // rotation (SpriteMaterial)\n if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;\n if (this.polygonOffset === true) data.polygonOffset = true;\n if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;\n if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;\n if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;\n if (this.dashSize !== undefined) data.dashSize = this.dashSize;\n if (this.gapSize !== undefined) data.gapSize = this.gapSize;\n if (this.scale !== undefined) data.scale = this.scale;\n if (this.dithering === true) data.dithering = true;\n if (this.alphaTest > 0) data.alphaTest = this.alphaTest;\n if (this.alphaHash === true) data.alphaHash = this.alphaHash;\n if (this.alphaToCoverage === true) data.alphaToCoverage = this.alphaToCoverage;\n if (this.premultipliedAlpha === true) data.premultipliedAlpha = this.premultipliedAlpha;\n if (this.forceSinglePass === true) data.forceSinglePass = this.forceSinglePass;\n if (this.wireframe === true) data.wireframe = this.wireframe;\n if (this.wireframeLinewidth > 1) data.wireframeLinewidth = this.wireframeLinewidth;\n if (this.wireframeLinecap !== \"round\") data.wireframeLinecap = this.wireframeLinecap;\n if (this.wireframeLinejoin !== \"round\") data.wireframeLinejoin = this.wireframeLinejoin;\n if (this.flatShading === true) data.flatShading = this.flatShading;\n if (this.visible === false) data.visible = false;\n if (this.toneMapped === false) data.toneMapped = false;\n if (this.fog === false) data.fog = false;\n if (Object.keys(this.userData).length > 0) data.userData = this.userData;\n // TODO: Copied from Object3D.toJSON\n function extractFromCache(cache) {\n const values = [];\n for(const key in cache){\n const data = cache[key];\n delete data.metadata;\n values.push(data);\n }\n return values;\n }\n if (isRootObject) {\n const textures = extractFromCache(meta.textures);\n const images = extractFromCache(meta.images);\n if (textures.length > 0) data.textures = textures;\n if (images.length > 0) data.images = images;\n }\n return data;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.name = source.name;\n this.blending = source.blending;\n this.side = source.side;\n this.vertexColors = source.vertexColors;\n this.opacity = source.opacity;\n this.transparent = source.transparent;\n this.blendSrc = source.blendSrc;\n this.blendDst = source.blendDst;\n this.blendEquation = source.blendEquation;\n this.blendSrcAlpha = source.blendSrcAlpha;\n this.blendDstAlpha = source.blendDstAlpha;\n this.blendEquationAlpha = source.blendEquationAlpha;\n this.depthFunc = source.depthFunc;\n this.depthTest = source.depthTest;\n this.depthWrite = source.depthWrite;\n this.stencilWriteMask = source.stencilWriteMask;\n this.stencilFunc = source.stencilFunc;\n this.stencilRef = source.stencilRef;\n this.stencilFuncMask = source.stencilFuncMask;\n this.stencilFail = source.stencilFail;\n this.stencilZFail = source.stencilZFail;\n this.stencilZPass = source.stencilZPass;\n this.stencilWrite = source.stencilWrite;\n const srcPlanes = source.clippingPlanes;\n let dstPlanes = null;\n if (srcPlanes !== null) {\n const n = srcPlanes.length;\n dstPlanes = new Array(n);\n for(let i = 0; i !== n; ++i)dstPlanes[i] = srcPlanes[i].clone();\n }\n this.clippingPlanes = dstPlanes;\n this.clipIntersection = source.clipIntersection;\n this.clipShadows = source.clipShadows;\n this.shadowSide = source.shadowSide;\n this.colorWrite = source.colorWrite;\n this.precision = source.precision;\n this.polygonOffset = source.polygonOffset;\n this.polygonOffsetFactor = source.polygonOffsetFactor;\n this.polygonOffsetUnits = source.polygonOffsetUnits;\n this.dithering = source.dithering;\n this.alphaTest = source.alphaTest;\n this.alphaHash = source.alphaHash;\n this.alphaToCoverage = source.alphaToCoverage;\n this.premultipliedAlpha = source.premultipliedAlpha;\n this.forceSinglePass = source.forceSinglePass;\n this.visible = source.visible;\n this.toneMapped = source.toneMapped;\n this.userData = JSON.parse(JSON.stringify(source.userData));\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n}\nconst $d5b33d7c30034067$var$_colorKeywords = {\n \"aliceblue\": 0xF0F8FF,\n \"antiquewhite\": 0xFAEBD7,\n \"aqua\": 0x00FFFF,\n \"aquamarine\": 0x7FFFD4,\n \"azure\": 0xF0FFFF,\n \"beige\": 0xF5F5DC,\n \"bisque\": 0xFFE4C4,\n \"black\": 0x000000,\n \"blanchedalmond\": 0xFFEBCD,\n \"blue\": 0x0000FF,\n \"blueviolet\": 0x8A2BE2,\n \"brown\": 0xA52A2A,\n \"burlywood\": 0xDEB887,\n \"cadetblue\": 0x5F9EA0,\n \"chartreuse\": 0x7FFF00,\n \"chocolate\": 0xD2691E,\n \"coral\": 0xFF7F50,\n \"cornflowerblue\": 0x6495ED,\n \"cornsilk\": 0xFFF8DC,\n \"crimson\": 0xDC143C,\n \"cyan\": 0x00FFFF,\n \"darkblue\": 0x00008B,\n \"darkcyan\": 0x008B8B,\n \"darkgoldenrod\": 0xB8860B,\n \"darkgray\": 0xA9A9A9,\n \"darkgreen\": 0x006400,\n \"darkgrey\": 0xA9A9A9,\n \"darkkhaki\": 0xBDB76B,\n \"darkmagenta\": 0x8B008B,\n \"darkolivegreen\": 0x556B2F,\n \"darkorange\": 0xFF8C00,\n \"darkorchid\": 0x9932CC,\n \"darkred\": 0x8B0000,\n \"darksalmon\": 0xE9967A,\n \"darkseagreen\": 0x8FBC8F,\n \"darkslateblue\": 0x483D8B,\n \"darkslategray\": 0x2F4F4F,\n \"darkslategrey\": 0x2F4F4F,\n \"darkturquoise\": 0x00CED1,\n \"darkviolet\": 0x9400D3,\n \"deeppink\": 0xFF1493,\n \"deepskyblue\": 0x00BFFF,\n \"dimgray\": 0x696969,\n \"dimgrey\": 0x696969,\n \"dodgerblue\": 0x1E90FF,\n \"firebrick\": 0xB22222,\n \"floralwhite\": 0xFFFAF0,\n \"forestgreen\": 0x228B22,\n \"fuchsia\": 0xFF00FF,\n \"gainsboro\": 0xDCDCDC,\n \"ghostwhite\": 0xF8F8FF,\n \"gold\": 0xFFD700,\n \"goldenrod\": 0xDAA520,\n \"gray\": 0x808080,\n \"green\": 0x008000,\n \"greenyellow\": 0xADFF2F,\n \"grey\": 0x808080,\n \"honeydew\": 0xF0FFF0,\n \"hotpink\": 0xFF69B4,\n \"indianred\": 0xCD5C5C,\n \"indigo\": 0x4B0082,\n \"ivory\": 0xFFFFF0,\n \"khaki\": 0xF0E68C,\n \"lavender\": 0xE6E6FA,\n \"lavenderblush\": 0xFFF0F5,\n \"lawngreen\": 0x7CFC00,\n \"lemonchiffon\": 0xFFFACD,\n \"lightblue\": 0xADD8E6,\n \"lightcoral\": 0xF08080,\n \"lightcyan\": 0xE0FFFF,\n \"lightgoldenrodyellow\": 0xFAFAD2,\n \"lightgray\": 0xD3D3D3,\n \"lightgreen\": 0x90EE90,\n \"lightgrey\": 0xD3D3D3,\n \"lightpink\": 0xFFB6C1,\n \"lightsalmon\": 0xFFA07A,\n \"lightseagreen\": 0x20B2AA,\n \"lightskyblue\": 0x87CEFA,\n \"lightslategray\": 0x778899,\n \"lightslategrey\": 0x778899,\n \"lightsteelblue\": 0xB0C4DE,\n \"lightyellow\": 0xFFFFE0,\n \"lime\": 0x00FF00,\n \"limegreen\": 0x32CD32,\n \"linen\": 0xFAF0E6,\n \"magenta\": 0xFF00FF,\n \"maroon\": 0x800000,\n \"mediumaquamarine\": 0x66CDAA,\n \"mediumblue\": 0x0000CD,\n \"mediumorchid\": 0xBA55D3,\n \"mediumpurple\": 0x9370DB,\n \"mediumseagreen\": 0x3CB371,\n \"mediumslateblue\": 0x7B68EE,\n \"mediumspringgreen\": 0x00FA9A,\n \"mediumturquoise\": 0x48D1CC,\n \"mediumvioletred\": 0xC71585,\n \"midnightblue\": 0x191970,\n \"mintcream\": 0xF5FFFA,\n \"mistyrose\": 0xFFE4E1,\n \"moccasin\": 0xFFE4B5,\n \"navajowhite\": 0xFFDEAD,\n \"navy\": 0x000080,\n \"oldlace\": 0xFDF5E6,\n \"olive\": 0x808000,\n \"olivedrab\": 0x6B8E23,\n \"orange\": 0xFFA500,\n \"orangered\": 0xFF4500,\n \"orchid\": 0xDA70D6,\n \"palegoldenrod\": 0xEEE8AA,\n \"palegreen\": 0x98FB98,\n \"paleturquoise\": 0xAFEEEE,\n \"palevioletred\": 0xDB7093,\n \"papayawhip\": 0xFFEFD5,\n \"peachpuff\": 0xFFDAB9,\n \"peru\": 0xCD853F,\n \"pink\": 0xFFC0CB,\n \"plum\": 0xDDA0DD,\n \"powderblue\": 0xB0E0E6,\n \"purple\": 0x800080,\n \"rebeccapurple\": 0x663399,\n \"red\": 0xFF0000,\n \"rosybrown\": 0xBC8F8F,\n \"royalblue\": 0x4169E1,\n \"saddlebrown\": 0x8B4513,\n \"salmon\": 0xFA8072,\n \"sandybrown\": 0xF4A460,\n \"seagreen\": 0x2E8B57,\n \"seashell\": 0xFFF5EE,\n \"sienna\": 0xA0522D,\n \"silver\": 0xC0C0C0,\n \"skyblue\": 0x87CEEB,\n \"slateblue\": 0x6A5ACD,\n \"slategray\": 0x708090,\n \"slategrey\": 0x708090,\n \"snow\": 0xFFFAFA,\n \"springgreen\": 0x00FF7F,\n \"steelblue\": 0x4682B4,\n \"tan\": 0xD2B48C,\n \"teal\": 0x008080,\n \"thistle\": 0xD8BFD8,\n \"tomato\": 0xFF6347,\n \"turquoise\": 0x40E0D0,\n \"violet\": 0xEE82EE,\n \"wheat\": 0xF5DEB3,\n \"white\": 0xFFFFFF,\n \"whitesmoke\": 0xF5F5F5,\n \"yellow\": 0xFFFF00,\n \"yellowgreen\": 0x9ACD32\n};\nconst $d5b33d7c30034067$var$_hslA = {\n h: 0,\n s: 0,\n l: 0\n};\nconst $d5b33d7c30034067$var$_hslB = {\n h: 0,\n s: 0,\n l: 0\n};\nfunction $d5b33d7c30034067$var$hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 0.5) return q;\n if (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t);\n return p;\n}\nclass $d5b33d7c30034067$export$892596cec99bc70e {\n constructor(r, g, b){\n this.isColor = true;\n this.r = 1;\n this.g = 1;\n this.b = 1;\n return this.set(r, g, b);\n }\n set(r, g, b) {\n if (g === undefined && b === undefined) {\n // r is THREE.Color, hex or string\n const value = r;\n if (value && value.isColor) this.copy(value);\n else if (typeof value === \"number\") this.setHex(value);\n else if (typeof value === \"string\") this.setStyle(value);\n } else this.setRGB(r, g, b);\n return this;\n }\n setScalar(scalar) {\n this.r = scalar;\n this.g = scalar;\n this.b = scalar;\n return this;\n }\n setHex(hex, colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n hex = Math.floor(hex);\n this.r = (hex >> 16 & 255) / 255;\n this.g = (hex >> 8 & 255) / 255;\n this.b = (hex & 255) / 255;\n $d5b33d7c30034067$export$5e6fd513f44698c.toWorkingColorSpace(this, colorSpace1);\n return this;\n }\n setRGB(r, g, b, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n this.r = r;\n this.g = g;\n this.b = b;\n $d5b33d7c30034067$export$5e6fd513f44698c.toWorkingColorSpace(this, colorSpace1);\n return this;\n }\n setHSL(h, s, l, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n // h,s,l ranges are in 0.0 - 1.0\n h = $d5b33d7c30034067$var$euclideanModulo(h, 1);\n s = $d5b33d7c30034067$var$clamp(s, 0, 1);\n l = $d5b33d7c30034067$var$clamp(l, 0, 1);\n if (s === 0) this.r = this.g = this.b = l;\n else {\n const p = l <= 0.5 ? l * (1 + s) : l + s - l * s;\n const q = 2 * l - p;\n this.r = $d5b33d7c30034067$var$hue2rgb(q, p, h + 1 / 3);\n this.g = $d5b33d7c30034067$var$hue2rgb(q, p, h);\n this.b = $d5b33d7c30034067$var$hue2rgb(q, p, h - 1 / 3);\n }\n $d5b33d7c30034067$export$5e6fd513f44698c.toWorkingColorSpace(this, colorSpace1);\n return this;\n }\n setStyle(style, colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n function handleAlpha(string) {\n if (string === undefined) return;\n if (parseFloat(string) < 1) console.warn(\"THREE.Color: Alpha component of \" + style + \" will be ignored.\");\n }\n let m;\n if (m = /^(\\w+)\\(([^\\)]*)\\)/.exec(style)) {\n // rgb / hsl\n let color;\n const name = m[1];\n const components = m[2];\n switch(name){\n case \"rgb\":\n case \"rgba\":\n if (color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n // rgb(255,0,0) rgba(255,0,0,0.5)\n handleAlpha(color[4]);\n return this.setRGB(Math.min(255, parseInt(color[1], 10)) / 255, Math.min(255, parseInt(color[2], 10)) / 255, Math.min(255, parseInt(color[3], 10)) / 255, colorSpace1);\n }\n if (color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n handleAlpha(color[4]);\n return this.setRGB(Math.min(100, parseInt(color[1], 10)) / 100, Math.min(100, parseInt(color[2], 10)) / 100, Math.min(100, parseInt(color[3], 10)) / 100, colorSpace1);\n }\n break;\n case \"hsl\":\n case \"hsla\":\n if (color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n // hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n handleAlpha(color[4]);\n return this.setHSL(parseFloat(color[1]) / 360, parseFloat(color[2]) / 100, parseFloat(color[3]) / 100, colorSpace1);\n }\n break;\n default:\n console.warn(\"THREE.Color: Unknown color model \" + style);\n }\n } else if (m = /^\\#([A-Fa-f\\d]+)$/.exec(style)) {\n // hex color\n const hex = m[1];\n const size = hex.length;\n if (size === 3) // #ff0\n return this.setRGB(parseInt(hex.charAt(0), 16) / 15, parseInt(hex.charAt(1), 16) / 15, parseInt(hex.charAt(2), 16) / 15, colorSpace1);\n else if (size === 6) // #ff0000\n return this.setHex(parseInt(hex, 16), colorSpace1);\n else console.warn(\"THREE.Color: Invalid hex color \" + style);\n } else if (style && style.length > 0) return this.setColorName(style, colorSpace1);\n return this;\n }\n setColorName(style, colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n // color keywords\n const hex = $d5b33d7c30034067$var$_colorKeywords[style.toLowerCase()];\n if (hex !== undefined) // red\n this.setHex(hex, colorSpace1);\n else // unknown color\n console.warn(\"THREE.Color: Unknown color \" + style);\n return this;\n }\n clone() {\n return new this.constructor(this.r, this.g, this.b);\n }\n copy(color) {\n this.r = color.r;\n this.g = color.g;\n this.b = color.b;\n return this;\n }\n copySRGBToLinear(color) {\n this.r = $d5b33d7c30034067$var$SRGBToLinear(color.r);\n this.g = $d5b33d7c30034067$var$SRGBToLinear(color.g);\n this.b = $d5b33d7c30034067$var$SRGBToLinear(color.b);\n return this;\n }\n copyLinearToSRGB(color) {\n this.r = $d5b33d7c30034067$var$LinearToSRGB(color.r);\n this.g = $d5b33d7c30034067$var$LinearToSRGB(color.g);\n this.b = $d5b33d7c30034067$var$LinearToSRGB(color.b);\n return this;\n }\n convertSRGBToLinear() {\n this.copySRGBToLinear(this);\n return this;\n }\n convertLinearToSRGB() {\n this.copyLinearToSRGB(this);\n return this;\n }\n getHex(colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n return Math.round($d5b33d7c30034067$var$clamp($d5b33d7c30034067$var$_color.r * 255, 0, 255)) * 65536 + Math.round($d5b33d7c30034067$var$clamp($d5b33d7c30034067$var$_color.g * 255, 0, 255)) * 256 + Math.round($d5b33d7c30034067$var$clamp($d5b33d7c30034067$var$_color.b * 255, 0, 255));\n }\n getHexString(colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n return (\"000000\" + this.getHex(colorSpace1).toString(16)).slice(-6);\n }\n getHSL(target, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n // h,s,l ranges are in 0.0 - 1.0\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n const r = $d5b33d7c30034067$var$_color.r, g = $d5b33d7c30034067$var$_color.g, b = $d5b33d7c30034067$var$_color.b;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let hue, saturation;\n const lightness = (min + max) / 2.0;\n if (min === max) {\n hue = 0;\n saturation = 0;\n } else {\n const delta = max - min;\n saturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);\n switch(max){\n case r:\n hue = (g - b) / delta + (g < b ? 6 : 0);\n break;\n case g:\n hue = (b - r) / delta + 2;\n break;\n case b:\n hue = (r - g) / delta + 4;\n break;\n }\n hue /= 6;\n }\n target.h = hue;\n target.s = saturation;\n target.l = lightness;\n return target;\n }\n getRGB(target, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n target.r = $d5b33d7c30034067$var$_color.r;\n target.g = $d5b33d7c30034067$var$_color.g;\n target.b = $d5b33d7c30034067$var$_color.b;\n return target;\n }\n getStyle(colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n const r = $d5b33d7c30034067$var$_color.r, g = $d5b33d7c30034067$var$_color.g, b = $d5b33d7c30034067$var$_color.b;\n if (colorSpace1 !== $d5b33d7c30034067$export$561f394b24edfcaa) // Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/).\n return `color(${colorSpace1} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`;\n return `rgb(${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)})`;\n }\n offsetHSL(h, s, l) {\n this.getHSL($d5b33d7c30034067$var$_hslA);\n $d5b33d7c30034067$var$_hslA.h += h;\n $d5b33d7c30034067$var$_hslA.s += s;\n $d5b33d7c30034067$var$_hslA.l += l;\n this.setHSL($d5b33d7c30034067$var$_hslA.h, $d5b33d7c30034067$var$_hslA.s, $d5b33d7c30034067$var$_hslA.l);\n return this;\n }\n add(color) {\n this.r += color.r;\n this.g += color.g;\n this.b += color.b;\n return this;\n }\n addColors(color1, color2) {\n this.r = color1.r + color2.r;\n this.g = color1.g + color2.g;\n this.b = color1.b + color2.b;\n return this;\n }\n addScalar(s) {\n this.r += s;\n this.g += s;\n this.b += s;\n return this;\n }\n sub(color) {\n this.r = Math.max(0, this.r - color.r);\n this.g = Math.max(0, this.g - color.g);\n this.b = Math.max(0, this.b - color.b);\n return this;\n }\n multiply(color) {\n this.r *= color.r;\n this.g *= color.g;\n this.b *= color.b;\n return this;\n }\n multiplyScalar(s) {\n this.r *= s;\n this.g *= s;\n this.b *= s;\n return this;\n }\n lerp(color, alpha) {\n this.r += (color.r - this.r) * alpha;\n this.g += (color.g - this.g) * alpha;\n this.b += (color.b - this.b) * alpha;\n return this;\n }\n lerpColors(color1, color2, alpha) {\n this.r = color1.r + (color2.r - color1.r) * alpha;\n this.g = color1.g + (color2.g - color1.g) * alpha;\n this.b = color1.b + (color2.b - color1.b) * alpha;\n return this;\n }\n lerpHSL(color, alpha) {\n this.getHSL($d5b33d7c30034067$var$_hslA);\n color.getHSL($d5b33d7c30034067$var$_hslB);\n const h = $d5b33d7c30034067$var$lerp($d5b33d7c30034067$var$_hslA.h, $d5b33d7c30034067$var$_hslB.h, alpha);\n const s = $d5b33d7c30034067$var$lerp($d5b33d7c30034067$var$_hslA.s, $d5b33d7c30034067$var$_hslB.s, alpha);\n const l = $d5b33d7c30034067$var$lerp($d5b33d7c30034067$var$_hslA.l, $d5b33d7c30034067$var$_hslB.l, alpha);\n this.setHSL(h, s, l);\n return this;\n }\n setFromVector3(v) {\n this.r = v.x;\n this.g = v.y;\n this.b = v.z;\n return this;\n }\n applyMatrix3(m) {\n const r = this.r, g = this.g, b = this.b;\n const e = m.elements;\n this.r = e[0] * r + e[3] * g + e[6] * b;\n this.g = e[1] * r + e[4] * g + e[7] * b;\n this.b = e[2] * r + e[5] * g + e[8] * b;\n return this;\n }\n equals(c) {\n return c.r === this.r && c.g === this.g && c.b === this.b;\n }\n fromArray(array, offset = 0) {\n this.r = array[offset];\n this.g = array[offset + 1];\n this.b = array[offset + 2];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.r;\n array[offset + 1] = this.g;\n array[offset + 2] = this.b;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.r = attribute.getX(index);\n this.g = attribute.getY(index);\n this.b = attribute.getZ(index);\n return this;\n }\n toJSON() {\n return this.getHex();\n }\n *[Symbol.iterator]() {\n yield this.r;\n yield this.g;\n yield this.b;\n }\n}\nconst $d5b33d7c30034067$var$_color = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\n$d5b33d7c30034067$export$892596cec99bc70e.NAMES = $d5b33d7c30034067$var$_colorKeywords;\nclass $d5b33d7c30034067$export$55cbcc9b622fe1f5 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshBasicMaterial = true;\n this.type = \"MeshBasicMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // emissive\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.specularMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.combine = $d5b33d7c30034067$export$e50ac29801f1774d;\n this.reflectivity = 1;\n this.refractionRatio = 0.98;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.specularMap = source.specularMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.combine = source.combine;\n this.reflectivity = source.reflectivity;\n this.refractionRatio = source.refractionRatio;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.fog = source.fog;\n return this;\n }\n}\n// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf\nconst $d5b33d7c30034067$var$_tables = /*@__PURE__*/ $d5b33d7c30034067$var$_generateTables();\nfunction $d5b33d7c30034067$var$_generateTables() {\n // float32 to float16 helpers\n const buffer = new ArrayBuffer(4);\n const floatView = new Float32Array(buffer);\n const uint32View = new Uint32Array(buffer);\n const baseTable = new Uint32Array(512);\n const shiftTable = new Uint32Array(512);\n for(let i = 0; i < 256; ++i){\n const e = i - 127;\n // very small number (0, -0)\n if (e < -27) {\n baseTable[i] = 0x0000;\n baseTable[i | 0x100] = 0x8000;\n shiftTable[i] = 24;\n shiftTable[i | 0x100] = 24;\n // small number (denorm)\n } else if (e < -14) {\n baseTable[i] = 0x0400 >> -e - 14;\n baseTable[i | 0x100] = 0x0400 >> -e - 14 | 0x8000;\n shiftTable[i] = -e - 1;\n shiftTable[i | 0x100] = -e - 1;\n // normal number\n } else if (e <= 15) {\n baseTable[i] = e + 15 << 10;\n baseTable[i | 0x100] = e + 15 << 10 | 0x8000;\n shiftTable[i] = 13;\n shiftTable[i | 0x100] = 13;\n // large number (Infinity, -Infinity)\n } else if (e < 128) {\n baseTable[i] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i] = 24;\n shiftTable[i | 0x100] = 24;\n // stay (NaN, Infinity, -Infinity)\n } else {\n baseTable[i] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i] = 13;\n shiftTable[i | 0x100] = 13;\n }\n }\n // float16 to float32 helpers\n const mantissaTable = new Uint32Array(2048);\n const exponentTable = new Uint32Array(64);\n const offsetTable = new Uint32Array(64);\n for(let i = 1; i < 1024; ++i){\n let m = i << 13; // zero pad mantissa bits\n let e = 0; // zero exponent\n // normalized\n while((m & 0x00800000) === 0){\n m <<= 1;\n e -= 0x00800000; // decrement exponent\n }\n m &= -8388609; // clear leading 1 bit\n e += 0x38800000; // adjust bias\n mantissaTable[i] = m | e;\n }\n for(let i = 1024; i < 2048; ++i)mantissaTable[i] = 0x38000000 + (i - 1024 << 13);\n for(let i = 1; i < 31; ++i)exponentTable[i] = i << 23;\n exponentTable[31] = 0x47800000;\n exponentTable[32] = 0x80000000;\n for(let i = 33; i < 63; ++i)exponentTable[i] = 0x80000000 + (i - 32 << 23);\n exponentTable[63] = 0xc7800000;\n for(let i = 1; i < 64; ++i)if (i !== 32) offsetTable[i] = 1024;\n return {\n floatView: floatView,\n uint32View: uint32View,\n baseTable: baseTable,\n shiftTable: shiftTable,\n mantissaTable: mantissaTable,\n exponentTable: exponentTable,\n offsetTable: offsetTable\n };\n}\n// float32 to float16\nfunction $d5b33d7c30034067$var$toHalfFloat(val) {\n if (Math.abs(val) > 65504) console.warn(\"THREE.DataUtils.toHalfFloat(): Value out of range.\");\n val = $d5b33d7c30034067$var$clamp(val, -65504, 65504);\n $d5b33d7c30034067$var$_tables.floatView[0] = val;\n const f = $d5b33d7c30034067$var$_tables.uint32View[0];\n const e = f >> 23 & 0x1ff;\n return $d5b33d7c30034067$var$_tables.baseTable[e] + ((f & 0x007fffff) >> $d5b33d7c30034067$var$_tables.shiftTable[e]);\n}\n// float16 to float32\nfunction $d5b33d7c30034067$var$fromHalfFloat(val) {\n const m = val >> 10;\n $d5b33d7c30034067$var$_tables.uint32View[0] = $d5b33d7c30034067$var$_tables.mantissaTable[$d5b33d7c30034067$var$_tables.offsetTable[m] + (val & 0x3ff)] + $d5b33d7c30034067$var$_tables.exponentTable[m];\n return $d5b33d7c30034067$var$_tables.floatView[0];\n}\nconst $d5b33d7c30034067$export$11ce8b759162cc80 = {\n toHalfFloat: $d5b33d7c30034067$var$toHalfFloat,\n fromHalfFloat: $d5b33d7c30034067$var$fromHalfFloat\n};\nconst $d5b33d7c30034067$var$_vector$8 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vector2$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nclass $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized = false){\n if (Array.isArray(array)) throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");\n this.isBufferAttribute = true;\n this.name = \"\";\n this.array = array;\n this.itemSize = itemSize;\n this.count = array !== undefined ? array.length / itemSize : 0;\n this.normalized = normalized;\n this.usage = $d5b33d7c30034067$export$763e8360f4d7f77d;\n this.updateRange = {\n offset: 0,\n count: -1\n };\n this.gpuType = $d5b33d7c30034067$export$f6d331659b644596;\n this.version = 0;\n }\n onUploadCallback() {}\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n setUsage(value) {\n this.usage = value;\n return this;\n }\n copy(source) {\n this.name = source.name;\n this.array = new source.array.constructor(source.array);\n this.itemSize = source.itemSize;\n this.count = source.count;\n this.normalized = source.normalized;\n this.usage = source.usage;\n this.gpuType = source.gpuType;\n return this;\n }\n copyAt(index1, attribute, index2) {\n index1 *= this.itemSize;\n index2 *= attribute.itemSize;\n for(let i = 0, l = this.itemSize; i < l; i++)this.array[index1 + i] = attribute.array[index2 + i];\n return this;\n }\n copyArray(array) {\n this.array.set(array);\n return this;\n }\n applyMatrix3(m) {\n if (this.itemSize === 2) for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector2$1.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector2$1.applyMatrix3(m);\n this.setXY(i, $d5b33d7c30034067$var$_vector2$1.x, $d5b33d7c30034067$var$_vector2$1.y);\n }\n else if (this.itemSize === 3) for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.applyMatrix3(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n applyMatrix4(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.applyMatrix4(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n applyNormalMatrix(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.applyNormalMatrix(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n transformDirection(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.transformDirection(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n set(value, offset = 0) {\n // Matching BufferAttribute constructor, do not normalize the array.\n this.array.set(value, offset);\n return this;\n }\n getComponent(index, component) {\n let value = this.array[index * this.itemSize + component];\n if (this.normalized) value = $d5b33d7c30034067$var$denormalize(value, this.array);\n return value;\n }\n setComponent(index, component, value) {\n if (this.normalized) value = $d5b33d7c30034067$var$normalize(value, this.array);\n this.array[index * this.itemSize + component] = value;\n return this;\n }\n getX(index) {\n let x = this.array[index * this.itemSize];\n if (this.normalized) x = $d5b33d7c30034067$var$denormalize(x, this.array);\n return x;\n }\n setX(index, x) {\n if (this.normalized) x = $d5b33d7c30034067$var$normalize(x, this.array);\n this.array[index * this.itemSize] = x;\n return this;\n }\n getY(index) {\n let y = this.array[index * this.itemSize + 1];\n if (this.normalized) y = $d5b33d7c30034067$var$denormalize(y, this.array);\n return y;\n }\n setY(index, y) {\n if (this.normalized) y = $d5b33d7c30034067$var$normalize(y, this.array);\n this.array[index * this.itemSize + 1] = y;\n return this;\n }\n getZ(index) {\n let z = this.array[index * this.itemSize + 2];\n if (this.normalized) z = $d5b33d7c30034067$var$denormalize(z, this.array);\n return z;\n }\n setZ(index, z) {\n if (this.normalized) z = $d5b33d7c30034067$var$normalize(z, this.array);\n this.array[index * this.itemSize + 2] = z;\n return this;\n }\n getW(index) {\n let w = this.array[index * this.itemSize + 3];\n if (this.normalized) w = $d5b33d7c30034067$var$denormalize(w, this.array);\n return w;\n }\n setW(index, w) {\n if (this.normalized) w = $d5b33d7c30034067$var$normalize(w, this.array);\n this.array[index * this.itemSize + 3] = w;\n return this;\n }\n setXY(index, x, y) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n }\n this.array[index + 0] = x;\n this.array[index + 1] = y;\n return this;\n }\n setXYZ(index, x, y, z) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n }\n this.array[index + 0] = x;\n this.array[index + 1] = y;\n this.array[index + 2] = z;\n return this;\n }\n setXYZW(index, x, y, z, w) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n w = $d5b33d7c30034067$var$normalize(w, this.array);\n }\n this.array[index + 0] = x;\n this.array[index + 1] = y;\n this.array[index + 2] = z;\n this.array[index + 3] = w;\n return this;\n }\n onUpload(callback) {\n this.onUploadCallback = callback;\n return this;\n }\n clone() {\n return new this.constructor(this.array, this.itemSize).copy(this);\n }\n toJSON() {\n const data = {\n itemSize: this.itemSize,\n type: this.array.constructor.name,\n array: Array.from(this.array),\n normalized: this.normalized\n };\n if (this.name !== \"\") data.name = this.name;\n if (this.usage !== $d5b33d7c30034067$export$763e8360f4d7f77d) data.usage = this.usage;\n if (this.updateRange.offset !== 0 || this.updateRange.count !== -1) data.updateRange = this.updateRange;\n return data;\n }\n}\n//\nclass $d5b33d7c30034067$export$f9ff2d6a20248cbf extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Int8Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$cacc90cf35d11cdd extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint8Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$baaa85a1a812c157 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint8ClampedArray(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$2b755a102ccdcefe extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Int16Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$640a853f68025f2e extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint16Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$46b369aed2968a0a extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Int32Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$7eb8c9fa25cd5bd6 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint32Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$dbd3698c64958d69 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint16Array(array), itemSize, normalized);\n this.isFloat16BufferAttribute = true;\n }\n getX(index) {\n let x = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize]);\n if (this.normalized) x = $d5b33d7c30034067$var$denormalize(x, this.array);\n return x;\n }\n setX(index, x) {\n if (this.normalized) x = $d5b33d7c30034067$var$normalize(x, this.array);\n this.array[index * this.itemSize] = $d5b33d7c30034067$var$toHalfFloat(x);\n return this;\n }\n getY(index) {\n let y = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize + 1]);\n if (this.normalized) y = $d5b33d7c30034067$var$denormalize(y, this.array);\n return y;\n }\n setY(index, y) {\n if (this.normalized) y = $d5b33d7c30034067$var$normalize(y, this.array);\n this.array[index * this.itemSize + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n return this;\n }\n getZ(index) {\n let z = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize + 2]);\n if (this.normalized) z = $d5b33d7c30034067$var$denormalize(z, this.array);\n return z;\n }\n setZ(index, z) {\n if (this.normalized) z = $d5b33d7c30034067$var$normalize(z, this.array);\n this.array[index * this.itemSize + 2] = $d5b33d7c30034067$var$toHalfFloat(z);\n return this;\n }\n getW(index) {\n let w = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize + 3]);\n if (this.normalized) w = $d5b33d7c30034067$var$denormalize(w, this.array);\n return w;\n }\n setW(index, w) {\n if (this.normalized) w = $d5b33d7c30034067$var$normalize(w, this.array);\n this.array[index * this.itemSize + 3] = $d5b33d7c30034067$var$toHalfFloat(w);\n return this;\n }\n setXY(index, x, y) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n }\n this.array[index + 0] = $d5b33d7c30034067$var$toHalfFloat(x);\n this.array[index + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n return this;\n }\n setXYZ(index, x, y, z) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n }\n this.array[index + 0] = $d5b33d7c30034067$var$toHalfFloat(x);\n this.array[index + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n this.array[index + 2] = $d5b33d7c30034067$var$toHalfFloat(z);\n return this;\n }\n setXYZW(index, x, y, z, w) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n w = $d5b33d7c30034067$var$normalize(w, this.array);\n }\n this.array[index + 0] = $d5b33d7c30034067$var$toHalfFloat(x);\n this.array[index + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n this.array[index + 2] = $d5b33d7c30034067$var$toHalfFloat(z);\n this.array[index + 3] = $d5b33d7c30034067$var$toHalfFloat(w);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$cbe7a62641830ebd extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Float32Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$9e0ade74842adbb8 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Float64Array(array), itemSize, normalized);\n }\n}\nlet $d5b33d7c30034067$var$_id$1 = 0;\nconst $d5b33d7c30034067$var$_m1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_obj = /*@__PURE__*/ new $d5b33d7c30034067$export$e4dd07dff30cc924();\nconst $d5b33d7c30034067$var$_offset = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_box$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_boxMorphTargets = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_vector$7 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$b7be63a67df8959 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isBufferGeometry = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_id$1++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.type = \"BufferGeometry\";\n this.index = null;\n this.attributes = {};\n this.morphAttributes = {};\n this.morphTargetsRelative = false;\n this.groups = [];\n this.boundingBox = null;\n this.boundingSphere = null;\n this.drawRange = {\n start: 0,\n count: Infinity\n };\n this.userData = {};\n }\n getIndex() {\n return this.index;\n }\n setIndex(index) {\n if (Array.isArray(index)) this.index = new ($d5b33d7c30034067$var$arrayNeedsUint32(index) ? $d5b33d7c30034067$export$7eb8c9fa25cd5bd6 : $d5b33d7c30034067$export$640a853f68025f2e)(index, 1);\n else this.index = index;\n return this;\n }\n getAttribute(name) {\n return this.attributes[name];\n }\n setAttribute(name, attribute) {\n this.attributes[name] = attribute;\n return this;\n }\n deleteAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n hasAttribute(name) {\n return this.attributes[name] !== undefined;\n }\n addGroup(start, count, materialIndex = 0) {\n this.groups.push({\n start: start,\n count: count,\n materialIndex: materialIndex\n });\n }\n clearGroups() {\n this.groups = [];\n }\n setDrawRange(start, count) {\n this.drawRange.start = start;\n this.drawRange.count = count;\n }\n applyMatrix4(matrix) {\n const position = this.attributes.position;\n if (position !== undefined) {\n position.applyMatrix4(matrix);\n position.needsUpdate = true;\n }\n const normal = this.attributes.normal;\n if (normal !== undefined) {\n const normalMatrix = new $d5b33d7c30034067$export$8ff26dafa08918().getNormalMatrix(matrix);\n normal.applyNormalMatrix(normalMatrix);\n normal.needsUpdate = true;\n }\n const tangent = this.attributes.tangent;\n if (tangent !== undefined) {\n tangent.transformDirection(matrix);\n tangent.needsUpdate = true;\n }\n if (this.boundingBox !== null) this.computeBoundingBox();\n if (this.boundingSphere !== null) this.computeBoundingSphere();\n return this;\n }\n applyQuaternion(q) {\n $d5b33d7c30034067$var$_m1.makeRotationFromQuaternion(q);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n rotateX(angle) {\n // rotate geometry around world x-axis\n $d5b33d7c30034067$var$_m1.makeRotationX(angle);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n rotateY(angle) {\n // rotate geometry around world y-axis\n $d5b33d7c30034067$var$_m1.makeRotationY(angle);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n rotateZ(angle) {\n // rotate geometry around world z-axis\n $d5b33d7c30034067$var$_m1.makeRotationZ(angle);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n translate(x, y, z) {\n // translate geometry\n $d5b33d7c30034067$var$_m1.makeTranslation(x, y, z);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n scale(x, y, z) {\n // scale geometry\n $d5b33d7c30034067$var$_m1.makeScale(x, y, z);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n lookAt(vector) {\n $d5b33d7c30034067$var$_obj.lookAt(vector);\n $d5b33d7c30034067$var$_obj.updateMatrix();\n this.applyMatrix4($d5b33d7c30034067$var$_obj.matrix);\n return this;\n }\n center() {\n this.computeBoundingBox();\n this.boundingBox.getCenter($d5b33d7c30034067$var$_offset).negate();\n this.translate($d5b33d7c30034067$var$_offset.x, $d5b33d7c30034067$var$_offset.y, $d5b33d7c30034067$var$_offset.z);\n return this;\n }\n setFromPoints(points) {\n const position = [];\n for(let i = 0, l = points.length; i < l; i++){\n const point = points[i];\n position.push(point.x, point.y, point.z || 0);\n }\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(position, 3));\n return this;\n }\n computeBoundingBox() {\n if (this.boundingBox === null) this.boundingBox = new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n const position = this.attributes.position;\n const morphAttributesPosition = this.morphAttributes.position;\n if (position && position.isGLBufferAttribute) {\n console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n this.boundingBox.set(new $d5b33d7c30034067$export$64b5c384219d3699(-Infinity, -Infinity, -Infinity), new $d5b33d7c30034067$export$64b5c384219d3699(Infinity, Infinity, Infinity));\n return;\n }\n if (position !== undefined) {\n this.boundingBox.setFromBufferAttribute(position);\n // process morph attributes if present\n if (morphAttributesPosition) for(let i = 0, il = morphAttributesPosition.length; i < il; i++){\n const morphAttribute = morphAttributesPosition[i];\n $d5b33d7c30034067$var$_box$1.setFromBufferAttribute(morphAttribute);\n if (this.morphTargetsRelative) {\n $d5b33d7c30034067$var$_vector$7.addVectors(this.boundingBox.min, $d5b33d7c30034067$var$_box$1.min);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_vector$7);\n $d5b33d7c30034067$var$_vector$7.addVectors(this.boundingBox.max, $d5b33d7c30034067$var$_box$1.max);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_vector$7);\n } else {\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_box$1.min);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_box$1.max);\n }\n }\n } else this.boundingBox.makeEmpty();\n if (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this);\n }\n computeBoundingSphere() {\n if (this.boundingSphere === null) this.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba();\n const position = this.attributes.position;\n const morphAttributesPosition = this.morphAttributes.position;\n if (position && position.isGLBufferAttribute) {\n console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n this.boundingSphere.set(new $d5b33d7c30034067$export$64b5c384219d3699(), Infinity);\n return;\n }\n if (position) {\n // first, find the center of the bounding sphere\n const center = this.boundingSphere.center;\n $d5b33d7c30034067$var$_box$1.setFromBufferAttribute(position);\n // process morph attributes if present\n if (morphAttributesPosition) for(let i = 0, il = morphAttributesPosition.length; i < il; i++){\n const morphAttribute = morphAttributesPosition[i];\n $d5b33d7c30034067$var$_boxMorphTargets.setFromBufferAttribute(morphAttribute);\n if (this.morphTargetsRelative) {\n $d5b33d7c30034067$var$_vector$7.addVectors($d5b33d7c30034067$var$_box$1.min, $d5b33d7c30034067$var$_boxMorphTargets.min);\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_vector$7);\n $d5b33d7c30034067$var$_vector$7.addVectors($d5b33d7c30034067$var$_box$1.max, $d5b33d7c30034067$var$_boxMorphTargets.max);\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_vector$7);\n } else {\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_boxMorphTargets.min);\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_boxMorphTargets.max);\n }\n }\n $d5b33d7c30034067$var$_box$1.getCenter(center);\n // second, try to find a boundingSphere with a radius smaller than the\n // boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n let maxRadiusSq = 0;\n for(let i = 0, il = position.count; i < il; i++){\n $d5b33d7c30034067$var$_vector$7.fromBufferAttribute(position, i);\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared($d5b33d7c30034067$var$_vector$7));\n }\n // process morph attributes if present\n if (morphAttributesPosition) for(let i = 0, il = morphAttributesPosition.length; i < il; i++){\n const morphAttribute = morphAttributesPosition[i];\n const morphTargetsRelative = this.morphTargetsRelative;\n for(let j = 0, jl = morphAttribute.count; j < jl; j++){\n $d5b33d7c30034067$var$_vector$7.fromBufferAttribute(morphAttribute, j);\n if (morphTargetsRelative) {\n $d5b33d7c30034067$var$_offset.fromBufferAttribute(position, j);\n $d5b33d7c30034067$var$_vector$7.add($d5b33d7c30034067$var$_offset);\n }\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared($d5b33d7c30034067$var$_vector$7));\n }\n }\n this.boundingSphere.radius = Math.sqrt(maxRadiusSq);\n if (isNaN(this.boundingSphere.radius)) console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this);\n }\n }\n computeTangents() {\n const index = this.index;\n const attributes = this.attributes;\n // based on http://www.terathon.com/code/tangent.html\n // (per vertex tangents)\n if (index === null || attributes.position === undefined || attributes.normal === undefined || attributes.uv === undefined) {\n console.error(\"THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)\");\n return;\n }\n const indices = index.array;\n const positions = attributes.position.array;\n const normals = attributes.normal.array;\n const uvs = attributes.uv.array;\n const nVertices = positions.length / 3;\n if (this.hasAttribute(\"tangent\") === false) this.setAttribute(\"tangent\", new $d5b33d7c30034067$export$8dea267bd6bde117(new Float32Array(4 * nVertices), 4));\n const tangents = this.getAttribute(\"tangent\").array;\n const tan1 = [], tan2 = [];\n for(let i = 0; i < nVertices; i++){\n tan1[i] = new $d5b33d7c30034067$export$64b5c384219d3699();\n tan2[i] = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n const vA = new $d5b33d7c30034067$export$64b5c384219d3699(), vB = new $d5b33d7c30034067$export$64b5c384219d3699(), vC = new $d5b33d7c30034067$export$64b5c384219d3699(), uvA = new $d5b33d7c30034067$export$c977b3e384af9ae1(), uvB = new $d5b33d7c30034067$export$c977b3e384af9ae1(), uvC = new $d5b33d7c30034067$export$c977b3e384af9ae1(), sdir = new $d5b33d7c30034067$export$64b5c384219d3699(), tdir = new $d5b33d7c30034067$export$64b5c384219d3699();\n function handleTriangle(a, b, c) {\n vA.fromArray(positions, a * 3);\n vB.fromArray(positions, b * 3);\n vC.fromArray(positions, c * 3);\n uvA.fromArray(uvs, a * 2);\n uvB.fromArray(uvs, b * 2);\n uvC.fromArray(uvs, c * 2);\n vB.sub(vA);\n vC.sub(vA);\n uvB.sub(uvA);\n uvC.sub(uvA);\n const r = 1.0 / (uvB.x * uvC.y - uvC.x * uvB.y);\n // silently ignore degenerate uv triangles having coincident or colinear vertices\n if (!isFinite(r)) return;\n sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC, -uvB.y).multiplyScalar(r);\n tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB, -uvC.x).multiplyScalar(r);\n tan1[a].add(sdir);\n tan1[b].add(sdir);\n tan1[c].add(sdir);\n tan2[a].add(tdir);\n tan2[b].add(tdir);\n tan2[c].add(tdir);\n }\n let groups = this.groups;\n if (groups.length === 0) groups = [\n {\n start: 0,\n count: indices.length\n }\n ];\n for(let i = 0, il = groups.length; i < il; ++i){\n const group = groups[i];\n const start = group.start;\n const count = group.count;\n for(let j = start, jl = start + count; j < jl; j += 3)handleTriangle(indices[j + 0], indices[j + 1], indices[j + 2]);\n }\n const tmp = new $d5b33d7c30034067$export$64b5c384219d3699(), tmp2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const n = new $d5b33d7c30034067$export$64b5c384219d3699(), n2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n function handleVertex(v) {\n n.fromArray(normals, v * 3);\n n2.copy(n);\n const t = tan1[v];\n // Gram-Schmidt orthogonalize\n tmp.copy(t);\n tmp.sub(n.multiplyScalar(n.dot(t))).normalize();\n // Calculate handedness\n tmp2.crossVectors(n2, t);\n const test = tmp2.dot(tan2[v]);\n const w = test < 0.0 ? -1 : 1.0;\n tangents[v * 4] = tmp.x;\n tangents[v * 4 + 1] = tmp.y;\n tangents[v * 4 + 2] = tmp.z;\n tangents[v * 4 + 3] = w;\n }\n for(let i = 0, il = groups.length; i < il; ++i){\n const group = groups[i];\n const start = group.start;\n const count = group.count;\n for(let j = start, jl = start + count; j < jl; j += 3){\n handleVertex(indices[j + 0]);\n handleVertex(indices[j + 1]);\n handleVertex(indices[j + 2]);\n }\n }\n }\n computeVertexNormals() {\n const index = this.index;\n const positionAttribute = this.getAttribute(\"position\");\n if (positionAttribute !== undefined) {\n let normalAttribute = this.getAttribute(\"normal\");\n if (normalAttribute === undefined) {\n normalAttribute = new $d5b33d7c30034067$export$8dea267bd6bde117(new Float32Array(positionAttribute.count * 3), 3);\n this.setAttribute(\"normal\", normalAttribute);\n } else // reset existing normals to zero\n for(let i = 0, il = normalAttribute.count; i < il; i++)normalAttribute.setXYZ(i, 0, 0, 0);\n const pA = new $d5b33d7c30034067$export$64b5c384219d3699(), pB = new $d5b33d7c30034067$export$64b5c384219d3699(), pC = new $d5b33d7c30034067$export$64b5c384219d3699();\n const nA = new $d5b33d7c30034067$export$64b5c384219d3699(), nB = new $d5b33d7c30034067$export$64b5c384219d3699(), nC = new $d5b33d7c30034067$export$64b5c384219d3699();\n const cb = new $d5b33d7c30034067$export$64b5c384219d3699(), ab = new $d5b33d7c30034067$export$64b5c384219d3699();\n // indexed elements\n if (index) for(let i = 0, il = index.count; i < il; i += 3){\n const vA = index.getX(i + 0);\n const vB = index.getX(i + 1);\n const vC = index.getX(i + 2);\n pA.fromBufferAttribute(positionAttribute, vA);\n pB.fromBufferAttribute(positionAttribute, vB);\n pC.fromBufferAttribute(positionAttribute, vC);\n cb.subVectors(pC, pB);\n ab.subVectors(pA, pB);\n cb.cross(ab);\n nA.fromBufferAttribute(normalAttribute, vA);\n nB.fromBufferAttribute(normalAttribute, vB);\n nC.fromBufferAttribute(normalAttribute, vC);\n nA.add(cb);\n nB.add(cb);\n nC.add(cb);\n normalAttribute.setXYZ(vA, nA.x, nA.y, nA.z);\n normalAttribute.setXYZ(vB, nB.x, nB.y, nB.z);\n normalAttribute.setXYZ(vC, nC.x, nC.y, nC.z);\n }\n else // non-indexed elements (unconnected triangle soup)\n for(let i = 0, il = positionAttribute.count; i < il; i += 3){\n pA.fromBufferAttribute(positionAttribute, i + 0);\n pB.fromBufferAttribute(positionAttribute, i + 1);\n pC.fromBufferAttribute(positionAttribute, i + 2);\n cb.subVectors(pC, pB);\n ab.subVectors(pA, pB);\n cb.cross(ab);\n normalAttribute.setXYZ(i + 0, cb.x, cb.y, cb.z);\n normalAttribute.setXYZ(i + 1, cb.x, cb.y, cb.z);\n normalAttribute.setXYZ(i + 2, cb.x, cb.y, cb.z);\n }\n this.normalizeNormals();\n normalAttribute.needsUpdate = true;\n }\n }\n normalizeNormals() {\n const normals = this.attributes.normal;\n for(let i = 0, il = normals.count; i < il; i++){\n $d5b33d7c30034067$var$_vector$7.fromBufferAttribute(normals, i);\n $d5b33d7c30034067$var$_vector$7.normalize();\n normals.setXYZ(i, $d5b33d7c30034067$var$_vector$7.x, $d5b33d7c30034067$var$_vector$7.y, $d5b33d7c30034067$var$_vector$7.z);\n }\n }\n toNonIndexed() {\n function convertBufferAttribute(attribute, indices) {\n const array = attribute.array;\n const itemSize = attribute.itemSize;\n const normalized = attribute.normalized;\n const array2 = new array.constructor(indices.length * itemSize);\n let index = 0, index2 = 0;\n for(let i = 0, l = indices.length; i < l; i++){\n if (attribute.isInterleavedBufferAttribute) index = indices[i] * attribute.data.stride + attribute.offset;\n else index = indices[i] * itemSize;\n for(let j = 0; j < itemSize; j++)array2[index2++] = array[index++];\n }\n return new $d5b33d7c30034067$export$8dea267bd6bde117(array2, itemSize, normalized);\n }\n //\n if (this.index === null) {\n console.warn(\"THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.\");\n return this;\n }\n const geometry2 = new $d5b33d7c30034067$export$b7be63a67df8959();\n const indices = this.index.array;\n const attributes = this.attributes;\n // attributes\n for(const name in attributes){\n const attribute = attributes[name];\n const newAttribute = convertBufferAttribute(attribute, indices);\n geometry2.setAttribute(name, newAttribute);\n }\n // morph attributes\n const morphAttributes = this.morphAttributes;\n for(const name in morphAttributes){\n const morphArray = [];\n const morphAttribute = morphAttributes[name]; // morphAttribute: array of Float32BufferAttributes\n for(let i = 0, il = morphAttribute.length; i < il; i++){\n const attribute = morphAttribute[i];\n const newAttribute = convertBufferAttribute(attribute, indices);\n morphArray.push(newAttribute);\n }\n geometry2.morphAttributes[name] = morphArray;\n }\n geometry2.morphTargetsRelative = this.morphTargetsRelative;\n // groups\n const groups = this.groups;\n for(let i = 0, l = groups.length; i < l; i++){\n const group = groups[i];\n geometry2.addGroup(group.start, group.count, group.materialIndex);\n }\n return geometry2;\n }\n toJSON() {\n const data = {\n metadata: {\n version: 4.6,\n type: \"BufferGeometry\",\n generator: \"BufferGeometry.toJSON\"\n }\n };\n // standard BufferGeometry serialization\n data.uuid = this.uuid;\n data.type = this.type;\n if (this.name !== \"\") data.name = this.name;\n if (Object.keys(this.userData).length > 0) data.userData = this.userData;\n if (this.parameters !== undefined) {\n const parameters = this.parameters;\n for(const key in parameters)if (parameters[key] !== undefined) data[key] = parameters[key];\n return data;\n }\n // for simplicity the code assumes attributes are not shared across geometries, see #15811\n data.data = {\n attributes: {}\n };\n const index = this.index;\n if (index !== null) data.data.index = {\n type: index.array.constructor.name,\n array: Array.prototype.slice.call(index.array)\n };\n const attributes = this.attributes;\n for(const key in attributes){\n const attribute = attributes[key];\n data.data.attributes[key] = attribute.toJSON(data.data);\n }\n const morphAttributes = {};\n let hasMorphAttributes = false;\n for(const key in this.morphAttributes){\n const attributeArray = this.morphAttributes[key];\n const array = [];\n for(let i = 0, il = attributeArray.length; i < il; i++){\n const attribute = attributeArray[i];\n array.push(attribute.toJSON(data.data));\n }\n if (array.length > 0) {\n morphAttributes[key] = array;\n hasMorphAttributes = true;\n }\n }\n if (hasMorphAttributes) {\n data.data.morphAttributes = morphAttributes;\n data.data.morphTargetsRelative = this.morphTargetsRelative;\n }\n const groups = this.groups;\n if (groups.length > 0) data.data.groups = JSON.parse(JSON.stringify(groups));\n const boundingSphere = this.boundingSphere;\n if (boundingSphere !== null) data.data.boundingSphere = {\n center: boundingSphere.center.toArray(),\n radius: boundingSphere.radius\n };\n return data;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n // reset\n this.index = null;\n this.attributes = {};\n this.morphAttributes = {};\n this.groups = [];\n this.boundingBox = null;\n this.boundingSphere = null;\n // used for storing cloned, shared data\n const data = {};\n // name\n this.name = source.name;\n // index\n const index = source.index;\n if (index !== null) this.setIndex(index.clone(data));\n // attributes\n const attributes = source.attributes;\n for(const name in attributes){\n const attribute = attributes[name];\n this.setAttribute(name, attribute.clone(data));\n }\n // morph attributes\n const morphAttributes = source.morphAttributes;\n for(const name in morphAttributes){\n const array = [];\n const morphAttribute = morphAttributes[name]; // morphAttribute: array of Float32BufferAttributes\n for(let i = 0, l = morphAttribute.length; i < l; i++)array.push(morphAttribute[i].clone(data));\n this.morphAttributes[name] = array;\n }\n this.morphTargetsRelative = source.morphTargetsRelative;\n // groups\n const groups = source.groups;\n for(let i = 0, l = groups.length; i < l; i++){\n const group = groups[i];\n this.addGroup(group.start, group.count, group.materialIndex);\n }\n // bounding box\n const boundingBox = source.boundingBox;\n if (boundingBox !== null) this.boundingBox = boundingBox.clone();\n // bounding sphere\n const boundingSphere = source.boundingSphere;\n if (boundingSphere !== null) this.boundingSphere = boundingSphere.clone();\n // draw range\n this.drawRange.start = source.drawRange.start;\n this.drawRange.count = source.drawRange.count;\n // user data\n this.userData = source.userData;\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n}\nconst $d5b33d7c30034067$var$_inverseMatrix$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nconst $d5b33d7c30034067$var$_sphere$5 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_sphereHitAt = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vA$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vB$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vC$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_tempA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_morphA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_uvA$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvB$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvC$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_normalA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normalB = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normalC = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_intersectionPoint = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_intersectionPointWorld = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$e176487c05830cc5 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(geometry = new $d5b33d7c30034067$export$b7be63a67df8959(), material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5()){\n super();\n this.isMesh = true;\n this.type = \"Mesh\";\n this.geometry = geometry;\n this.material = material;\n this.updateMorphTargets();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n if (source.morphTargetInfluences !== undefined) this.morphTargetInfluences = source.morphTargetInfluences.slice();\n if (source.morphTargetDictionary !== undefined) this.morphTargetDictionary = Object.assign({}, source.morphTargetDictionary);\n this.material = source.material;\n this.geometry = source.geometry;\n return this;\n }\n updateMorphTargets() {\n const geometry = this.geometry;\n const morphAttributes = geometry.morphAttributes;\n const keys = Object.keys(morphAttributes);\n if (keys.length > 0) {\n const morphAttribute = morphAttributes[keys[0]];\n if (morphAttribute !== undefined) {\n this.morphTargetInfluences = [];\n this.morphTargetDictionary = {};\n for(let m = 0, ml = morphAttribute.length; m < ml; m++){\n const name = morphAttribute[m].name || String(m);\n this.morphTargetInfluences.push(0);\n this.morphTargetDictionary[name] = m;\n }\n }\n }\n }\n getVertexPosition(index, target) {\n const geometry = this.geometry;\n const position = geometry.attributes.position;\n const morphPosition = geometry.morphAttributes.position;\n const morphTargetsRelative = geometry.morphTargetsRelative;\n target.fromBufferAttribute(position, index);\n const morphInfluences = this.morphTargetInfluences;\n if (morphPosition && morphInfluences) {\n $d5b33d7c30034067$var$_morphA.set(0, 0, 0);\n for(let i = 0, il = morphPosition.length; i < il; i++){\n const influence = morphInfluences[i];\n const morphAttribute = morphPosition[i];\n if (influence === 0) continue;\n $d5b33d7c30034067$var$_tempA.fromBufferAttribute(morphAttribute, index);\n if (morphTargetsRelative) $d5b33d7c30034067$var$_morphA.addScaledVector($d5b33d7c30034067$var$_tempA, influence);\n else $d5b33d7c30034067$var$_morphA.addScaledVector($d5b33d7c30034067$var$_tempA.sub(target), influence);\n }\n target.add($d5b33d7c30034067$var$_morphA);\n }\n return target;\n }\n raycast(raycaster, intersects) {\n const geometry = this.geometry;\n const material = this.material;\n const matrixWorld = this.matrixWorld;\n if (material === undefined) return;\n // test with bounding sphere in world space\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$5.copy(geometry.boundingSphere);\n $d5b33d7c30034067$var$_sphere$5.applyMatrix4(matrixWorld);\n // check distance from ray origin to bounding sphere\n $d5b33d7c30034067$var$_ray$3.copy(raycaster.ray).recast(raycaster.near);\n if ($d5b33d7c30034067$var$_sphere$5.containsPoint($d5b33d7c30034067$var$_ray$3.origin) === false) {\n if ($d5b33d7c30034067$var$_ray$3.intersectSphere($d5b33d7c30034067$var$_sphere$5, $d5b33d7c30034067$var$_sphereHitAt) === null) return;\n if ($d5b33d7c30034067$var$_ray$3.origin.distanceToSquared($d5b33d7c30034067$var$_sphereHitAt) > (raycaster.far - raycaster.near) ** 2) return;\n }\n // convert ray to local space of mesh\n $d5b33d7c30034067$var$_inverseMatrix$3.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray$3.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix$3);\n // test with bounding box in local space\n if (geometry.boundingBox !== null) {\n if ($d5b33d7c30034067$var$_ray$3.intersectsBox(geometry.boundingBox) === false) return;\n }\n // test for intersections with geometry\n this._computeIntersections(raycaster, intersects, $d5b33d7c30034067$var$_ray$3);\n }\n _computeIntersections(raycaster, intersects, rayLocalSpace) {\n let intersection;\n const geometry = this.geometry;\n const material = this.material;\n const index = geometry.index;\n const position = geometry.attributes.position;\n const uv = geometry.attributes.uv;\n const uv1 = geometry.attributes.uv1;\n const normal = geometry.attributes.normal;\n const groups = geometry.groups;\n const drawRange = geometry.drawRange;\n if (index !== null) {\n // indexed buffer geometry\n if (Array.isArray(material)) for(let i = 0, il = groups.length; i < il; i++){\n const group = groups[i];\n const groupMaterial = material[group.materialIndex];\n const start = Math.max(group.start, drawRange.start);\n const end = Math.min(index.count, Math.min(group.start + group.count, drawRange.start + drawRange.count));\n for(let j = start, jl = end; j < jl; j += 3){\n const a = index.getX(j);\n const b = index.getX(j + 1);\n const c = index.getX(j + 2);\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(j / 3); // triangle number in indexed buffer semantics\n intersection.face.materialIndex = group.materialIndex;\n intersects.push(intersection);\n }\n }\n }\n else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(index.count, drawRange.start + drawRange.count);\n for(let i = start, il = end; i < il; i += 3){\n const a = index.getX(i);\n const b = index.getX(i + 1);\n const c = index.getX(i + 2);\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(i / 3); // triangle number in indexed buffer semantics\n intersects.push(intersection);\n }\n }\n }\n } else if (position !== undefined) {\n // non-indexed buffer geometry\n if (Array.isArray(material)) for(let i = 0, il = groups.length; i < il; i++){\n const group = groups[i];\n const groupMaterial = material[group.materialIndex];\n const start = Math.max(group.start, drawRange.start);\n const end = Math.min(position.count, Math.min(group.start + group.count, drawRange.start + drawRange.count));\n for(let j = start, jl = end; j < jl; j += 3){\n const a = j;\n const b = j + 1;\n const c = j + 2;\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(j / 3); // triangle number in non-indexed buffer semantics\n intersection.face.materialIndex = group.materialIndex;\n intersects.push(intersection);\n }\n }\n }\n else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(position.count, drawRange.start + drawRange.count);\n for(let i = start, il = end; i < il; i += 3){\n const a = i;\n const b = i + 1;\n const c = i + 2;\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(i / 3); // triangle number in non-indexed buffer semantics\n intersects.push(intersection);\n }\n }\n }\n }\n }\n}\nfunction $d5b33d7c30034067$var$checkIntersection(object, material, raycaster, ray, pA, pB, pC, point) {\n let intersect;\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) intersect = ray.intersectTriangle(pC, pB, pA, true, point);\n else intersect = ray.intersectTriangle(pA, pB, pC, material.side === $d5b33d7c30034067$export$2ede184fc2998901, point);\n if (intersect === null) return null;\n $d5b33d7c30034067$var$_intersectionPointWorld.copy(point);\n $d5b33d7c30034067$var$_intersectionPointWorld.applyMatrix4(object.matrixWorld);\n const distance = raycaster.ray.origin.distanceTo($d5b33d7c30034067$var$_intersectionPointWorld);\n if (distance < raycaster.near || distance > raycaster.far) return null;\n return {\n distance: distance,\n point: $d5b33d7c30034067$var$_intersectionPointWorld.clone(),\n object: object\n };\n}\nfunction $d5b33d7c30034067$var$checkGeometryIntersection(object, material, raycaster, ray, uv, uv1, normal, a, b, c) {\n object.getVertexPosition(a, $d5b33d7c30034067$var$_vA$1);\n object.getVertexPosition(b, $d5b33d7c30034067$var$_vB$1);\n object.getVertexPosition(c, $d5b33d7c30034067$var$_vC$1);\n const intersection = $d5b33d7c30034067$var$checkIntersection(object, material, raycaster, ray, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_intersectionPoint);\n if (intersection) {\n if (uv) {\n $d5b33d7c30034067$var$_uvA$1.fromBufferAttribute(uv, a);\n $d5b33d7c30034067$var$_uvB$1.fromBufferAttribute(uv, b);\n $d5b33d7c30034067$var$_uvC$1.fromBufferAttribute(uv, c);\n intersection.uv = $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectionPoint, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_uvA$1, $d5b33d7c30034067$var$_uvB$1, $d5b33d7c30034067$var$_uvC$1, new $d5b33d7c30034067$export$c977b3e384af9ae1());\n }\n if (uv1) {\n $d5b33d7c30034067$var$_uvA$1.fromBufferAttribute(uv1, a);\n $d5b33d7c30034067$var$_uvB$1.fromBufferAttribute(uv1, b);\n $d5b33d7c30034067$var$_uvC$1.fromBufferAttribute(uv1, c);\n intersection.uv1 = $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectionPoint, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_uvA$1, $d5b33d7c30034067$var$_uvB$1, $d5b33d7c30034067$var$_uvC$1, new $d5b33d7c30034067$export$c977b3e384af9ae1());\n intersection.uv2 = intersection.uv1; // @deprecated, r152\n }\n if (normal) {\n $d5b33d7c30034067$var$_normalA.fromBufferAttribute(normal, a);\n $d5b33d7c30034067$var$_normalB.fromBufferAttribute(normal, b);\n $d5b33d7c30034067$var$_normalC.fromBufferAttribute(normal, c);\n intersection.normal = $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectionPoint, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_normalA, $d5b33d7c30034067$var$_normalB, $d5b33d7c30034067$var$_normalC, new $d5b33d7c30034067$export$64b5c384219d3699());\n if (intersection.normal.dot(ray.direction) > 0) intersection.normal.multiplyScalar(-1);\n }\n const face = {\n a: a,\n b: b,\n c: c,\n normal: new $d5b33d7c30034067$export$64b5c384219d3699(),\n materialIndex: 0\n };\n $d5b33d7c30034067$export$5a465592bfe74b48.getNormal($d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, face.normal);\n intersection.face = face;\n }\n return intersection;\n}\nclass $d5b33d7c30034067$export$33e43285f7406bd5 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1){\n super();\n this.type = \"BoxGeometry\";\n this.parameters = {\n width: width,\n height: height,\n depth: depth,\n widthSegments: widthSegments,\n heightSegments: heightSegments,\n depthSegments: depthSegments\n };\n const scope = this;\n // segments\n widthSegments = Math.floor(widthSegments);\n heightSegments = Math.floor(heightSegments);\n depthSegments = Math.floor(depthSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n let numberOfVertices = 0;\n let groupStart = 0;\n // build each side of the box geometry\n buildPlane(\"z\", \"y\", \"x\", -1, -1, depth, height, width, depthSegments, heightSegments, 0); // px\n buildPlane(\"z\", \"y\", \"x\", 1, -1, depth, height, -width, depthSegments, heightSegments, 1); // nx\n buildPlane(\"x\", \"z\", \"y\", 1, 1, width, depth, height, widthSegments, depthSegments, 2); // py\n buildPlane(\"x\", \"z\", \"y\", 1, -1, width, depth, -height, widthSegments, depthSegments, 3); // ny\n buildPlane(\"x\", \"y\", \"z\", 1, -1, width, height, depth, widthSegments, heightSegments, 4); // pz\n buildPlane(\"x\", \"y\", \"z\", -1, -1, width, height, -depth, widthSegments, heightSegments, 5); // nz\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n function buildPlane(u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex) {\n const segmentWidth = width / gridX;\n const segmentHeight = height / gridY;\n const widthHalf = width / 2;\n const heightHalf = height / 2;\n const depthHalf = depth / 2;\n const gridX1 = gridX + 1;\n const gridY1 = gridY + 1;\n let vertexCounter = 0;\n let groupCount = 0;\n const vector = new $d5b33d7c30034067$export$64b5c384219d3699();\n // generate vertices, normals and uvs\n for(let iy = 0; iy < gridY1; iy++){\n const y = iy * segmentHeight - heightHalf;\n for(let ix = 0; ix < gridX1; ix++){\n const x = ix * segmentWidth - widthHalf;\n // set values to correct vector component\n vector[u] = x * udir;\n vector[v] = y * vdir;\n vector[w] = depthHalf;\n // now apply vector to vertex buffer\n vertices.push(vector.x, vector.y, vector.z);\n // set values to correct vector component\n vector[u] = 0;\n vector[v] = 0;\n vector[w] = depth > 0 ? 1 : -1;\n // now apply vector to normal buffer\n normals.push(vector.x, vector.y, vector.z);\n // uvs\n uvs.push(ix / gridX);\n uvs.push(1 - iy / gridY);\n // counters\n vertexCounter += 1;\n }\n }\n // indices\n // 1. you need three indices to draw a single face\n // 2. a single segment consists of two faces\n // 3. so we need to generate six (2*3) indices per segment\n for(let iy = 0; iy < gridY; iy++)for(let ix = 0; ix < gridX; ix++){\n const a = numberOfVertices + ix + gridX1 * iy;\n const b = numberOfVertices + ix + gridX1 * (iy + 1);\n const c = numberOfVertices + (ix + 1) + gridX1 * (iy + 1);\n const d = numberOfVertices + (ix + 1) + gridX1 * iy;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n // increase counter\n groupCount += 6;\n }\n // add a group to the geometry. this will ensure multi material support\n scope.addGroup(groupStart, groupCount, materialIndex);\n // calculate new start value for groups\n groupStart += groupCount;\n // update total number of vertices\n numberOfVertices += vertexCounter;\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$33e43285f7406bd5(data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments);\n }\n}\n/**\n * Uniform Utilities\n */ function $d5b33d7c30034067$var$cloneUniforms(src) {\n const dst = {};\n for(const u in src){\n dst[u] = {};\n for(const p in src[u]){\n const property = src[u][p];\n if (property && (property.isColor || property.isMatrix3 || property.isMatrix4 || property.isVector2 || property.isVector3 || property.isVector4 || property.isTexture || property.isQuaternion)) {\n if (property.isRenderTargetTexture) {\n console.warn(\"UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().\");\n dst[u][p] = null;\n } else dst[u][p] = property.clone();\n } else if (Array.isArray(property)) dst[u][p] = property.slice();\n else dst[u][p] = property;\n }\n }\n return dst;\n}\nfunction $d5b33d7c30034067$var$mergeUniforms(uniforms) {\n const merged = {};\n for(let u = 0; u < uniforms.length; u++){\n const tmp = $d5b33d7c30034067$var$cloneUniforms(uniforms[u]);\n for(const p in tmp)merged[p] = tmp[p];\n }\n return merged;\n}\nfunction $d5b33d7c30034067$var$cloneUniformsGroups(src) {\n const dst = [];\n for(let u = 0; u < src.length; u++)dst.push(src[u].clone());\n return dst;\n}\nfunction $d5b33d7c30034067$var$getUnlitUniformColorSpace(renderer) {\n if (renderer.getRenderTarget() === null) // https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398\n return renderer.outputColorSpace;\n return $d5b33d7c30034067$export$42429b3acfb233a4;\n}\n// Legacy\nconst $d5b33d7c30034067$export$d8ecdf8615bfea69 = {\n clone: $d5b33d7c30034067$var$cloneUniforms,\n merge: $d5b33d7c30034067$var$mergeUniforms\n};\nvar $d5b33d7c30034067$var$default_vertex = \"void main() {\\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\nvar $d5b33d7c30034067$var$default_fragment = \"void main() {\\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\nclass $d5b33d7c30034067$export$83c7d75d550a8b0d extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isShaderMaterial = true;\n this.type = \"ShaderMaterial\";\n this.defines = {};\n this.uniforms = {};\n this.uniformsGroups = [];\n this.vertexShader = $d5b33d7c30034067$var$default_vertex;\n this.fragmentShader = $d5b33d7c30034067$var$default_fragment;\n this.linewidth = 1;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.fog = false; // set to use scene fog\n this.lights = false; // set to use scene lights\n this.clipping = false; // set to use user-defined clipping planes\n this.forceSinglePass = true;\n this.extensions = {\n derivatives: false,\n fragDepth: false,\n drawBuffers: false,\n shaderTextureLOD: false // set to use shader texture LOD\n };\n // When rendered geometry doesn't include these attributes but the material does,\n // use these default values in WebGL. This avoids errors when buffer data is missing.\n this.defaultAttributeValues = {\n \"color\": [\n 1,\n 1,\n 1\n ],\n \"uv\": [\n 0,\n 0\n ],\n \"uv1\": [\n 0,\n 0\n ]\n };\n this.index0AttributeName = undefined;\n this.uniformsNeedUpdate = false;\n this.glslVersion = null;\n if (parameters !== undefined) this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.fragmentShader = source.fragmentShader;\n this.vertexShader = source.vertexShader;\n this.uniforms = $d5b33d7c30034067$var$cloneUniforms(source.uniforms);\n this.uniformsGroups = $d5b33d7c30034067$var$cloneUniformsGroups(source.uniformsGroups);\n this.defines = Object.assign({}, source.defines);\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.fog = source.fog;\n this.lights = source.lights;\n this.clipping = source.clipping;\n this.extensions = Object.assign({}, source.extensions);\n this.glslVersion = source.glslVersion;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.glslVersion = this.glslVersion;\n data.uniforms = {};\n for(const name in this.uniforms){\n const uniform = this.uniforms[name];\n const value = uniform.value;\n if (value && value.isTexture) data.uniforms[name] = {\n type: \"t\",\n value: value.toJSON(meta).uuid\n };\n else if (value && value.isColor) data.uniforms[name] = {\n type: \"c\",\n value: value.getHex()\n };\n else if (value && value.isVector2) data.uniforms[name] = {\n type: \"v2\",\n value: value.toArray()\n };\n else if (value && value.isVector3) data.uniforms[name] = {\n type: \"v3\",\n value: value.toArray()\n };\n else if (value && value.isVector4) data.uniforms[name] = {\n type: \"v4\",\n value: value.toArray()\n };\n else if (value && value.isMatrix3) data.uniforms[name] = {\n type: \"m3\",\n value: value.toArray()\n };\n else if (value && value.isMatrix4) data.uniforms[name] = {\n type: \"m4\",\n value: value.toArray()\n };\n else data.uniforms[name] = {\n value: value\n };\n }\n if (Object.keys(this.defines).length > 0) data.defines = this.defines;\n data.vertexShader = this.vertexShader;\n data.fragmentShader = this.fragmentShader;\n data.lights = this.lights;\n data.clipping = this.clipping;\n const extensions = {};\n for(const key in this.extensions)if (this.extensions[key] === true) extensions[key] = true;\n if (Object.keys(extensions).length > 0) data.extensions = extensions;\n return data;\n }\n}\nclass $d5b33d7c30034067$export$79f141de891a5fed extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isCamera = true;\n this.type = \"Camera\";\n this.matrixWorldInverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.projectionMatrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.projectionMatrixInverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3;\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.matrixWorldInverse.copy(source.matrixWorldInverse);\n this.projectionMatrix.copy(source.projectionMatrix);\n this.projectionMatrixInverse.copy(source.projectionMatrixInverse);\n this.coordinateSystem = source.coordinateSystem;\n return this;\n }\n getWorldDirection(target) {\n this.updateWorldMatrix(true, false);\n const e = this.matrixWorld.elements;\n return target.set(-e[8], -e[9], -e[10]).normalize();\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n this.matrixWorldInverse.copy(this.matrixWorld).invert();\n }\n updateWorldMatrix(updateParents, updateChildren) {\n super.updateWorldMatrix(updateParents, updateChildren);\n this.matrixWorldInverse.copy(this.matrixWorld).invert();\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nclass $d5b33d7c30034067$export$74e4ae24825f68d7 extends $d5b33d7c30034067$export$79f141de891a5fed {\n constructor(fov = 50, aspect = 1, near = 0.1, far = 2000){\n super();\n this.isPerspectiveCamera = true;\n this.type = \"PerspectiveCamera\";\n this.fov = fov;\n this.zoom = 1;\n this.near = near;\n this.far = far;\n this.focus = 10;\n this.aspect = aspect;\n this.view = null;\n this.filmGauge = 35; // width of the film (default in millimeters)\n this.filmOffset = 0; // horizontal film offset (same unit as gauge)\n this.updateProjectionMatrix();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.fov = source.fov;\n this.zoom = source.zoom;\n this.near = source.near;\n this.far = source.far;\n this.focus = source.focus;\n this.aspect = source.aspect;\n this.view = source.view === null ? null : Object.assign({}, source.view);\n this.filmGauge = source.filmGauge;\n this.filmOffset = source.filmOffset;\n return this;\n }\n /**\n\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t *\n\t * The default film gauge is 35, so that the focal length can be specified for\n\t * a 35mm (full frame) camera.\n\t *\n\t * Values for focal length and film gauge must have the same unit.\n\t */ setFocalLength(focalLength) {\n /** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */ const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n this.fov = $d5b33d7c30034067$var$RAD2DEG * 2 * Math.atan(vExtentSlope);\n this.updateProjectionMatrix();\n }\n /**\n\t * Calculates the focal length from the current .fov and .filmGauge.\n\t */ getFocalLength() {\n const vExtentSlope = Math.tan($d5b33d7c30034067$var$DEG2RAD * 0.5 * this.fov);\n return 0.5 * this.getFilmHeight() / vExtentSlope;\n }\n getEffectiveFOV() {\n return $d5b33d7c30034067$var$RAD2DEG * 2 * Math.atan(Math.tan($d5b33d7c30034067$var$DEG2RAD * 0.5 * this.fov) / this.zoom);\n }\n getFilmWidth() {\n // film not completely covered in portrait format (aspect < 1)\n return this.filmGauge * Math.min(this.aspect, 1);\n }\n getFilmHeight() {\n // film not completely covered in landscape format (aspect > 1)\n return this.filmGauge / Math.max(this.aspect, 1);\n }\n /**\n\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t * multi-monitor/multi-machine setups.\n\t *\n\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t * the monitors are in grid like this\n\t *\n\t * +---+---+---+\n\t * | A | B | C |\n\t * +---+---+---+\n\t * | D | E | F |\n\t * +---+---+---+\n\t *\n\t * then for each monitor you would call it like this\n\t *\n\t * const w = 1920;\n\t * const h = 1080;\n\t * const fullWidth = w * 3;\n\t * const fullHeight = h * 2;\n\t *\n\t * --A--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t * --B--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t * --C--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t * --D--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t * --E--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t * --F--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t *\n\t * Note there is no reason monitors have to be the same size or in a grid.\n\t */ setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n this.aspect = fullWidth / fullHeight;\n if (this.view === null) this.view = {\n enabled: true,\n fullWidth: 1,\n fullHeight: 1,\n offsetX: 0,\n offsetY: 0,\n width: 1,\n height: 1\n };\n this.view.enabled = true;\n this.view.fullWidth = fullWidth;\n this.view.fullHeight = fullHeight;\n this.view.offsetX = x;\n this.view.offsetY = y;\n this.view.width = width;\n this.view.height = height;\n this.updateProjectionMatrix();\n }\n clearViewOffset() {\n if (this.view !== null) this.view.enabled = false;\n this.updateProjectionMatrix();\n }\n updateProjectionMatrix() {\n const near = this.near;\n let top = near * Math.tan($d5b33d7c30034067$var$DEG2RAD * 0.5 * this.fov) / this.zoom;\n let height = 2 * top;\n let width = this.aspect * height;\n let left = -0.5 * width;\n const view = this.view;\n if (this.view !== null && this.view.enabled) {\n const fullWidth = view.fullWidth, fullHeight = view.fullHeight;\n left += view.offsetX * width / fullWidth;\n top -= view.offsetY * height / fullHeight;\n width *= view.width / fullWidth;\n height *= view.height / fullHeight;\n }\n const skew = this.filmOffset;\n if (skew !== 0) left += near * skew / this.getFilmWidth();\n this.projectionMatrix.makePerspective(left, left + width, top, top - height, near, this.far, this.coordinateSystem);\n this.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.fov = this.fov;\n data.object.zoom = this.zoom;\n data.object.near = this.near;\n data.object.far = this.far;\n data.object.focus = this.focus;\n data.object.aspect = this.aspect;\n if (this.view !== null) data.object.view = Object.assign({}, this.view);\n data.object.filmGauge = this.filmGauge;\n data.object.filmOffset = this.filmOffset;\n return data;\n }\n}\nconst $d5b33d7c30034067$var$fov = -90; // negative fov is not an error\nconst $d5b33d7c30034067$var$aspect = 1;\nclass $d5b33d7c30034067$export$d0cdd0bd804995de extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(near, far, renderTarget){\n super();\n this.type = \"CubeCamera\";\n this.renderTarget = renderTarget;\n this.coordinateSystem = null;\n const cameraPX = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraPX.layers = this.layers;\n this.add(cameraPX);\n const cameraNX = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraNX.layers = this.layers;\n this.add(cameraNX);\n const cameraPY = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraPY.layers = this.layers;\n this.add(cameraPY);\n const cameraNY = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraNY.layers = this.layers;\n this.add(cameraNY);\n const cameraPZ = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraPZ.layers = this.layers;\n this.add(cameraPZ);\n const cameraNZ = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraNZ.layers = this.layers;\n this.add(cameraNZ);\n }\n updateCoordinateSystem() {\n const coordinateSystem = this.coordinateSystem;\n const cameras = this.children.concat();\n const [cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ] = cameras;\n for (const camera of cameras)this.remove(camera);\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) {\n cameraPX.up.set(0, 1, 0);\n cameraPX.lookAt(1, 0, 0);\n cameraNX.up.set(0, 1, 0);\n cameraNX.lookAt(-1, 0, 0);\n cameraPY.up.set(0, 0, -1);\n cameraPY.lookAt(0, 1, 0);\n cameraNY.up.set(0, 0, 1);\n cameraNY.lookAt(0, -1, 0);\n cameraPZ.up.set(0, 1, 0);\n cameraPZ.lookAt(0, 0, 1);\n cameraNZ.up.set(0, 1, 0);\n cameraNZ.lookAt(0, 0, -1);\n } else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) {\n cameraPX.up.set(0, -1, 0);\n cameraPX.lookAt(-1, 0, 0);\n cameraNX.up.set(0, -1, 0);\n cameraNX.lookAt(1, 0, 0);\n cameraPY.up.set(0, 0, 1);\n cameraPY.lookAt(0, 1, 0);\n cameraNY.up.set(0, 0, -1);\n cameraNY.lookAt(0, -1, 0);\n cameraPZ.up.set(0, -1, 0);\n cameraPZ.lookAt(0, 0, 1);\n cameraNZ.up.set(0, -1, 0);\n cameraNZ.lookAt(0, 0, -1);\n } else throw new Error(\"THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: \" + coordinateSystem);\n for (const camera of cameras){\n this.add(camera);\n camera.updateMatrixWorld();\n }\n }\n update(renderer, scene) {\n if (this.parent === null) this.updateMatrixWorld();\n const renderTarget = this.renderTarget;\n if (this.coordinateSystem !== renderer.coordinateSystem) {\n this.coordinateSystem = renderer.coordinateSystem;\n this.updateCoordinateSystem();\n }\n const [cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ] = this.children;\n const currentRenderTarget = renderer.getRenderTarget();\n const currentXrEnabled = renderer.xr.enabled;\n renderer.xr.enabled = false;\n const generateMipmaps = renderTarget.texture.generateMipmaps;\n renderTarget.texture.generateMipmaps = false;\n renderer.setRenderTarget(renderTarget, 0);\n renderer.render(scene, cameraPX);\n renderer.setRenderTarget(renderTarget, 1);\n renderer.render(scene, cameraNX);\n renderer.setRenderTarget(renderTarget, 2);\n renderer.render(scene, cameraPY);\n renderer.setRenderTarget(renderTarget, 3);\n renderer.render(scene, cameraNY);\n renderer.setRenderTarget(renderTarget, 4);\n renderer.render(scene, cameraPZ);\n renderTarget.texture.generateMipmaps = generateMipmaps;\n renderer.setRenderTarget(renderTarget, 5);\n renderer.render(scene, cameraNZ);\n renderer.setRenderTarget(currentRenderTarget);\n renderer.xr.enabled = currentXrEnabled;\n renderTarget.texture.needsPMREMUpdate = true;\n }\n}\nclass $d5b33d7c30034067$export$ee2e5a18258a4049 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1){\n images = images !== undefined ? images : [];\n mapping = mapping !== undefined ? mapping : $d5b33d7c30034067$export$8759762a6477f2c4;\n super(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1);\n this.isCubeTexture = true;\n this.flipY = false;\n }\n get images() {\n return this.image;\n }\n set images(value) {\n this.image = value;\n }\n}\nclass $d5b33d7c30034067$export$ac386671d651941e extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(size = 1, options = {}){\n super(size, size, options);\n this.isWebGLCubeRenderTarget = true;\n const image = {\n width: size,\n height: size,\n depth: 1\n };\n const images = [\n image,\n image,\n image,\n image,\n image,\n image\n ];\n if (options.encoding !== undefined) {\n // @deprecated, r152\n $d5b33d7c30034067$var$warnOnce(\"THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace.\");\n options.colorSpace = options.encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n this.texture = new $d5b33d7c30034067$export$ee2e5a18258a4049(images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace);\n // By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n // in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n // in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n // three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n // and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture\n // as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures).\n this.texture.isRenderTargetTexture = true;\n this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n }\n fromEquirectangularTexture(renderer, texture) {\n this.texture.type = texture.type;\n this.texture.colorSpace = texture.colorSpace;\n this.texture.generateMipmaps = texture.generateMipmaps;\n this.texture.minFilter = texture.minFilter;\n this.texture.magFilter = texture.magFilter;\n const shader = {\n uniforms: {\n tEquirect: {\n value: null\n }\n },\n vertexShader: /* glsl */ `\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,\n fragmentShader: /* glsl */ `\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`\n };\n const geometry = new $d5b33d7c30034067$export$33e43285f7406bd5(5, 5, 5);\n const material = new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"CubemapFromEquirect\",\n uniforms: $d5b33d7c30034067$var$cloneUniforms(shader.uniforms),\n vertexShader: shader.vertexShader,\n fragmentShader: shader.fragmentShader,\n side: $d5b33d7c30034067$export$d9f0486e75b5ace,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba\n });\n material.uniforms.tEquirect.value = texture;\n const mesh = new $d5b33d7c30034067$export$e176487c05830cc5(geometry, material);\n const currentMinFilter = texture.minFilter;\n // Avoid blurred poles\n if (texture.minFilter === $d5b33d7c30034067$export$5d8599b6a933fb1b) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n const camera = new $d5b33d7c30034067$export$d0cdd0bd804995de(1, 10, this);\n camera.update(renderer, mesh);\n texture.minFilter = currentMinFilter;\n mesh.geometry.dispose();\n mesh.material.dispose();\n return this;\n }\n clear(renderer, color, depth, stencil) {\n const currentRenderTarget = renderer.getRenderTarget();\n for(let i = 0; i < 6; i++){\n renderer.setRenderTarget(this, i);\n renderer.clear(color, depth, stencil);\n }\n renderer.setRenderTarget(currentRenderTarget);\n }\n}\nconst $d5b33d7c30034067$var$_vector1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vector2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normalMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918();\nclass $d5b33d7c30034067$export$7ff5ac152ef991b0 {\n constructor(normal = new $d5b33d7c30034067$export$64b5c384219d3699(1, 0, 0), constant = 0){\n this.isPlane = true;\n // normal is assumed to be normalized\n this.normal = normal;\n this.constant = constant;\n }\n set(normal, constant) {\n this.normal.copy(normal);\n this.constant = constant;\n return this;\n }\n setComponents(x, y, z, w) {\n this.normal.set(x, y, z);\n this.constant = w;\n return this;\n }\n setFromNormalAndCoplanarPoint(normal, point) {\n this.normal.copy(normal);\n this.constant = -point.dot(this.normal);\n return this;\n }\n setFromCoplanarPoints(a, b, c) {\n const normal = $d5b33d7c30034067$var$_vector1.subVectors(c, b).cross($d5b33d7c30034067$var$_vector2.subVectors(a, b)).normalize();\n // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n this.setFromNormalAndCoplanarPoint(normal, a);\n return this;\n }\n copy(plane) {\n this.normal.copy(plane.normal);\n this.constant = plane.constant;\n return this;\n }\n normalize() {\n // Note: will lead to a divide by zero if the plane is invalid.\n const inverseNormalLength = 1.0 / this.normal.length();\n this.normal.multiplyScalar(inverseNormalLength);\n this.constant *= inverseNormalLength;\n return this;\n }\n negate() {\n this.constant *= -1;\n this.normal.negate();\n return this;\n }\n distanceToPoint(point) {\n return this.normal.dot(point) + this.constant;\n }\n distanceToSphere(sphere) {\n return this.distanceToPoint(sphere.center) - sphere.radius;\n }\n projectPoint(point, target) {\n return target.copy(point).addScaledVector(this.normal, -this.distanceToPoint(point));\n }\n intersectLine(line, target) {\n const direction = line.delta($d5b33d7c30034067$var$_vector1);\n const denominator = this.normal.dot(direction);\n if (denominator === 0) {\n // line is coplanar, return origin\n if (this.distanceToPoint(line.start) === 0) return target.copy(line.start);\n // Unsure if this is the correct method to handle this case.\n return null;\n }\n const t = -(line.start.dot(this.normal) + this.constant) / denominator;\n if (t < 0 || t > 1) return null;\n return target.copy(line.start).addScaledVector(direction, t);\n }\n intersectsLine(line) {\n // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n const startSign = this.distanceToPoint(line.start);\n const endSign = this.distanceToPoint(line.end);\n return startSign < 0 && endSign > 0 || endSign < 0 && startSign > 0;\n }\n intersectsBox(box) {\n return box.intersectsPlane(this);\n }\n intersectsSphere(sphere) {\n return sphere.intersectsPlane(this);\n }\n coplanarPoint(target) {\n return target.copy(this.normal).multiplyScalar(-this.constant);\n }\n applyMatrix4(matrix, optionalNormalMatrix) {\n const normalMatrix = optionalNormalMatrix || $d5b33d7c30034067$var$_normalMatrix.getNormalMatrix(matrix);\n const referencePoint = this.coplanarPoint($d5b33d7c30034067$var$_vector1).applyMatrix4(matrix);\n const normal = this.normal.applyMatrix3(normalMatrix).normalize();\n this.constant = -referencePoint.dot(normal);\n return this;\n }\n translate(offset) {\n this.constant -= offset.dot(this.normal);\n return this;\n }\n equals(plane) {\n return plane.normal.equals(this.normal) && plane.constant === this.constant;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_sphere$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_vector$6 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$35efe6f4c85463d2 {\n constructor(p0 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p1 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p2 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p3 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p4 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p5 = new $d5b33d7c30034067$export$7ff5ac152ef991b0()){\n this.planes = [\n p0,\n p1,\n p2,\n p3,\n p4,\n p5\n ];\n }\n set(p0, p1, p2, p3, p4, p5) {\n const planes = this.planes;\n planes[0].copy(p0);\n planes[1].copy(p1);\n planes[2].copy(p2);\n planes[3].copy(p3);\n planes[4].copy(p4);\n planes[5].copy(p5);\n return this;\n }\n copy(frustum) {\n const planes = this.planes;\n for(let i = 0; i < 6; i++)planes[i].copy(frustum.planes[i]);\n return this;\n }\n setFromProjectionMatrix(m, coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3) {\n const planes = this.planes;\n const me = m.elements;\n const me0 = me[0], me1 = me[1], me2 = me[2], me3 = me[3];\n const me4 = me[4], me5 = me[5], me6 = me[6], me7 = me[7];\n const me8 = me[8], me9 = me[9], me10 = me[10], me11 = me[11];\n const me12 = me[12], me13 = me[13], me14 = me[14], me15 = me[15];\n planes[0].setComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12).normalize();\n planes[1].setComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12).normalize();\n planes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize();\n planes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize();\n planes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize();\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) planes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();\n else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) planes[5].setComponents(me2, me6, me10, me14).normalize();\n else throw new Error(\"THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: \" + coordinateSystem);\n return this;\n }\n intersectsObject(object) {\n if (object.boundingSphere !== undefined) {\n if (object.boundingSphere === null) object.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$4.copy(object.boundingSphere).applyMatrix4(object.matrixWorld);\n } else {\n const geometry = object.geometry;\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$4.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld);\n }\n return this.intersectsSphere($d5b33d7c30034067$var$_sphere$4);\n }\n intersectsSprite(sprite) {\n $d5b33d7c30034067$var$_sphere$4.center.set(0, 0, 0);\n $d5b33d7c30034067$var$_sphere$4.radius = 0.7071067811865476;\n $d5b33d7c30034067$var$_sphere$4.applyMatrix4(sprite.matrixWorld);\n return this.intersectsSphere($d5b33d7c30034067$var$_sphere$4);\n }\n intersectsSphere(sphere) {\n const planes = this.planes;\n const center = sphere.center;\n const negRadius = -sphere.radius;\n for(let i = 0; i < 6; i++){\n const distance = planes[i].distanceToPoint(center);\n if (distance < negRadius) return false;\n }\n return true;\n }\n intersectsBox(box) {\n const planes = this.planes;\n for(let i = 0; i < 6; i++){\n const plane = planes[i];\n // corner at max distance\n $d5b33d7c30034067$var$_vector$6.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n $d5b33d7c30034067$var$_vector$6.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n $d5b33d7c30034067$var$_vector$6.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n if (plane.distanceToPoint($d5b33d7c30034067$var$_vector$6) < 0) return false;\n }\n return true;\n }\n containsPoint(point) {\n const planes = this.planes;\n for(let i = 0; i < 6; i++){\n if (planes[i].distanceToPoint(point) < 0) return false;\n }\n return true;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nfunction $d5b33d7c30034067$var$WebGLAnimation() {\n let context = null;\n let isAnimating = false;\n let animationLoop = null;\n let requestId = null;\n function onAnimationFrame(time, frame) {\n animationLoop(time, frame);\n requestId = context.requestAnimationFrame(onAnimationFrame);\n }\n return {\n start: function() {\n if (isAnimating === true) return;\n if (animationLoop === null) return;\n requestId = context.requestAnimationFrame(onAnimationFrame);\n isAnimating = true;\n },\n stop: function() {\n context.cancelAnimationFrame(requestId);\n isAnimating = false;\n },\n setAnimationLoop: function(callback) {\n animationLoop = callback;\n },\n setContext: function(value) {\n context = value;\n }\n };\n}\nfunction $d5b33d7c30034067$var$WebGLAttributes(gl, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n const buffers = new WeakMap();\n function createBuffer(attribute, bufferType) {\n const array = attribute.array;\n const usage = attribute.usage;\n const buffer = gl.createBuffer();\n gl.bindBuffer(bufferType, buffer);\n gl.bufferData(bufferType, array, usage);\n attribute.onUploadCallback();\n let type;\n if (array instanceof Float32Array) type = gl.FLOAT;\n else if (array instanceof Uint16Array) {\n if (attribute.isFloat16BufferAttribute) {\n if (isWebGL2) type = gl.HALF_FLOAT;\n else throw new Error(\"THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.\");\n } else type = gl.UNSIGNED_SHORT;\n } else if (array instanceof Int16Array) type = gl.SHORT;\n else if (array instanceof Uint32Array) type = gl.UNSIGNED_INT;\n else if (array instanceof Int32Array) type = gl.INT;\n else if (array instanceof Int8Array) type = gl.BYTE;\n else if (array instanceof Uint8Array) type = gl.UNSIGNED_BYTE;\n else if (array instanceof Uint8ClampedArray) type = gl.UNSIGNED_BYTE;\n else throw new Error(\"THREE.WebGLAttributes: Unsupported buffer data format: \" + array);\n return {\n buffer: buffer,\n type: type,\n bytesPerElement: array.BYTES_PER_ELEMENT,\n version: attribute.version\n };\n }\n function updateBuffer(buffer, attribute, bufferType) {\n const array = attribute.array;\n const updateRange = attribute.updateRange;\n gl.bindBuffer(bufferType, buffer);\n if (updateRange.count === -1) // Not using update ranges\n gl.bufferSubData(bufferType, 0, array);\n else {\n if (isWebGL2) gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array, updateRange.offset, updateRange.count);\n else gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array.subarray(updateRange.offset, updateRange.offset + updateRange.count));\n updateRange.count = -1; // reset range\n }\n attribute.onUploadCallback();\n }\n //\n function get(attribute) {\n if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n return buffers.get(attribute);\n }\n function remove(attribute) {\n if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n const data = buffers.get(attribute);\n if (data) {\n gl.deleteBuffer(data.buffer);\n buffers.delete(attribute);\n }\n }\n function update(attribute, bufferType) {\n if (attribute.isGLBufferAttribute) {\n const cached = buffers.get(attribute);\n if (!cached || cached.version < attribute.version) buffers.set(attribute, {\n buffer: attribute.buffer,\n type: attribute.type,\n bytesPerElement: attribute.elementSize,\n version: attribute.version\n });\n return;\n }\n if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n const data = buffers.get(attribute);\n if (data === undefined) buffers.set(attribute, createBuffer(attribute, bufferType));\n else if (data.version < attribute.version) {\n updateBuffer(data.buffer, attribute, bufferType);\n data.version = attribute.version;\n }\n }\n return {\n get: get,\n remove: remove,\n update: update\n };\n}\nclass $d5b33d7c30034067$export$967d831af31f69ce extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(width = 1, height = 1, widthSegments = 1, heightSegments = 1){\n super();\n this.type = \"PlaneGeometry\";\n this.parameters = {\n width: width,\n height: height,\n widthSegments: widthSegments,\n heightSegments: heightSegments\n };\n const width_half = width / 2;\n const height_half = height / 2;\n const gridX = Math.floor(widthSegments);\n const gridY = Math.floor(heightSegments);\n const gridX1 = gridX + 1;\n const gridY1 = gridY + 1;\n const segment_width = width / gridX;\n const segment_height = height / gridY;\n //\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n for(let iy = 0; iy < gridY1; iy++){\n const y = iy * segment_height - height_half;\n for(let ix = 0; ix < gridX1; ix++){\n const x = ix * segment_width - width_half;\n vertices.push(x, -y, 0);\n normals.push(0, 0, 1);\n uvs.push(ix / gridX);\n uvs.push(1 - iy / gridY);\n }\n }\n for(let iy = 0; iy < gridY; iy++)for(let ix = 0; ix < gridX; ix++){\n const a = ix + gridX1 * iy;\n const b = ix + gridX1 * (iy + 1);\n const c = ix + 1 + gridX1 * (iy + 1);\n const d = ix + 1 + gridX1 * iy;\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$967d831af31f69ce(data.width, data.height, data.widthSegments, data.heightSegments);\n }\n}\nvar $d5b33d7c30034067$var$alphahash_fragment = \"#ifdef USE_ALPHAHASH\\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\\n#endif\";\nvar $d5b33d7c30034067$var$alphahash_pars_fragment = \"#ifdef USE_ALPHAHASH\\n\tconst float ALPHA_HASH_SCALE = 0.05;\\n\tfloat hash2D( vec2 value ) {\\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\\n\t}\\n\tfloat hash3D( vec3 value ) {\\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\\n\t}\\n\tfloat getAlphaHashThreshold( vec3 position ) {\\n\t\tfloat maxDeriv = max(\\n\t\t\tlength( dFdx( position.xyz ) ),\\n\t\t\tlength( dFdy( position.xyz ) )\\n\t\t);\\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\\n\t\tvec2 pixScales = vec2(\\n\t\t\texp2( floor( log2( pixScale ) ) ),\\n\t\t\texp2( ceil( log2( pixScale ) ) )\\n\t\t);\\n\t\tvec2 alpha = vec2(\\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\\n\t\t);\\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\\n\t\tvec3 cases = vec3(\\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\\n\t\t);\\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\\n\t\t\t: cases.z;\\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\\n#endif\";\nvar $d5b33d7c30034067$var$alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\tuniform sampler2D alphaMap;\\n#endif\";\nvar $d5b33d7c30034067$var$alphatest_fragment = \"#ifdef USE_ALPHATEST\\n\tif ( diffuseColor.a < alphaTest ) discard;\\n#endif\";\nvar $d5b33d7c30034067$var$alphatest_pars_fragment = \"#ifdef USE_ALPHATEST\\n\tuniform float alphaTest;\\n#endif\";\nvar $d5b33d7c30034067$var$aomap_fragment = \"#ifdef USE_AOMAP\\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\tuniform sampler2D aoMap;\\n\tuniform float aoMapIntensity;\\n#endif\";\nvar $d5b33d7c30034067$var$begin_vertex = \"vec3 transformed = vec3( position );\\n#ifdef USE_ALPHAHASH\\n\tvPosition = vec3( position );\\n#endif\";\nvar $d5b33d7c30034067$var$beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\nvar $d5b33d7c30034067$var$bsdfs = \"float G_BlinnPhong_Implicit( ) {\\n\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\\n\tvec3 halfDir = normalize( lightDir + viewDir );\\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\\n\tfloat G = G_BlinnPhong_Implicit( );\\n\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\treturn F * ( G * D );\\n} // validated\";\nvar $d5b33d7c30034067$var$iridescence_fragment = \"#ifdef USE_IRIDESCENCE\\n\tconst mat3 XYZ_TO_REC709 = mat3(\\n\t\t 3.2404542, -0.9692660, 0.0556434,\\n\t\t-1.5371385, 1.8760108, -0.2040259,\\n\t\t-0.4985314, 0.0415560, 1.0572252\\n\t);\\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\\n\t}\\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\\n\t}\\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\\n\t}\\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\\n\t\txyz /= 1.0685e-7;\\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\\n\t\treturn rgb;\\n\t}\\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\\n\t\tvec3 I;\\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\\n\t\tif ( cosTheta2Sq < 0.0 ) {\\n\t\t\treturn vec3( 1.0 );\\n\t\t}\\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\\n\t\tfloat T121 = 1.0 - R12;\\n\t\tfloat phi12 = 0.0;\\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\\n\t\tfloat phi21 = PI - phi12;\\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\\n\t\tvec3 phi23 = vec3( 0.0 );\\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\\n\t\tvec3 phi = vec3( phi21 ) + phi23;\\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\\n\t\tvec3 r123 = sqrt( R123 );\\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\\n\t\tvec3 C0 = R12 + Rs;\\n\t\tI = C0;\\n\t\tvec3 Cm = Rs - T121;\\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\\n\t\t\tCm *= r123;\\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\\n\t\t\tI += Cm * Sm;\\n\t\t}\\n\t\treturn max( I, vec3( 0.0 ) );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\tuniform sampler2D bumpMap;\\n\tuniform float bumpScale;\\n\tvec2 dHdxy_fwd() {\\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\\n\t\treturn vec2( dBx, dBy );\\n\t}\\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\\n\t\tvec3 vN = surf_norm;\\n\t\tvec3 R1 = cross( vSigmaY, vN );\\n\t\tvec3 R2 = cross( vN, vSigmaX );\\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\tvec4 plane;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\t\tplane = clippingPlanes[ i ];\\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\t\tbool clipped = true;\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\t\t\tplane = clippingPlanes[ i ];\\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t\tif ( clipped ) discard;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\tvarying vec3 vClipPosition;\\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\tvarying vec3 vClipPosition;\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\tvClipPosition = - mvPosition.xyz;\\n#endif\";\nvar $d5b33d7c30034067$var$color_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\tdiffuseColor.rgb *= vColor;\\n#endif\";\nvar $d5b33d7c30034067$var$color_pars_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\tvarying vec3 vColor;\\n#endif\";\nvar $d5b33d7c30034067$var$color_pars_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\tvarying vec3 vColor;\\n#endif\";\nvar $d5b33d7c30034067$var$color_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\nvar $d5b33d7c30034067$var$common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nvec3 pow2( const in vec3 x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\treturn fract( sin( sn ) * c );\\n}\\n#ifdef HIGH_PRECISION\\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\tfloat precisionSafeLength( vec3 v ) {\\n\t\tfloat maxComponent = max3( abs( v ) );\\n\t\treturn length( v / maxComponent ) * maxComponent;\\n\t}\\n#endif\\nstruct IncidentLight {\\n\tvec3 color;\\n\tvec3 direction;\\n\tbool visible;\\n};\\nstruct ReflectedLight {\\n\tvec3 directDiffuse;\\n\tvec3 directSpecular;\\n\tvec3 indirectDiffuse;\\n\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\tvec3 position;\\n\tvec3 normal;\\n\tvec3 viewDir;\\n#ifdef USE_CLEARCOAT\\n\tvec3 clearcoatNormal;\\n#endif\\n};\\n#ifdef USE_ALPHAHASH\\n\tvarying vec3 vPosition;\\n#endif\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\tmat3 tmp;\\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\treturn tmp;\\n}\\nfloat luminance( const in vec3 rgb ) {\\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\\n\treturn dot( weights, rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\treturn vec2( u, v );\\n}\\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\\n\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n}\\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n} // validated\";\nvar $d5b33d7c30034067$var$cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\t#define cubeUV_minMipLevel 4.0\\n\t#define cubeUV_minTileSize 16.0\\n\tfloat getFace( vec3 direction ) {\\n\t\tvec3 absDirection = abs( direction );\\n\t\tfloat face = - 1.0;\\n\t\tif ( absDirection.x > absDirection.z ) {\\n\t\t\tif ( absDirection.x > absDirection.y )\\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\t\t\telse\\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\t\t} else {\\n\t\t\tif ( absDirection.z > absDirection.y )\\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\t\t\telse\\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\t\t}\\n\t\treturn face;\\n\t}\\n\tvec2 getUV( vec3 direction, float face ) {\\n\t\tvec2 uv;\\n\t\tif ( face == 0.0 ) {\\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\t\t} else if ( face == 1.0 ) {\\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\t\t} else if ( face == 2.0 ) {\\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\t\t} else if ( face == 3.0 ) {\\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\t\t} else if ( face == 4.0 ) {\\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\t\t} else {\\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\t\t}\\n\t\treturn 0.5 * ( uv + 1.0 );\\n\t}\\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\t\tfloat face = getFace( direction );\\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\t\tfloat faceSize = exp2( mipInt );\\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\\n\t\tif ( face > 2.0 ) {\\n\t\t\tuv.y += faceSize;\\n\t\t\tface -= 3.0;\\n\t\t}\\n\t\tuv.x += face * faceSize;\\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\\n\t\t#ifdef texture2DGradEXT\\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\\n\t\t#else\\n\t\t\treturn texture2D( envMap, uv ).rgb;\\n\t\t#endif\\n\t}\\n\t#define cubeUV_r0 1.0\\n\t#define cubeUV_v0 0.339\\n\t#define cubeUV_m0 - 2.0\\n\t#define cubeUV_r1 0.8\\n\t#define cubeUV_v1 0.276\\n\t#define cubeUV_m1 - 1.0\\n\t#define cubeUV_r4 0.4\\n\t#define cubeUV_v4 0.046\\n\t#define cubeUV_m4 2.0\\n\t#define cubeUV_r5 0.305\\n\t#define cubeUV_v5 0.016\\n\t#define cubeUV_m5 3.0\\n\t#define cubeUV_r6 0.21\\n\t#define cubeUV_v6 0.0038\\n\t#define cubeUV_m6 4.0\\n\tfloat roughnessToMip( float roughness ) {\\n\t\tfloat mip = 0.0;\\n\t\tif ( roughness >= cubeUV_r1 ) {\\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\\n\t\t} else if ( roughness >= cubeUV_r4 ) {\\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\\n\t\t} else if ( roughness >= cubeUV_r5 ) {\\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\\n\t\t} else if ( roughness >= cubeUV_r6 ) {\\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\\n\t\t} else {\\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\\n\t\treturn mip;\\n\t}\\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\\n\t\tfloat mipF = fract( mip );\\n\t\tfloat mipInt = floor( mip );\\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\t\tif ( mipF == 0.0 ) {\\n\t\t\treturn vec4( color0, 1.0 );\\n\t\t} else {\\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\t\t}\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\tmat3 m = mat3( instanceMatrix );\\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\t#ifdef FLIP_SIDED\\n\t\ttransformedTangent = - transformedTangent;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\tuniform sampler2D displacementMap;\\n\tuniform float displacementScale;\\n\tuniform float displacementBias;\\n#endif\";\nvar $d5b33d7c30034067$var$displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\\n#endif\";\nvar $d5b33d7c30034067$var$emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\nvar $d5b33d7c30034067$var$emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\tuniform sampler2D emissiveMap;\\n#endif\";\nvar $d5b33d7c30034067$var$colorspace_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\nvar $d5b33d7c30034067$var$colorspace_pars_fragment = \"vec4 LinearToLinear( in vec4 value ) {\\n\treturn value;\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\";\nvar $d5b33d7c30034067$var$envmap_fragment = \"#ifdef USE_ENVMAP\\n\t#ifdef ENV_WORLDPOS\\n\t\tvec3 cameraToFrag;\\n\t\tif ( isOrthographic ) {\\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\t\t} else {\\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\t\t}\\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\t\t#ifdef ENVMAP_MODE_REFLECTION\\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\t\t#else\\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\t\t#endif\\n\t#else\\n\t\tvec3 reflectVec = vReflect;\\n\t#endif\\n\t#ifdef ENVMAP_TYPE_CUBE\\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\t#else\\n\t\tvec4 envColor = vec4( 0.0 );\\n\t#endif\\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\t#elif defined( ENVMAP_BLENDING_MIX )\\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\t#elif defined( ENVMAP_BLENDING_ADD )\\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\tuniform float envMapIntensity;\\n\tuniform float flipEnvMap;\\n\t#ifdef ENVMAP_TYPE_CUBE\\n\t\tuniform samplerCube envMap;\\n\t#else\\n\t\tuniform sampler2D envMap;\\n\t#endif\\n\t\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\tuniform float reflectivity;\\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\t\t#define ENV_WORLDPOS\\n\t#endif\\n\t#ifdef ENV_WORLDPOS\\n\t\tvarying vec3 vWorldPosition;\\n\t\tuniform float refractionRatio;\\n\t#else\\n\t\tvarying vec3 vReflect;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\t\t#define ENV_WORLDPOS\\n\t#endif\\n\t#ifdef ENV_WORLDPOS\\n\t\t\\n\t\tvarying vec3 vWorldPosition;\\n\t#else\\n\t\tvarying vec3 vReflect;\\n\t\tuniform float refractionRatio;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_vertex = \"#ifdef USE_ENVMAP\\n\t#ifdef ENV_WORLDPOS\\n\t\tvWorldPosition = worldPosition.xyz;\\n\t#else\\n\t\tvec3 cameraToVertex;\\n\t\tif ( isOrthographic ) {\\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\t\t} else {\\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\t\t}\\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\t\t#ifdef ENVMAP_MODE_REFLECTION\\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\\n\t\t#else\\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\t\t#endif\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$fog_vertex = \"#ifdef USE_FOG\\n\tvFogDepth = - mvPosition.z;\\n#endif\";\nvar $d5b33d7c30034067$var$fog_pars_vertex = \"#ifdef USE_FOG\\n\tvarying float vFogDepth;\\n#endif\";\nvar $d5b33d7c30034067$var$fog_fragment = \"#ifdef USE_FOG\\n\t#ifdef FOG_EXP2\\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\\n\t#else\\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\\n\t#endif\\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\nvar $d5b33d7c30034067$var$fog_pars_fragment = \"#ifdef USE_FOG\\n\tuniform vec3 fogColor;\\n\tvarying float vFogDepth;\\n\t#ifdef FOG_EXP2\\n\t\tuniform float fogDensity;\\n\t#else\\n\t\tuniform float fogNear;\\n\t\tuniform float fogFar;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\tfloat dotNL = dot( normal, lightDirection );\\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\t#ifdef USE_GRADIENTMAP\\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\\n\t#else\\n\t\tvec2 fw = fwidth( coord ) * 0.5;\\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\\n\t#endif\\n}\";\nvar $d5b33d7c30034067$var$lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\\n#endif\";\nvar $d5b33d7c30034067$var$lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\tuniform sampler2D lightMap;\\n\tuniform float lightMapIntensity;\\n#endif\";\nvar $d5b33d7c30034067$var$lights_lambert_fragment = \"LambertMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularStrength = specularStrength;\";\nvar $d5b33d7c30034067$var$lights_lambert_pars_fragment = \"varying vec3 vViewPosition;\\nstruct LambertMaterial {\\n\tvec3 diffuseColor;\\n\tfloat specularStrength;\\n};\\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\tvec3 irradiance = dotNL * directLight.color;\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert\";\nvar $d5b33d7c30034067$var$lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\tvec3 irradiance = ambientLightColor;\\n\treturn irradiance;\\n}\\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\t#if defined ( LEGACY_LIGHTS )\\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\t\t}\\n\t\treturn 1.0;\\n\t#else\\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\t\tif ( cutoffDistance > 0.0 ) {\\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\t\t}\\n\t\treturn distanceFalloff;\\n\t#endif\\n}\\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\tstruct DirectionalLight {\\n\t\tvec3 direction;\\n\t\tvec3 color;\\n\t};\\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\t\tlight.color = directionalLight.color;\\n\t\tlight.direction = directionalLight.direction;\\n\t\tlight.visible = true;\\n\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\tstruct PointLight {\\n\t\tvec3 position;\\n\t\tvec3 color;\\n\t\tfloat distance;\\n\t\tfloat decay;\\n\t};\\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\t\tvec3 lVector = pointLight.position - geometry.position;\\n\t\tlight.direction = normalize( lVector );\\n\t\tfloat lightDistance = length( lVector );\\n\t\tlight.color = pointLight.color;\\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\tstruct SpotLight {\\n\t\tvec3 position;\\n\t\tvec3 direction;\\n\t\tvec3 color;\\n\t\tfloat distance;\\n\t\tfloat decay;\\n\t\tfloat coneCos;\\n\t\tfloat penumbraCos;\\n\t};\\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\t\tvec3 lVector = spotLight.position - geometry.position;\\n\t\tlight.direction = normalize( lVector );\\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\t\tif ( spotAttenuation > 0.0 ) {\\n\t\t\tfloat lightDistance = length( lVector );\\n\t\t\tlight.color = spotLight.color * spotAttenuation;\\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\t\t} else {\\n\t\t\tlight.color = vec3( 0.0 );\\n\t\t\tlight.visible = false;\\n\t\t}\\n\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\tstruct RectAreaLight {\\n\t\tvec3 color;\\n\t\tvec3 position;\\n\t\tvec3 halfWidth;\\n\t\tvec3 halfHeight;\\n\t};\\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\tstruct HemisphereLight {\\n\t\tvec3 direction;\\n\t\tvec3 skyColor;\\n\t\tvec3 groundColor;\\n\t};\\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\t\treturn irradiance;\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_physical_pars_fragment = \"#ifdef USE_ENVMAP\\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\\n\t\t#else\\n\t\t\treturn vec3( 0.0 );\\n\t\t#endif\\n\t}\\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\t\t\treturn envMapColor.rgb * envMapIntensity;\\n\t\t#else\\n\t\t\treturn vec3( 0.0 );\\n\t\t#endif\\n\t}\\n\t#ifdef USE_ANISOTROPY\\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\\n\t\t\t#else\\n\t\t\t\treturn vec3( 0.0 );\\n\t\t\t#endif\\n\t\t}\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\nvar $d5b33d7c30034067$var$lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\nstruct ToonMaterial {\\n\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\";\nvar $d5b33d7c30034067$var$lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\nvar $d5b33d7c30034067$var$lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\nstruct BlinnPhongMaterial {\\n\tvec3 diffuseColor;\\n\tvec3 specularColor;\\n\tfloat specularShininess;\\n\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\tvec3 irradiance = dotNL * directLight.color;\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\";\nvar $d5b33d7c30034067$var$lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\\nmaterial.roughness = min( material.roughness, 1.0 );\\n#ifdef IOR\\n\tmaterial.ior = ior;\\n\t#ifdef USE_SPECULAR\\n\t\tfloat specularIntensityFactor = specularIntensity;\\n\t\tvec3 specularColorFactor = specularColor;\\n\t\t#ifdef USE_SPECULAR_COLORMAP\\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\\n\t\t#endif\\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\\n\t\t#endif\\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\\n\t#else\\n\t\tfloat specularIntensityFactor = 1.0;\\n\t\tvec3 specularColorFactor = vec3( 1.0 );\\n\t\tmaterial.specularF90 = 1.0;\\n\t#endif\\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\\n#else\\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\\n\tmaterial.specularF90 = 1.0;\\n#endif\\n#ifdef USE_CLEARCOAT\\n\tmaterial.clearcoat = clearcoat;\\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\tmaterial.clearcoatF0 = vec3( 0.04 );\\n\tmaterial.clearcoatF90 = 1.0;\\n\t#ifdef USE_CLEARCOATMAP\\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\\n\t#endif\\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\\n\t#endif\\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\tmaterial.clearcoatRoughness += geometryRoughness;\\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\tmaterial.iridescence = iridescence;\\n\tmaterial.iridescenceIOR = iridescenceIOR;\\n\t#ifdef USE_IRIDESCENCEMAP\\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\\n\t#endif\\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\\n\t#else\\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\\n\t#endif\\n#endif\\n#ifdef USE_SHEEN\\n\tmaterial.sheenColor = sheenColor;\\n\t#ifdef USE_SHEEN_COLORMAP\\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\\n\t#endif\\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\\n\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\t#ifdef USE_ANISOTROPYMAP\\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\\n\t#else\\n\t\tvec2 anisotropyV = anisotropyVector;\\n\t#endif\\n\tmaterial.anisotropy = length( anisotropyV );\\n\tanisotropyV /= material.anisotropy;\\n\tmaterial.anisotropy = saturate( material.anisotropy );\\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\\n#endif\";\nvar $d5b33d7c30034067$var$lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\tvec3 diffuseColor;\\n\tfloat roughness;\\n\tvec3 specularColor;\\n\tfloat specularF90;\\n\t#ifdef USE_CLEARCOAT\\n\t\tfloat clearcoat;\\n\t\tfloat clearcoatRoughness;\\n\t\tvec3 clearcoatF0;\\n\t\tfloat clearcoatF90;\\n\t#endif\\n\t#ifdef USE_IRIDESCENCE\\n\t\tfloat iridescence;\\n\t\tfloat iridescenceIOR;\\n\t\tfloat iridescenceThickness;\\n\t\tvec3 iridescenceFresnel;\\n\t\tvec3 iridescenceF0;\\n\t#endif\\n\t#ifdef USE_SHEEN\\n\t\tvec3 sheenColor;\\n\t\tfloat sheenRoughness;\\n\t#endif\\n\t#ifdef IOR\\n\t\tfloat ior;\\n\t#endif\\n\t#ifdef USE_TRANSMISSION\\n\t\tfloat transmission;\\n\t\tfloat transmissionAlpha;\\n\t\tfloat thickness;\\n\t\tfloat attenuationDistance;\\n\t\tvec3 attenuationColor;\\n\t#endif\\n\t#ifdef USE_ANISOTROPY\\n\t\tfloat anisotropy;\\n\t\tfloat alphaT;\\n\t\tvec3 anisotropyT;\\n\t\tvec3 anisotropyB;\\n\t#endif\\n};\\nvec3 clearcoatSpecular = vec3( 0.0 );\\nvec3 sheenSpecular = vec3( 0.0 );\\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\\n float x2 = x * x;\\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\\n}\\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\tfloat a2 = pow2( alpha );\\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\tfloat a2 = pow2( alpha );\\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\n#ifdef USE_ANISOTROPY\\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\\n\t\tfloat v = 0.5 / ( gv + gl );\\n\t\treturn saturate(v);\\n\t}\\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\\n\t\tfloat a2 = alphaT * alphaB;\\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\\n\t\thighp float v2 = dot( v, v );\\n\t\tfloat w2 = a2 / v2;\\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\\n\t}\\n#endif\\n#ifdef USE_CLEARCOAT\\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\\n\t\tvec3 f0 = material.clearcoatF0;\\n\t\tfloat f90 = material.clearcoatF90;\\n\t\tfloat roughness = material.clearcoatRoughness;\\n\t\tfloat alpha = pow2( roughness );\\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\t\tfloat D = D_GGX( alpha, dotNH );\\n\t\treturn F * ( V * D );\\n\t}\\n#endif\\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\\n\tvec3 f0 = material.specularColor;\\n\tfloat f90 = material.specularF90;\\n\tfloat roughness = material.roughness;\\n\tfloat alpha = pow2( roughness );\\n\tvec3 halfDir = normalize( lightDir + viewDir );\\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\t#ifdef USE_IRIDESCENCE\\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\\n\t#endif\\n\t#ifdef USE_ANISOTROPY\\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\\n\t#else\\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\t\tfloat D = D_GGX( alpha, dotNH );\\n\t#endif\\n\treturn F * ( V * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\tconst float LUT_SIZE = 64.0;\\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\tfloat dotNV = saturate( dot( N, V ) );\\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\tfloat l = length( f );\\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\tfloat x = dot( v1, v2 );\\n\tfloat y = abs( x );\\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\tfloat v = a / b;\\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\tvec3 lightNormal = cross( v1, v2 );\\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\tvec3 T1, T2;\\n\tT1 = normalize( V - N * dot( V, N ) );\\n\tT2 = - cross( N, T1 );\\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\tvec3 coords[ 4 ];\\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\tvec3 vectorFormFactor = vec3( 0.0 );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\treturn vec3( result );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie( float roughness, float dotNH ) {\\n\tfloat alpha = pow2( roughness );\\n\tfloat invAlpha = 1.0 / alpha;\\n\tfloat cos2h = dotNH * dotNH;\\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\\n}\\nfloat V_Neubelt( float dotNV, float dotNL ) {\\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\\n}\\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\\n\tvec3 halfDir = normalize( lightDir + viewDir );\\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\\n\tfloat V = V_Neubelt( dotNV, dotNL );\\n\treturn sheenColor * ( D * V );\\n}\\n#endif\\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tfloat r2 = roughness * roughness;\\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\\n\treturn saturate( DG * RECIPROCAL_PI );\\n}\\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\tvec4 r = roughness * c0 + c1;\\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\\n\treturn fab;\\n}\\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\treturn specularColor * fab.x + specularF90 * fab.y;\\n}\\n#ifdef USE_IRIDESCENCE\\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n#else\\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n#endif\\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\t#ifdef USE_IRIDESCENCE\\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\\n\t#else\\n\t\tvec3 Fr = specularColor;\\n\t#endif\\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\\n\tfloat Ess = fab.x + fab.y;\\n\tfloat Ems = 1.0 - Ess;\\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\tsingleScatter += FssEss;\\n\tmultiScatter += Fms * Ems;\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\t\tvec3 normal = geometry.normal;\\n\t\tvec3 viewDir = geometry.viewDir;\\n\t\tvec3 position = geometry.position;\\n\t\tvec3 lightPos = rectAreaLight.position;\\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\t\tvec3 lightColor = rectAreaLight.color;\\n\t\tfloat roughness = material.roughness;\\n\t\tvec3 rectCoords[ 4 ];\\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\t\tvec4 t1 = texture2D( ltc_1, uv );\\n\t\tvec4 t2 = texture2D( ltc_2, uv );\\n\t\tmat3 mInv = mat3(\\n\t\t\tvec3( t1.x, 0, t1.y ),\\n\t\t\tvec3( 0, 1, 0 ),\\n\t\t\tvec3( t1.z, 0, t1.w )\\n\t\t);\\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\tvec3 irradiance = dotNL * directLight.color;\\n\t#ifdef USE_CLEARCOAT\\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\\n\t#endif\\n\t#ifdef USE_SHEEN\\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\\n\t#endif\\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\t#ifdef USE_CLEARCOAT\\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\\n\t#endif\\n\t#ifdef USE_SHEEN\\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\\n\t#endif\\n\tvec3 singleScattering = vec3( 0.0 );\\n\tvec3 multiScattering = vec3( 0.0 );\\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\t#ifdef USE_IRIDESCENCE\\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\\n\t#else\\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\\n\t#endif\\n\tvec3 totalScattering = singleScattering + multiScattering;\\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\\n\treflectedLight.indirectSpecular += radiance * singleScattering;\\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_Physical\\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\nvar $d5b33d7c30034067$var$lights_fragment_begin = \"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef USE_CLEARCOAT\\n\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\\n\tif ( material.iridescenceThickness == 0.0 ) {\\n\t\tmaterial.iridescence = 0.0;\\n\t} else {\\n\t\tmaterial.iridescence = saturate( material.iridescence );\\n\t}\\n\tif ( material.iridescence > 0.0 ) {\\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\\n\t}\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\tPointLight pointLight;\\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\tPointLightShadow pointLightShadow;\\n\t#endif\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\t\tpointLight = pointLights[ i ];\\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\t\tpointLightShadow = pointLightShadows[ i ];\\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\t\t#endif\\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\tSpotLight spotLight;\\n\tvec4 spotColor;\\n\tvec3 spotLightCoord;\\n\tbool inSpotLightMap;\\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\tSpotLightShadow spotLightShadow;\\n\t#endif\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\t\tspotLight = spotLights[ i ];\\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\\n\t\t#else\\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\t\t#endif\\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\\n\t\t#endif\\n\t\t#undef SPOT_LIGHT_MAP_INDEX\\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\t\tspotLightShadow = spotLightShadows[ i ];\\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\t\t#endif\\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\tDirectionalLight directionalLight;\\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\tDirectionalLightShadow directionalLightShadow;\\n\t#endif\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\t\tdirectionalLight = directionalLights[ i ];\\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\t\t#endif\\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\tRectAreaLight rectAreaLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\t\trectAreaLight = rectAreaLights[ i ];\\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\tvec3 iblIrradiance = vec3( 0.0 );\\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\\n\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\tvec3 radiance = vec3( 0.0 );\\n\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\nvar $d5b33d7c30034067$var$lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\t#ifdef USE_LIGHTMAP\\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\t\tirradiance += lightMapIrradiance;\\n\t#endif\\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\\n\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\t#ifdef USE_ANISOTROPY\\n\t\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\\n\t#else\\n\t\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\\n\t#endif\\n\t#ifdef USE_CLEARCOAT\\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\tuniform float logDepthBufFC;\\n\tvarying float vFragDepth;\\n\tvarying float vIsPerspective;\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\t#ifdef USE_LOGDEPTHBUF_EXT\\n\t\tvarying float vFragDepth;\\n\t\tvarying float vIsPerspective;\\n\t#else\\n\t\tuniform float logDepthBufFC;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\t#ifdef USE_LOGDEPTHBUF_EXT\\n\t\tvFragDepth = 1.0 + gl_Position.w;\\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\t#else\\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\t\t\tgl_Position.z *= gl_Position.w;\\n\t\t}\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$map_fragment = \"#ifdef USE_MAP\\n\tdiffuseColor *= texture2D( map, vMapUv );\\n#endif\";\nvar $d5b33d7c30034067$var$map_pars_fragment = \"#ifdef USE_MAP\\n\tuniform sampler2D map;\\n#endif\";\nvar $d5b33d7c30034067$var$map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\t#if defined( USE_POINTS_UV )\\n\t\tvec2 uv = vUv;\\n\t#else\\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\t#endif\\n#endif\\n#ifdef USE_MAP\\n\tdiffuseColor *= texture2D( map, uv );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\nvar $d5b33d7c30034067$var$map_particle_pars_fragment = \"#if defined( USE_POINTS_UV )\\n\tvarying vec2 vUv;\\n#else\\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\t\tuniform mat3 uvTransform;\\n\t#endif\\n#endif\\n#ifdef USE_MAP\\n\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tuniform sampler2D alphaMap;\\n#endif\";\nvar $d5b33d7c30034067$var$metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\\n\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\nvar $d5b33d7c30034067$var$metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\tuniform sampler2D metalnessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$morphcolor_vertex = \"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\\n\tvColor *= morphTargetBaseInfluence;\\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\t\t#if defined( USE_COLOR_ALPHA )\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\\n\t\t#elif defined( USE_COLOR )\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\\n\t\t#endif\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\tobjectNormal *= morphTargetBaseInfluence;\\n\t#ifdef MORPHTARGETS_TEXTURE\\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\\n\t\t}\\n\t#else\\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\tuniform float morphTargetBaseInfluence;\\n\t#ifdef MORPHTARGETS_TEXTURE\\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\\n\t\tuniform sampler2DArray morphTargetsTexture;\\n\t\tuniform ivec2 morphTargetsTextureSize;\\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\\n\t\t}\\n\t#else\\n\t\t#ifndef USE_MORPHNORMALS\\n\t\t\tuniform float morphTargetInfluences[ 8 ];\\n\t\t#else\\n\t\t\tuniform float morphTargetInfluences[ 4 ];\\n\t\t#endif\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\ttransformed *= morphTargetBaseInfluence;\\n\t#ifdef MORPHTARGETS_TEXTURE\\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\\n\t\t}\\n\t#else\\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\t\t#ifndef USE_MORPHNORMALS\\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\t\t#endif\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normal_fragment_begin = \"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\tvec3 fdx = dFdx( vViewPosition );\\n\tvec3 fdy = dFdy( vViewPosition );\\n\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\tvec3 normal = normalize( vNormal );\\n\t#ifdef DOUBLE_SIDED\\n\t\tnormal *= faceDirection;\\n\t#endif\\n#endif\\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\\n\t#ifdef USE_TANGENT\\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\t#else\\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\\n\t\t#if defined( USE_NORMALMAP )\\n\t\t\tvNormalMapUv\\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\\n\t\t\tvClearcoatNormalMapUv\\n\t\t#else\\n\t\t\tvUv\\n\t\t#endif\\n\t\t);\\n\t#endif\\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\t\ttbn[0] *= faceDirection;\\n\t\ttbn[1] *= faceDirection;\\n\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\t#ifdef USE_TANGENT\\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\t#else\\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\\n\t#endif\\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\t\ttbn2[0] *= faceDirection;\\n\t\ttbn2[1] *= faceDirection;\\n\t#endif\\n#endif\\nvec3 geometryNormal = normal;\";\nvar $d5b33d7c30034067$var$normal_fragment_maps = \"#ifdef USE_NORMALMAP_OBJECTSPACE\\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\t#ifdef FLIP_SIDED\\n\t\tnormal = - normal;\\n\t#endif\\n\t#ifdef DOUBLE_SIDED\\n\t\tnormal = normal * faceDirection;\\n\t#endif\\n\tnormal = normalize( normalMatrix * normal );\\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\tmapN.xy *= normalScale;\\n\tnormal = normalize( tbn * mapN );\\n#elif defined( USE_BUMPMAP )\\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\";\nvar $d5b33d7c30034067$var$normal_pars_fragment = \"#ifndef FLAT_SHADED\\n\tvarying vec3 vNormal;\\n\t#ifdef USE_TANGENT\\n\t\tvarying vec3 vTangent;\\n\t\tvarying vec3 vBitangent;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normal_pars_vertex = \"#ifndef FLAT_SHADED\\n\tvarying vec3 vNormal;\\n\t#ifdef USE_TANGENT\\n\t\tvarying vec3 vTangent;\\n\t\tvarying vec3 vBitangent;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normal_vertex = \"#ifndef FLAT_SHADED\\n\tvNormal = normalize( transformedNormal );\\n\t#ifdef USE_TANGENT\\n\t\tvTangent = normalize( transformedTangent );\\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\tuniform sampler2D normalMap;\\n\tuniform vec2 normalScale;\\n#endif\\n#ifdef USE_NORMALMAP_OBJECTSPACE\\n\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\\n\t\tvec2 st0 = dFdx( uv.st );\\n\t\tvec2 st1 = dFdy( uv.st );\\n\t\tvec3 N = surf_norm;\\n\t\tvec3 q1perp = cross( q1, N );\\n\t\tvec3 q0perp = cross( N, q0 );\\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\\n\t\treturn mat3( T * scale, B * scale, N );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$clearcoat_normal_fragment_begin = \"#ifdef USE_CLEARCOAT\\n\tvec3 clearcoatNormal = geometryNormal;\\n#endif\";\nvar $d5b33d7c30034067$var$clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\\n\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\\n#endif\";\nvar $d5b33d7c30034067$var$clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tuniform sampler2D clearcoatNormalMap;\\n\tuniform vec2 clearcoatNormalScale;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$iridescence_pars_fragment = \"#ifdef USE_IRIDESCENCEMAP\\n\tuniform sampler2D iridescenceMap;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tuniform sampler2D iridescenceThicknessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$opaque_fragment = \"#ifdef OPAQUE\\ndiffuseColor.a = 1.0;\\n#endif\\n#ifdef USE_TRANSMISSION\\ndiffuseColor.a *= material.transmissionAlpha;\\n#endif\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\";\nvar $d5b33d7c30034067$var$packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\treturn dot( v, UnpackFactors );\\n}\\nvec2 packDepthToRG( in highp float v ) {\\n\treturn packDepthToRGBA( v ).yx;\\n}\\nfloat unpackRGToDepth( const in highp vec2 v ) {\\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\treturn depth * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\\n}\";\nvar $d5b33d7c30034067$var$premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\nvar $d5b33d7c30034067$var$project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\nvar $d5b33d7c30034067$var$dithering_fragment = \"#ifdef DITHERING\\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\nvar $d5b33d7c30034067$var$dithering_pars_fragment = \"#ifdef DITHERING\\n\tvec3 dithering( vec3 color ) {\\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\t\treturn color + dither_shift_RGB;\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\\n\troughnessFactor *= texelRoughness.g;\\n#endif\";\nvar $d5b33d7c30034067$var$roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\tuniform sampler2D roughnessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmap_pars_fragment = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#if NUM_SPOT_LIGHT_MAPS > 0\\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tstruct DirectionalLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\t\tstruct SpotLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tstruct PointLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t\tfloat shadowCameraNear;\\n\t\t\tfloat shadowCameraFar;\\n\t\t};\\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\t#endif\\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\t}\\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\t}\\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\t\tfloat occlusion = 1.0;\\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\t\tfloat hard_shadow = step( compare , distribution.x );\\n\t\tif (hard_shadow != 1.0 ) {\\n\t\t\tfloat distance = compare - distribution.x ;\\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\t\t}\\n\t\treturn occlusion;\\n\t}\\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\t\tfloat shadow = 1.0;\\n\t\tshadowCoord.xyz /= shadowCoord.w;\\n\t\tshadowCoord.z += shadowBias;\\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\\n\t\tif ( frustumTest ) {\\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\\n\t\t\tfloat dx2 = dx0 / 2.0;\\n\t\t\tfloat dy2 = dy0 / 2.0;\\n\t\t\tfloat dx3 = dx1 / 2.0;\\n\t\t\tfloat dy3 = dy1 / 2.0;\\n\t\t\tshadow = (\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\t\t\t) * ( 1.0 / 17.0 );\\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\t\t\tfloat dx = texelSize.x;\\n\t\t\tfloat dy = texelSize.y;\\n\t\t\tvec2 uv = shadowCoord.xy;\\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\t\t\tuv -= f * texelSize;\\n\t\t\tshadow = (\\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\t\t\t\t\t f.x ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\t\t\t\t\t f.x ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t f.y ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t f.y ) +\\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\t\t\t\t\t\t f.x ),\\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t\t f.x ),\\n\t\t\t\t\t f.y )\\n\t\t\t) * ( 1.0 / 9.0 );\\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\t\t#else\\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\t\t#endif\\n\t\t}\\n\t\treturn shadow;\\n\t}\\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\t\tvec3 absV = abs( v );\\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\t\tabsV *= scaleToCube;\\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\t\tvec2 planar = v.xy;\\n\t\tfloat almostATexel = 1.5 * texelSizeY;\\n\t\tfloat almostOne = 1.0 - almostATexel;\\n\t\tif ( absV.z >= almostOne ) {\\n\t\t\tif ( v.z > 0.0 )\\n\t\t\t\tplanar.x = 4.0 - v.x;\\n\t\t} else if ( absV.x >= almostOne ) {\\n\t\t\tfloat signX = sign( v.x );\\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\\n\t\t} else if ( absV.y >= almostOne ) {\\n\t\t\tfloat signY = sign( v.y );\\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\t\t\tplanar.y = v.z * signY - 2.0;\\n\t\t}\\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\t}\\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\t\tvec3 lightToPosition = shadowCoord.xyz;\\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\\n\t\tvec3 bd3D = normalize( lightToPosition );\\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\t\t\treturn (\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\t\t\t) * ( 1.0 / 9.0 );\\n\t\t#else\\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\t\t#endif\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmap_pars_vertex = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tstruct DirectionalLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\t\tstruct SpotLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tstruct PointLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t\tfloat shadowCameraNear;\\n\t\t\tfloat shadowCameraFar;\\n\t\t};\\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmap_vertex = \"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\tvec4 shadowWorldPosition;\\n#endif\\n#if defined( USE_SHADOWMAP )\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t#endif\\n#endif\\n#if NUM_SPOT_LIGHT_COORDS > 0\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\\n\t\tshadowWorldPosition = worldPosition;\\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\\n\t\t#endif\\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmask_pars_fragment = \"float getShadowMask() {\\n\tfloat shadow = 1.0;\\n\t#ifdef USE_SHADOWMAP\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\tDirectionalLightShadow directionalLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\t\tdirectionalLight = directionalLightShadows[ i ];\\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#endif\\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\tSpotLightShadow spotLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\t\tspotLight = spotLightShadows[ i ];\\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\tPointLightShadow pointLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\t\tpointLight = pointLightShadows[ i ];\\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#endif\\n\t#endif\\n\treturn shadow;\\n}\";\nvar $d5b33d7c30034067$var$skinbase_vertex = \"#ifdef USE_SKINNING\\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\nvar $d5b33d7c30034067$var$skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\tuniform mat4 bindMatrix;\\n\tuniform mat4 bindMatrixInverse;\\n\tuniform highp sampler2D boneTexture;\\n\tuniform int boneTextureSize;\\n\tmat4 getBoneMatrix( const in float i ) {\\n\t\tfloat j = i * 4.0;\\n\t\tfloat x = mod( j, float( boneTextureSize ) );\\n\t\tfloat y = floor( j / float( boneTextureSize ) );\\n\t\tfloat dx = 1.0 / float( boneTextureSize );\\n\t\tfloat dy = 1.0 / float( boneTextureSize );\\n\t\ty = dy * ( y + 0.5 );\\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\t\treturn bone;\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$skinning_vertex = \"#ifdef USE_SKINNING\\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\tvec4 skinned = vec4( 0.0 );\\n\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\nvar $d5b33d7c30034067$var$skinnormal_vertex = \"#ifdef USE_SKINNING\\n\tmat4 skinMatrix = mat4( 0.0 );\\n\tskinMatrix += skinWeight.x * boneMatX;\\n\tskinMatrix += skinWeight.y * boneMatY;\\n\tskinMatrix += skinWeight.z * boneMatZ;\\n\tskinMatrix += skinWeight.w * boneMatW;\\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\t#ifdef USE_TANGENT\\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\\n\tspecularStrength = texelSpecular.r;\\n#else\\n\tspecularStrength = 1.0;\\n#endif\";\nvar $d5b33d7c30034067$var$specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\tuniform sampler2D specularMap;\\n#endif\";\nvar $d5b33d7c30034067$var$tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\nvar $d5b33d7c30034067$var$tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\treturn saturate( toneMappingExposure * color );\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\tcolor *= toneMappingExposure;\\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\tcolor *= toneMappingExposure;\\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\tconst mat3 ACESInputMat = mat3(\\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\\n\t);\\n\tconst mat3 ACESOutputMat = mat3(\\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\\n\t);\\n\tcolor *= toneMappingExposure / 0.6;\\n\tcolor = ACESInputMat * color;\\n\tcolor = RRTAndODTFit( color );\\n\tcolor = ACESOutputMat * color;\\n\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\nvar $d5b33d7c30034067$var$transmission_fragment = \"#ifdef USE_TRANSMISSION\\n\tmaterial.transmission = transmission;\\n\tmaterial.transmissionAlpha = 1.0;\\n\tmaterial.thickness = thickness;\\n\tmaterial.attenuationDistance = attenuationDistance;\\n\tmaterial.attenuationColor = attenuationColor;\\n\t#ifdef USE_TRANSMISSIONMAP\\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\\n\t#endif\\n\t#ifdef USE_THICKNESSMAP\\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\\n\t#endif\\n\tvec3 pos = vWorldPosition;\\n\tvec3 v = normalize( cameraPosition - pos );\\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\\n\tvec4 transmitted = getIBLVolumeRefraction(\\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\\n\t\tmaterial.attenuationColor, material.attenuationDistance );\\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\\n#endif\";\nvar $d5b33d7c30034067$var$transmission_pars_fragment = \"#ifdef USE_TRANSMISSION\\n\tuniform float transmission;\\n\tuniform float thickness;\\n\tuniform float attenuationDistance;\\n\tuniform vec3 attenuationColor;\\n\t#ifdef USE_TRANSMISSIONMAP\\n\t\tuniform sampler2D transmissionMap;\\n\t#endif\\n\t#ifdef USE_THICKNESSMAP\\n\t\tuniform sampler2D thicknessMap;\\n\t#endif\\n\tuniform vec2 transmissionSamplerSize;\\n\tuniform sampler2D transmissionSamplerMap;\\n\tuniform mat4 modelMatrix;\\n\tuniform mat4 projectionMatrix;\\n\tvarying vec3 vWorldPosition;\\n\tfloat w0( float a ) {\\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\\n\t}\\n\tfloat w1( float a ) {\\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\\n\t}\\n\tfloat w2( float a ){\\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\\n\t}\\n\tfloat w3( float a ) {\\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\\n\t}\\n\tfloat g0( float a ) {\\n\t\treturn w0( a ) + w1( a );\\n\t}\\n\tfloat g1( float a ) {\\n\t\treturn w2( a ) + w3( a );\\n\t}\\n\tfloat h0( float a ) {\\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\\n\t}\\n\tfloat h1( float a ) {\\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\\n\t}\\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\\n\t\tuv = uv * texelSize.zw + 0.5;\\n\t\tvec2 iuv = floor( uv );\\n\t\tvec2 fuv = fract( uv );\\n\t\tfloat g0x = g0( fuv.x );\\n\t\tfloat g1x = g1( fuv.x );\\n\t\tfloat h0x = h0( fuv.x );\\n\t\tfloat h1x = h1( fuv.x );\\n\t\tfloat h0y = h0( fuv.y );\\n\t\tfloat h1y = h1( fuv.y );\\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\\n\t}\\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\\n\t\treturn mix( fSample, cSample, fract( lod ) );\\n\t}\\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\\n\t\tvec3 modelScale;\\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\\n\t}\\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\\n\t}\\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\\n\t}\\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\\n\t\tif ( isinf( attenuationDistance ) ) {\\n\t\t\treturn vec3( 1.0 );\\n\t\t} else {\\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\\n\t\t}\\n\t}\\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\\n\t\tvec3 refractedRayExit = position + transmissionRay;\\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\t\trefractionCoords += 1.0;\\n\t\trefractionCoords /= 2.0;\\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$uv_pars_fragment = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\tuniform mat3 transmissionMapTransform;\\n\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\tuniform mat3 thicknessMapTransform;\\n\tvarying vec2 vThicknessMapUv;\\n#endif\";\nvar $d5b33d7c30034067$var$uv_pars_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\tuniform mat3 mapTransform;\\n\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tuniform mat3 alphaMapTransform;\\n\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\tuniform mat3 lightMapTransform;\\n\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\tuniform mat3 aoMapTransform;\\n\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\tuniform mat3 bumpMapTransform;\\n\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\tuniform mat3 normalMapTransform;\\n\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\tuniform mat3 displacementMapTransform;\\n\tvarying vec2 vDisplacementMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\tuniform mat3 emissiveMapTransform;\\n\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\tuniform mat3 metalnessMapTransform;\\n\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\tuniform mat3 roughnessMapTransform;\\n\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\tuniform mat3 anisotropyMapTransform;\\n\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\tuniform mat3 clearcoatMapTransform;\\n\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tuniform mat3 clearcoatNormalMapTransform;\\n\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tuniform mat3 clearcoatRoughnessMapTransform;\\n\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\tuniform mat3 sheenColorMapTransform;\\n\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\tuniform mat3 sheenRoughnessMapTransform;\\n\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\tuniform mat3 iridescenceMapTransform;\\n\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tuniform mat3 iridescenceThicknessMapTransform;\\n\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\tuniform mat3 specularMapTransform;\\n\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\tuniform mat3 specularColorMapTransform;\\n\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\tuniform mat3 specularIntensityMapTransform;\\n\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\tuniform mat3 transmissionMapTransform;\\n\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\tuniform mat3 thicknessMapTransform;\\n\tvarying vec2 vThicknessMapUv;\\n#endif\";\nvar $d5b33d7c30034067$var$uv_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\tvUv = vec3( uv, 1 ).xy;\\n#endif\\n#ifdef USE_MAP\\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_AOMAP\\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_BUMPMAP\\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_NORMALMAP\\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\";\nvar $d5b33d7c30034067$var$worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\\n\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\t#ifdef USE_INSTANCING\\n\t\tworldPosition = instanceMatrix * worldPosition;\\n\t#endif\\n\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\nconst $d5b33d7c30034067$var$vertex$h = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\nconst $d5b33d7c30034067$var$fragment$h = \"uniform sampler2D t2D;\\nuniform float backgroundIntensity;\\nvarying vec2 vUv;\\nvoid main() {\\n\tvec4 texColor = texture2D( t2D, vUv );\\n\ttexColor.rgb *= backgroundIntensity;\\n\tgl_FragColor = texColor;\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$g = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvWorldDirection = transformDirection( position, modelMatrix );\\n\t#include \\n\t#include \\n\tgl_Position.z = gl_Position.w;\\n}\";\nconst $d5b33d7c30034067$var$fragment$g = \"#ifdef ENVMAP_TYPE_CUBE\\n\tuniform samplerCube envMap;\\n#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\tuniform sampler2D envMap;\\n#endif\\nuniform float flipEnvMap;\\nuniform float backgroundBlurriness;\\nuniform float backgroundIntensity;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\t#ifdef ENVMAP_TYPE_CUBE\\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\\n\t#else\\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\t#endif\\n\ttexColor.rgb *= backgroundIntensity;\\n\tgl_FragColor = texColor;\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$f = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvWorldDirection = transformDirection( position, modelMatrix );\\n\t#include \\n\t#include \\n\tgl_Position.z = gl_Position.w;\\n}\";\nconst $d5b33d7c30034067$var$fragment$f = \"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\nvoid main() {\\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\\n\tgl_FragColor = texColor;\\n\tgl_FragColor.a *= opacity;\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$e = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\t#include \\n\t#include \\n\t#ifdef USE_DISPLACEMENTMAP\\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvHighPrecisionZW = gl_Position.zw;\\n}\";\nconst $d5b33d7c30034067$var$fragment$e = \"#if DEPTH_PACKING == 3200\\n\tuniform float opacity;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( 1.0 );\\n\t#if DEPTH_PACKING == 3200\\n\t\tdiffuseColor.a = opacity;\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\t#if DEPTH_PACKING == 3200\\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\t#elif DEPTH_PACKING == 3201\\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\t#endif\\n}\";\nconst $d5b33d7c30034067$var$vertex$d = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#ifdef USE_DISPLACEMENTMAP\\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvWorldPosition = worldPosition.xyz;\\n}\";\nconst $d5b33d7c30034067$var$fragment$d = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main () {\\n\t#include \\n\tvec4 diffuseColor = vec4( 1.0 );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tfloat dist = length( vWorldPosition - referencePosition );\\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\tdist = saturate( dist );\\n\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\nconst $d5b33d7c30034067$var$vertex$c = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvWorldDirection = transformDirection( position, modelMatrix );\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$c = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvec3 direction = normalize( vWorldDirection );\\n\tvec2 sampleUV = equirectUv( direction );\\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$b = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\tvLineDistance = scale * lineDistance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$b = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\t\tdiscard;\\n\t}\\n\tvec3 outgoingLight = vec3( 0.0 );\\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\toutgoingLight = diffuseColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$a = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$a = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\t#ifdef USE_LIGHTMAP\\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\\n\t#else\\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\t#endif\\n\t#include \\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$9 = \"#define LAMBERT\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$9 = \"#define LAMBERT\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$8 = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n}\";\nconst $d5b33d7c30034067$var$fragment$8 = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 viewDir = normalize( vViewPosition );\\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\tvec3 y = cross( viewDir, x );\\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\t#ifdef USE_MATCAP\\n\t\tvec4 matcapColor = texture2D( matcap, uv );\\n\t#else\\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\\n\t#endif\\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$7 = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\nconst $d5b33d7c30034067$var$fragment$7 = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n\t#ifdef OPAQUE\\n\t\tgl_FragColor.a = 1.0;\\n\t#endif\\n}\";\nconst $d5b33d7c30034067$var$vertex$6 = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$6 = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$5 = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifdef USE_TRANSMISSION\\n\tvarying vec3 vWorldPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n#ifdef USE_TRANSMISSION\\n\tvWorldPosition = worldPosition.xyz;\\n#endif\\n}\";\nconst $d5b33d7c30034067$var$fragment$5 = \"#define STANDARD\\n#ifdef PHYSICAL\\n\t#define IOR\\n\t#define USE_SPECULAR\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef IOR\\n\tuniform float ior;\\n#endif\\n#ifdef USE_SPECULAR\\n\tuniform float specularIntensity;\\n\tuniform vec3 specularColor;\\n\t#ifdef USE_SPECULAR_COLORMAP\\n\t\tuniform sampler2D specularColorMap;\\n\t#endif\\n\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\t\tuniform sampler2D specularIntensityMap;\\n\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT\\n\tuniform float clearcoat;\\n\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\tuniform float iridescence;\\n\tuniform float iridescenceIOR;\\n\tuniform float iridescenceThicknessMinimum;\\n\tuniform float iridescenceThicknessMaximum;\\n#endif\\n#ifdef USE_SHEEN\\n\tuniform vec3 sheenColor;\\n\tuniform float sheenRoughness;\\n\t#ifdef USE_SHEEN_COLORMAP\\n\t\tuniform sampler2D sheenColorMap;\\n\t#endif\\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\t\tuniform sampler2D sheenRoughnessMap;\\n\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\tuniform vec2 anisotropyVector;\\n\t#ifdef USE_ANISOTROPYMAP\\n\t\tuniform sampler2D anisotropyMap;\\n\t#endif\\n#endif\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\t#include \\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\t#ifdef USE_SHEEN\\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\\n\t#endif\\n\t#ifdef USE_CLEARCOAT\\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$4 = \"#define TOON\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$4 = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$3 = \"uniform float size;\\nuniform float scale;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#ifdef USE_POINTS_UV\\n\tvarying vec2 vUv;\\n\tuniform mat3 uvTransform;\\n#endif\\nvoid main() {\\n\t#ifdef USE_POINTS_UV\\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tgl_PointSize = size;\\n\t#ifdef USE_SIZEATTENUATION\\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$3 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec3 outgoingLight = vec3( 0.0 );\\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\toutgoingLight = diffuseColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$2 = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$2 = \"uniform vec3 color;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$1 = \"uniform float rotation;\\nuniform vec2 center;\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\tvec2 scale;\\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\t#ifndef USE_SIZEATTENUATION\\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\\n\t#endif\\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\tvec2 rotatedPosition;\\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\tmvPosition.xy += rotatedPosition;\\n\tgl_Position = projectionMatrix * mvPosition;\\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$1 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec3 outgoingLight = vec3( 0.0 );\\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\toutgoingLight = diffuseColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$export$955f9f2e84c43c8b = {\n alphahash_fragment: $d5b33d7c30034067$var$alphahash_fragment,\n alphahash_pars_fragment: $d5b33d7c30034067$var$alphahash_pars_fragment,\n alphamap_fragment: $d5b33d7c30034067$var$alphamap_fragment,\n alphamap_pars_fragment: $d5b33d7c30034067$var$alphamap_pars_fragment,\n alphatest_fragment: $d5b33d7c30034067$var$alphatest_fragment,\n alphatest_pars_fragment: $d5b33d7c30034067$var$alphatest_pars_fragment,\n aomap_fragment: $d5b33d7c30034067$var$aomap_fragment,\n aomap_pars_fragment: $d5b33d7c30034067$var$aomap_pars_fragment,\n begin_vertex: $d5b33d7c30034067$var$begin_vertex,\n beginnormal_vertex: $d5b33d7c30034067$var$beginnormal_vertex,\n bsdfs: $d5b33d7c30034067$var$bsdfs,\n iridescence_fragment: $d5b33d7c30034067$var$iridescence_fragment,\n bumpmap_pars_fragment: $d5b33d7c30034067$var$bumpmap_pars_fragment,\n clipping_planes_fragment: $d5b33d7c30034067$var$clipping_planes_fragment,\n clipping_planes_pars_fragment: $d5b33d7c30034067$var$clipping_planes_pars_fragment,\n clipping_planes_pars_vertex: $d5b33d7c30034067$var$clipping_planes_pars_vertex,\n clipping_planes_vertex: $d5b33d7c30034067$var$clipping_planes_vertex,\n color_fragment: $d5b33d7c30034067$var$color_fragment,\n color_pars_fragment: $d5b33d7c30034067$var$color_pars_fragment,\n color_pars_vertex: $d5b33d7c30034067$var$color_pars_vertex,\n color_vertex: $d5b33d7c30034067$var$color_vertex,\n common: $d5b33d7c30034067$var$common,\n cube_uv_reflection_fragment: $d5b33d7c30034067$var$cube_uv_reflection_fragment,\n defaultnormal_vertex: $d5b33d7c30034067$var$defaultnormal_vertex,\n displacementmap_pars_vertex: $d5b33d7c30034067$var$displacementmap_pars_vertex,\n displacementmap_vertex: $d5b33d7c30034067$var$displacementmap_vertex,\n emissivemap_fragment: $d5b33d7c30034067$var$emissivemap_fragment,\n emissivemap_pars_fragment: $d5b33d7c30034067$var$emissivemap_pars_fragment,\n colorspace_fragment: $d5b33d7c30034067$var$colorspace_fragment,\n colorspace_pars_fragment: $d5b33d7c30034067$var$colorspace_pars_fragment,\n envmap_fragment: $d5b33d7c30034067$var$envmap_fragment,\n envmap_common_pars_fragment: $d5b33d7c30034067$var$envmap_common_pars_fragment,\n envmap_pars_fragment: $d5b33d7c30034067$var$envmap_pars_fragment,\n envmap_pars_vertex: $d5b33d7c30034067$var$envmap_pars_vertex,\n envmap_physical_pars_fragment: $d5b33d7c30034067$var$envmap_physical_pars_fragment,\n envmap_vertex: $d5b33d7c30034067$var$envmap_vertex,\n fog_vertex: $d5b33d7c30034067$var$fog_vertex,\n fog_pars_vertex: $d5b33d7c30034067$var$fog_pars_vertex,\n fog_fragment: $d5b33d7c30034067$var$fog_fragment,\n fog_pars_fragment: $d5b33d7c30034067$var$fog_pars_fragment,\n gradientmap_pars_fragment: $d5b33d7c30034067$var$gradientmap_pars_fragment,\n lightmap_fragment: $d5b33d7c30034067$var$lightmap_fragment,\n lightmap_pars_fragment: $d5b33d7c30034067$var$lightmap_pars_fragment,\n lights_lambert_fragment: $d5b33d7c30034067$var$lights_lambert_fragment,\n lights_lambert_pars_fragment: $d5b33d7c30034067$var$lights_lambert_pars_fragment,\n lights_pars_begin: $d5b33d7c30034067$var$lights_pars_begin,\n lights_toon_fragment: $d5b33d7c30034067$var$lights_toon_fragment,\n lights_toon_pars_fragment: $d5b33d7c30034067$var$lights_toon_pars_fragment,\n lights_phong_fragment: $d5b33d7c30034067$var$lights_phong_fragment,\n lights_phong_pars_fragment: $d5b33d7c30034067$var$lights_phong_pars_fragment,\n lights_physical_fragment: $d5b33d7c30034067$var$lights_physical_fragment,\n lights_physical_pars_fragment: $d5b33d7c30034067$var$lights_physical_pars_fragment,\n lights_fragment_begin: $d5b33d7c30034067$var$lights_fragment_begin,\n lights_fragment_maps: $d5b33d7c30034067$var$lights_fragment_maps,\n lights_fragment_end: $d5b33d7c30034067$var$lights_fragment_end,\n logdepthbuf_fragment: $d5b33d7c30034067$var$logdepthbuf_fragment,\n logdepthbuf_pars_fragment: $d5b33d7c30034067$var$logdepthbuf_pars_fragment,\n logdepthbuf_pars_vertex: $d5b33d7c30034067$var$logdepthbuf_pars_vertex,\n logdepthbuf_vertex: $d5b33d7c30034067$var$logdepthbuf_vertex,\n map_fragment: $d5b33d7c30034067$var$map_fragment,\n map_pars_fragment: $d5b33d7c30034067$var$map_pars_fragment,\n map_particle_fragment: $d5b33d7c30034067$var$map_particle_fragment,\n map_particle_pars_fragment: $d5b33d7c30034067$var$map_particle_pars_fragment,\n metalnessmap_fragment: $d5b33d7c30034067$var$metalnessmap_fragment,\n metalnessmap_pars_fragment: $d5b33d7c30034067$var$metalnessmap_pars_fragment,\n morphcolor_vertex: $d5b33d7c30034067$var$morphcolor_vertex,\n morphnormal_vertex: $d5b33d7c30034067$var$morphnormal_vertex,\n morphtarget_pars_vertex: $d5b33d7c30034067$var$morphtarget_pars_vertex,\n morphtarget_vertex: $d5b33d7c30034067$var$morphtarget_vertex,\n normal_fragment_begin: $d5b33d7c30034067$var$normal_fragment_begin,\n normal_fragment_maps: $d5b33d7c30034067$var$normal_fragment_maps,\n normal_pars_fragment: $d5b33d7c30034067$var$normal_pars_fragment,\n normal_pars_vertex: $d5b33d7c30034067$var$normal_pars_vertex,\n normal_vertex: $d5b33d7c30034067$var$normal_vertex,\n normalmap_pars_fragment: $d5b33d7c30034067$var$normalmap_pars_fragment,\n clearcoat_normal_fragment_begin: $d5b33d7c30034067$var$clearcoat_normal_fragment_begin,\n clearcoat_normal_fragment_maps: $d5b33d7c30034067$var$clearcoat_normal_fragment_maps,\n clearcoat_pars_fragment: $d5b33d7c30034067$var$clearcoat_pars_fragment,\n iridescence_pars_fragment: $d5b33d7c30034067$var$iridescence_pars_fragment,\n opaque_fragment: $d5b33d7c30034067$var$opaque_fragment,\n packing: $d5b33d7c30034067$var$packing,\n premultiplied_alpha_fragment: $d5b33d7c30034067$var$premultiplied_alpha_fragment,\n project_vertex: $d5b33d7c30034067$var$project_vertex,\n dithering_fragment: $d5b33d7c30034067$var$dithering_fragment,\n dithering_pars_fragment: $d5b33d7c30034067$var$dithering_pars_fragment,\n roughnessmap_fragment: $d5b33d7c30034067$var$roughnessmap_fragment,\n roughnessmap_pars_fragment: $d5b33d7c30034067$var$roughnessmap_pars_fragment,\n shadowmap_pars_fragment: $d5b33d7c30034067$var$shadowmap_pars_fragment,\n shadowmap_pars_vertex: $d5b33d7c30034067$var$shadowmap_pars_vertex,\n shadowmap_vertex: $d5b33d7c30034067$var$shadowmap_vertex,\n shadowmask_pars_fragment: $d5b33d7c30034067$var$shadowmask_pars_fragment,\n skinbase_vertex: $d5b33d7c30034067$var$skinbase_vertex,\n skinning_pars_vertex: $d5b33d7c30034067$var$skinning_pars_vertex,\n skinning_vertex: $d5b33d7c30034067$var$skinning_vertex,\n skinnormal_vertex: $d5b33d7c30034067$var$skinnormal_vertex,\n specularmap_fragment: $d5b33d7c30034067$var$specularmap_fragment,\n specularmap_pars_fragment: $d5b33d7c30034067$var$specularmap_pars_fragment,\n tonemapping_fragment: $d5b33d7c30034067$var$tonemapping_fragment,\n tonemapping_pars_fragment: $d5b33d7c30034067$var$tonemapping_pars_fragment,\n transmission_fragment: $d5b33d7c30034067$var$transmission_fragment,\n transmission_pars_fragment: $d5b33d7c30034067$var$transmission_pars_fragment,\n uv_pars_fragment: $d5b33d7c30034067$var$uv_pars_fragment,\n uv_pars_vertex: $d5b33d7c30034067$var$uv_pars_vertex,\n uv_vertex: $d5b33d7c30034067$var$uv_vertex,\n worldpos_vertex: $d5b33d7c30034067$var$worldpos_vertex,\n background_vert: $d5b33d7c30034067$var$vertex$h,\n background_frag: $d5b33d7c30034067$var$fragment$h,\n backgroundCube_vert: $d5b33d7c30034067$var$vertex$g,\n backgroundCube_frag: $d5b33d7c30034067$var$fragment$g,\n cube_vert: $d5b33d7c30034067$var$vertex$f,\n cube_frag: $d5b33d7c30034067$var$fragment$f,\n depth_vert: $d5b33d7c30034067$var$vertex$e,\n depth_frag: $d5b33d7c30034067$var$fragment$e,\n distanceRGBA_vert: $d5b33d7c30034067$var$vertex$d,\n distanceRGBA_frag: $d5b33d7c30034067$var$fragment$d,\n equirect_vert: $d5b33d7c30034067$var$vertex$c,\n equirect_frag: $d5b33d7c30034067$var$fragment$c,\n linedashed_vert: $d5b33d7c30034067$var$vertex$b,\n linedashed_frag: $d5b33d7c30034067$var$fragment$b,\n meshbasic_vert: $d5b33d7c30034067$var$vertex$a,\n meshbasic_frag: $d5b33d7c30034067$var$fragment$a,\n meshlambert_vert: $d5b33d7c30034067$var$vertex$9,\n meshlambert_frag: $d5b33d7c30034067$var$fragment$9,\n meshmatcap_vert: $d5b33d7c30034067$var$vertex$8,\n meshmatcap_frag: $d5b33d7c30034067$var$fragment$8,\n meshnormal_vert: $d5b33d7c30034067$var$vertex$7,\n meshnormal_frag: $d5b33d7c30034067$var$fragment$7,\n meshphong_vert: $d5b33d7c30034067$var$vertex$6,\n meshphong_frag: $d5b33d7c30034067$var$fragment$6,\n meshphysical_vert: $d5b33d7c30034067$var$vertex$5,\n meshphysical_frag: $d5b33d7c30034067$var$fragment$5,\n meshtoon_vert: $d5b33d7c30034067$var$vertex$4,\n meshtoon_frag: $d5b33d7c30034067$var$fragment$4,\n points_vert: $d5b33d7c30034067$var$vertex$3,\n points_frag: $d5b33d7c30034067$var$fragment$3,\n shadow_vert: $d5b33d7c30034067$var$vertex$2,\n shadow_frag: $d5b33d7c30034067$var$fragment$2,\n sprite_vert: $d5b33d7c30034067$var$vertex$1,\n sprite_frag: $d5b33d7c30034067$var$fragment$1\n};\n/**\n * Uniforms library for shared webgl shaders\n */ const $d5b33d7c30034067$export$6643083551874bf5 = {\n common: {\n diffuse: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n },\n opacity: {\n value: 1.0\n },\n map: {\n value: null\n },\n mapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaMap: {\n value: null\n },\n alphaMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaTest: {\n value: 0\n }\n },\n specularmap: {\n specularMap: {\n value: null\n },\n specularMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n envmap: {\n envMap: {\n value: null\n },\n flipEnvMap: {\n value: -1\n },\n reflectivity: {\n value: 1.0\n },\n ior: {\n value: 1.5\n },\n refractionRatio: {\n value: 0.98\n }\n },\n aomap: {\n aoMap: {\n value: null\n },\n aoMapIntensity: {\n value: 1\n },\n aoMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n lightmap: {\n lightMap: {\n value: null\n },\n lightMapIntensity: {\n value: 1\n },\n lightMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n bumpmap: {\n bumpMap: {\n value: null\n },\n bumpMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n bumpScale: {\n value: 1\n }\n },\n normalmap: {\n normalMap: {\n value: null\n },\n normalMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n normalScale: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1)\n }\n },\n displacementmap: {\n displacementMap: {\n value: null\n },\n displacementMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n displacementScale: {\n value: 1\n },\n displacementBias: {\n value: 0\n }\n },\n emissivemap: {\n emissiveMap: {\n value: null\n },\n emissiveMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n metalnessmap: {\n metalnessMap: {\n value: null\n },\n metalnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n roughnessmap: {\n roughnessMap: {\n value: null\n },\n roughnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n gradientmap: {\n gradientMap: {\n value: null\n }\n },\n fog: {\n fogDensity: {\n value: 0.00025\n },\n fogNear: {\n value: 1\n },\n fogFar: {\n value: 2000\n },\n fogColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n }\n },\n lights: {\n ambientLightColor: {\n value: []\n },\n lightProbe: {\n value: []\n },\n directionalLights: {\n value: [],\n properties: {\n direction: {},\n color: {}\n }\n },\n directionalLightShadows: {\n value: [],\n properties: {\n shadowBias: {},\n shadowNormalBias: {},\n shadowRadius: {},\n shadowMapSize: {}\n }\n },\n directionalShadowMap: {\n value: []\n },\n directionalShadowMatrix: {\n value: []\n },\n spotLights: {\n value: [],\n properties: {\n color: {},\n position: {},\n direction: {},\n distance: {},\n coneCos: {},\n penumbraCos: {},\n decay: {}\n }\n },\n spotLightShadows: {\n value: [],\n properties: {\n shadowBias: {},\n shadowNormalBias: {},\n shadowRadius: {},\n shadowMapSize: {}\n }\n },\n spotLightMap: {\n value: []\n },\n spotShadowMap: {\n value: []\n },\n spotLightMatrix: {\n value: []\n },\n pointLights: {\n value: [],\n properties: {\n color: {},\n position: {},\n decay: {},\n distance: {}\n }\n },\n pointLightShadows: {\n value: [],\n properties: {\n shadowBias: {},\n shadowNormalBias: {},\n shadowRadius: {},\n shadowMapSize: {},\n shadowCameraNear: {},\n shadowCameraFar: {}\n }\n },\n pointShadowMap: {\n value: []\n },\n pointShadowMatrix: {\n value: []\n },\n hemisphereLights: {\n value: [],\n properties: {\n direction: {},\n skyColor: {},\n groundColor: {}\n }\n },\n // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n rectAreaLights: {\n value: [],\n properties: {\n color: {},\n position: {},\n width: {},\n height: {}\n }\n },\n ltc_1: {\n value: null\n },\n ltc_2: {\n value: null\n }\n },\n points: {\n diffuse: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n },\n opacity: {\n value: 1.0\n },\n size: {\n value: 1.0\n },\n scale: {\n value: 1.0\n },\n map: {\n value: null\n },\n alphaMap: {\n value: null\n },\n alphaMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaTest: {\n value: 0\n },\n uvTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n sprite: {\n diffuse: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n },\n opacity: {\n value: 1.0\n },\n center: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0.5)\n },\n rotation: {\n value: 0.0\n },\n map: {\n value: null\n },\n mapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaMap: {\n value: null\n },\n alphaMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaTest: {\n value: 0\n }\n }\n};\nconst $d5b33d7c30034067$export$bee4a7d47f8f5014 = {\n basic: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.specularmap,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshbasic_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshbasic_frag\n },\n lambert: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.specularmap,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshlambert_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshlambert_frag\n },\n phong: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.specularmap,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n specular: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x111111)\n },\n shininess: {\n value: 30\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphong_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphong_frag\n },\n standard: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.roughnessmap,\n $d5b33d7c30034067$export$6643083551874bf5.metalnessmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n roughness: {\n value: 1.0\n },\n metalness: {\n value: 0.0\n },\n envMapIntensity: {\n value: 1\n } // temporary\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_frag\n },\n toon: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.gradientmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshtoon_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshtoon_frag\n },\n matcap: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n {\n matcap: {\n value: null\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshmatcap_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshmatcap_frag\n },\n points: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.points,\n $d5b33d7c30034067$export$6643083551874bf5.fog\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.points_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.points_frag\n },\n dashed: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n {\n scale: {\n value: 1\n },\n dashSize: {\n value: 1\n },\n totalSize: {\n value: 2\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.linedashed_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.linedashed_frag\n },\n depth: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.depth_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.depth_frag\n },\n normal: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n {\n opacity: {\n value: 1.0\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshnormal_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshnormal_frag\n },\n sprite: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.sprite,\n $d5b33d7c30034067$export$6643083551874bf5.fog\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.sprite_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.sprite_frag\n },\n background: {\n uniforms: {\n uvTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n t2D: {\n value: null\n },\n backgroundIntensity: {\n value: 1\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.background_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.background_frag\n },\n backgroundCube: {\n uniforms: {\n envMap: {\n value: null\n },\n flipEnvMap: {\n value: -1\n },\n backgroundBlurriness: {\n value: 0\n },\n backgroundIntensity: {\n value: 1\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.backgroundCube_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.backgroundCube_frag\n },\n cube: {\n uniforms: {\n tCube: {\n value: null\n },\n tFlip: {\n value: -1\n },\n opacity: {\n value: 1.0\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.cube_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.cube_frag\n },\n equirect: {\n uniforms: {\n tEquirect: {\n value: null\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.equirect_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.equirect_frag\n },\n distanceRGBA: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n {\n referencePosition: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699()\n },\n nearDistance: {\n value: 1\n },\n farDistance: {\n value: 1000\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.distanceRGBA_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.distanceRGBA_frag\n },\n shadow: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n {\n color: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x00000)\n },\n opacity: {\n value: 1.0\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.shadow_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.shadow_frag\n }\n};\n$d5b33d7c30034067$export$bee4a7d47f8f5014.physical = {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$bee4a7d47f8f5014.standard.uniforms,\n {\n clearcoat: {\n value: 0\n },\n clearcoatMap: {\n value: null\n },\n clearcoatMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n clearcoatNormalMap: {\n value: null\n },\n clearcoatNormalMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n clearcoatNormalScale: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1)\n },\n clearcoatRoughness: {\n value: 0\n },\n clearcoatRoughnessMap: {\n value: null\n },\n clearcoatRoughnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n iridescence: {\n value: 0\n },\n iridescenceMap: {\n value: null\n },\n iridescenceMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n iridescenceIOR: {\n value: 1.3\n },\n iridescenceThicknessMinimum: {\n value: 100\n },\n iridescenceThicknessMaximum: {\n value: 400\n },\n iridescenceThicknessMap: {\n value: null\n },\n iridescenceThicknessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n sheen: {\n value: 0\n },\n sheenColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n sheenColorMap: {\n value: null\n },\n sheenColorMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n sheenRoughness: {\n value: 1\n },\n sheenRoughnessMap: {\n value: null\n },\n sheenRoughnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n transmission: {\n value: 0\n },\n transmissionMap: {\n value: null\n },\n transmissionMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n transmissionSamplerSize: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1()\n },\n transmissionSamplerMap: {\n value: null\n },\n thickness: {\n value: 0\n },\n thicknessMap: {\n value: null\n },\n thicknessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n attenuationDistance: {\n value: 0\n },\n attenuationColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n specularColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(1, 1, 1)\n },\n specularColorMap: {\n value: null\n },\n specularColorMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n specularIntensity: {\n value: 1\n },\n specularIntensityMap: {\n value: null\n },\n specularIntensityMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n anisotropyVector: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1()\n },\n anisotropyMap: {\n value: null\n },\n anisotropyMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_frag\n};\nconst $d5b33d7c30034067$var$_rgb = {\n r: 0,\n b: 0,\n g: 0\n};\nfunction $d5b33d7c30034067$var$WebGLBackground(renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha) {\n const clearColor = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n let clearAlpha = alpha === true ? 0 : 1;\n let planeMesh;\n let boxMesh;\n let currentBackground = null;\n let currentBackgroundVersion = 0;\n let currentTonemapping = null;\n function render(renderList, scene) {\n let forceClear = false;\n let background = scene.isScene === true ? scene.background : null;\n if (background && background.isTexture) {\n const usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background\n background = (usePMREM ? cubeuvmaps : cubemaps).get(background);\n }\n if (background === null) setClear(clearColor, clearAlpha);\n else if (background && background.isColor) {\n setClear(background, 1);\n forceClear = true;\n }\n const xr = renderer.xr;\n const environmentBlendMode = xr.getEnvironmentBlendMode();\n switch(environmentBlendMode){\n case \"opaque\":\n forceClear = true;\n break;\n case \"additive\":\n state.buffers.color.setClear(0, 0, 0, 1, premultipliedAlpha);\n forceClear = true;\n break;\n case \"alpha-blend\":\n state.buffers.color.setClear(0, 0, 0, 0, premultipliedAlpha);\n forceClear = true;\n break;\n }\n if (renderer.autoClear || forceClear) renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);\n if (background && (background.isCubeTexture || background.mapping === $d5b33d7c30034067$export$dbf3e70ff37af79)) {\n if (boxMesh === undefined) {\n boxMesh = new $d5b33d7c30034067$export$e176487c05830cc5(new $d5b33d7c30034067$export$33e43285f7406bd5(1, 1, 1), new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"BackgroundCubeMaterial\",\n uniforms: $d5b33d7c30034067$var$cloneUniforms($d5b33d7c30034067$export$bee4a7d47f8f5014.backgroundCube.uniforms),\n vertexShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.backgroundCube.vertexShader,\n fragmentShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.backgroundCube.fragmentShader,\n side: $d5b33d7c30034067$export$d9f0486e75b5ace,\n depthTest: false,\n depthWrite: false,\n fog: false\n }));\n boxMesh.geometry.deleteAttribute(\"normal\");\n boxMesh.geometry.deleteAttribute(\"uv\");\n boxMesh.onBeforeRender = function(renderer, scene, camera) {\n this.matrixWorld.copyPosition(camera.matrixWorld);\n };\n // add \"envMap\" material property so the renderer can evaluate it like for built-in materials\n Object.defineProperty(boxMesh.material, \"envMap\", {\n get: function() {\n return this.uniforms.envMap.value;\n }\n });\n objects.update(boxMesh);\n }\n boxMesh.material.uniforms.envMap.value = background;\n boxMesh.material.uniforms.flipEnvMap.value = background.isCubeTexture && background.isRenderTargetTexture === false ? -1 : 1;\n boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;\n boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n boxMesh.material.toneMapped = background.colorSpace === $d5b33d7c30034067$export$561f394b24edfcaa ? false : true;\n if (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n boxMesh.material.needsUpdate = true;\n currentBackground = background;\n currentBackgroundVersion = background.version;\n currentTonemapping = renderer.toneMapping;\n }\n boxMesh.layers.enableAll();\n // push to the pre-sorted opaque render list\n renderList.unshift(boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null);\n } else if (background && background.isTexture) {\n if (planeMesh === undefined) {\n planeMesh = new $d5b33d7c30034067$export$e176487c05830cc5(new $d5b33d7c30034067$export$967d831af31f69ce(2, 2), new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"BackgroundMaterial\",\n uniforms: $d5b33d7c30034067$var$cloneUniforms($d5b33d7c30034067$export$bee4a7d47f8f5014.background.uniforms),\n vertexShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.background.vertexShader,\n fragmentShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.background.fragmentShader,\n side: $d5b33d7c30034067$export$2ede184fc2998901,\n depthTest: false,\n depthWrite: false,\n fog: false\n }));\n planeMesh.geometry.deleteAttribute(\"normal\");\n // add \"map\" material property so the renderer can evaluate it like for built-in materials\n Object.defineProperty(planeMesh.material, \"map\", {\n get: function() {\n return this.uniforms.t2D.value;\n }\n });\n objects.update(planeMesh);\n }\n planeMesh.material.uniforms.t2D.value = background;\n planeMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n planeMesh.material.toneMapped = background.colorSpace === $d5b33d7c30034067$export$561f394b24edfcaa ? false : true;\n if (background.matrixAutoUpdate === true) background.updateMatrix();\n planeMesh.material.uniforms.uvTransform.value.copy(background.matrix);\n if (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n planeMesh.material.needsUpdate = true;\n currentBackground = background;\n currentBackgroundVersion = background.version;\n currentTonemapping = renderer.toneMapping;\n }\n planeMesh.layers.enableAll();\n // push to the pre-sorted opaque render list\n renderList.unshift(planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null);\n }\n }\n function setClear(color, alpha) {\n color.getRGB($d5b33d7c30034067$var$_rgb, $d5b33d7c30034067$var$getUnlitUniformColorSpace(renderer));\n state.buffers.color.setClear($d5b33d7c30034067$var$_rgb.r, $d5b33d7c30034067$var$_rgb.g, $d5b33d7c30034067$var$_rgb.b, alpha, premultipliedAlpha);\n }\n return {\n getClearColor: function() {\n return clearColor;\n },\n setClearColor: function(color, alpha = 1) {\n clearColor.set(color);\n clearAlpha = alpha;\n setClear(clearColor, clearAlpha);\n },\n getClearAlpha: function() {\n return clearAlpha;\n },\n setClearAlpha: function(alpha) {\n clearAlpha = alpha;\n setClear(clearColor, clearAlpha);\n },\n render: render\n };\n}\nfunction $d5b33d7c30034067$var$WebGLBindingStates(gl, extensions, attributes, capabilities) {\n const maxVertexAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n const extension = capabilities.isWebGL2 ? null : extensions.get(\"OES_vertex_array_object\");\n const vaoAvailable = capabilities.isWebGL2 || extension !== null;\n const bindingStates = {};\n const defaultState = createBindingState(null);\n let currentState = defaultState;\n let forceUpdate = false;\n function setup(object, material, program, geometry, index) {\n let updateBuffers = false;\n if (vaoAvailable) {\n const state = getBindingState(geometry, program, material);\n if (currentState !== state) {\n currentState = state;\n bindVertexArrayObject(currentState.object);\n }\n updateBuffers = needsUpdate(object, geometry, program, index);\n if (updateBuffers) saveCache(object, geometry, program, index);\n } else {\n const wireframe = material.wireframe === true;\n if (currentState.geometry !== geometry.id || currentState.program !== program.id || currentState.wireframe !== wireframe) {\n currentState.geometry = geometry.id;\n currentState.program = program.id;\n currentState.wireframe = wireframe;\n updateBuffers = true;\n }\n }\n if (index !== null) attributes.update(index, gl.ELEMENT_ARRAY_BUFFER);\n if (updateBuffers || forceUpdate) {\n forceUpdate = false;\n setupVertexAttributes(object, material, program, geometry);\n if (index !== null) gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, attributes.get(index).buffer);\n }\n }\n function createVertexArrayObject() {\n if (capabilities.isWebGL2) return gl.createVertexArray();\n return extension.createVertexArrayOES();\n }\n function bindVertexArrayObject(vao) {\n if (capabilities.isWebGL2) return gl.bindVertexArray(vao);\n return extension.bindVertexArrayOES(vao);\n }\n function deleteVertexArrayObject(vao) {\n if (capabilities.isWebGL2) return gl.deleteVertexArray(vao);\n return extension.deleteVertexArrayOES(vao);\n }\n function getBindingState(geometry, program, material) {\n const wireframe = material.wireframe === true;\n let programMap = bindingStates[geometry.id];\n if (programMap === undefined) {\n programMap = {};\n bindingStates[geometry.id] = programMap;\n }\n let stateMap = programMap[program.id];\n if (stateMap === undefined) {\n stateMap = {};\n programMap[program.id] = stateMap;\n }\n let state = stateMap[wireframe];\n if (state === undefined) {\n state = createBindingState(createVertexArrayObject());\n stateMap[wireframe] = state;\n }\n return state;\n }\n function createBindingState(vao) {\n const newAttributes = [];\n const enabledAttributes = [];\n const attributeDivisors = [];\n for(let i = 0; i < maxVertexAttributes; i++){\n newAttributes[i] = 0;\n enabledAttributes[i] = 0;\n attributeDivisors[i] = 0;\n }\n return {\n // for backward compatibility on non-VAO support browser\n geometry: null,\n program: null,\n wireframe: false,\n newAttributes: newAttributes,\n enabledAttributes: enabledAttributes,\n attributeDivisors: attributeDivisors,\n object: vao,\n attributes: {},\n index: null\n };\n }\n function needsUpdate(object, geometry, program, index) {\n const cachedAttributes = currentState.attributes;\n const geometryAttributes = geometry.attributes;\n let attributesNum = 0;\n const programAttributes = program.getAttributes();\n for(const name in programAttributes){\n const programAttribute = programAttributes[name];\n if (programAttribute.location >= 0) {\n const cachedAttribute = cachedAttributes[name];\n let geometryAttribute = geometryAttributes[name];\n if (geometryAttribute === undefined) {\n if (name === \"instanceMatrix\" && object.instanceMatrix) geometryAttribute = object.instanceMatrix;\n if (name === \"instanceColor\" && object.instanceColor) geometryAttribute = object.instanceColor;\n }\n if (cachedAttribute === undefined) return true;\n if (cachedAttribute.attribute !== geometryAttribute) return true;\n if (geometryAttribute && cachedAttribute.data !== geometryAttribute.data) return true;\n attributesNum++;\n }\n }\n if (currentState.attributesNum !== attributesNum) return true;\n if (currentState.index !== index) return true;\n return false;\n }\n function saveCache(object, geometry, program, index) {\n const cache = {};\n const attributes = geometry.attributes;\n let attributesNum = 0;\n const programAttributes = program.getAttributes();\n for(const name in programAttributes){\n const programAttribute = programAttributes[name];\n if (programAttribute.location >= 0) {\n let attribute = attributes[name];\n if (attribute === undefined) {\n if (name === \"instanceMatrix\" && object.instanceMatrix) attribute = object.instanceMatrix;\n if (name === \"instanceColor\" && object.instanceColor) attribute = object.instanceColor;\n }\n const data = {};\n data.attribute = attribute;\n if (attribute && attribute.data) data.data = attribute.data;\n cache[name] = data;\n attributesNum++;\n }\n }\n currentState.attributes = cache;\n currentState.attributesNum = attributesNum;\n currentState.index = index;\n }\n function initAttributes() {\n const newAttributes = currentState.newAttributes;\n for(let i = 0, il = newAttributes.length; i < il; i++)newAttributes[i] = 0;\n }\n function enableAttribute(attribute) {\n enableAttributeAndDivisor(attribute, 0);\n }\n function enableAttributeAndDivisor(attribute, meshPerAttribute) {\n const newAttributes = currentState.newAttributes;\n const enabledAttributes = currentState.enabledAttributes;\n const attributeDivisors = currentState.attributeDivisors;\n newAttributes[attribute] = 1;\n if (enabledAttributes[attribute] === 0) {\n gl.enableVertexAttribArray(attribute);\n enabledAttributes[attribute] = 1;\n }\n if (attributeDivisors[attribute] !== meshPerAttribute) {\n const extension = capabilities.isWebGL2 ? gl : extensions.get(\"ANGLE_instanced_arrays\");\n extension[capabilities.isWebGL2 ? \"vertexAttribDivisor\" : \"vertexAttribDivisorANGLE\"](attribute, meshPerAttribute);\n attributeDivisors[attribute] = meshPerAttribute;\n }\n }\n function disableUnusedAttributes() {\n const newAttributes = currentState.newAttributes;\n const enabledAttributes = currentState.enabledAttributes;\n for(let i = 0, il = enabledAttributes.length; i < il; i++)if (enabledAttributes[i] !== newAttributes[i]) {\n gl.disableVertexAttribArray(i);\n enabledAttributes[i] = 0;\n }\n }\n function vertexAttribPointer(index, size, type, normalized, stride, offset, integer) {\n if (integer === true) gl.vertexAttribIPointer(index, size, type, stride, offset);\n else gl.vertexAttribPointer(index, size, type, normalized, stride, offset);\n }\n function setupVertexAttributes(object, material, program, geometry) {\n if (capabilities.isWebGL2 === false && (object.isInstancedMesh || geometry.isInstancedBufferGeometry)) {\n if (extensions.get(\"ANGLE_instanced_arrays\") === null) return;\n }\n initAttributes();\n const geometryAttributes = geometry.attributes;\n const programAttributes = program.getAttributes();\n const materialDefaultAttributeValues = material.defaultAttributeValues;\n for(const name in programAttributes){\n const programAttribute = programAttributes[name];\n if (programAttribute.location >= 0) {\n let geometryAttribute = geometryAttributes[name];\n if (geometryAttribute === undefined) {\n if (name === \"instanceMatrix\" && object.instanceMatrix) geometryAttribute = object.instanceMatrix;\n if (name === \"instanceColor\" && object.instanceColor) geometryAttribute = object.instanceColor;\n }\n if (geometryAttribute !== undefined) {\n const normalized = geometryAttribute.normalized;\n const size = geometryAttribute.itemSize;\n const attribute = attributes.get(geometryAttribute);\n // TODO Attribute may not be available on context restore\n if (attribute === undefined) continue;\n const buffer = attribute.buffer;\n const type = attribute.type;\n const bytesPerElement = attribute.bytesPerElement;\n // check for integer attributes (WebGL 2 only)\n const integer = capabilities.isWebGL2 === true && (type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === $d5b33d7c30034067$export$5c612977753abe2);\n if (geometryAttribute.isInterleavedBufferAttribute) {\n const data = geometryAttribute.data;\n const stride = data.stride;\n const offset = geometryAttribute.offset;\n if (data.isInstancedInterleavedBuffer) {\n for(let i = 0; i < programAttribute.locationSize; i++)enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);\n if (object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined) geometry._maxInstanceCount = data.meshPerAttribute * data.count;\n } else for(let i = 0; i < programAttribute.locationSize; i++)enableAttribute(programAttribute.location + i);\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n for(let i = 0; i < programAttribute.locationSize; i++)vertexAttribPointer(programAttribute.location + i, size / programAttribute.locationSize, type, normalized, stride * bytesPerElement, (offset + size / programAttribute.locationSize * i) * bytesPerElement, integer);\n } else {\n if (geometryAttribute.isInstancedBufferAttribute) {\n for(let i = 0; i < programAttribute.locationSize; i++)enableAttributeAndDivisor(programAttribute.location + i, geometryAttribute.meshPerAttribute);\n if (object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined) geometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n } else for(let i = 0; i < programAttribute.locationSize; i++)enableAttribute(programAttribute.location + i);\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n for(let i = 0; i < programAttribute.locationSize; i++)vertexAttribPointer(programAttribute.location + i, size / programAttribute.locationSize, type, normalized, size * bytesPerElement, size / programAttribute.locationSize * i * bytesPerElement, integer);\n }\n } else if (materialDefaultAttributeValues !== undefined) {\n const value = materialDefaultAttributeValues[name];\n if (value !== undefined) switch(value.length){\n case 2:\n gl.vertexAttrib2fv(programAttribute.location, value);\n break;\n case 3:\n gl.vertexAttrib3fv(programAttribute.location, value);\n break;\n case 4:\n gl.vertexAttrib4fv(programAttribute.location, value);\n break;\n default:\n gl.vertexAttrib1fv(programAttribute.location, value);\n }\n }\n }\n }\n disableUnusedAttributes();\n }\n function dispose() {\n reset();\n for(const geometryId in bindingStates){\n const programMap = bindingStates[geometryId];\n for(const programId in programMap){\n const stateMap = programMap[programId];\n for(const wireframe in stateMap){\n deleteVertexArrayObject(stateMap[wireframe].object);\n delete stateMap[wireframe];\n }\n delete programMap[programId];\n }\n delete bindingStates[geometryId];\n }\n }\n function releaseStatesOfGeometry(geometry) {\n if (bindingStates[geometry.id] === undefined) return;\n const programMap = bindingStates[geometry.id];\n for(const programId in programMap){\n const stateMap = programMap[programId];\n for(const wireframe in stateMap){\n deleteVertexArrayObject(stateMap[wireframe].object);\n delete stateMap[wireframe];\n }\n delete programMap[programId];\n }\n delete bindingStates[geometry.id];\n }\n function releaseStatesOfProgram(program) {\n for(const geometryId in bindingStates){\n const programMap = bindingStates[geometryId];\n if (programMap[program.id] === undefined) continue;\n const stateMap = programMap[program.id];\n for(const wireframe in stateMap){\n deleteVertexArrayObject(stateMap[wireframe].object);\n delete stateMap[wireframe];\n }\n delete programMap[program.id];\n }\n }\n function reset() {\n resetDefaultState();\n forceUpdate = true;\n if (currentState === defaultState) return;\n currentState = defaultState;\n bindVertexArrayObject(currentState.object);\n }\n // for backward-compatibility\n function resetDefaultState() {\n defaultState.geometry = null;\n defaultState.program = null;\n defaultState.wireframe = false;\n }\n return {\n setup: setup,\n reset: reset,\n resetDefaultState: resetDefaultState,\n dispose: dispose,\n releaseStatesOfGeometry: releaseStatesOfGeometry,\n releaseStatesOfProgram: releaseStatesOfProgram,\n initAttributes: initAttributes,\n enableAttribute: enableAttribute,\n disableUnusedAttributes: disableUnusedAttributes\n };\n}\nfunction $d5b33d7c30034067$var$WebGLBufferRenderer(gl, extensions, info, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n let mode;\n function setMode(value) {\n mode = value;\n }\n function render(start, count) {\n gl.drawArrays(mode, start, count);\n info.update(count, mode, 1);\n }\n function renderInstances(start, count, primcount) {\n if (primcount === 0) return;\n let extension, methodName;\n if (isWebGL2) {\n extension = gl;\n methodName = \"drawArraysInstanced\";\n } else {\n extension = extensions.get(\"ANGLE_instanced_arrays\");\n methodName = \"drawArraysInstancedANGLE\";\n if (extension === null) {\n console.error(\"THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");\n return;\n }\n }\n extension[methodName](mode, start, count, primcount);\n info.update(count, mode, primcount);\n }\n //\n this.setMode = setMode;\n this.render = render;\n this.renderInstances = renderInstances;\n}\nfunction $d5b33d7c30034067$var$WebGLCapabilities(gl, extensions, parameters) {\n let maxAnisotropy;\n function getMaxAnisotropy() {\n if (maxAnisotropy !== undefined) return maxAnisotropy;\n if (extensions.has(\"EXT_texture_filter_anisotropic\") === true) {\n const extension = extensions.get(\"EXT_texture_filter_anisotropic\");\n maxAnisotropy = gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\n } else maxAnisotropy = 0;\n return maxAnisotropy;\n }\n function getMaxPrecision(precision) {\n if (precision === \"highp\") {\n if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) return \"highp\";\n precision = \"mediump\";\n }\n if (precision === \"mediump\") {\n if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) return \"mediump\";\n }\n return \"lowp\";\n }\n const isWebGL2 = typeof WebGL2RenderingContext !== \"undefined\" && gl.constructor.name === \"WebGL2RenderingContext\";\n let precision = parameters.precision !== undefined ? parameters.precision : \"highp\";\n const maxPrecision = getMaxPrecision(precision);\n if (maxPrecision !== precision) {\n console.warn(\"THREE.WebGLRenderer:\", precision, \"not supported, using\", maxPrecision, \"instead.\");\n precision = maxPrecision;\n }\n const drawBuffers = isWebGL2 || extensions.has(\"WEBGL_draw_buffers\");\n const logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n const maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n const maxVertexTextures = gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);\n const maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n const maxCubemapSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);\n const maxAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n const maxVertexUniforms = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);\n const maxVaryings = gl.getParameter(gl.MAX_VARYING_VECTORS);\n const maxFragmentUniforms = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);\n const vertexTextures = maxVertexTextures > 0;\n const floatFragmentTextures = isWebGL2 || extensions.has(\"OES_texture_float\");\n const floatVertexTextures = vertexTextures && floatFragmentTextures;\n const maxSamples = isWebGL2 ? gl.getParameter(gl.MAX_SAMPLES) : 0;\n return {\n isWebGL2: isWebGL2,\n drawBuffers: drawBuffers,\n getMaxAnisotropy: getMaxAnisotropy,\n getMaxPrecision: getMaxPrecision,\n precision: precision,\n logarithmicDepthBuffer: logarithmicDepthBuffer,\n maxTextures: maxTextures,\n maxVertexTextures: maxVertexTextures,\n maxTextureSize: maxTextureSize,\n maxCubemapSize: maxCubemapSize,\n maxAttributes: maxAttributes,\n maxVertexUniforms: maxVertexUniforms,\n maxVaryings: maxVaryings,\n maxFragmentUniforms: maxFragmentUniforms,\n vertexTextures: vertexTextures,\n floatFragmentTextures: floatFragmentTextures,\n floatVertexTextures: floatVertexTextures,\n maxSamples: maxSamples\n };\n}\nfunction $d5b33d7c30034067$var$WebGLClipping(properties) {\n const scope = this;\n let globalState = null, numGlobalPlanes = 0, localClippingEnabled = false, renderingShadows = false;\n const plane = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), viewNormalMatrix = new $d5b33d7c30034067$export$8ff26dafa08918(), uniform = {\n value: null,\n needsUpdate: false\n };\n this.uniform = uniform;\n this.numPlanes = 0;\n this.numIntersection = 0;\n this.init = function(planes, enableLocalClipping) {\n const enabled = planes.length !== 0 || enableLocalClipping || // enable state of previous frame - the clipping code has to\n // run another frame in order to reset the state:\n numGlobalPlanes !== 0 || localClippingEnabled;\n localClippingEnabled = enableLocalClipping;\n numGlobalPlanes = planes.length;\n return enabled;\n };\n this.beginShadows = function() {\n renderingShadows = true;\n projectPlanes(null);\n };\n this.endShadows = function() {\n renderingShadows = false;\n };\n this.setGlobalState = function(planes, camera) {\n globalState = projectPlanes(planes, camera, 0);\n };\n this.setState = function(material, camera, useCache) {\n const planes = material.clippingPlanes, clipIntersection = material.clipIntersection, clipShadows = material.clipShadows;\n const materialProperties = properties.get(material);\n if (!localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && !clipShadows) {\n // there's no local clipping\n if (renderingShadows) // there's no global clipping\n projectPlanes(null);\n else resetGlobalState();\n } else {\n const nGlobal = renderingShadows ? 0 : numGlobalPlanes, lGlobal = nGlobal * 4;\n let dstArray = materialProperties.clippingState || null;\n uniform.value = dstArray; // ensure unique state\n dstArray = projectPlanes(planes, camera, lGlobal, useCache);\n for(let i = 0; i !== lGlobal; ++i)dstArray[i] = globalState[i];\n materialProperties.clippingState = dstArray;\n this.numIntersection = clipIntersection ? this.numPlanes : 0;\n this.numPlanes += nGlobal;\n }\n };\n function resetGlobalState() {\n if (uniform.value !== globalState) {\n uniform.value = globalState;\n uniform.needsUpdate = numGlobalPlanes > 0;\n }\n scope.numPlanes = numGlobalPlanes;\n scope.numIntersection = 0;\n }\n function projectPlanes(planes, camera, dstOffset, skipTransform) {\n const nPlanes = planes !== null ? planes.length : 0;\n let dstArray = null;\n if (nPlanes !== 0) {\n dstArray = uniform.value;\n if (skipTransform !== true || dstArray === null) {\n const flatSize = dstOffset + nPlanes * 4, viewMatrix = camera.matrixWorldInverse;\n viewNormalMatrix.getNormalMatrix(viewMatrix);\n if (dstArray === null || dstArray.length < flatSize) dstArray = new Float32Array(flatSize);\n for(let i = 0, i4 = dstOffset; i !== nPlanes; ++i, i4 += 4){\n plane.copy(planes[i]).applyMatrix4(viewMatrix, viewNormalMatrix);\n plane.normal.toArray(dstArray, i4);\n dstArray[i4 + 3] = plane.constant;\n }\n }\n uniform.value = dstArray;\n uniform.needsUpdate = true;\n }\n scope.numPlanes = nPlanes;\n scope.numIntersection = 0;\n return dstArray;\n }\n}\nfunction $d5b33d7c30034067$var$WebGLCubeMaps(renderer) {\n let cubemaps = new WeakMap();\n function mapTextureMapping(texture, mapping) {\n if (mapping === $d5b33d7c30034067$export$d64030b316d3b087) texture.mapping = $d5b33d7c30034067$export$8759762a6477f2c4;\n else if (mapping === $d5b33d7c30034067$export$ee99d97d46898098) texture.mapping = $d5b33d7c30034067$export$dc59f8aed047f61d;\n return texture;\n }\n function get(texture) {\n if (texture && texture.isTexture && texture.isRenderTargetTexture === false) {\n const mapping = texture.mapping;\n if (mapping === $d5b33d7c30034067$export$d64030b316d3b087 || mapping === $d5b33d7c30034067$export$ee99d97d46898098) {\n if (cubemaps.has(texture)) {\n const cubemap = cubemaps.get(texture).texture;\n return mapTextureMapping(cubemap, texture.mapping);\n } else {\n const image = texture.image;\n if (image && image.height > 0) {\n const renderTarget = new $d5b33d7c30034067$export$ac386671d651941e(image.height / 2);\n renderTarget.fromEquirectangularTexture(renderer, texture);\n cubemaps.set(texture, renderTarget);\n texture.addEventListener(\"dispose\", onTextureDispose);\n return mapTextureMapping(renderTarget.texture, texture.mapping);\n } else // image not yet ready. try the conversion next frame\n return null;\n }\n }\n }\n return texture;\n }\n function onTextureDispose(event) {\n const texture = event.target;\n texture.removeEventListener(\"dispose\", onTextureDispose);\n const cubemap = cubemaps.get(texture);\n if (cubemap !== undefined) {\n cubemaps.delete(texture);\n cubemap.dispose();\n }\n }\n function dispose() {\n cubemaps = new WeakMap();\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nclass $d5b33d7c30034067$export$9ebf355ee4ed261b extends $d5b33d7c30034067$export$79f141de891a5fed {\n constructor(left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000){\n super();\n this.isOrthographicCamera = true;\n this.type = \"OrthographicCamera\";\n this.zoom = 1;\n this.view = null;\n this.left = left;\n this.right = right;\n this.top = top;\n this.bottom = bottom;\n this.near = near;\n this.far = far;\n this.updateProjectionMatrix();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.left = source.left;\n this.right = source.right;\n this.top = source.top;\n this.bottom = source.bottom;\n this.near = source.near;\n this.far = source.far;\n this.zoom = source.zoom;\n this.view = source.view === null ? null : Object.assign({}, source.view);\n return this;\n }\n setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n if (this.view === null) this.view = {\n enabled: true,\n fullWidth: 1,\n fullHeight: 1,\n offsetX: 0,\n offsetY: 0,\n width: 1,\n height: 1\n };\n this.view.enabled = true;\n this.view.fullWidth = fullWidth;\n this.view.fullHeight = fullHeight;\n this.view.offsetX = x;\n this.view.offsetY = y;\n this.view.width = width;\n this.view.height = height;\n this.updateProjectionMatrix();\n }\n clearViewOffset() {\n if (this.view !== null) this.view.enabled = false;\n this.updateProjectionMatrix();\n }\n updateProjectionMatrix() {\n const dx = (this.right - this.left) / (2 * this.zoom);\n const dy = (this.top - this.bottom) / (2 * this.zoom);\n const cx = (this.right + this.left) / 2;\n const cy = (this.top + this.bottom) / 2;\n let left = cx - dx;\n let right = cx + dx;\n let top = cy + dy;\n let bottom = cy - dy;\n if (this.view !== null && this.view.enabled) {\n const scaleW = (this.right - this.left) / this.view.fullWidth / this.zoom;\n const scaleH = (this.top - this.bottom) / this.view.fullHeight / this.zoom;\n left += scaleW * this.view.offsetX;\n right = left + scaleW * this.view.width;\n top -= scaleH * this.view.offsetY;\n bottom = top - scaleH * this.view.height;\n }\n this.projectionMatrix.makeOrthographic(left, right, top, bottom, this.near, this.far, this.coordinateSystem);\n this.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.zoom = this.zoom;\n data.object.left = this.left;\n data.object.right = this.right;\n data.object.top = this.top;\n data.object.bottom = this.bottom;\n data.object.near = this.near;\n data.object.far = this.far;\n if (this.view !== null) data.object.view = Object.assign({}, this.view);\n return data;\n }\n}\nconst $d5b33d7c30034067$var$LOD_MIN = 4;\n// The standard deviations (radians) associated with the extra mips. These are\n// chosen to approximate a Trowbridge-Reitz distribution function times the\n// geometric shadowing function. These sigma values squared must match the\n// variance #defines in cube_uv_reflection_fragment.glsl.js.\nconst $d5b33d7c30034067$var$EXTRA_LOD_SIGMA = [\n 0.125,\n 0.215,\n 0.35,\n 0.446,\n 0.526,\n 0.582\n];\n// The maximum length of the blur for loop. Smaller sigmas will use fewer\n// samples and exit early, but not recompile the shader.\nconst $d5b33d7c30034067$var$MAX_SAMPLES = 20;\nconst $d5b33d7c30034067$var$_flatCamera = /*@__PURE__*/ new $d5b33d7c30034067$export$9ebf355ee4ed261b();\nconst $d5b33d7c30034067$var$_clearColor = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\nlet $d5b33d7c30034067$var$_oldTarget = null;\n// Golden Ratio\nconst $d5b33d7c30034067$var$PHI = (1 + Math.sqrt(5)) / 2;\nconst $d5b33d7c30034067$var$INV_PHI = 1 / $d5b33d7c30034067$var$PHI;\n// Vertices of a dodecahedron (except the opposites, which represent the\n// same axis), used as axis directions evenly spread on a sphere.\nconst $d5b33d7c30034067$var$_axisDirections = [\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-1, 1, 1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, -1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-1, 1, -1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, $d5b33d7c30034067$var$PHI, $d5b33d7c30034067$var$INV_PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, $d5b33d7c30034067$var$PHI, -$d5b33d7c30034067$var$INV_PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699($d5b33d7c30034067$var$INV_PHI, 0, $d5b33d7c30034067$var$PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-$d5b33d7c30034067$var$INV_PHI, 0, $d5b33d7c30034067$var$PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699($d5b33d7c30034067$var$PHI, $d5b33d7c30034067$var$INV_PHI, 0),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-$d5b33d7c30034067$var$PHI, $d5b33d7c30034067$var$INV_PHI, 0)\n];\n/**\n * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n * (PMREM) from a cubeMap environment texture. This allows different levels of\n * blur to be quickly accessed based on material roughness. It is packed into a\n * special CubeUV format that allows us to perform custom interpolation so that\n * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n * higher roughness levels. In this way we maintain resolution to smoothly\n * interpolate diffuse lighting while limiting sampling computation.\n *\n * Paper: Fast, Accurate Image-Based Lighting\n * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view\n*/ class $d5b33d7c30034067$export$6add42717753e221 {\n constructor(renderer){\n this._renderer = renderer;\n this._pingPongRenderTarget = null;\n this._lodMax = 0;\n this._cubeSize = 0;\n this._lodPlanes = [];\n this._sizeLods = [];\n this._sigmas = [];\n this._blurMaterial = null;\n this._cubemapMaterial = null;\n this._equirectMaterial = null;\n this._compileMaterial(this._blurMaterial);\n }\n /**\n\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t * is placed at the origin).\n\t */ fromScene(scene, sigma = 0, near = 0.1, far = 100) {\n $d5b33d7c30034067$var$_oldTarget = this._renderer.getRenderTarget();\n this._setSize(256);\n const cubeUVRenderTarget = this._allocateTargets();\n cubeUVRenderTarget.depthBuffer = true;\n this._sceneToCubeUV(scene, near, far, cubeUVRenderTarget);\n if (sigma > 0) this._blur(cubeUVRenderTarget, 0, 0, sigma);\n this._applyPMREM(cubeUVRenderTarget);\n this._cleanup(cubeUVRenderTarget);\n return cubeUVRenderTarget;\n }\n /**\n\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t * or HDR. The ideal input image size is 1k (1024 x 512),\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */ fromEquirectangular(equirectangular, renderTarget = null) {\n return this._fromTexture(equirectangular, renderTarget);\n }\n /**\n\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t * or HDR. The ideal input cube size is 256 x 256,\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */ fromCubemap(cubemap, renderTarget = null) {\n return this._fromTexture(cubemap, renderTarget);\n }\n /**\n\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */ compileCubemapShader() {\n if (this._cubemapMaterial === null) {\n this._cubemapMaterial = $d5b33d7c30034067$var$_getCubemapMaterial();\n this._compileMaterial(this._cubemapMaterial);\n }\n }\n /**\n\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */ compileEquirectangularShader() {\n if (this._equirectMaterial === null) {\n this._equirectMaterial = $d5b33d7c30034067$var$_getEquirectMaterial();\n this._compileMaterial(this._equirectMaterial);\n }\n }\n /**\n\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t * one of them will cause any others to also become unusable.\n\t */ dispose() {\n this._dispose();\n if (this._cubemapMaterial !== null) this._cubemapMaterial.dispose();\n if (this._equirectMaterial !== null) this._equirectMaterial.dispose();\n }\n // private interface\n _setSize(cubeSize) {\n this._lodMax = Math.floor(Math.log2(cubeSize));\n this._cubeSize = Math.pow(2, this._lodMax);\n }\n _dispose() {\n if (this._blurMaterial !== null) this._blurMaterial.dispose();\n if (this._pingPongRenderTarget !== null) this._pingPongRenderTarget.dispose();\n for(let i = 0; i < this._lodPlanes.length; i++)this._lodPlanes[i].dispose();\n }\n _cleanup(outputTarget) {\n this._renderer.setRenderTarget($d5b33d7c30034067$var$_oldTarget);\n outputTarget.scissorTest = false;\n $d5b33d7c30034067$var$_setViewport(outputTarget, 0, 0, outputTarget.width, outputTarget.height);\n }\n _fromTexture(texture, renderTarget) {\n if (texture.mapping === $d5b33d7c30034067$export$8759762a6477f2c4 || texture.mapping === $d5b33d7c30034067$export$dc59f8aed047f61d) this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width || texture.image[0].image.width);\n else this._setSize(texture.image.width / 4);\n $d5b33d7c30034067$var$_oldTarget = this._renderer.getRenderTarget();\n const cubeUVRenderTarget = renderTarget || this._allocateTargets();\n this._textureToCubeUV(texture, cubeUVRenderTarget);\n this._applyPMREM(cubeUVRenderTarget);\n this._cleanup(cubeUVRenderTarget);\n return cubeUVRenderTarget;\n }\n _allocateTargets() {\n const width = 3 * Math.max(this._cubeSize, 112);\n const height = 4 * this._cubeSize;\n const params = {\n magFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n minFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n generateMipmaps: false,\n type: $d5b33d7c30034067$export$2697304443f382bc,\n format: $d5b33d7c30034067$export$3f8bb04b555a363c,\n colorSpace: $d5b33d7c30034067$export$42429b3acfb233a4,\n depthBuffer: false\n };\n const cubeUVRenderTarget = $d5b33d7c30034067$var$_createRenderTarget(width, height, params);\n if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width || this._pingPongRenderTarget.height !== height) {\n if (this._pingPongRenderTarget !== null) this._dispose();\n this._pingPongRenderTarget = $d5b33d7c30034067$var$_createRenderTarget(width, height, params);\n const { _lodMax: _lodMax } = this;\n ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = $d5b33d7c30034067$var$_createPlanes(_lodMax));\n this._blurMaterial = $d5b33d7c30034067$var$_getBlurShader(_lodMax, width, height);\n }\n return cubeUVRenderTarget;\n }\n _compileMaterial(material) {\n const tmpMesh = new $d5b33d7c30034067$export$e176487c05830cc5(this._lodPlanes[0], material);\n this._renderer.compile(tmpMesh, $d5b33d7c30034067$var$_flatCamera);\n }\n _sceneToCubeUV(scene, near, far, cubeUVRenderTarget) {\n const fov = 90;\n const aspect = 1;\n const cubeCamera = new $d5b33d7c30034067$export$74e4ae24825f68d7(fov, aspect, near, far);\n const upSign = [\n 1,\n -1,\n 1,\n 1,\n 1,\n 1\n ];\n const forwardSign = [\n 1,\n 1,\n 1,\n -1,\n -1,\n -1\n ];\n const renderer = this._renderer;\n const originalAutoClear = renderer.autoClear;\n const toneMapping = renderer.toneMapping;\n renderer.getClearColor($d5b33d7c30034067$var$_clearColor);\n renderer.toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n renderer.autoClear = false;\n const backgroundMaterial = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n name: \"PMREM.Background\",\n side: $d5b33d7c30034067$export$d9f0486e75b5ace,\n depthWrite: false,\n depthTest: false\n });\n const backgroundBox = new $d5b33d7c30034067$export$e176487c05830cc5(new $d5b33d7c30034067$export$33e43285f7406bd5(), backgroundMaterial);\n let useSolidColor = false;\n const background = scene.background;\n if (background) {\n if (background.isColor) {\n backgroundMaterial.color.copy(background);\n scene.background = null;\n useSolidColor = true;\n }\n } else {\n backgroundMaterial.color.copy($d5b33d7c30034067$var$_clearColor);\n useSolidColor = true;\n }\n for(let i = 0; i < 6; i++){\n const col = i % 3;\n if (col === 0) {\n cubeCamera.up.set(0, upSign[i], 0);\n cubeCamera.lookAt(forwardSign[i], 0, 0);\n } else if (col === 1) {\n cubeCamera.up.set(0, 0, upSign[i]);\n cubeCamera.lookAt(0, forwardSign[i], 0);\n } else {\n cubeCamera.up.set(0, upSign[i], 0);\n cubeCamera.lookAt(0, 0, forwardSign[i]);\n }\n const size = this._cubeSize;\n $d5b33d7c30034067$var$_setViewport(cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size);\n renderer.setRenderTarget(cubeUVRenderTarget);\n if (useSolidColor) renderer.render(backgroundBox, cubeCamera);\n renderer.render(scene, cubeCamera);\n }\n backgroundBox.geometry.dispose();\n backgroundBox.material.dispose();\n renderer.toneMapping = toneMapping;\n renderer.autoClear = originalAutoClear;\n scene.background = background;\n }\n _textureToCubeUV(texture, cubeUVRenderTarget) {\n const renderer = this._renderer;\n const isCubeTexture = texture.mapping === $d5b33d7c30034067$export$8759762a6477f2c4 || texture.mapping === $d5b33d7c30034067$export$dc59f8aed047f61d;\n if (isCubeTexture) {\n if (this._cubemapMaterial === null) this._cubemapMaterial = $d5b33d7c30034067$var$_getCubemapMaterial();\n this._cubemapMaterial.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;\n } else if (this._equirectMaterial === null) this._equirectMaterial = $d5b33d7c30034067$var$_getEquirectMaterial();\n const material = isCubeTexture ? this._cubemapMaterial : this._equirectMaterial;\n const mesh = new $d5b33d7c30034067$export$e176487c05830cc5(this._lodPlanes[0], material);\n const uniforms = material.uniforms;\n uniforms[\"envMap\"].value = texture;\n const size = this._cubeSize;\n $d5b33d7c30034067$var$_setViewport(cubeUVRenderTarget, 0, 0, 3 * size, 2 * size);\n renderer.setRenderTarget(cubeUVRenderTarget);\n renderer.render(mesh, $d5b33d7c30034067$var$_flatCamera);\n }\n _applyPMREM(cubeUVRenderTarget) {\n const renderer = this._renderer;\n const autoClear = renderer.autoClear;\n renderer.autoClear = false;\n for(let i = 1; i < this._lodPlanes.length; i++){\n const sigma = Math.sqrt(this._sigmas[i] * this._sigmas[i] - this._sigmas[i - 1] * this._sigmas[i - 1]);\n const poleAxis = $d5b33d7c30034067$var$_axisDirections[(i - 1) % $d5b33d7c30034067$var$_axisDirections.length];\n this._blur(cubeUVRenderTarget, i - 1, i, sigma, poleAxis);\n }\n renderer.autoClear = autoClear;\n }\n /**\n\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t * accurate at the poles, but still does a decent job.\n\t */ _blur(cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis) {\n const pingPongRenderTarget = this._pingPongRenderTarget;\n this._halfBlur(cubeUVRenderTarget, pingPongRenderTarget, lodIn, lodOut, sigma, \"latitudinal\", poleAxis);\n this._halfBlur(pingPongRenderTarget, cubeUVRenderTarget, lodOut, lodOut, sigma, \"longitudinal\", poleAxis);\n }\n _halfBlur(targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis) {\n const renderer = this._renderer;\n const blurMaterial = this._blurMaterial;\n if (direction !== \"latitudinal\" && direction !== \"longitudinal\") console.error(\"blur direction must be either latitudinal or longitudinal!\");\n // Number of standard deviations at which to cut off the discrete approximation.\n const STANDARD_DEVIATIONS = 3;\n const blurMesh = new $d5b33d7c30034067$export$e176487c05830cc5(this._lodPlanes[lodOut], blurMaterial);\n const blurUniforms = blurMaterial.uniforms;\n const pixels = this._sizeLods[lodIn] - 1;\n const radiansPerPixel = isFinite(sigmaRadians) ? Math.PI / (2 * pixels) : 2 * Math.PI / (2 * $d5b33d7c30034067$var$MAX_SAMPLES - 1);\n const sigmaPixels = sigmaRadians / radiansPerPixel;\n const samples = isFinite(sigmaRadians) ? 1 + Math.floor(STANDARD_DEVIATIONS * sigmaPixels) : $d5b33d7c30034067$var$MAX_SAMPLES;\n if (samples > $d5b33d7c30034067$var$MAX_SAMPLES) console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${$d5b33d7c30034067$var$MAX_SAMPLES}`);\n const weights = [];\n let sum = 0;\n for(let i = 0; i < $d5b33d7c30034067$var$MAX_SAMPLES; ++i){\n const x = i / sigmaPixels;\n const weight = Math.exp(-x * x / 2);\n weights.push(weight);\n if (i === 0) sum += weight;\n else if (i < samples) sum += 2 * weight;\n }\n for(let i = 0; i < weights.length; i++)weights[i] = weights[i] / sum;\n blurUniforms[\"envMap\"].value = targetIn.texture;\n blurUniforms[\"samples\"].value = samples;\n blurUniforms[\"weights\"].value = weights;\n blurUniforms[\"latitudinal\"].value = direction === \"latitudinal\";\n if (poleAxis) blurUniforms[\"poleAxis\"].value = poleAxis;\n const { _lodMax: _lodMax } = this;\n blurUniforms[\"dTheta\"].value = radiansPerPixel;\n blurUniforms[\"mipInt\"].value = _lodMax - lodIn;\n const outputSize = this._sizeLods[lodOut];\n const x = 3 * outputSize * (lodOut > _lodMax - $d5b33d7c30034067$var$LOD_MIN ? lodOut - _lodMax + $d5b33d7c30034067$var$LOD_MIN : 0);\n const y = 4 * (this._cubeSize - outputSize);\n $d5b33d7c30034067$var$_setViewport(targetOut, x, y, 3 * outputSize, 2 * outputSize);\n renderer.setRenderTarget(targetOut);\n renderer.render(blurMesh, $d5b33d7c30034067$var$_flatCamera);\n }\n}\nfunction $d5b33d7c30034067$var$_createPlanes(lodMax) {\n const lodPlanes = [];\n const sizeLods = [];\n const sigmas = [];\n let lod = lodMax;\n const totalLods = lodMax - $d5b33d7c30034067$var$LOD_MIN + 1 + $d5b33d7c30034067$var$EXTRA_LOD_SIGMA.length;\n for(let i = 0; i < totalLods; i++){\n const sizeLod = Math.pow(2, lod);\n sizeLods.push(sizeLod);\n let sigma = 1.0 / sizeLod;\n if (i > lodMax - $d5b33d7c30034067$var$LOD_MIN) sigma = $d5b33d7c30034067$var$EXTRA_LOD_SIGMA[i - lodMax + $d5b33d7c30034067$var$LOD_MIN - 1];\n else if (i === 0) sigma = 0;\n sigmas.push(sigma);\n const texelSize = 1.0 / (sizeLod - 2);\n const min = -texelSize;\n const max = 1 + texelSize;\n const uv1 = [\n min,\n min,\n max,\n min,\n max,\n max,\n min,\n min,\n max,\n max,\n min,\n max\n ];\n const cubeFaces = 6;\n const vertices = 6;\n const positionSize = 3;\n const uvSize = 2;\n const faceIndexSize = 1;\n const position = new Float32Array(positionSize * vertices * cubeFaces);\n const uv = new Float32Array(uvSize * vertices * cubeFaces);\n const faceIndex = new Float32Array(faceIndexSize * vertices * cubeFaces);\n for(let face = 0; face < cubeFaces; face++){\n const x = face % 3 * 2 / 3 - 1;\n const y = face > 2 ? 0 : -1;\n const coordinates = [\n x,\n y,\n 0,\n x + 2 / 3,\n y,\n 0,\n x + 2 / 3,\n y + 1,\n 0,\n x,\n y,\n 0,\n x + 2 / 3,\n y + 1,\n 0,\n x,\n y + 1,\n 0\n ];\n position.set(coordinates, positionSize * vertices * face);\n uv.set(uv1, uvSize * vertices * face);\n const fill = [\n face,\n face,\n face,\n face,\n face,\n face\n ];\n faceIndex.set(fill, faceIndexSize * vertices * face);\n }\n const planes = new $d5b33d7c30034067$export$b7be63a67df8959();\n planes.setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117(position, positionSize));\n planes.setAttribute(\"uv\", new $d5b33d7c30034067$export$8dea267bd6bde117(uv, uvSize));\n planes.setAttribute(\"faceIndex\", new $d5b33d7c30034067$export$8dea267bd6bde117(faceIndex, faceIndexSize));\n lodPlanes.push(planes);\n if (lod > $d5b33d7c30034067$var$LOD_MIN) lod--;\n }\n return {\n lodPlanes: lodPlanes,\n sizeLods: sizeLods,\n sigmas: sigmas\n };\n}\nfunction $d5b33d7c30034067$var$_createRenderTarget(width, height, params) {\n const cubeUVRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(width, height, params);\n cubeUVRenderTarget.texture.mapping = $d5b33d7c30034067$export$dbf3e70ff37af79;\n cubeUVRenderTarget.texture.name = \"PMREM.cubeUv\";\n cubeUVRenderTarget.scissorTest = true;\n return cubeUVRenderTarget;\n}\nfunction $d5b33d7c30034067$var$_setViewport(target, x, y, width, height) {\n target.viewport.set(x, y, width, height);\n target.scissor.set(x, y, width, height);\n}\nfunction $d5b33d7c30034067$var$_getBlurShader(lodMax, width, height) {\n const weights = new Float32Array($d5b33d7c30034067$var$MAX_SAMPLES);\n const poleAxis = new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0);\n const shaderMaterial = new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"SphericalGaussianBlur\",\n defines: {\n \"n\": $d5b33d7c30034067$var$MAX_SAMPLES,\n \"CUBEUV_TEXEL_WIDTH\": 1.0 / width,\n \"CUBEUV_TEXEL_HEIGHT\": 1.0 / height,\n \"CUBEUV_MAX_MIP\": `${lodMax}.0`\n },\n uniforms: {\n \"envMap\": {\n value: null\n },\n \"samples\": {\n value: 1\n },\n \"weights\": {\n value: weights\n },\n \"latitudinal\": {\n value: false\n },\n \"dTheta\": {\n value: 0\n },\n \"mipInt\": {\n value: 0\n },\n \"poleAxis\": {\n value: poleAxis\n }\n },\n vertexShader: $d5b33d7c30034067$var$_getCommonVertexShader(),\n fragmentShader: /* glsl */ `\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba,\n depthTest: false,\n depthWrite: false\n });\n return shaderMaterial;\n}\nfunction $d5b33d7c30034067$var$_getEquirectMaterial() {\n return new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"EquirectangularToCubeUV\",\n uniforms: {\n \"envMap\": {\n value: null\n }\n },\n vertexShader: $d5b33d7c30034067$var$_getCommonVertexShader(),\n fragmentShader: /* glsl */ `\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba,\n depthTest: false,\n depthWrite: false\n });\n}\nfunction $d5b33d7c30034067$var$_getCubemapMaterial() {\n return new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"CubemapToCubeUV\",\n uniforms: {\n \"envMap\": {\n value: null\n },\n \"flipEnvMap\": {\n value: -1\n }\n },\n vertexShader: $d5b33d7c30034067$var$_getCommonVertexShader(),\n fragmentShader: /* glsl */ `\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba,\n depthTest: false,\n depthWrite: false\n });\n}\nfunction $d5b33d7c30034067$var$_getCommonVertexShader() {\n return /* glsl */ `\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`;\n}\nfunction $d5b33d7c30034067$var$WebGLCubeUVMaps(renderer) {\n let cubeUVmaps = new WeakMap();\n let pmremGenerator = null;\n function get(texture) {\n if (texture && texture.isTexture) {\n const mapping = texture.mapping;\n const isEquirectMap = mapping === $d5b33d7c30034067$export$d64030b316d3b087 || mapping === $d5b33d7c30034067$export$ee99d97d46898098;\n const isCubeMap = mapping === $d5b33d7c30034067$export$8759762a6477f2c4 || mapping === $d5b33d7c30034067$export$dc59f8aed047f61d;\n // equirect/cube map to cubeUV conversion\n if (isEquirectMap || isCubeMap) {\n if (texture.isRenderTargetTexture && texture.needsPMREMUpdate === true) {\n texture.needsPMREMUpdate = false;\n let renderTarget = cubeUVmaps.get(texture);\n if (pmremGenerator === null) pmremGenerator = new $d5b33d7c30034067$export$6add42717753e221(renderer);\n renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular(texture, renderTarget) : pmremGenerator.fromCubemap(texture, renderTarget);\n cubeUVmaps.set(texture, renderTarget);\n return renderTarget.texture;\n } else {\n if (cubeUVmaps.has(texture)) return cubeUVmaps.get(texture).texture;\n else {\n const image = texture.image;\n if (isEquirectMap && image && image.height > 0 || isCubeMap && image && isCubeTextureComplete(image)) {\n if (pmremGenerator === null) pmremGenerator = new $d5b33d7c30034067$export$6add42717753e221(renderer);\n const renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular(texture) : pmremGenerator.fromCubemap(texture);\n cubeUVmaps.set(texture, renderTarget);\n texture.addEventListener(\"dispose\", onTextureDispose);\n return renderTarget.texture;\n } else // image not yet ready. try the conversion next frame\n return null;\n }\n }\n }\n }\n return texture;\n }\n function isCubeTextureComplete(image) {\n let count = 0;\n const length = 6;\n for(let i = 0; i < length; i++)if (image[i] !== undefined) count++;\n return count === length;\n }\n function onTextureDispose(event) {\n const texture = event.target;\n texture.removeEventListener(\"dispose\", onTextureDispose);\n const cubemapUV = cubeUVmaps.get(texture);\n if (cubemapUV !== undefined) {\n cubeUVmaps.delete(texture);\n cubemapUV.dispose();\n }\n }\n function dispose() {\n cubeUVmaps = new WeakMap();\n if (pmremGenerator !== null) {\n pmremGenerator.dispose();\n pmremGenerator = null;\n }\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$WebGLExtensions(gl) {\n const extensions = {};\n function getExtension(name) {\n if (extensions[name] !== undefined) return extensions[name];\n let extension;\n switch(name){\n case \"WEBGL_depth_texture\":\n extension = gl.getExtension(\"WEBGL_depth_texture\") || gl.getExtension(\"MOZ_WEBGL_depth_texture\") || gl.getExtension(\"WEBKIT_WEBGL_depth_texture\");\n break;\n case \"EXT_texture_filter_anisotropic\":\n extension = gl.getExtension(\"EXT_texture_filter_anisotropic\") || gl.getExtension(\"MOZ_EXT_texture_filter_anisotropic\") || gl.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");\n break;\n case \"WEBGL_compressed_texture_s3tc\":\n extension = gl.getExtension(\"WEBGL_compressed_texture_s3tc\") || gl.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\") || gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");\n break;\n case \"WEBGL_compressed_texture_pvrtc\":\n extension = gl.getExtension(\"WEBGL_compressed_texture_pvrtc\") || gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");\n break;\n default:\n extension = gl.getExtension(name);\n }\n extensions[name] = extension;\n return extension;\n }\n return {\n has: function(name) {\n return getExtension(name) !== null;\n },\n init: function(capabilities) {\n if (capabilities.isWebGL2) getExtension(\"EXT_color_buffer_float\");\n else {\n getExtension(\"WEBGL_depth_texture\");\n getExtension(\"OES_texture_float\");\n getExtension(\"OES_texture_half_float\");\n getExtension(\"OES_texture_half_float_linear\");\n getExtension(\"OES_standard_derivatives\");\n getExtension(\"OES_element_index_uint\");\n getExtension(\"OES_vertex_array_object\");\n getExtension(\"ANGLE_instanced_arrays\");\n }\n getExtension(\"OES_texture_float_linear\");\n getExtension(\"EXT_color_buffer_half_float\");\n getExtension(\"WEBGL_multisampled_render_to_texture\");\n },\n get: function(name) {\n const extension = getExtension(name);\n if (extension === null) console.warn(\"THREE.WebGLRenderer: \" + name + \" extension not supported.\");\n return extension;\n }\n };\n}\nfunction $d5b33d7c30034067$var$WebGLGeometries(gl, attributes, info, bindingStates) {\n const geometries = {};\n const wireframeAttributes = new WeakMap();\n function onGeometryDispose(event) {\n const geometry = event.target;\n if (geometry.index !== null) attributes.remove(geometry.index);\n for(const name in geometry.attributes)attributes.remove(geometry.attributes[name]);\n for(const name in geometry.morphAttributes){\n const array = geometry.morphAttributes[name];\n for(let i = 0, l = array.length; i < l; i++)attributes.remove(array[i]);\n }\n geometry.removeEventListener(\"dispose\", onGeometryDispose);\n delete geometries[geometry.id];\n const attribute = wireframeAttributes.get(geometry);\n if (attribute) {\n attributes.remove(attribute);\n wireframeAttributes.delete(geometry);\n }\n bindingStates.releaseStatesOfGeometry(geometry);\n if (geometry.isInstancedBufferGeometry === true) delete geometry._maxInstanceCount;\n //\n info.memory.geometries--;\n }\n function get(object, geometry) {\n if (geometries[geometry.id] === true) return geometry;\n geometry.addEventListener(\"dispose\", onGeometryDispose);\n geometries[geometry.id] = true;\n info.memory.geometries++;\n return geometry;\n }\n function update(geometry) {\n const geometryAttributes = geometry.attributes;\n // Updating index buffer in VAO now. See WebGLBindingStates.\n for(const name in geometryAttributes)attributes.update(geometryAttributes[name], gl.ARRAY_BUFFER);\n // morph targets\n const morphAttributes = geometry.morphAttributes;\n for(const name in morphAttributes){\n const array = morphAttributes[name];\n for(let i = 0, l = array.length; i < l; i++)attributes.update(array[i], gl.ARRAY_BUFFER);\n }\n }\n function updateWireframeAttribute(geometry) {\n const indices = [];\n const geometryIndex = geometry.index;\n const geometryPosition = geometry.attributes.position;\n let version = 0;\n if (geometryIndex !== null) {\n const array = geometryIndex.array;\n version = geometryIndex.version;\n for(let i = 0, l = array.length; i < l; i += 3){\n const a = array[i + 0];\n const b = array[i + 1];\n const c = array[i + 2];\n indices.push(a, b, b, c, c, a);\n }\n } else if (geometryPosition !== undefined) {\n const array = geometryPosition.array;\n version = geometryPosition.version;\n for(let i = 0, l = array.length / 3 - 1; i < l; i += 3){\n const a = i + 0;\n const b = i + 1;\n const c = i + 2;\n indices.push(a, b, b, c, c, a);\n }\n } else return;\n const attribute = new ($d5b33d7c30034067$var$arrayNeedsUint32(indices) ? $d5b33d7c30034067$export$7eb8c9fa25cd5bd6 : $d5b33d7c30034067$export$640a853f68025f2e)(indices, 1);\n attribute.version = version;\n // Updating index buffer in VAO now. See WebGLBindingStates\n //\n const previousAttribute = wireframeAttributes.get(geometry);\n if (previousAttribute) attributes.remove(previousAttribute);\n //\n wireframeAttributes.set(geometry, attribute);\n }\n function getWireframeAttribute(geometry) {\n const currentAttribute = wireframeAttributes.get(geometry);\n if (currentAttribute) {\n const geometryIndex = geometry.index;\n if (geometryIndex !== null) // if the attribute is obsolete, create a new one\n {\n if (currentAttribute.version < geometryIndex.version) updateWireframeAttribute(geometry);\n }\n } else updateWireframeAttribute(geometry);\n return wireframeAttributes.get(geometry);\n }\n return {\n get: get,\n update: update,\n getWireframeAttribute: getWireframeAttribute\n };\n}\nfunction $d5b33d7c30034067$var$WebGLIndexedBufferRenderer(gl, extensions, info, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n let mode;\n function setMode(value) {\n mode = value;\n }\n let type, bytesPerElement;\n function setIndex(value) {\n type = value.type;\n bytesPerElement = value.bytesPerElement;\n }\n function render(start, count) {\n gl.drawElements(mode, count, type, start * bytesPerElement);\n info.update(count, mode, 1);\n }\n function renderInstances(start, count, primcount) {\n if (primcount === 0) return;\n let extension, methodName;\n if (isWebGL2) {\n extension = gl;\n methodName = \"drawElementsInstanced\";\n } else {\n extension = extensions.get(\"ANGLE_instanced_arrays\");\n methodName = \"drawElementsInstancedANGLE\";\n if (extension === null) {\n console.error(\"THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");\n return;\n }\n }\n extension[methodName](mode, count, type, start * bytesPerElement, primcount);\n info.update(count, mode, primcount);\n }\n //\n this.setMode = setMode;\n this.setIndex = setIndex;\n this.render = render;\n this.renderInstances = renderInstances;\n}\nfunction $d5b33d7c30034067$var$WebGLInfo(gl) {\n const memory = {\n geometries: 0,\n textures: 0\n };\n const render = {\n frame: 0,\n calls: 0,\n triangles: 0,\n points: 0,\n lines: 0\n };\n function update(count, mode, instanceCount) {\n render.calls++;\n switch(mode){\n case gl.TRIANGLES:\n render.triangles += instanceCount * (count / 3);\n break;\n case gl.LINES:\n render.lines += instanceCount * (count / 2);\n break;\n case gl.LINE_STRIP:\n render.lines += instanceCount * (count - 1);\n break;\n case gl.LINE_LOOP:\n render.lines += instanceCount * count;\n break;\n case gl.POINTS:\n render.points += instanceCount * count;\n break;\n default:\n console.error(\"THREE.WebGLInfo: Unknown draw mode:\", mode);\n break;\n }\n }\n function reset() {\n render.calls = 0;\n render.triangles = 0;\n render.points = 0;\n render.lines = 0;\n }\n return {\n memory: memory,\n render: render,\n programs: null,\n autoReset: true,\n reset: reset,\n update: update\n };\n}\nfunction $d5b33d7c30034067$var$numericalSort(a, b) {\n return a[0] - b[0];\n}\nfunction $d5b33d7c30034067$var$absNumericalSort(a, b) {\n return Math.abs(b[1]) - Math.abs(a[1]);\n}\nfunction $d5b33d7c30034067$var$WebGLMorphtargets(gl, capabilities, textures) {\n const influencesList = {};\n const morphInfluences = new Float32Array(8);\n const morphTextures = new WeakMap();\n const morph = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const workInfluences = [];\n for(let i = 0; i < 8; i++)workInfluences[i] = [\n i,\n 0\n ];\n function update(object, geometry, program) {\n const objectInfluences = object.morphTargetInfluences;\n if (capabilities.isWebGL2 === true) {\n // instead of using attributes, the WebGL 2 code path encodes morph targets\n // into an array of data textures. Each layer represents a single morph target.\n const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n const morphTargetsCount = morphAttribute !== undefined ? morphAttribute.length : 0;\n let entry = morphTextures.get(geometry);\n if (entry === undefined || entry.count !== morphTargetsCount) {\n if (entry !== undefined) entry.texture.dispose();\n const hasMorphPosition = geometry.morphAttributes.position !== undefined;\n const hasMorphNormals = geometry.morphAttributes.normal !== undefined;\n const hasMorphColors = geometry.morphAttributes.color !== undefined;\n const morphTargets = geometry.morphAttributes.position || [];\n const morphNormals = geometry.morphAttributes.normal || [];\n const morphColors = geometry.morphAttributes.color || [];\n let vertexDataCount = 0;\n if (hasMorphPosition === true) vertexDataCount = 1;\n if (hasMorphNormals === true) vertexDataCount = 2;\n if (hasMorphColors === true) vertexDataCount = 3;\n let width = geometry.attributes.position.count * vertexDataCount;\n let height = 1;\n if (width > capabilities.maxTextureSize) {\n height = Math.ceil(width / capabilities.maxTextureSize);\n width = capabilities.maxTextureSize;\n }\n const buffer = new Float32Array(width * height * 4 * morphTargetsCount);\n const texture = new $d5b33d7c30034067$export$dfac6c8e811406a3(buffer, width, height, morphTargetsCount);\n texture.type = $d5b33d7c30034067$export$f6d331659b644596;\n texture.needsUpdate = true;\n // fill buffer\n const vertexDataStride = vertexDataCount * 4;\n for(let i = 0; i < morphTargetsCount; i++){\n const morphTarget = morphTargets[i];\n const morphNormal = morphNormals[i];\n const morphColor = morphColors[i];\n const offset = width * height * 4 * i;\n for(let j = 0; j < morphTarget.count; j++){\n const stride = j * vertexDataStride;\n if (hasMorphPosition === true) {\n morph.fromBufferAttribute(morphTarget, j);\n buffer[offset + stride + 0] = morph.x;\n buffer[offset + stride + 1] = morph.y;\n buffer[offset + stride + 2] = morph.z;\n buffer[offset + stride + 3] = 0;\n }\n if (hasMorphNormals === true) {\n morph.fromBufferAttribute(morphNormal, j);\n buffer[offset + stride + 4] = morph.x;\n buffer[offset + stride + 5] = morph.y;\n buffer[offset + stride + 6] = morph.z;\n buffer[offset + stride + 7] = 0;\n }\n if (hasMorphColors === true) {\n morph.fromBufferAttribute(morphColor, j);\n buffer[offset + stride + 8] = morph.x;\n buffer[offset + stride + 9] = morph.y;\n buffer[offset + stride + 10] = morph.z;\n buffer[offset + stride + 11] = morphColor.itemSize === 4 ? morph.w : 1;\n }\n }\n }\n entry = {\n count: morphTargetsCount,\n texture: texture,\n size: new $d5b33d7c30034067$export$c977b3e384af9ae1(width, height)\n };\n morphTextures.set(geometry, entry);\n function disposeTexture() {\n texture.dispose();\n morphTextures.delete(geometry);\n geometry.removeEventListener(\"dispose\", disposeTexture);\n }\n geometry.addEventListener(\"dispose\", disposeTexture);\n }\n //\n let morphInfluencesSum = 0;\n for(let i = 0; i < objectInfluences.length; i++)morphInfluencesSum += objectInfluences[i];\n const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n program.getUniforms().setValue(gl, \"morphTargetBaseInfluence\", morphBaseInfluence);\n program.getUniforms().setValue(gl, \"morphTargetInfluences\", objectInfluences);\n program.getUniforms().setValue(gl, \"morphTargetsTexture\", entry.texture, textures);\n program.getUniforms().setValue(gl, \"morphTargetsTextureSize\", entry.size);\n } else {\n // When object doesn't have morph target influences defined, we treat it as a 0-length array\n // This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n const length = objectInfluences === undefined ? 0 : objectInfluences.length;\n let influences = influencesList[geometry.id];\n if (influences === undefined || influences.length !== length) {\n // initialise list\n influences = [];\n for(let i = 0; i < length; i++)influences[i] = [\n i,\n 0\n ];\n influencesList[geometry.id] = influences;\n }\n // Collect influences\n for(let i = 0; i < length; i++){\n const influence = influences[i];\n influence[0] = i;\n influence[1] = objectInfluences[i];\n }\n influences.sort($d5b33d7c30034067$var$absNumericalSort);\n for(let i = 0; i < 8; i++)if (i < length && influences[i][1]) {\n workInfluences[i][0] = influences[i][0];\n workInfluences[i][1] = influences[i][1];\n } else {\n workInfluences[i][0] = Number.MAX_SAFE_INTEGER;\n workInfluences[i][1] = 0;\n }\n workInfluences.sort($d5b33d7c30034067$var$numericalSort);\n const morphTargets = geometry.morphAttributes.position;\n const morphNormals = geometry.morphAttributes.normal;\n let morphInfluencesSum = 0;\n for(let i = 0; i < 8; i++){\n const influence = workInfluences[i];\n const index = influence[0];\n const value = influence[1];\n if (index !== Number.MAX_SAFE_INTEGER && value) {\n if (morphTargets && geometry.getAttribute(\"morphTarget\" + i) !== morphTargets[index]) geometry.setAttribute(\"morphTarget\" + i, morphTargets[index]);\n if (morphNormals && geometry.getAttribute(\"morphNormal\" + i) !== morphNormals[index]) geometry.setAttribute(\"morphNormal\" + i, morphNormals[index]);\n morphInfluences[i] = value;\n morphInfluencesSum += value;\n } else {\n if (morphTargets && geometry.hasAttribute(\"morphTarget\" + i) === true) geometry.deleteAttribute(\"morphTarget\" + i);\n if (morphNormals && geometry.hasAttribute(\"morphNormal\" + i) === true) geometry.deleteAttribute(\"morphNormal\" + i);\n morphInfluences[i] = 0;\n }\n }\n // GLSL shader uses formula baseinfluence * base + sum(target * influence)\n // This allows us to switch between absolute morphs and relative morphs without changing shader code\n // When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n program.getUniforms().setValue(gl, \"morphTargetBaseInfluence\", morphBaseInfluence);\n program.getUniforms().setValue(gl, \"morphTargetInfluences\", morphInfluences);\n }\n }\n return {\n update: update\n };\n}\nfunction $d5b33d7c30034067$var$WebGLObjects(gl, geometries, attributes, info) {\n let updateMap = new WeakMap();\n function update(object) {\n const frame = info.render.frame;\n const geometry = object.geometry;\n const buffergeometry = geometries.get(object, geometry);\n // Update once per frame\n if (updateMap.get(buffergeometry) !== frame) {\n geometries.update(buffergeometry);\n updateMap.set(buffergeometry, frame);\n }\n if (object.isInstancedMesh) {\n if (object.hasEventListener(\"dispose\", onInstancedMeshDispose) === false) object.addEventListener(\"dispose\", onInstancedMeshDispose);\n if (updateMap.get(object) !== frame) {\n attributes.update(object.instanceMatrix, gl.ARRAY_BUFFER);\n if (object.instanceColor !== null) attributes.update(object.instanceColor, gl.ARRAY_BUFFER);\n updateMap.set(object, frame);\n }\n }\n if (object.isSkinnedMesh) {\n const skeleton = object.skeleton;\n if (updateMap.get(skeleton) !== frame) {\n skeleton.update();\n updateMap.set(skeleton, frame);\n }\n }\n return buffergeometry;\n }\n function dispose() {\n updateMap = new WeakMap();\n }\n function onInstancedMeshDispose(event) {\n const instancedMesh = event.target;\n instancedMesh.removeEventListener(\"dispose\", onInstancedMeshDispose);\n attributes.remove(instancedMesh.instanceMatrix);\n if (instancedMesh.instanceColor !== null) attributes.remove(instancedMesh.instanceColor);\n }\n return {\n update: update,\n dispose: dispose\n };\n}\n/**\n * Uniforms of a program.\n * Those form a tree structure with a special top-level container for the root,\n * which you get by calling 'new WebGLUniforms( gl, program )'.\n *\n *\n * Properties of inner nodes including the top-level container:\n *\n * .seq - array of nested uniforms\n * .map - nested uniforms by name\n *\n *\n * Methods of all nodes except the top-level container:\n *\n * .setValue( gl, value, [textures] )\n *\n * \t\tuploads a uniform value(s)\n * \tthe 'textures' parameter is needed for sampler uniforms\n *\n *\n * Static methods of the top-level container (textures factorizations):\n *\n * .upload( gl, seq, values, textures )\n *\n * \t\tsets uniforms in 'seq' to 'values[id].value'\n *\n * .seqWithValue( seq, values ) : filteredSeq\n *\n * \t\tfilters 'seq' entries with corresponding entry in values\n *\n *\n * Methods of the top-level container (textures factorizations):\n *\n * .setValue( gl, name, value, textures )\n *\n * \t\tsets uniform with name 'name' to 'value'\n *\n * .setOptional( gl, obj, prop )\n *\n * \t\tlike .set for an optional property of the object\n *\n */ const $d5b33d7c30034067$var$emptyTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$5431306cf43de24a();\nconst $d5b33d7c30034067$var$emptyArrayTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$dfac6c8e811406a3();\nconst $d5b33d7c30034067$var$empty3dTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$d7a3086320f856db();\nconst $d5b33d7c30034067$var$emptyCubeTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$ee2e5a18258a4049();\n// --- Utilities ---\n// Array Caches (provide typed arrays for temporary by size)\nconst $d5b33d7c30034067$var$arrayCacheF32 = [];\nconst $d5b33d7c30034067$var$arrayCacheI32 = [];\n// Float32Array caches used for uploading Matrix uniforms\nconst $d5b33d7c30034067$var$mat4array = new Float32Array(16);\nconst $d5b33d7c30034067$var$mat3array = new Float32Array(9);\nconst $d5b33d7c30034067$var$mat2array = new Float32Array(4);\n// Flattening for arrays of vectors and matrices\nfunction $d5b33d7c30034067$var$flatten(array, nBlocks, blockSize) {\n const firstElem = array[0];\n if (firstElem <= 0 || firstElem > 0) return array;\n // unoptimized: ! isNaN( firstElem )\n // see http://jacksondunstan.com/articles/983\n const n = nBlocks * blockSize;\n let r = $d5b33d7c30034067$var$arrayCacheF32[n];\n if (r === undefined) {\n r = new Float32Array(n);\n $d5b33d7c30034067$var$arrayCacheF32[n] = r;\n }\n if (nBlocks !== 0) {\n firstElem.toArray(r, 0);\n for(let i = 1, offset = 0; i !== nBlocks; ++i){\n offset += blockSize;\n array[i].toArray(r, offset);\n }\n }\n return r;\n}\nfunction $d5b33d7c30034067$var$arraysEqual(a, b) {\n if (a.length !== b.length) return false;\n for(let i = 0, l = a.length; i < l; i++){\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\nfunction $d5b33d7c30034067$var$copyArray(a, b) {\n for(let i = 0, l = b.length; i < l; i++)a[i] = b[i];\n}\n// Texture unit allocation\nfunction $d5b33d7c30034067$var$allocTexUnits(textures, n) {\n let r = $d5b33d7c30034067$var$arrayCacheI32[n];\n if (r === undefined) {\n r = new Int32Array(n);\n $d5b33d7c30034067$var$arrayCacheI32[n] = r;\n }\n for(let i = 0; i !== n; ++i)r[i] = textures.allocateTextureUnit();\n return r;\n}\n// --- Setters ---\n// Note: Defining these methods externally, because they come in a bunch\n// and this way their names minify.\n// Single scalar\nfunction $d5b33d7c30034067$var$setValueV1f(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1f(this.addr, v);\n cache[0] = v;\n}\n// Single float vector (from flat array or THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2f(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y) {\n gl.uniform2f(this.addr, v.x, v.y);\n cache[0] = v.x;\n cache[1] = v.y;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform2fv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV3f(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n gl.uniform3f(this.addr, v.x, v.y, v.z);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n }\n } else if (v.r !== undefined) {\n if (cache[0] !== v.r || cache[1] !== v.g || cache[2] !== v.b) {\n gl.uniform3f(this.addr, v.r, v.g, v.b);\n cache[0] = v.r;\n cache[1] = v.g;\n cache[2] = v.b;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform3fv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV4f(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n gl.uniform4f(this.addr, v.x, v.y, v.z, v.w);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n cache[3] = v.w;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform4fv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\n// Single matrix (from flat array or THREE.MatrixN)\nfunction $d5b33d7c30034067$var$setValueM2(gl, v) {\n const cache = this.cache;\n const elements = v.elements;\n if (elements === undefined) {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniformMatrix2fv(this.addr, false, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, elements)) return;\n $d5b33d7c30034067$var$mat2array.set(elements);\n gl.uniformMatrix2fv(this.addr, false, $d5b33d7c30034067$var$mat2array);\n $d5b33d7c30034067$var$copyArray(cache, elements);\n }\n}\nfunction $d5b33d7c30034067$var$setValueM3(gl, v) {\n const cache = this.cache;\n const elements = v.elements;\n if (elements === undefined) {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniformMatrix3fv(this.addr, false, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, elements)) return;\n $d5b33d7c30034067$var$mat3array.set(elements);\n gl.uniformMatrix3fv(this.addr, false, $d5b33d7c30034067$var$mat3array);\n $d5b33d7c30034067$var$copyArray(cache, elements);\n }\n}\nfunction $d5b33d7c30034067$var$setValueM4(gl, v) {\n const cache = this.cache;\n const elements = v.elements;\n if (elements === undefined) {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniformMatrix4fv(this.addr, false, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, elements)) return;\n $d5b33d7c30034067$var$mat4array.set(elements);\n gl.uniformMatrix4fv(this.addr, false, $d5b33d7c30034067$var$mat4array);\n $d5b33d7c30034067$var$copyArray(cache, elements);\n }\n}\n// Single integer / boolean\nfunction $d5b33d7c30034067$var$setValueV1i(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1i(this.addr, v);\n cache[0] = v;\n}\n// Single integer / boolean vector (from flat array or THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2i(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y) {\n gl.uniform2i(this.addr, v.x, v.y);\n cache[0] = v.x;\n cache[1] = v.y;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform2iv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV3i(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n gl.uniform3i(this.addr, v.x, v.y, v.z);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform3iv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV4i(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n gl.uniform4i(this.addr, v.x, v.y, v.z, v.w);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n cache[3] = v.w;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform4iv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\n// Single unsigned integer\nfunction $d5b33d7c30034067$var$setValueV1ui(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1ui(this.addr, v);\n cache[0] = v;\n}\n// Single unsigned integer vector (from flat array or THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2ui(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y) {\n gl.uniform2ui(this.addr, v.x, v.y);\n cache[0] = v.x;\n cache[1] = v.y;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform2uiv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV3ui(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n gl.uniform3ui(this.addr, v.x, v.y, v.z);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform3uiv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV4ui(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n gl.uniform4ui(this.addr, v.x, v.y, v.z, v.w);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n cache[3] = v.w;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform4uiv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\n// Single texture (2D / Cube)\nfunction $d5b33d7c30034067$var$setValueT1(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTexture2D(v || $d5b33d7c30034067$var$emptyTexture, unit);\n}\nfunction $d5b33d7c30034067$var$setValueT3D1(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTexture3D(v || $d5b33d7c30034067$var$empty3dTexture, unit);\n}\nfunction $d5b33d7c30034067$var$setValueT6(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTextureCube(v || $d5b33d7c30034067$var$emptyCubeTexture, unit);\n}\nfunction $d5b33d7c30034067$var$setValueT2DArray1(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTexture2DArray(v || $d5b33d7c30034067$var$emptyArrayTexture, unit);\n}\n// Helper to pick the right setter for the singular case\nfunction $d5b33d7c30034067$var$getSingularSetter(type) {\n switch(type){\n case 0x1406:\n return $d5b33d7c30034067$var$setValueV1f; // FLOAT\n case 0x8b50:\n return $d5b33d7c30034067$var$setValueV2f; // _VEC2\n case 0x8b51:\n return $d5b33d7c30034067$var$setValueV3f; // _VEC3\n case 0x8b52:\n return $d5b33d7c30034067$var$setValueV4f; // _VEC4\n case 0x8b5a:\n return $d5b33d7c30034067$var$setValueM2; // _MAT2\n case 0x8b5b:\n return $d5b33d7c30034067$var$setValueM3; // _MAT3\n case 0x8b5c:\n return $d5b33d7c30034067$var$setValueM4; // _MAT4\n case 0x1404:\n case 0x8b56:\n return $d5b33d7c30034067$var$setValueV1i; // INT, BOOL\n case 0x8b53:\n case 0x8b57:\n return $d5b33d7c30034067$var$setValueV2i; // _VEC2\n case 0x8b54:\n case 0x8b58:\n return $d5b33d7c30034067$var$setValueV3i; // _VEC3\n case 0x8b55:\n case 0x8b59:\n return $d5b33d7c30034067$var$setValueV4i; // _VEC4\n case 0x1405:\n return $d5b33d7c30034067$var$setValueV1ui; // UINT\n case 0x8dc6:\n return $d5b33d7c30034067$var$setValueV2ui; // _VEC2\n case 0x8dc7:\n return $d5b33d7c30034067$var$setValueV3ui; // _VEC3\n case 0x8dc8:\n return $d5b33d7c30034067$var$setValueV4ui; // _VEC4\n case 0x8b5e:\n case 0x8d66:\n case 0x8dca:\n case 0x8dd2:\n case 0x8b62:\n return $d5b33d7c30034067$var$setValueT1;\n case 0x8b5f:\n case 0x8dcb:\n case 0x8dd3:\n return $d5b33d7c30034067$var$setValueT3D1;\n case 0x8b60:\n case 0x8dcc:\n case 0x8dd4:\n case 0x8dc5:\n return $d5b33d7c30034067$var$setValueT6;\n case 0x8dc1:\n case 0x8dcf:\n case 0x8dd7:\n case 0x8dc4:\n return $d5b33d7c30034067$var$setValueT2DArray1;\n }\n}\n// Array of scalars\nfunction $d5b33d7c30034067$var$setValueV1fArray(gl, v) {\n gl.uniform1fv(this.addr, v);\n}\n// Array of vectors (from flat array or array of THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2fArray(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 2);\n gl.uniform2fv(this.addr, data);\n}\nfunction $d5b33d7c30034067$var$setValueV3fArray(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 3);\n gl.uniform3fv(this.addr, data);\n}\nfunction $d5b33d7c30034067$var$setValueV4fArray(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 4);\n gl.uniform4fv(this.addr, data);\n}\n// Array of matrices (from flat array or array of THREE.MatrixN)\nfunction $d5b33d7c30034067$var$setValueM2Array(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 4);\n gl.uniformMatrix2fv(this.addr, false, data);\n}\nfunction $d5b33d7c30034067$var$setValueM3Array(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 9);\n gl.uniformMatrix3fv(this.addr, false, data);\n}\nfunction $d5b33d7c30034067$var$setValueM4Array(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 16);\n gl.uniformMatrix4fv(this.addr, false, data);\n}\n// Array of integer / boolean\nfunction $d5b33d7c30034067$var$setValueV1iArray(gl, v) {\n gl.uniform1iv(this.addr, v);\n}\n// Array of integer / boolean vectors (from flat array)\nfunction $d5b33d7c30034067$var$setValueV2iArray(gl, v) {\n gl.uniform2iv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV3iArray(gl, v) {\n gl.uniform3iv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV4iArray(gl, v) {\n gl.uniform4iv(this.addr, v);\n}\n// Array of unsigned integer\nfunction $d5b33d7c30034067$var$setValueV1uiArray(gl, v) {\n gl.uniform1uiv(this.addr, v);\n}\n// Array of unsigned integer vectors (from flat array)\nfunction $d5b33d7c30034067$var$setValueV2uiArray(gl, v) {\n gl.uniform2uiv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV3uiArray(gl, v) {\n gl.uniform3uiv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV4uiArray(gl, v) {\n gl.uniform4uiv(this.addr, v);\n}\n// Array of textures (2D / 3D / Cube / 2DArray)\nfunction $d5b33d7c30034067$var$setValueT1Array(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTexture2D(v[i] || $d5b33d7c30034067$var$emptyTexture, units[i]);\n}\nfunction $d5b33d7c30034067$var$setValueT3DArray(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTexture3D(v[i] || $d5b33d7c30034067$var$empty3dTexture, units[i]);\n}\nfunction $d5b33d7c30034067$var$setValueT6Array(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTextureCube(v[i] || $d5b33d7c30034067$var$emptyCubeTexture, units[i]);\n}\nfunction $d5b33d7c30034067$var$setValueT2DArrayArray(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTexture2DArray(v[i] || $d5b33d7c30034067$var$emptyArrayTexture, units[i]);\n}\n// Helper to pick the right setter for a pure (bottom-level) array\nfunction $d5b33d7c30034067$var$getPureArraySetter(type) {\n switch(type){\n case 0x1406:\n return $d5b33d7c30034067$var$setValueV1fArray; // FLOAT\n case 0x8b50:\n return $d5b33d7c30034067$var$setValueV2fArray; // _VEC2\n case 0x8b51:\n return $d5b33d7c30034067$var$setValueV3fArray; // _VEC3\n case 0x8b52:\n return $d5b33d7c30034067$var$setValueV4fArray; // _VEC4\n case 0x8b5a:\n return $d5b33d7c30034067$var$setValueM2Array; // _MAT2\n case 0x8b5b:\n return $d5b33d7c30034067$var$setValueM3Array; // _MAT3\n case 0x8b5c:\n return $d5b33d7c30034067$var$setValueM4Array; // _MAT4\n case 0x1404:\n case 0x8b56:\n return $d5b33d7c30034067$var$setValueV1iArray; // INT, BOOL\n case 0x8b53:\n case 0x8b57:\n return $d5b33d7c30034067$var$setValueV2iArray; // _VEC2\n case 0x8b54:\n case 0x8b58:\n return $d5b33d7c30034067$var$setValueV3iArray; // _VEC3\n case 0x8b55:\n case 0x8b59:\n return $d5b33d7c30034067$var$setValueV4iArray; // _VEC4\n case 0x1405:\n return $d5b33d7c30034067$var$setValueV1uiArray; // UINT\n case 0x8dc6:\n return $d5b33d7c30034067$var$setValueV2uiArray; // _VEC2\n case 0x8dc7:\n return $d5b33d7c30034067$var$setValueV3uiArray; // _VEC3\n case 0x8dc8:\n return $d5b33d7c30034067$var$setValueV4uiArray; // _VEC4\n case 0x8b5e:\n case 0x8d66:\n case 0x8dca:\n case 0x8dd2:\n case 0x8b62:\n return $d5b33d7c30034067$var$setValueT1Array;\n case 0x8b5f:\n case 0x8dcb:\n case 0x8dd3:\n return $d5b33d7c30034067$var$setValueT3DArray;\n case 0x8b60:\n case 0x8dcc:\n case 0x8dd4:\n case 0x8dc5:\n return $d5b33d7c30034067$var$setValueT6Array;\n case 0x8dc1:\n case 0x8dcf:\n case 0x8dd7:\n case 0x8dc4:\n return $d5b33d7c30034067$var$setValueT2DArrayArray;\n }\n}\n// --- Uniform Classes ---\nclass $d5b33d7c30034067$var$SingleUniform {\n constructor(id, activeInfo, addr){\n this.id = id;\n this.addr = addr;\n this.cache = [];\n this.setValue = $d5b33d7c30034067$var$getSingularSetter(activeInfo.type);\n // this.path = activeInfo.name; // DEBUG\n }\n}\nclass $d5b33d7c30034067$var$PureArrayUniform {\n constructor(id, activeInfo, addr){\n this.id = id;\n this.addr = addr;\n this.cache = [];\n this.size = activeInfo.size;\n this.setValue = $d5b33d7c30034067$var$getPureArraySetter(activeInfo.type);\n // this.path = activeInfo.name; // DEBUG\n }\n}\nclass $d5b33d7c30034067$var$StructuredUniform {\n constructor(id){\n this.id = id;\n this.seq = [];\n this.map = {};\n }\n setValue(gl, value, textures) {\n const seq = this.seq;\n for(let i = 0, n = seq.length; i !== n; ++i){\n const u = seq[i];\n u.setValue(gl, value[u.id], textures);\n }\n }\n}\n// --- Top-level ---\n// Parser - builds up the property tree from the path strings\nconst $d5b33d7c30034067$var$RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g;\n// extracts\n// \t- the identifier (member name or array index)\n// - followed by an optional right bracket (found when array index)\n// - followed by an optional left bracket or dot (type of subscript)\n//\n// Note: These portions can be read in a non-overlapping fashion and\n// allow straightforward parsing of the hierarchy that WebGL encodes\n// in the uniform names.\nfunction $d5b33d7c30034067$var$addUniform(container, uniformObject) {\n container.seq.push(uniformObject);\n container.map[uniformObject.id] = uniformObject;\n}\nfunction $d5b33d7c30034067$var$parseUniform(activeInfo, addr, container) {\n const path = activeInfo.name, pathLength = path.length;\n // reset RegExp object, because of the early exit of a previous run\n $d5b33d7c30034067$var$RePathPart.lastIndex = 0;\n while(true){\n const match = $d5b33d7c30034067$var$RePathPart.exec(path), matchEnd = $d5b33d7c30034067$var$RePathPart.lastIndex;\n let id = match[1];\n const idIsIndex = match[2] === \"]\", subscript = match[3];\n if (idIsIndex) id = id | 0; // convert to integer\n if (subscript === undefined || subscript === \"[\" && matchEnd + 2 === pathLength) {\n // bare name or \"pure\" bottom-level array \"[0]\" suffix\n $d5b33d7c30034067$var$addUniform(container, subscript === undefined ? new $d5b33d7c30034067$var$SingleUniform(id, activeInfo, addr) : new $d5b33d7c30034067$var$PureArrayUniform(id, activeInfo, addr));\n break;\n } else {\n // step into inner node / create it in case it doesn't exist\n const map = container.map;\n let next = map[id];\n if (next === undefined) {\n next = new $d5b33d7c30034067$var$StructuredUniform(id);\n $d5b33d7c30034067$var$addUniform(container, next);\n }\n container = next;\n }\n }\n}\n// Root Container\nclass $d5b33d7c30034067$var$WebGLUniforms {\n constructor(gl, program){\n this.seq = [];\n this.map = {};\n const n = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n for(let i = 0; i < n; ++i){\n const info = gl.getActiveUniform(program, i), addr = gl.getUniformLocation(program, info.name);\n $d5b33d7c30034067$var$parseUniform(info, addr, this);\n }\n }\n setValue(gl, name, value, textures) {\n const u = this.map[name];\n if (u !== undefined) u.setValue(gl, value, textures);\n }\n setOptional(gl, object, name) {\n const v = object[name];\n if (v !== undefined) this.setValue(gl, name, v);\n }\n static upload(gl, seq, values, textures) {\n for(let i = 0, n = seq.length; i !== n; ++i){\n const u = seq[i], v = values[u.id];\n if (v.needsUpdate !== false) // note: always updating when .needsUpdate is undefined\n u.setValue(gl, v.value, textures);\n }\n }\n static seqWithValue(seq, values) {\n const r = [];\n for(let i = 0, n = seq.length; i !== n; ++i){\n const u = seq[i];\n if (u.id in values) r.push(u);\n }\n return r;\n }\n}\nfunction $d5b33d7c30034067$var$WebGLShader(gl, type, string) {\n const shader = gl.createShader(type);\n gl.shaderSource(shader, string);\n gl.compileShader(shader);\n return shader;\n}\nlet $d5b33d7c30034067$var$programIdCount = 0;\nfunction $d5b33d7c30034067$var$handleSource(string, errorLine) {\n const lines = string.split(\"\\n\");\n const lines2 = [];\n const from = Math.max(errorLine - 6, 0);\n const to = Math.min(errorLine + 6, lines.length);\n for(let i = from; i < to; i++){\n const line = i + 1;\n lines2.push(`${line === errorLine ? \">\" : \" \"} ${line}: ${lines[i]}`);\n }\n return lines2.join(\"\\n\");\n}\nfunction $d5b33d7c30034067$var$getEncodingComponents(colorSpace1) {\n switch(colorSpace1){\n case $d5b33d7c30034067$export$42429b3acfb233a4:\n return [\n \"Linear\",\n \"( value )\"\n ];\n case $d5b33d7c30034067$export$561f394b24edfcaa:\n return [\n \"sRGB\",\n \"( value )\"\n ];\n default:\n console.warn(\"THREE.WebGLProgram: Unsupported color space:\", colorSpace1);\n return [\n \"Linear\",\n \"( value )\"\n ];\n }\n}\nfunction $d5b33d7c30034067$var$getShaderErrors(gl, shader, type) {\n const status = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n const errors = gl.getShaderInfoLog(shader).trim();\n if (status && errors === \"\") return \"\";\n const errorMatches = /ERROR: 0:(\\d+)/.exec(errors);\n if (errorMatches) {\n // --enable-privileged-webgl-extension\n // console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n const errorLine = parseInt(errorMatches[1]);\n return type.toUpperCase() + \"\\n\\n\" + errors + \"\\n\\n\" + $d5b33d7c30034067$var$handleSource(gl.getShaderSource(shader), errorLine);\n } else return errors;\n}\nfunction $d5b33d7c30034067$var$getTexelEncodingFunction(functionName, colorSpace1) {\n const components = $d5b33d7c30034067$var$getEncodingComponents(colorSpace1);\n return \"vec4 \" + functionName + \"( vec4 value ) { return LinearTo\" + components[0] + components[1] + \"; }\";\n}\nfunction $d5b33d7c30034067$var$getToneMappingFunction(functionName, toneMapping) {\n let toneMappingName;\n switch(toneMapping){\n case $d5b33d7c30034067$export$98f52c2a46c598ca:\n toneMappingName = \"Linear\";\n break;\n case $d5b33d7c30034067$export$74b25e54b3bcd548:\n toneMappingName = \"Reinhard\";\n break;\n case $d5b33d7c30034067$export$932b3dd283d4a366:\n toneMappingName = \"OptimizedCineon\";\n break;\n case $d5b33d7c30034067$export$a0d98fe6d7e4af64:\n toneMappingName = \"ACESFilmic\";\n break;\n case $d5b33d7c30034067$export$2c7b09c1e9abfb5e:\n toneMappingName = \"Custom\";\n break;\n default:\n console.warn(\"THREE.WebGLProgram: Unsupported toneMapping:\", toneMapping);\n toneMappingName = \"Linear\";\n }\n return \"vec3 \" + functionName + \"( vec3 color ) { return \" + toneMappingName + \"ToneMapping( color ); }\";\n}\nfunction $d5b33d7c30034067$var$generateExtensions(parameters) {\n const chunks = [\n parameters.extensionDerivatives || !!parameters.envMapCubeUVHeight || parameters.bumpMap || parameters.normalMapTangentSpace || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === \"physical\" ? \"#extension GL_OES_standard_derivatives : enable\" : \"\",\n (parameters.extensionFragDepth || parameters.logarithmicDepthBuffer) && parameters.rendererExtensionFragDepth ? \"#extension GL_EXT_frag_depth : enable\" : \"\",\n parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ? \"#extension GL_EXT_draw_buffers : require\" : \"\",\n (parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission) && parameters.rendererExtensionShaderTextureLod ? \"#extension GL_EXT_shader_texture_lod : enable\" : \"\"\n ];\n return chunks.filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n}\nfunction $d5b33d7c30034067$var$generateDefines(defines) {\n const chunks = [];\n for(const name in defines){\n const value = defines[name];\n if (value === false) continue;\n chunks.push(\"#define \" + name + \" \" + value);\n }\n return chunks.join(\"\\n\");\n}\nfunction $d5b33d7c30034067$var$fetchAttributeLocations(gl, program) {\n const attributes = {};\n const n = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n for(let i = 0; i < n; i++){\n const info = gl.getActiveAttrib(program, i);\n const name = info.name;\n let locationSize = 1;\n if (info.type === gl.FLOAT_MAT2) locationSize = 2;\n if (info.type === gl.FLOAT_MAT3) locationSize = 3;\n if (info.type === gl.FLOAT_MAT4) locationSize = 4;\n // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n attributes[name] = {\n type: info.type,\n location: gl.getAttribLocation(program, name),\n locationSize: locationSize\n };\n }\n return attributes;\n}\nfunction $d5b33d7c30034067$var$filterEmptyLine(string) {\n return string !== \"\";\n}\nfunction $d5b33d7c30034067$var$replaceLightNums(string, parameters) {\n const numSpotLightCoords = parameters.numSpotLightShadows + parameters.numSpotLightMaps - parameters.numSpotLightShadowsWithMaps;\n return string.replace(/NUM_DIR_LIGHTS/g, parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g, parameters.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g, parameters.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g, numSpotLightCoords).replace(/NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g, parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, parameters.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows);\n}\nfunction $d5b33d7c30034067$var$replaceClippingPlaneNums(string, parameters) {\n return string.replace(/NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, parameters.numClippingPlanes - parameters.numClipIntersection);\n}\n// Resolve Includes\nconst $d5b33d7c30034067$var$includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\nfunction $d5b33d7c30034067$var$resolveIncludes(string) {\n return string.replace($d5b33d7c30034067$var$includePattern, $d5b33d7c30034067$var$includeReplacer);\n}\nconst $d5b33d7c30034067$var$shaderChunkMap = new Map([\n [\n \"encodings_fragment\",\n \"colorspace_fragment\"\n ],\n [\n \"encodings_pars_fragment\",\n \"colorspace_pars_fragment\"\n ],\n [\n \"output_fragment\",\n \"opaque_fragment\"\n ]\n]);\nfunction $d5b33d7c30034067$var$includeReplacer(match, include) {\n let string = $d5b33d7c30034067$export$955f9f2e84c43c8b[include];\n if (string === undefined) {\n const newInclude = $d5b33d7c30034067$var$shaderChunkMap.get(include);\n if (newInclude !== undefined) {\n string = $d5b33d7c30034067$export$955f9f2e84c43c8b[newInclude];\n console.warn('THREE.WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.', include, newInclude);\n } else throw new Error(\"Can not resolve #include <\" + include + \">\");\n }\n return $d5b33d7c30034067$var$resolveIncludes(string);\n}\n// Unroll Loops\nconst $d5b33d7c30034067$var$unrollLoopPattern = /#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*<\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;\nfunction $d5b33d7c30034067$var$unrollLoops(string) {\n return string.replace($d5b33d7c30034067$var$unrollLoopPattern, $d5b33d7c30034067$var$loopReplacer);\n}\nfunction $d5b33d7c30034067$var$loopReplacer(match, start, end, snippet) {\n let string = \"\";\n for(let i = parseInt(start); i < parseInt(end); i++)string += snippet.replace(/\\[\\s*i\\s*\\]/g, \"[ \" + i + \" ]\").replace(/UNROLLED_LOOP_INDEX/g, i);\n return string;\n}\n//\nfunction $d5b33d7c30034067$var$generatePrecision(parameters) {\n let precisionstring = \"precision \" + parameters.precision + \" float;\\nprecision \" + parameters.precision + \" int;\";\n if (parameters.precision === \"highp\") precisionstring += \"\\n#define HIGH_PRECISION\";\n else if (parameters.precision === \"mediump\") precisionstring += \"\\n#define MEDIUM_PRECISION\";\n else if (parameters.precision === \"lowp\") precisionstring += \"\\n#define LOW_PRECISION\";\n return precisionstring;\n}\nfunction $d5b33d7c30034067$var$generateShadowMapTypeDefine(parameters) {\n let shadowMapTypeDefine = \"SHADOWMAP_TYPE_BASIC\";\n if (parameters.shadowMapType === $d5b33d7c30034067$export$5813f879eee7cd88) shadowMapTypeDefine = \"SHADOWMAP_TYPE_PCF\";\n else if (parameters.shadowMapType === $d5b33d7c30034067$export$a47c4b43a1be34f0) shadowMapTypeDefine = \"SHADOWMAP_TYPE_PCF_SOFT\";\n else if (parameters.shadowMapType === $d5b33d7c30034067$export$896ae1ade6c829c4) shadowMapTypeDefine = \"SHADOWMAP_TYPE_VSM\";\n return shadowMapTypeDefine;\n}\nfunction $d5b33d7c30034067$var$generateEnvMapTypeDefine(parameters) {\n let envMapTypeDefine = \"ENVMAP_TYPE_CUBE\";\n if (parameters.envMap) switch(parameters.envMapMode){\n case $d5b33d7c30034067$export$8759762a6477f2c4:\n case $d5b33d7c30034067$export$dc59f8aed047f61d:\n envMapTypeDefine = \"ENVMAP_TYPE_CUBE\";\n break;\n case $d5b33d7c30034067$export$dbf3e70ff37af79:\n envMapTypeDefine = \"ENVMAP_TYPE_CUBE_UV\";\n break;\n }\n return envMapTypeDefine;\n}\nfunction $d5b33d7c30034067$var$generateEnvMapModeDefine(parameters) {\n let envMapModeDefine = \"ENVMAP_MODE_REFLECTION\";\n if (parameters.envMap) switch(parameters.envMapMode){\n case $d5b33d7c30034067$export$dc59f8aed047f61d:\n envMapModeDefine = \"ENVMAP_MODE_REFRACTION\";\n break;\n }\n return envMapModeDefine;\n}\nfunction $d5b33d7c30034067$var$generateEnvMapBlendingDefine(parameters) {\n let envMapBlendingDefine = \"ENVMAP_BLENDING_NONE\";\n if (parameters.envMap) switch(parameters.combine){\n case $d5b33d7c30034067$export$e50ac29801f1774d:\n envMapBlendingDefine = \"ENVMAP_BLENDING_MULTIPLY\";\n break;\n case $d5b33d7c30034067$export$9f9d94f963c85479:\n envMapBlendingDefine = \"ENVMAP_BLENDING_MIX\";\n break;\n case $d5b33d7c30034067$export$e641dc52bc3494aa:\n envMapBlendingDefine = \"ENVMAP_BLENDING_ADD\";\n break;\n }\n return envMapBlendingDefine;\n}\nfunction $d5b33d7c30034067$var$generateCubeUVSize(parameters) {\n const imageHeight = parameters.envMapCubeUVHeight;\n if (imageHeight === null) return null;\n const maxMip = Math.log2(imageHeight) - 2;\n const texelHeight = 1.0 / imageHeight;\n const texelWidth = 1.0 / (3 * Math.max(Math.pow(2, maxMip), 112));\n return {\n texelWidth: texelWidth,\n texelHeight: texelHeight,\n maxMip: maxMip\n };\n}\nfunction $d5b33d7c30034067$var$WebGLProgram(renderer, cacheKey, parameters, bindingStates) {\n // TODO Send this event to Three.js DevTools\n // console.log( 'WebGLProgram', cacheKey );\n const gl = renderer.getContext();\n const defines = parameters.defines;\n let vertexShader = parameters.vertexShader;\n let fragmentShader = parameters.fragmentShader;\n const shadowMapTypeDefine = $d5b33d7c30034067$var$generateShadowMapTypeDefine(parameters);\n const envMapTypeDefine = $d5b33d7c30034067$var$generateEnvMapTypeDefine(parameters);\n const envMapModeDefine = $d5b33d7c30034067$var$generateEnvMapModeDefine(parameters);\n const envMapBlendingDefine = $d5b33d7c30034067$var$generateEnvMapBlendingDefine(parameters);\n const envMapCubeUVSize = $d5b33d7c30034067$var$generateCubeUVSize(parameters);\n const customExtensions = parameters.isWebGL2 ? \"\" : $d5b33d7c30034067$var$generateExtensions(parameters);\n const customDefines = $d5b33d7c30034067$var$generateDefines(defines);\n const program = gl.createProgram();\n let prefixVertex, prefixFragment;\n let versionString = parameters.glslVersion ? \"#version \" + parameters.glslVersion + \"\\n\" : \"\";\n if (parameters.isRawShaderMaterial) {\n prefixVertex = [\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n if (prefixVertex.length > 0) prefixVertex += \"\\n\";\n prefixFragment = [\n customExtensions,\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n if (prefixFragment.length > 0) prefixFragment += \"\\n\";\n } else {\n prefixVertex = [\n $d5b33d7c30034067$var$generatePrecision(parameters),\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines,\n parameters.instancing ? \"#define USE_INSTANCING\" : \"\",\n parameters.instancingColor ? \"#define USE_INSTANCING_COLOR\" : \"\",\n parameters.useFog && parameters.fog ? \"#define USE_FOG\" : \"\",\n parameters.useFog && parameters.fogExp2 ? \"#define FOG_EXP2\" : \"\",\n parameters.map ? \"#define USE_MAP\" : \"\",\n parameters.envMap ? \"#define USE_ENVMAP\" : \"\",\n parameters.envMap ? \"#define \" + envMapModeDefine : \"\",\n parameters.lightMap ? \"#define USE_LIGHTMAP\" : \"\",\n parameters.aoMap ? \"#define USE_AOMAP\" : \"\",\n parameters.bumpMap ? \"#define USE_BUMPMAP\" : \"\",\n parameters.normalMap ? \"#define USE_NORMALMAP\" : \"\",\n parameters.normalMapObjectSpace ? \"#define USE_NORMALMAP_OBJECTSPACE\" : \"\",\n parameters.normalMapTangentSpace ? \"#define USE_NORMALMAP_TANGENTSPACE\" : \"\",\n parameters.displacementMap ? \"#define USE_DISPLACEMENTMAP\" : \"\",\n parameters.emissiveMap ? \"#define USE_EMISSIVEMAP\" : \"\",\n parameters.anisotropyMap ? \"#define USE_ANISOTROPYMAP\" : \"\",\n parameters.clearcoatMap ? \"#define USE_CLEARCOATMAP\" : \"\",\n parameters.clearcoatRoughnessMap ? \"#define USE_CLEARCOAT_ROUGHNESSMAP\" : \"\",\n parameters.clearcoatNormalMap ? \"#define USE_CLEARCOAT_NORMALMAP\" : \"\",\n parameters.iridescenceMap ? \"#define USE_IRIDESCENCEMAP\" : \"\",\n parameters.iridescenceThicknessMap ? \"#define USE_IRIDESCENCE_THICKNESSMAP\" : \"\",\n parameters.specularMap ? \"#define USE_SPECULARMAP\" : \"\",\n parameters.specularColorMap ? \"#define USE_SPECULAR_COLORMAP\" : \"\",\n parameters.specularIntensityMap ? \"#define USE_SPECULAR_INTENSITYMAP\" : \"\",\n parameters.roughnessMap ? \"#define USE_ROUGHNESSMAP\" : \"\",\n parameters.metalnessMap ? \"#define USE_METALNESSMAP\" : \"\",\n parameters.alphaMap ? \"#define USE_ALPHAMAP\" : \"\",\n parameters.alphaHash ? \"#define USE_ALPHAHASH\" : \"\",\n parameters.transmission ? \"#define USE_TRANSMISSION\" : \"\",\n parameters.transmissionMap ? \"#define USE_TRANSMISSIONMAP\" : \"\",\n parameters.thicknessMap ? \"#define USE_THICKNESSMAP\" : \"\",\n parameters.sheenColorMap ? \"#define USE_SHEEN_COLORMAP\" : \"\",\n parameters.sheenRoughnessMap ? \"#define USE_SHEEN_ROUGHNESSMAP\" : \"\",\n //\n parameters.mapUv ? \"#define MAP_UV \" + parameters.mapUv : \"\",\n parameters.alphaMapUv ? \"#define ALPHAMAP_UV \" + parameters.alphaMapUv : \"\",\n parameters.lightMapUv ? \"#define LIGHTMAP_UV \" + parameters.lightMapUv : \"\",\n parameters.aoMapUv ? \"#define AOMAP_UV \" + parameters.aoMapUv : \"\",\n parameters.emissiveMapUv ? \"#define EMISSIVEMAP_UV \" + parameters.emissiveMapUv : \"\",\n parameters.bumpMapUv ? \"#define BUMPMAP_UV \" + parameters.bumpMapUv : \"\",\n parameters.normalMapUv ? \"#define NORMALMAP_UV \" + parameters.normalMapUv : \"\",\n parameters.displacementMapUv ? \"#define DISPLACEMENTMAP_UV \" + parameters.displacementMapUv : \"\",\n parameters.metalnessMapUv ? \"#define METALNESSMAP_UV \" + parameters.metalnessMapUv : \"\",\n parameters.roughnessMapUv ? \"#define ROUGHNESSMAP_UV \" + parameters.roughnessMapUv : \"\",\n parameters.anisotropyMapUv ? \"#define ANISOTROPYMAP_UV \" + parameters.anisotropyMapUv : \"\",\n parameters.clearcoatMapUv ? \"#define CLEARCOATMAP_UV \" + parameters.clearcoatMapUv : \"\",\n parameters.clearcoatNormalMapUv ? \"#define CLEARCOAT_NORMALMAP_UV \" + parameters.clearcoatNormalMapUv : \"\",\n parameters.clearcoatRoughnessMapUv ? \"#define CLEARCOAT_ROUGHNESSMAP_UV \" + parameters.clearcoatRoughnessMapUv : \"\",\n parameters.iridescenceMapUv ? \"#define IRIDESCENCEMAP_UV \" + parameters.iridescenceMapUv : \"\",\n parameters.iridescenceThicknessMapUv ? \"#define IRIDESCENCE_THICKNESSMAP_UV \" + parameters.iridescenceThicknessMapUv : \"\",\n parameters.sheenColorMapUv ? \"#define SHEEN_COLORMAP_UV \" + parameters.sheenColorMapUv : \"\",\n parameters.sheenRoughnessMapUv ? \"#define SHEEN_ROUGHNESSMAP_UV \" + parameters.sheenRoughnessMapUv : \"\",\n parameters.specularMapUv ? \"#define SPECULARMAP_UV \" + parameters.specularMapUv : \"\",\n parameters.specularColorMapUv ? \"#define SPECULAR_COLORMAP_UV \" + parameters.specularColorMapUv : \"\",\n parameters.specularIntensityMapUv ? \"#define SPECULAR_INTENSITYMAP_UV \" + parameters.specularIntensityMapUv : \"\",\n parameters.transmissionMapUv ? \"#define TRANSMISSIONMAP_UV \" + parameters.transmissionMapUv : \"\",\n parameters.thicknessMapUv ? \"#define THICKNESSMAP_UV \" + parameters.thicknessMapUv : \"\",\n //\n parameters.vertexTangents && parameters.flatShading === false ? \"#define USE_TANGENT\" : \"\",\n parameters.vertexColors ? \"#define USE_COLOR\" : \"\",\n parameters.vertexAlphas ? \"#define USE_COLOR_ALPHA\" : \"\",\n parameters.vertexUv1s ? \"#define USE_UV1\" : \"\",\n parameters.vertexUv2s ? \"#define USE_UV2\" : \"\",\n parameters.vertexUv3s ? \"#define USE_UV3\" : \"\",\n parameters.pointsUvs ? \"#define USE_POINTS_UV\" : \"\",\n parameters.flatShading ? \"#define FLAT_SHADED\" : \"\",\n parameters.skinning ? \"#define USE_SKINNING\" : \"\",\n parameters.morphTargets ? \"#define USE_MORPHTARGETS\" : \"\",\n parameters.morphNormals && parameters.flatShading === false ? \"#define USE_MORPHNORMALS\" : \"\",\n parameters.morphColors && parameters.isWebGL2 ? \"#define USE_MORPHCOLORS\" : \"\",\n parameters.morphTargetsCount > 0 && parameters.isWebGL2 ? \"#define MORPHTARGETS_TEXTURE\" : \"\",\n parameters.morphTargetsCount > 0 && parameters.isWebGL2 ? \"#define MORPHTARGETS_TEXTURE_STRIDE \" + parameters.morphTextureStride : \"\",\n parameters.morphTargetsCount > 0 && parameters.isWebGL2 ? \"#define MORPHTARGETS_COUNT \" + parameters.morphTargetsCount : \"\",\n parameters.doubleSided ? \"#define DOUBLE_SIDED\" : \"\",\n parameters.flipSided ? \"#define FLIP_SIDED\" : \"\",\n parameters.shadowMapEnabled ? \"#define USE_SHADOWMAP\" : \"\",\n parameters.shadowMapEnabled ? \"#define \" + shadowMapTypeDefine : \"\",\n parameters.sizeAttenuation ? \"#define USE_SIZEATTENUATION\" : \"\",\n parameters.useLegacyLights ? \"#define LEGACY_LIGHTS\" : \"\",\n parameters.logarithmicDepthBuffer ? \"#define USE_LOGDEPTHBUF\" : \"\",\n parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? \"#define USE_LOGDEPTHBUF_EXT\" : \"\",\n \"uniform mat4 modelMatrix;\",\n \"uniform mat4 modelViewMatrix;\",\n \"uniform mat4 projectionMatrix;\",\n \"uniform mat4 viewMatrix;\",\n \"uniform mat3 normalMatrix;\",\n \"uniform vec3 cameraPosition;\",\n \"uniform bool isOrthographic;\",\n \"#ifdef USE_INSTANCING\",\n \"\tattribute mat4 instanceMatrix;\",\n \"#endif\",\n \"#ifdef USE_INSTANCING_COLOR\",\n \"\tattribute vec3 instanceColor;\",\n \"#endif\",\n \"attribute vec3 position;\",\n \"attribute vec3 normal;\",\n \"attribute vec2 uv;\",\n \"#ifdef USE_UV1\",\n \"\tattribute vec2 uv1;\",\n \"#endif\",\n \"#ifdef USE_UV2\",\n \"\tattribute vec2 uv2;\",\n \"#endif\",\n \"#ifdef USE_UV3\",\n \"\tattribute vec2 uv3;\",\n \"#endif\",\n \"#ifdef USE_TANGENT\",\n \"\tattribute vec4 tangent;\",\n \"#endif\",\n \"#if defined( USE_COLOR_ALPHA )\",\n \"\tattribute vec4 color;\",\n \"#elif defined( USE_COLOR )\",\n \"\tattribute vec3 color;\",\n \"#endif\",\n \"#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )\",\n \"\tattribute vec3 morphTarget0;\",\n \"\tattribute vec3 morphTarget1;\",\n \"\tattribute vec3 morphTarget2;\",\n \"\tattribute vec3 morphTarget3;\",\n \"\t#ifdef USE_MORPHNORMALS\",\n \"\t\tattribute vec3 morphNormal0;\",\n \"\t\tattribute vec3 morphNormal1;\",\n \"\t\tattribute vec3 morphNormal2;\",\n \"\t\tattribute vec3 morphNormal3;\",\n \"\t#else\",\n \"\t\tattribute vec3 morphTarget4;\",\n \"\t\tattribute vec3 morphTarget5;\",\n \"\t\tattribute vec3 morphTarget6;\",\n \"\t\tattribute vec3 morphTarget7;\",\n \"\t#endif\",\n \"#endif\",\n \"#ifdef USE_SKINNING\",\n \"\tattribute vec4 skinIndex;\",\n \"\tattribute vec4 skinWeight;\",\n \"#endif\",\n \"\\n\"\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n prefixFragment = [\n customExtensions,\n $d5b33d7c30034067$var$generatePrecision(parameters),\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines,\n parameters.useFog && parameters.fog ? \"#define USE_FOG\" : \"\",\n parameters.useFog && parameters.fogExp2 ? \"#define FOG_EXP2\" : \"\",\n parameters.map ? \"#define USE_MAP\" : \"\",\n parameters.matcap ? \"#define USE_MATCAP\" : \"\",\n parameters.envMap ? \"#define USE_ENVMAP\" : \"\",\n parameters.envMap ? \"#define \" + envMapTypeDefine : \"\",\n parameters.envMap ? \"#define \" + envMapModeDefine : \"\",\n parameters.envMap ? \"#define \" + envMapBlendingDefine : \"\",\n envMapCubeUVSize ? \"#define CUBEUV_TEXEL_WIDTH \" + envMapCubeUVSize.texelWidth : \"\",\n envMapCubeUVSize ? \"#define CUBEUV_TEXEL_HEIGHT \" + envMapCubeUVSize.texelHeight : \"\",\n envMapCubeUVSize ? \"#define CUBEUV_MAX_MIP \" + envMapCubeUVSize.maxMip + \".0\" : \"\",\n parameters.lightMap ? \"#define USE_LIGHTMAP\" : \"\",\n parameters.aoMap ? \"#define USE_AOMAP\" : \"\",\n parameters.bumpMap ? \"#define USE_BUMPMAP\" : \"\",\n parameters.normalMap ? \"#define USE_NORMALMAP\" : \"\",\n parameters.normalMapObjectSpace ? \"#define USE_NORMALMAP_OBJECTSPACE\" : \"\",\n parameters.normalMapTangentSpace ? \"#define USE_NORMALMAP_TANGENTSPACE\" : \"\",\n parameters.emissiveMap ? \"#define USE_EMISSIVEMAP\" : \"\",\n parameters.anisotropy ? \"#define USE_ANISOTROPY\" : \"\",\n parameters.anisotropyMap ? \"#define USE_ANISOTROPYMAP\" : \"\",\n parameters.clearcoat ? \"#define USE_CLEARCOAT\" : \"\",\n parameters.clearcoatMap ? \"#define USE_CLEARCOATMAP\" : \"\",\n parameters.clearcoatRoughnessMap ? \"#define USE_CLEARCOAT_ROUGHNESSMAP\" : \"\",\n parameters.clearcoatNormalMap ? \"#define USE_CLEARCOAT_NORMALMAP\" : \"\",\n parameters.iridescence ? \"#define USE_IRIDESCENCE\" : \"\",\n parameters.iridescenceMap ? \"#define USE_IRIDESCENCEMAP\" : \"\",\n parameters.iridescenceThicknessMap ? \"#define USE_IRIDESCENCE_THICKNESSMAP\" : \"\",\n parameters.specularMap ? \"#define USE_SPECULARMAP\" : \"\",\n parameters.specularColorMap ? \"#define USE_SPECULAR_COLORMAP\" : \"\",\n parameters.specularIntensityMap ? \"#define USE_SPECULAR_INTENSITYMAP\" : \"\",\n parameters.roughnessMap ? \"#define USE_ROUGHNESSMAP\" : \"\",\n parameters.metalnessMap ? \"#define USE_METALNESSMAP\" : \"\",\n parameters.alphaMap ? \"#define USE_ALPHAMAP\" : \"\",\n parameters.alphaTest ? \"#define USE_ALPHATEST\" : \"\",\n parameters.alphaHash ? \"#define USE_ALPHAHASH\" : \"\",\n parameters.sheen ? \"#define USE_SHEEN\" : \"\",\n parameters.sheenColorMap ? \"#define USE_SHEEN_COLORMAP\" : \"\",\n parameters.sheenRoughnessMap ? \"#define USE_SHEEN_ROUGHNESSMAP\" : \"\",\n parameters.transmission ? \"#define USE_TRANSMISSION\" : \"\",\n parameters.transmissionMap ? \"#define USE_TRANSMISSIONMAP\" : \"\",\n parameters.thicknessMap ? \"#define USE_THICKNESSMAP\" : \"\",\n parameters.vertexTangents && parameters.flatShading === false ? \"#define USE_TANGENT\" : \"\",\n parameters.vertexColors || parameters.instancingColor ? \"#define USE_COLOR\" : \"\",\n parameters.vertexAlphas ? \"#define USE_COLOR_ALPHA\" : \"\",\n parameters.vertexUv1s ? \"#define USE_UV1\" : \"\",\n parameters.vertexUv2s ? \"#define USE_UV2\" : \"\",\n parameters.vertexUv3s ? \"#define USE_UV3\" : \"\",\n parameters.pointsUvs ? \"#define USE_POINTS_UV\" : \"\",\n parameters.gradientMap ? \"#define USE_GRADIENTMAP\" : \"\",\n parameters.flatShading ? \"#define FLAT_SHADED\" : \"\",\n parameters.doubleSided ? \"#define DOUBLE_SIDED\" : \"\",\n parameters.flipSided ? \"#define FLIP_SIDED\" : \"\",\n parameters.shadowMapEnabled ? \"#define USE_SHADOWMAP\" : \"\",\n parameters.shadowMapEnabled ? \"#define \" + shadowMapTypeDefine : \"\",\n parameters.premultipliedAlpha ? \"#define PREMULTIPLIED_ALPHA\" : \"\",\n parameters.useLegacyLights ? \"#define LEGACY_LIGHTS\" : \"\",\n parameters.logarithmicDepthBuffer ? \"#define USE_LOGDEPTHBUF\" : \"\",\n parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? \"#define USE_LOGDEPTHBUF_EXT\" : \"\",\n \"uniform mat4 viewMatrix;\",\n \"uniform vec3 cameraPosition;\",\n \"uniform bool isOrthographic;\",\n parameters.toneMapping !== $d5b33d7c30034067$export$9fcb6b4294603b2 ? \"#define TONE_MAPPING\" : \"\",\n parameters.toneMapping !== $d5b33d7c30034067$export$9fcb6b4294603b2 ? $d5b33d7c30034067$export$955f9f2e84c43c8b[\"tonemapping_pars_fragment\"] : \"\",\n parameters.toneMapping !== $d5b33d7c30034067$export$9fcb6b4294603b2 ? $d5b33d7c30034067$var$getToneMappingFunction(\"toneMapping\", parameters.toneMapping) : \"\",\n parameters.dithering ? \"#define DITHERING\" : \"\",\n parameters.opaque ? \"#define OPAQUE\" : \"\",\n $d5b33d7c30034067$export$955f9f2e84c43c8b[\"colorspace_pars_fragment\"],\n $d5b33d7c30034067$var$getTexelEncodingFunction(\"linearToOutputTexel\", parameters.outputColorSpace),\n parameters.useDepthPacking ? \"#define DEPTH_PACKING \" + parameters.depthPacking : \"\",\n \"\\n\"\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n }\n vertexShader = $d5b33d7c30034067$var$resolveIncludes(vertexShader);\n vertexShader = $d5b33d7c30034067$var$replaceLightNums(vertexShader, parameters);\n vertexShader = $d5b33d7c30034067$var$replaceClippingPlaneNums(vertexShader, parameters);\n fragmentShader = $d5b33d7c30034067$var$resolveIncludes(fragmentShader);\n fragmentShader = $d5b33d7c30034067$var$replaceLightNums(fragmentShader, parameters);\n fragmentShader = $d5b33d7c30034067$var$replaceClippingPlaneNums(fragmentShader, parameters);\n vertexShader = $d5b33d7c30034067$var$unrollLoops(vertexShader);\n fragmentShader = $d5b33d7c30034067$var$unrollLoops(fragmentShader);\n if (parameters.isWebGL2 && parameters.isRawShaderMaterial !== true) {\n // GLSL 3.0 conversion for built-in materials and ShaderMaterial\n versionString = \"#version 300 es\\n\";\n prefixVertex = [\n \"precision mediump sampler2DArray;\",\n \"#define attribute in\",\n \"#define varying out\",\n \"#define texture2D texture\"\n ].join(\"\\n\") + \"\\n\" + prefixVertex;\n prefixFragment = [\n \"#define varying in\",\n parameters.glslVersion === $d5b33d7c30034067$export$f63012db5506e7dd ? \"\" : \"layout(location = 0) out highp vec4 pc_fragColor;\",\n parameters.glslVersion === $d5b33d7c30034067$export$f63012db5506e7dd ? \"\" : \"#define gl_FragColor pc_fragColor\",\n \"#define gl_FragDepthEXT gl_FragDepth\",\n \"#define texture2D texture\",\n \"#define textureCube texture\",\n \"#define texture2DProj textureProj\",\n \"#define texture2DLodEXT textureLod\",\n \"#define texture2DProjLodEXT textureProjLod\",\n \"#define textureCubeLodEXT textureLod\",\n \"#define texture2DGradEXT textureGrad\",\n \"#define texture2DProjGradEXT textureProjGrad\",\n \"#define textureCubeGradEXT textureGrad\"\n ].join(\"\\n\") + \"\\n\" + prefixFragment;\n }\n const vertexGlsl = versionString + prefixVertex + vertexShader;\n const fragmentGlsl = versionString + prefixFragment + fragmentShader;\n // console.log( '*VERTEX*', vertexGlsl );\n // console.log( '*FRAGMENT*', fragmentGlsl );\n const glVertexShader = $d5b33d7c30034067$var$WebGLShader(gl, gl.VERTEX_SHADER, vertexGlsl);\n const glFragmentShader = $d5b33d7c30034067$var$WebGLShader(gl, gl.FRAGMENT_SHADER, fragmentGlsl);\n gl.attachShader(program, glVertexShader);\n gl.attachShader(program, glFragmentShader);\n // Force a particular attribute to index 0.\n if (parameters.index0AttributeName !== undefined) gl.bindAttribLocation(program, 0, parameters.index0AttributeName);\n else if (parameters.morphTargets === true) // programs with morphTargets displace position out of attribute 0\n gl.bindAttribLocation(program, 0, \"position\");\n gl.linkProgram(program);\n // check for link errors\n if (renderer.debug.checkShaderErrors) {\n const programLog = gl.getProgramInfoLog(program).trim();\n const vertexLog = gl.getShaderInfoLog(glVertexShader).trim();\n const fragmentLog = gl.getShaderInfoLog(glFragmentShader).trim();\n let runnable = true;\n let haveDiagnostics = true;\n if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) {\n runnable = false;\n if (typeof renderer.debug.onShaderError === \"function\") renderer.debug.onShaderError(gl, program, glVertexShader, glFragmentShader);\n else {\n // default error reporting\n const vertexErrors = $d5b33d7c30034067$var$getShaderErrors(gl, glVertexShader, \"vertex\");\n const fragmentErrors = $d5b33d7c30034067$var$getShaderErrors(gl, glFragmentShader, \"fragment\");\n console.error(\"THREE.WebGLProgram: Shader Error \" + gl.getError() + \" - \" + \"VALIDATE_STATUS \" + gl.getProgramParameter(program, gl.VALIDATE_STATUS) + \"\\n\\n\" + \"Program Info Log: \" + programLog + \"\\n\" + vertexErrors + \"\\n\" + fragmentErrors);\n }\n } else if (programLog !== \"\") console.warn(\"THREE.WebGLProgram: Program Info Log:\", programLog);\n else if (vertexLog === \"\" || fragmentLog === \"\") haveDiagnostics = false;\n if (haveDiagnostics) this.diagnostics = {\n runnable: runnable,\n programLog: programLog,\n vertexShader: {\n log: vertexLog,\n prefix: prefixVertex\n },\n fragmentShader: {\n log: fragmentLog,\n prefix: prefixFragment\n }\n };\n }\n // Clean up\n // Crashes in iOS9 and iOS10. #18402\n // gl.detachShader( program, glVertexShader );\n // gl.detachShader( program, glFragmentShader );\n gl.deleteShader(glVertexShader);\n gl.deleteShader(glFragmentShader);\n // set up caching for uniform locations\n let cachedUniforms;\n this.getUniforms = function() {\n if (cachedUniforms === undefined) cachedUniforms = new $d5b33d7c30034067$var$WebGLUniforms(gl, program);\n return cachedUniforms;\n };\n // set up caching for attribute locations\n let cachedAttributes;\n this.getAttributes = function() {\n if (cachedAttributes === undefined) cachedAttributes = $d5b33d7c30034067$var$fetchAttributeLocations(gl, program);\n return cachedAttributes;\n };\n // free resource\n this.destroy = function() {\n bindingStates.releaseStatesOfProgram(this);\n gl.deleteProgram(program);\n this.program = undefined;\n };\n //\n this.type = parameters.shaderType;\n this.name = parameters.shaderName;\n this.id = $d5b33d7c30034067$var$programIdCount++;\n this.cacheKey = cacheKey;\n this.usedTimes = 1;\n this.program = program;\n this.vertexShader = glVertexShader;\n this.fragmentShader = glFragmentShader;\n return this;\n}\nlet $d5b33d7c30034067$var$_id = 0;\nclass $d5b33d7c30034067$var$WebGLShaderCache {\n constructor(){\n this.shaderCache = new Map();\n this.materialCache = new Map();\n }\n update(material) {\n const vertexShader = material.vertexShader;\n const fragmentShader = material.fragmentShader;\n const vertexShaderStage = this._getShaderStage(vertexShader);\n const fragmentShaderStage = this._getShaderStage(fragmentShader);\n const materialShaders = this._getShaderCacheForMaterial(material);\n if (materialShaders.has(vertexShaderStage) === false) {\n materialShaders.add(vertexShaderStage);\n vertexShaderStage.usedTimes++;\n }\n if (materialShaders.has(fragmentShaderStage) === false) {\n materialShaders.add(fragmentShaderStage);\n fragmentShaderStage.usedTimes++;\n }\n return this;\n }\n remove(material) {\n const materialShaders = this.materialCache.get(material);\n for (const shaderStage of materialShaders){\n shaderStage.usedTimes--;\n if (shaderStage.usedTimes === 0) this.shaderCache.delete(shaderStage.code);\n }\n this.materialCache.delete(material);\n return this;\n }\n getVertexShaderID(material) {\n return this._getShaderStage(material.vertexShader).id;\n }\n getFragmentShaderID(material) {\n return this._getShaderStage(material.fragmentShader).id;\n }\n dispose() {\n this.shaderCache.clear();\n this.materialCache.clear();\n }\n _getShaderCacheForMaterial(material) {\n const cache = this.materialCache;\n let set = cache.get(material);\n if (set === undefined) {\n set = new Set();\n cache.set(material, set);\n }\n return set;\n }\n _getShaderStage(code) {\n const cache = this.shaderCache;\n let stage = cache.get(code);\n if (stage === undefined) {\n stage = new $d5b33d7c30034067$var$WebGLShaderStage(code);\n cache.set(code, stage);\n }\n return stage;\n }\n}\nclass $d5b33d7c30034067$var$WebGLShaderStage {\n constructor(code){\n this.id = $d5b33d7c30034067$var$_id++;\n this.code = code;\n this.usedTimes = 0;\n }\n}\nfunction $d5b33d7c30034067$var$WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping) {\n const _programLayers = new $d5b33d7c30034067$export$89312ce47c0ca777();\n const _customShaders = new $d5b33d7c30034067$var$WebGLShaderCache();\n const programs = [];\n const IS_WEBGL2 = capabilities.isWebGL2;\n const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n const SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures;\n let precision = capabilities.precision;\n const shaderIDs = {\n MeshDepthMaterial: \"depth\",\n MeshDistanceMaterial: \"distanceRGBA\",\n MeshNormalMaterial: \"normal\",\n MeshBasicMaterial: \"basic\",\n MeshLambertMaterial: \"lambert\",\n MeshPhongMaterial: \"phong\",\n MeshToonMaterial: \"toon\",\n MeshStandardMaterial: \"physical\",\n MeshPhysicalMaterial: \"physical\",\n MeshMatcapMaterial: \"matcap\",\n LineBasicMaterial: \"basic\",\n LineDashedMaterial: \"dashed\",\n PointsMaterial: \"points\",\n ShadowMaterial: \"shadow\",\n SpriteMaterial: \"sprite\"\n };\n function getChannel(value) {\n if (value === 0) return \"uv\";\n return `uv${value}`;\n }\n function getParameters(material, lights, shadows, scene, object) {\n const fog = scene.fog;\n const geometry = object.geometry;\n const environment = material.isMeshStandardMaterial ? scene.environment : null;\n const envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || environment);\n const envMapCubeUVHeight = !!envMap && envMap.mapping === $d5b33d7c30034067$export$dbf3e70ff37af79 ? envMap.image.height : null;\n const shaderID = shaderIDs[material.type];\n // heuristics to create shader parameters according to lights in the scene\n // (not to blow over maxLights budget)\n if (material.precision !== null) {\n precision = capabilities.getMaxPrecision(material.precision);\n if (precision !== material.precision) console.warn(\"THREE.WebGLProgram.getParameters:\", material.precision, \"not supported, using\", precision, \"instead.\");\n }\n //\n const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n const morphTargetsCount = morphAttribute !== undefined ? morphAttribute.length : 0;\n let morphTextureStride = 0;\n if (geometry.morphAttributes.position !== undefined) morphTextureStride = 1;\n if (geometry.morphAttributes.normal !== undefined) morphTextureStride = 2;\n if (geometry.morphAttributes.color !== undefined) morphTextureStride = 3;\n //\n let vertexShader, fragmentShader;\n let customVertexShaderID, customFragmentShaderID;\n if (shaderID) {\n const shader = $d5b33d7c30034067$export$bee4a7d47f8f5014[shaderID];\n vertexShader = shader.vertexShader;\n fragmentShader = shader.fragmentShader;\n } else {\n vertexShader = material.vertexShader;\n fragmentShader = material.fragmentShader;\n _customShaders.update(material);\n customVertexShaderID = _customShaders.getVertexShaderID(material);\n customFragmentShaderID = _customShaders.getFragmentShaderID(material);\n }\n const currentRenderTarget = renderer.getRenderTarget();\n const IS_INSTANCEDMESH = object.isInstancedMesh === true;\n const HAS_MAP = !!material.map;\n const HAS_MATCAP = !!material.matcap;\n const HAS_ENVMAP = !!envMap;\n const HAS_AOMAP = !!material.aoMap;\n const HAS_LIGHTMAP = !!material.lightMap;\n const HAS_BUMPMAP = !!material.bumpMap;\n const HAS_NORMALMAP = !!material.normalMap;\n const HAS_DISPLACEMENTMAP = !!material.displacementMap;\n const HAS_EMISSIVEMAP = !!material.emissiveMap;\n const HAS_METALNESSMAP = !!material.metalnessMap;\n const HAS_ROUGHNESSMAP = !!material.roughnessMap;\n const HAS_ANISOTROPY = material.anisotropy > 0;\n const HAS_CLEARCOAT = material.clearcoat > 0;\n const HAS_IRIDESCENCE = material.iridescence > 0;\n const HAS_SHEEN = material.sheen > 0;\n const HAS_TRANSMISSION = material.transmission > 0;\n const HAS_ANISOTROPYMAP = HAS_ANISOTROPY && !!material.anisotropyMap;\n const HAS_CLEARCOATMAP = HAS_CLEARCOAT && !!material.clearcoatMap;\n const HAS_CLEARCOAT_NORMALMAP = HAS_CLEARCOAT && !!material.clearcoatNormalMap;\n const HAS_CLEARCOAT_ROUGHNESSMAP = HAS_CLEARCOAT && !!material.clearcoatRoughnessMap;\n const HAS_IRIDESCENCEMAP = HAS_IRIDESCENCE && !!material.iridescenceMap;\n const HAS_IRIDESCENCE_THICKNESSMAP = HAS_IRIDESCENCE && !!material.iridescenceThicknessMap;\n const HAS_SHEEN_COLORMAP = HAS_SHEEN && !!material.sheenColorMap;\n const HAS_SHEEN_ROUGHNESSMAP = HAS_SHEEN && !!material.sheenRoughnessMap;\n const HAS_SPECULARMAP = !!material.specularMap;\n const HAS_SPECULAR_COLORMAP = !!material.specularColorMap;\n const HAS_SPECULAR_INTENSITYMAP = !!material.specularIntensityMap;\n const HAS_TRANSMISSIONMAP = HAS_TRANSMISSION && !!material.transmissionMap;\n const HAS_THICKNESSMAP = HAS_TRANSMISSION && !!material.thicknessMap;\n const HAS_GRADIENTMAP = !!material.gradientMap;\n const HAS_ALPHAMAP = !!material.alphaMap;\n const HAS_ALPHATEST = material.alphaTest > 0;\n const HAS_ALPHAHASH = !!material.alphaHash;\n const HAS_EXTENSIONS = !!material.extensions;\n const HAS_ATTRIBUTE_UV1 = !!geometry.attributes.uv1;\n const HAS_ATTRIBUTE_UV2 = !!geometry.attributes.uv2;\n const HAS_ATTRIBUTE_UV3 = !!geometry.attributes.uv3;\n let toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n if (material.toneMapped) {\n if (currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true) toneMapping = renderer.toneMapping;\n }\n const parameters = {\n isWebGL2: IS_WEBGL2,\n shaderID: shaderID,\n shaderType: material.type,\n shaderName: material.name,\n vertexShader: vertexShader,\n fragmentShader: fragmentShader,\n defines: material.defines,\n customVertexShaderID: customVertexShaderID,\n customFragmentShaderID: customFragmentShaderID,\n isRawShaderMaterial: material.isRawShaderMaterial === true,\n glslVersion: material.glslVersion,\n precision: precision,\n instancing: IS_INSTANCEDMESH,\n instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,\n supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,\n outputColorSpace: currentRenderTarget === null ? renderer.outputColorSpace : currentRenderTarget.isXRRenderTarget === true ? currentRenderTarget.texture.colorSpace : $d5b33d7c30034067$export$42429b3acfb233a4,\n map: HAS_MAP,\n matcap: HAS_MATCAP,\n envMap: HAS_ENVMAP,\n envMapMode: HAS_ENVMAP && envMap.mapping,\n envMapCubeUVHeight: envMapCubeUVHeight,\n aoMap: HAS_AOMAP,\n lightMap: HAS_LIGHTMAP,\n bumpMap: HAS_BUMPMAP,\n normalMap: HAS_NORMALMAP,\n displacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP,\n emissiveMap: HAS_EMISSIVEMAP,\n normalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === $d5b33d7c30034067$export$9990ad26f9db5b2c,\n normalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === $d5b33d7c30034067$export$2852a58ebdac27b8,\n metalnessMap: HAS_METALNESSMAP,\n roughnessMap: HAS_ROUGHNESSMAP,\n anisotropy: HAS_ANISOTROPY,\n anisotropyMap: HAS_ANISOTROPYMAP,\n clearcoat: HAS_CLEARCOAT,\n clearcoatMap: HAS_CLEARCOATMAP,\n clearcoatNormalMap: HAS_CLEARCOAT_NORMALMAP,\n clearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP,\n iridescence: HAS_IRIDESCENCE,\n iridescenceMap: HAS_IRIDESCENCEMAP,\n iridescenceThicknessMap: HAS_IRIDESCENCE_THICKNESSMAP,\n sheen: HAS_SHEEN,\n sheenColorMap: HAS_SHEEN_COLORMAP,\n sheenRoughnessMap: HAS_SHEEN_ROUGHNESSMAP,\n specularMap: HAS_SPECULARMAP,\n specularColorMap: HAS_SPECULAR_COLORMAP,\n specularIntensityMap: HAS_SPECULAR_INTENSITYMAP,\n transmission: HAS_TRANSMISSION,\n transmissionMap: HAS_TRANSMISSIONMAP,\n thicknessMap: HAS_THICKNESSMAP,\n gradientMap: HAS_GRADIENTMAP,\n opaque: material.transparent === false && material.blending === $d5b33d7c30034067$export$5b29a26d96ee6af0,\n alphaMap: HAS_ALPHAMAP,\n alphaTest: HAS_ALPHATEST,\n alphaHash: HAS_ALPHAHASH,\n combine: material.combine,\n //\n mapUv: HAS_MAP && getChannel(material.map.channel),\n aoMapUv: HAS_AOMAP && getChannel(material.aoMap.channel),\n lightMapUv: HAS_LIGHTMAP && getChannel(material.lightMap.channel),\n bumpMapUv: HAS_BUMPMAP && getChannel(material.bumpMap.channel),\n normalMapUv: HAS_NORMALMAP && getChannel(material.normalMap.channel),\n displacementMapUv: HAS_DISPLACEMENTMAP && getChannel(material.displacementMap.channel),\n emissiveMapUv: HAS_EMISSIVEMAP && getChannel(material.emissiveMap.channel),\n metalnessMapUv: HAS_METALNESSMAP && getChannel(material.metalnessMap.channel),\n roughnessMapUv: HAS_ROUGHNESSMAP && getChannel(material.roughnessMap.channel),\n anisotropyMapUv: HAS_ANISOTROPYMAP && getChannel(material.anisotropyMap.channel),\n clearcoatMapUv: HAS_CLEARCOATMAP && getChannel(material.clearcoatMap.channel),\n clearcoatNormalMapUv: HAS_CLEARCOAT_NORMALMAP && getChannel(material.clearcoatNormalMap.channel),\n clearcoatRoughnessMapUv: HAS_CLEARCOAT_ROUGHNESSMAP && getChannel(material.clearcoatRoughnessMap.channel),\n iridescenceMapUv: HAS_IRIDESCENCEMAP && getChannel(material.iridescenceMap.channel),\n iridescenceThicknessMapUv: HAS_IRIDESCENCE_THICKNESSMAP && getChannel(material.iridescenceThicknessMap.channel),\n sheenColorMapUv: HAS_SHEEN_COLORMAP && getChannel(material.sheenColorMap.channel),\n sheenRoughnessMapUv: HAS_SHEEN_ROUGHNESSMAP && getChannel(material.sheenRoughnessMap.channel),\n specularMapUv: HAS_SPECULARMAP && getChannel(material.specularMap.channel),\n specularColorMapUv: HAS_SPECULAR_COLORMAP && getChannel(material.specularColorMap.channel),\n specularIntensityMapUv: HAS_SPECULAR_INTENSITYMAP && getChannel(material.specularIntensityMap.channel),\n transmissionMapUv: HAS_TRANSMISSIONMAP && getChannel(material.transmissionMap.channel),\n thicknessMapUv: HAS_THICKNESSMAP && getChannel(material.thicknessMap.channel),\n alphaMapUv: HAS_ALPHAMAP && getChannel(material.alphaMap.channel),\n //\n vertexTangents: !!geometry.attributes.tangent && (HAS_NORMALMAP || HAS_ANISOTROPY),\n vertexColors: material.vertexColors,\n vertexAlphas: material.vertexColors === true && !!geometry.attributes.color && geometry.attributes.color.itemSize === 4,\n vertexUv1s: HAS_ATTRIBUTE_UV1,\n vertexUv2s: HAS_ATTRIBUTE_UV2,\n vertexUv3s: HAS_ATTRIBUTE_UV3,\n pointsUvs: object.isPoints === true && !!geometry.attributes.uv && (HAS_MAP || HAS_ALPHAMAP),\n fog: !!fog,\n useFog: material.fog === true,\n fogExp2: fog && fog.isFogExp2,\n flatShading: material.flatShading === true,\n sizeAttenuation: material.sizeAttenuation === true,\n logarithmicDepthBuffer: logarithmicDepthBuffer,\n skinning: object.isSkinnedMesh === true,\n morphTargets: geometry.morphAttributes.position !== undefined,\n morphNormals: geometry.morphAttributes.normal !== undefined,\n morphColors: geometry.morphAttributes.color !== undefined,\n morphTargetsCount: morphTargetsCount,\n morphTextureStride: morphTextureStride,\n numDirLights: lights.directional.length,\n numPointLights: lights.point.length,\n numSpotLights: lights.spot.length,\n numSpotLightMaps: lights.spotLightMap.length,\n numRectAreaLights: lights.rectArea.length,\n numHemiLights: lights.hemi.length,\n numDirLightShadows: lights.directionalShadowMap.length,\n numPointLightShadows: lights.pointShadowMap.length,\n numSpotLightShadows: lights.spotShadowMap.length,\n numSpotLightShadowsWithMaps: lights.numSpotLightShadowsWithMaps,\n numClippingPlanes: clipping.numPlanes,\n numClipIntersection: clipping.numIntersection,\n dithering: material.dithering,\n shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n shadowMapType: renderer.shadowMap.type,\n toneMapping: toneMapping,\n useLegacyLights: renderer._useLegacyLights,\n premultipliedAlpha: material.premultipliedAlpha,\n doubleSided: material.side === $d5b33d7c30034067$export$3b296b6f144d5b03,\n flipSided: material.side === $d5b33d7c30034067$export$d9f0486e75b5ace,\n useDepthPacking: material.depthPacking >= 0,\n depthPacking: material.depthPacking || 0,\n index0AttributeName: material.index0AttributeName,\n extensionDerivatives: HAS_EXTENSIONS && material.extensions.derivatives === true,\n extensionFragDepth: HAS_EXTENSIONS && material.extensions.fragDepth === true,\n extensionDrawBuffers: HAS_EXTENSIONS && material.extensions.drawBuffers === true,\n extensionShaderTextureLOD: HAS_EXTENSIONS && material.extensions.shaderTextureLOD === true,\n rendererExtensionFragDepth: IS_WEBGL2 || extensions.has(\"EXT_frag_depth\"),\n rendererExtensionDrawBuffers: IS_WEBGL2 || extensions.has(\"WEBGL_draw_buffers\"),\n rendererExtensionShaderTextureLod: IS_WEBGL2 || extensions.has(\"EXT_shader_texture_lod\"),\n customProgramCacheKey: material.customProgramCacheKey()\n };\n return parameters;\n }\n function getProgramCacheKey(parameters) {\n const array = [];\n if (parameters.shaderID) array.push(parameters.shaderID);\n else {\n array.push(parameters.customVertexShaderID);\n array.push(parameters.customFragmentShaderID);\n }\n if (parameters.defines !== undefined) for(const name in parameters.defines){\n array.push(name);\n array.push(parameters.defines[name]);\n }\n if (parameters.isRawShaderMaterial === false) {\n getProgramCacheKeyParameters(array, parameters);\n getProgramCacheKeyBooleans(array, parameters);\n array.push(renderer.outputColorSpace);\n }\n array.push(parameters.customProgramCacheKey);\n return array.join();\n }\n function getProgramCacheKeyParameters(array, parameters) {\n array.push(parameters.precision);\n array.push(parameters.outputColorSpace);\n array.push(parameters.envMapMode);\n array.push(parameters.envMapCubeUVHeight);\n array.push(parameters.mapUv);\n array.push(parameters.alphaMapUv);\n array.push(parameters.lightMapUv);\n array.push(parameters.aoMapUv);\n array.push(parameters.bumpMapUv);\n array.push(parameters.normalMapUv);\n array.push(parameters.displacementMapUv);\n array.push(parameters.emissiveMapUv);\n array.push(parameters.metalnessMapUv);\n array.push(parameters.roughnessMapUv);\n array.push(parameters.anisotropyMapUv);\n array.push(parameters.clearcoatMapUv);\n array.push(parameters.clearcoatNormalMapUv);\n array.push(parameters.clearcoatRoughnessMapUv);\n array.push(parameters.iridescenceMapUv);\n array.push(parameters.iridescenceThicknessMapUv);\n array.push(parameters.sheenColorMapUv);\n array.push(parameters.sheenRoughnessMapUv);\n array.push(parameters.specularMapUv);\n array.push(parameters.specularColorMapUv);\n array.push(parameters.specularIntensityMapUv);\n array.push(parameters.transmissionMapUv);\n array.push(parameters.thicknessMapUv);\n array.push(parameters.combine);\n array.push(parameters.fogExp2);\n array.push(parameters.sizeAttenuation);\n array.push(parameters.morphTargetsCount);\n array.push(parameters.morphAttributeCount);\n array.push(parameters.numDirLights);\n array.push(parameters.numPointLights);\n array.push(parameters.numSpotLights);\n array.push(parameters.numSpotLightMaps);\n array.push(parameters.numHemiLights);\n array.push(parameters.numRectAreaLights);\n array.push(parameters.numDirLightShadows);\n array.push(parameters.numPointLightShadows);\n array.push(parameters.numSpotLightShadows);\n array.push(parameters.numSpotLightShadowsWithMaps);\n array.push(parameters.shadowMapType);\n array.push(parameters.toneMapping);\n array.push(parameters.numClippingPlanes);\n array.push(parameters.numClipIntersection);\n array.push(parameters.depthPacking);\n }\n function getProgramCacheKeyBooleans(array, parameters) {\n _programLayers.disableAll();\n if (parameters.isWebGL2) _programLayers.enable(0);\n if (parameters.supportsVertexTextures) _programLayers.enable(1);\n if (parameters.instancing) _programLayers.enable(2);\n if (parameters.instancingColor) _programLayers.enable(3);\n if (parameters.matcap) _programLayers.enable(4);\n if (parameters.envMap) _programLayers.enable(5);\n if (parameters.normalMapObjectSpace) _programLayers.enable(6);\n if (parameters.normalMapTangentSpace) _programLayers.enable(7);\n if (parameters.clearcoat) _programLayers.enable(8);\n if (parameters.iridescence) _programLayers.enable(9);\n if (parameters.alphaTest) _programLayers.enable(10);\n if (parameters.vertexColors) _programLayers.enable(11);\n if (parameters.vertexAlphas) _programLayers.enable(12);\n if (parameters.vertexUv1s) _programLayers.enable(13);\n if (parameters.vertexUv2s) _programLayers.enable(14);\n if (parameters.vertexUv3s) _programLayers.enable(15);\n if (parameters.vertexTangents) _programLayers.enable(16);\n if (parameters.anisotropy) _programLayers.enable(17);\n array.push(_programLayers.mask);\n _programLayers.disableAll();\n if (parameters.fog) _programLayers.enable(0);\n if (parameters.useFog) _programLayers.enable(1);\n if (parameters.flatShading) _programLayers.enable(2);\n if (parameters.logarithmicDepthBuffer) _programLayers.enable(3);\n if (parameters.skinning) _programLayers.enable(4);\n if (parameters.morphTargets) _programLayers.enable(5);\n if (parameters.morphNormals) _programLayers.enable(6);\n if (parameters.morphColors) _programLayers.enable(7);\n if (parameters.premultipliedAlpha) _programLayers.enable(8);\n if (parameters.shadowMapEnabled) _programLayers.enable(9);\n if (parameters.useLegacyLights) _programLayers.enable(10);\n if (parameters.doubleSided) _programLayers.enable(11);\n if (parameters.flipSided) _programLayers.enable(12);\n if (parameters.useDepthPacking) _programLayers.enable(13);\n if (parameters.dithering) _programLayers.enable(14);\n if (parameters.transmission) _programLayers.enable(15);\n if (parameters.sheen) _programLayers.enable(16);\n if (parameters.opaque) _programLayers.enable(17);\n if (parameters.pointsUvs) _programLayers.enable(18);\n array.push(_programLayers.mask);\n }\n function getUniforms(material) {\n const shaderID = shaderIDs[material.type];\n let uniforms;\n if (shaderID) {\n const shader = $d5b33d7c30034067$export$bee4a7d47f8f5014[shaderID];\n uniforms = $d5b33d7c30034067$export$d8ecdf8615bfea69.clone(shader.uniforms);\n } else uniforms = material.uniforms;\n return uniforms;\n }\n function acquireProgram(parameters, cacheKey) {\n let program;\n // Check if code has been already compiled\n for(let p = 0, pl = programs.length; p < pl; p++){\n const preexistingProgram = programs[p];\n if (preexistingProgram.cacheKey === cacheKey) {\n program = preexistingProgram;\n ++program.usedTimes;\n break;\n }\n }\n if (program === undefined) {\n program = new $d5b33d7c30034067$var$WebGLProgram(renderer, cacheKey, parameters, bindingStates);\n programs.push(program);\n }\n return program;\n }\n function releaseProgram(program) {\n if (--program.usedTimes === 0) {\n // Remove from unordered set\n const i = programs.indexOf(program);\n programs[i] = programs[programs.length - 1];\n programs.pop();\n // Free WebGL resources\n program.destroy();\n }\n }\n function releaseShaderCache(material) {\n _customShaders.remove(material);\n }\n function dispose() {\n _customShaders.dispose();\n }\n return {\n getParameters: getParameters,\n getProgramCacheKey: getProgramCacheKey,\n getUniforms: getUniforms,\n acquireProgram: acquireProgram,\n releaseProgram: releaseProgram,\n releaseShaderCache: releaseShaderCache,\n // Exposed for resource monitoring & error feedback via renderer.info:\n programs: programs,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$WebGLProperties() {\n let properties = new WeakMap();\n function get(object) {\n let map = properties.get(object);\n if (map === undefined) {\n map = {};\n properties.set(object, map);\n }\n return map;\n }\n function remove(object) {\n properties.delete(object);\n }\n function update(object, key, value) {\n properties.get(object)[key] = value;\n }\n function dispose() {\n properties = new WeakMap();\n }\n return {\n get: get,\n remove: remove,\n update: update,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$painterSortStable(a, b) {\n if (a.groupOrder !== b.groupOrder) return a.groupOrder - b.groupOrder;\n else if (a.renderOrder !== b.renderOrder) return a.renderOrder - b.renderOrder;\n else if (a.material.id !== b.material.id) return a.material.id - b.material.id;\n else if (a.z !== b.z) return a.z - b.z;\n else return a.id - b.id;\n}\nfunction $d5b33d7c30034067$var$reversePainterSortStable(a, b) {\n if (a.groupOrder !== b.groupOrder) return a.groupOrder - b.groupOrder;\n else if (a.renderOrder !== b.renderOrder) return a.renderOrder - b.renderOrder;\n else if (a.z !== b.z) return b.z - a.z;\n else return a.id - b.id;\n}\nfunction $d5b33d7c30034067$var$WebGLRenderList() {\n const renderItems = [];\n let renderItemsIndex = 0;\n const opaque = [];\n const transmissive = [];\n const transparent = [];\n function init() {\n renderItemsIndex = 0;\n opaque.length = 0;\n transmissive.length = 0;\n transparent.length = 0;\n }\n function getNextRenderItem(object, geometry, material, groupOrder, z, group) {\n let renderItem = renderItems[renderItemsIndex];\n if (renderItem === undefined) {\n renderItem = {\n id: object.id,\n object: object,\n geometry: geometry,\n material: material,\n groupOrder: groupOrder,\n renderOrder: object.renderOrder,\n z: z,\n group: group\n };\n renderItems[renderItemsIndex] = renderItem;\n } else {\n renderItem.id = object.id;\n renderItem.object = object;\n renderItem.geometry = geometry;\n renderItem.material = material;\n renderItem.groupOrder = groupOrder;\n renderItem.renderOrder = object.renderOrder;\n renderItem.z = z;\n renderItem.group = group;\n }\n renderItemsIndex++;\n return renderItem;\n }\n function push(object, geometry, material, groupOrder, z, group) {\n const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n if (material.transmission > 0.0) transmissive.push(renderItem);\n else if (material.transparent === true) transparent.push(renderItem);\n else opaque.push(renderItem);\n }\n function unshift(object, geometry, material, groupOrder, z, group) {\n const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n if (material.transmission > 0.0) transmissive.unshift(renderItem);\n else if (material.transparent === true) transparent.unshift(renderItem);\n else opaque.unshift(renderItem);\n }\n function sort(customOpaqueSort, customTransparentSort) {\n if (opaque.length > 1) opaque.sort(customOpaqueSort || $d5b33d7c30034067$var$painterSortStable);\n if (transmissive.length > 1) transmissive.sort(customTransparentSort || $d5b33d7c30034067$var$reversePainterSortStable);\n if (transparent.length > 1) transparent.sort(customTransparentSort || $d5b33d7c30034067$var$reversePainterSortStable);\n }\n function finish() {\n // Clear references from inactive renderItems in the list\n for(let i = renderItemsIndex, il = renderItems.length; i < il; i++){\n const renderItem = renderItems[i];\n if (renderItem.id === null) break;\n renderItem.id = null;\n renderItem.object = null;\n renderItem.geometry = null;\n renderItem.material = null;\n renderItem.group = null;\n }\n }\n return {\n opaque: opaque,\n transmissive: transmissive,\n transparent: transparent,\n init: init,\n push: push,\n unshift: unshift,\n finish: finish,\n sort: sort\n };\n}\nfunction $d5b33d7c30034067$var$WebGLRenderLists() {\n let lists = new WeakMap();\n function get(scene, renderCallDepth) {\n const listArray = lists.get(scene);\n let list;\n if (listArray === undefined) {\n list = new $d5b33d7c30034067$var$WebGLRenderList();\n lists.set(scene, [\n list\n ]);\n } else if (renderCallDepth >= listArray.length) {\n list = new $d5b33d7c30034067$var$WebGLRenderList();\n listArray.push(list);\n } else list = listArray[renderCallDepth];\n return list;\n }\n function dispose() {\n lists = new WeakMap();\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$UniformsCache() {\n const lights = {};\n return {\n get: function(light) {\n if (lights[light.id] !== undefined) return lights[light.id];\n let uniforms;\n switch(light.type){\n case \"DirectionalLight\":\n uniforms = {\n direction: new $d5b33d7c30034067$export$64b5c384219d3699(),\n color: new $d5b33d7c30034067$export$892596cec99bc70e()\n };\n break;\n case \"SpotLight\":\n uniforms = {\n position: new $d5b33d7c30034067$export$64b5c384219d3699(),\n direction: new $d5b33d7c30034067$export$64b5c384219d3699(),\n color: new $d5b33d7c30034067$export$892596cec99bc70e(),\n distance: 0,\n coneCos: 0,\n penumbraCos: 0,\n decay: 0\n };\n break;\n case \"PointLight\":\n uniforms = {\n position: new $d5b33d7c30034067$export$64b5c384219d3699(),\n color: new $d5b33d7c30034067$export$892596cec99bc70e(),\n distance: 0,\n decay: 0\n };\n break;\n case \"HemisphereLight\":\n uniforms = {\n direction: new $d5b33d7c30034067$export$64b5c384219d3699(),\n skyColor: new $d5b33d7c30034067$export$892596cec99bc70e(),\n groundColor: new $d5b33d7c30034067$export$892596cec99bc70e()\n };\n break;\n case \"RectAreaLight\":\n uniforms = {\n color: new $d5b33d7c30034067$export$892596cec99bc70e(),\n position: new $d5b33d7c30034067$export$64b5c384219d3699(),\n halfWidth: new $d5b33d7c30034067$export$64b5c384219d3699(),\n halfHeight: new $d5b33d7c30034067$export$64b5c384219d3699()\n };\n break;\n }\n lights[light.id] = uniforms;\n return uniforms;\n }\n };\n}\nfunction $d5b33d7c30034067$var$ShadowUniformsCache() {\n const lights = {};\n return {\n get: function(light) {\n if (lights[light.id] !== undefined) return lights[light.id];\n let uniforms;\n switch(light.type){\n case \"DirectionalLight\":\n uniforms = {\n shadowBias: 0,\n shadowNormalBias: 0,\n shadowRadius: 1,\n shadowMapSize: new $d5b33d7c30034067$export$c977b3e384af9ae1()\n };\n break;\n case \"SpotLight\":\n uniforms = {\n shadowBias: 0,\n shadowNormalBias: 0,\n shadowRadius: 1,\n shadowMapSize: new $d5b33d7c30034067$export$c977b3e384af9ae1()\n };\n break;\n case \"PointLight\":\n uniforms = {\n shadowBias: 0,\n shadowNormalBias: 0,\n shadowRadius: 1,\n shadowMapSize: new $d5b33d7c30034067$export$c977b3e384af9ae1(),\n shadowCameraNear: 1,\n shadowCameraFar: 1000\n };\n break;\n }\n lights[light.id] = uniforms;\n return uniforms;\n }\n };\n}\nlet $d5b33d7c30034067$var$nextVersion = 0;\nfunction $d5b33d7c30034067$var$shadowCastingAndTexturingLightsFirst(lightA, lightB) {\n return (lightB.castShadow ? 2 : 0) - (lightA.castShadow ? 2 : 0) + (lightB.map ? 1 : 0) - (lightA.map ? 1 : 0);\n}\nfunction $d5b33d7c30034067$var$WebGLLights(extensions, capabilities) {\n const cache = new $d5b33d7c30034067$var$UniformsCache();\n const shadowCache = $d5b33d7c30034067$var$ShadowUniformsCache();\n const state = {\n version: 0,\n hash: {\n directionalLength: -1,\n pointLength: -1,\n spotLength: -1,\n rectAreaLength: -1,\n hemiLength: -1,\n numDirectionalShadows: -1,\n numPointShadows: -1,\n numSpotShadows: -1,\n numSpotMaps: -1\n },\n ambient: [\n 0,\n 0,\n 0\n ],\n probe: [],\n directional: [],\n directionalShadow: [],\n directionalShadowMap: [],\n directionalShadowMatrix: [],\n spot: [],\n spotLightMap: [],\n spotShadow: [],\n spotShadowMap: [],\n spotLightMatrix: [],\n rectArea: [],\n rectAreaLTC1: null,\n rectAreaLTC2: null,\n point: [],\n pointShadow: [],\n pointShadowMap: [],\n pointShadowMatrix: [],\n hemi: [],\n numSpotLightShadowsWithMaps: 0\n };\n for(let i = 0; i < 9; i++)state.probe.push(new $d5b33d7c30034067$export$64b5c384219d3699());\n const vector3 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const matrix4 = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n const matrix42 = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n function setup(lights, useLegacyLights) {\n let r = 0, g = 0, b = 0;\n for(let i = 0; i < 9; i++)state.probe[i].set(0, 0, 0);\n let directionalLength = 0;\n let pointLength = 0;\n let spotLength = 0;\n let rectAreaLength = 0;\n let hemiLength = 0;\n let numDirectionalShadows = 0;\n let numPointShadows = 0;\n let numSpotShadows = 0;\n let numSpotMaps = 0;\n let numSpotShadowsWithMaps = 0;\n // ordering : [shadow casting + map texturing, map texturing, shadow casting, none ]\n lights.sort($d5b33d7c30034067$var$shadowCastingAndTexturingLightsFirst);\n // artist-friendly light intensity scaling factor\n const scaleFactor = useLegacyLights === true ? Math.PI : 1;\n for(let i = 0, l = lights.length; i < l; i++){\n const light = lights[i];\n const color = light.color;\n const intensity = light.intensity;\n const distance = light.distance;\n const shadowMap = light.shadow && light.shadow.map ? light.shadow.map.texture : null;\n if (light.isAmbientLight) {\n r += color.r * intensity * scaleFactor;\n g += color.g * intensity * scaleFactor;\n b += color.b * intensity * scaleFactor;\n } else if (light.isLightProbe) for(let j = 0; j < 9; j++)state.probe[j].addScaledVector(light.sh.coefficients[j], intensity);\n else if (light.isDirectionalLight) {\n const uniforms = cache.get(light);\n uniforms.color.copy(light.color).multiplyScalar(light.intensity * scaleFactor);\n if (light.castShadow) {\n const shadow = light.shadow;\n const shadowUniforms = shadowCache.get(light);\n shadowUniforms.shadowBias = shadow.bias;\n shadowUniforms.shadowNormalBias = shadow.normalBias;\n shadowUniforms.shadowRadius = shadow.radius;\n shadowUniforms.shadowMapSize = shadow.mapSize;\n state.directionalShadow[directionalLength] = shadowUniforms;\n state.directionalShadowMap[directionalLength] = shadowMap;\n state.directionalShadowMatrix[directionalLength] = light.shadow.matrix;\n numDirectionalShadows++;\n }\n state.directional[directionalLength] = uniforms;\n directionalLength++;\n } else if (light.isSpotLight) {\n const uniforms = cache.get(light);\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.color.copy(color).multiplyScalar(intensity * scaleFactor);\n uniforms.distance = distance;\n uniforms.coneCos = Math.cos(light.angle);\n uniforms.penumbraCos = Math.cos(light.angle * (1 - light.penumbra));\n uniforms.decay = light.decay;\n state.spot[spotLength] = uniforms;\n const shadow = light.shadow;\n if (light.map) {\n state.spotLightMap[numSpotMaps] = light.map;\n numSpotMaps++;\n // make sure the lightMatrix is up to date\n // TODO : do it if required only\n shadow.updateMatrices(light);\n if (light.castShadow) numSpotShadowsWithMaps++;\n }\n state.spotLightMatrix[spotLength] = shadow.matrix;\n if (light.castShadow) {\n const shadowUniforms = shadowCache.get(light);\n shadowUniforms.shadowBias = shadow.bias;\n shadowUniforms.shadowNormalBias = shadow.normalBias;\n shadowUniforms.shadowRadius = shadow.radius;\n shadowUniforms.shadowMapSize = shadow.mapSize;\n state.spotShadow[spotLength] = shadowUniforms;\n state.spotShadowMap[spotLength] = shadowMap;\n numSpotShadows++;\n }\n spotLength++;\n } else if (light.isRectAreaLight) {\n const uniforms = cache.get(light);\n uniforms.color.copy(color).multiplyScalar(intensity);\n uniforms.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n uniforms.halfHeight.set(0.0, light.height * 0.5, 0.0);\n state.rectArea[rectAreaLength] = uniforms;\n rectAreaLength++;\n } else if (light.isPointLight) {\n const uniforms = cache.get(light);\n uniforms.color.copy(light.color).multiplyScalar(light.intensity * scaleFactor);\n uniforms.distance = light.distance;\n uniforms.decay = light.decay;\n if (light.castShadow) {\n const shadow = light.shadow;\n const shadowUniforms = shadowCache.get(light);\n shadowUniforms.shadowBias = shadow.bias;\n shadowUniforms.shadowNormalBias = shadow.normalBias;\n shadowUniforms.shadowRadius = shadow.radius;\n shadowUniforms.shadowMapSize = shadow.mapSize;\n shadowUniforms.shadowCameraNear = shadow.camera.near;\n shadowUniforms.shadowCameraFar = shadow.camera.far;\n state.pointShadow[pointLength] = shadowUniforms;\n state.pointShadowMap[pointLength] = shadowMap;\n state.pointShadowMatrix[pointLength] = light.shadow.matrix;\n numPointShadows++;\n }\n state.point[pointLength] = uniforms;\n pointLength++;\n } else if (light.isHemisphereLight) {\n const uniforms = cache.get(light);\n uniforms.skyColor.copy(light.color).multiplyScalar(intensity * scaleFactor);\n uniforms.groundColor.copy(light.groundColor).multiplyScalar(intensity * scaleFactor);\n state.hemi[hemiLength] = uniforms;\n hemiLength++;\n }\n }\n if (rectAreaLength > 0) {\n if (capabilities.isWebGL2) {\n // WebGL 2\n state.rectAreaLTC1 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_1;\n state.rectAreaLTC2 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_2;\n } else {\n // WebGL 1\n if (extensions.has(\"OES_texture_float_linear\") === true) {\n state.rectAreaLTC1 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_1;\n state.rectAreaLTC2 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_2;\n } else if (extensions.has(\"OES_texture_half_float_linear\") === true) {\n state.rectAreaLTC1 = $d5b33d7c30034067$export$6643083551874bf5.LTC_HALF_1;\n state.rectAreaLTC2 = $d5b33d7c30034067$export$6643083551874bf5.LTC_HALF_2;\n } else console.error(\"THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.\");\n }\n }\n state.ambient[0] = r;\n state.ambient[1] = g;\n state.ambient[2] = b;\n const hash = state.hash;\n if (hash.directionalLength !== directionalLength || hash.pointLength !== pointLength || hash.spotLength !== spotLength || hash.rectAreaLength !== rectAreaLength || hash.hemiLength !== hemiLength || hash.numDirectionalShadows !== numDirectionalShadows || hash.numPointShadows !== numPointShadows || hash.numSpotShadows !== numSpotShadows || hash.numSpotMaps !== numSpotMaps) {\n state.directional.length = directionalLength;\n state.spot.length = spotLength;\n state.rectArea.length = rectAreaLength;\n state.point.length = pointLength;\n state.hemi.length = hemiLength;\n state.directionalShadow.length = numDirectionalShadows;\n state.directionalShadowMap.length = numDirectionalShadows;\n state.pointShadow.length = numPointShadows;\n state.pointShadowMap.length = numPointShadows;\n state.spotShadow.length = numSpotShadows;\n state.spotShadowMap.length = numSpotShadows;\n state.directionalShadowMatrix.length = numDirectionalShadows;\n state.pointShadowMatrix.length = numPointShadows;\n state.spotLightMatrix.length = numSpotShadows + numSpotMaps - numSpotShadowsWithMaps;\n state.spotLightMap.length = numSpotMaps;\n state.numSpotLightShadowsWithMaps = numSpotShadowsWithMaps;\n hash.directionalLength = directionalLength;\n hash.pointLength = pointLength;\n hash.spotLength = spotLength;\n hash.rectAreaLength = rectAreaLength;\n hash.hemiLength = hemiLength;\n hash.numDirectionalShadows = numDirectionalShadows;\n hash.numPointShadows = numPointShadows;\n hash.numSpotShadows = numSpotShadows;\n hash.numSpotMaps = numSpotMaps;\n state.version = $d5b33d7c30034067$var$nextVersion++;\n }\n }\n function setupView(lights, camera) {\n let directionalLength = 0;\n let pointLength = 0;\n let spotLength = 0;\n let rectAreaLength = 0;\n let hemiLength = 0;\n const viewMatrix = camera.matrixWorldInverse;\n for(let i = 0, l = lights.length; i < l; i++){\n const light = lights[i];\n if (light.isDirectionalLight) {\n const uniforms = state.directional[directionalLength];\n uniforms.direction.setFromMatrixPosition(light.matrixWorld);\n vector3.setFromMatrixPosition(light.target.matrixWorld);\n uniforms.direction.sub(vector3);\n uniforms.direction.transformDirection(viewMatrix);\n directionalLength++;\n } else if (light.isSpotLight) {\n const uniforms = state.spot[spotLength];\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.position.applyMatrix4(viewMatrix);\n uniforms.direction.setFromMatrixPosition(light.matrixWorld);\n vector3.setFromMatrixPosition(light.target.matrixWorld);\n uniforms.direction.sub(vector3);\n uniforms.direction.transformDirection(viewMatrix);\n spotLength++;\n } else if (light.isRectAreaLight) {\n const uniforms = state.rectArea[rectAreaLength];\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.position.applyMatrix4(viewMatrix);\n // extract local rotation of light to derive width/height half vectors\n matrix42.identity();\n matrix4.copy(light.matrixWorld);\n matrix4.premultiply(viewMatrix);\n matrix42.extractRotation(matrix4);\n uniforms.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n uniforms.halfHeight.set(0.0, light.height * 0.5, 0.0);\n uniforms.halfWidth.applyMatrix4(matrix42);\n uniforms.halfHeight.applyMatrix4(matrix42);\n rectAreaLength++;\n } else if (light.isPointLight) {\n const uniforms = state.point[pointLength];\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.position.applyMatrix4(viewMatrix);\n pointLength++;\n } else if (light.isHemisphereLight) {\n const uniforms = state.hemi[hemiLength];\n uniforms.direction.setFromMatrixPosition(light.matrixWorld);\n uniforms.direction.transformDirection(viewMatrix);\n hemiLength++;\n }\n }\n }\n return {\n setup: setup,\n setupView: setupView,\n state: state\n };\n}\nfunction $d5b33d7c30034067$var$WebGLRenderState(extensions, capabilities) {\n const lights = new $d5b33d7c30034067$var$WebGLLights(extensions, capabilities);\n const lightsArray = [];\n const shadowsArray = [];\n function init() {\n lightsArray.length = 0;\n shadowsArray.length = 0;\n }\n function pushLight(light) {\n lightsArray.push(light);\n }\n function pushShadow(shadowLight) {\n shadowsArray.push(shadowLight);\n }\n function setupLights(useLegacyLights) {\n lights.setup(lightsArray, useLegacyLights);\n }\n function setupLightsView(camera) {\n lights.setupView(lightsArray, camera);\n }\n const state = {\n lightsArray: lightsArray,\n shadowsArray: shadowsArray,\n lights: lights\n };\n return {\n init: init,\n state: state,\n setupLights: setupLights,\n setupLightsView: setupLightsView,\n pushLight: pushLight,\n pushShadow: pushShadow\n };\n}\nfunction $d5b33d7c30034067$var$WebGLRenderStates(extensions, capabilities) {\n let renderStates = new WeakMap();\n function get(scene, renderCallDepth = 0) {\n const renderStateArray = renderStates.get(scene);\n let renderState;\n if (renderStateArray === undefined) {\n renderState = new $d5b33d7c30034067$var$WebGLRenderState(extensions, capabilities);\n renderStates.set(scene, [\n renderState\n ]);\n } else if (renderCallDepth >= renderStateArray.length) {\n renderState = new $d5b33d7c30034067$var$WebGLRenderState(extensions, capabilities);\n renderStateArray.push(renderState);\n } else renderState = renderStateArray[renderCallDepth];\n return renderState;\n }\n function dispose() {\n renderStates = new WeakMap();\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nclass $d5b33d7c30034067$export$2698c22ec13825db extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshDepthMaterial = true;\n this.type = \"MeshDepthMaterial\";\n this.depthPacking = $d5b33d7c30034067$export$deeb383078690b50;\n this.map = null;\n this.alphaMap = null;\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.depthPacking = source.depthPacking;\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$33e187ed002f2a19 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshDistanceMaterial = true;\n this.type = \"MeshDistanceMaterial\";\n this.map = null;\n this.alphaMap = null;\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$vertex = \"void main() {\\n\tgl_Position = vec4( position, 1.0 );\\n}\";\nconst $d5b33d7c30034067$var$fragment = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include \\nvoid main() {\\n\tconst float samples = float( VSM_SAMPLES );\\n\tfloat mean = 0.0;\\n\tfloat squared_mean = 0.0;\\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\\n\tfor ( float i = 0.0; i < samples; i ++ ) {\\n\t\tfloat uvOffset = uvStart + i * uvStride;\\n\t\t#ifdef HORIZONTAL_PASS\\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\\n\t\t\tmean += distribution.x;\\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\t\t#else\\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\\n\t\t\tmean += depth;\\n\t\t\tsquared_mean += depth * depth;\\n\t\t#endif\\n\t}\\n\tmean = mean / samples;\\n\tsquared_mean = squared_mean / samples;\\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\nfunction $d5b33d7c30034067$var$WebGLShadowMap(_renderer, _objects, _capabilities) {\n let _frustum = new $d5b33d7c30034067$export$35efe6f4c85463d2();\n const _shadowMapSize = new $d5b33d7c30034067$export$c977b3e384af9ae1(), _viewportSize = new $d5b33d7c30034067$export$c977b3e384af9ae1(), _viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3(), _depthMaterial = new $d5b33d7c30034067$export$2698c22ec13825db({\n depthPacking: $d5b33d7c30034067$export$8f910f4c4f73df11\n }), _distanceMaterial = new $d5b33d7c30034067$export$33e187ed002f2a19(), _materialCache = {}, _maxTextureSize = _capabilities.maxTextureSize;\n const shadowSide = {\n [$d5b33d7c30034067$export$2ede184fc2998901]: $d5b33d7c30034067$export$d9f0486e75b5ace,\n [$d5b33d7c30034067$export$d9f0486e75b5ace]: $d5b33d7c30034067$export$2ede184fc2998901,\n [$d5b33d7c30034067$export$3b296b6f144d5b03]: $d5b33d7c30034067$export$3b296b6f144d5b03\n };\n const shadowMaterialVertical = new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n defines: {\n VSM_SAMPLES: 8\n },\n uniforms: {\n shadow_pass: {\n value: null\n },\n resolution: {\n value: new $d5b33d7c30034067$export$c977b3e384af9ae1()\n },\n radius: {\n value: 4.0\n }\n },\n vertexShader: $d5b33d7c30034067$var$vertex,\n fragmentShader: $d5b33d7c30034067$var$fragment\n });\n const shadowMaterialHorizontal = shadowMaterialVertical.clone();\n shadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n const fullScreenTri = new $d5b33d7c30034067$export$b7be63a67df8959();\n fullScreenTri.setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117(new Float32Array([\n -1,\n -1,\n 0.5,\n 3,\n -1,\n 0.5,\n -1,\n 3,\n 0.5\n ]), 3));\n const fullScreenMesh = new $d5b33d7c30034067$export$e176487c05830cc5(fullScreenTri, shadowMaterialVertical);\n const scope = this;\n this.enabled = false;\n this.autoUpdate = true;\n this.needsUpdate = false;\n this.type = $d5b33d7c30034067$export$5813f879eee7cd88;\n let _previousType = this.type;\n this.render = function(lights, scene, camera) {\n if (scope.enabled === false) return;\n if (scope.autoUpdate === false && scope.needsUpdate === false) return;\n if (lights.length === 0) return;\n const currentRenderTarget = _renderer.getRenderTarget();\n const activeCubeFace = _renderer.getActiveCubeFace();\n const activeMipmapLevel = _renderer.getActiveMipmapLevel();\n const _state = _renderer.state;\n // Set GL state for depth map.\n _state.setBlending($d5b33d7c30034067$export$63b8d6b580fc65ba);\n _state.buffers.color.setClear(1, 1, 1, 1);\n _state.buffers.depth.setTest(true);\n _state.setScissorTest(false);\n // check for shadow map type changes\n const toVSM = _previousType !== $d5b33d7c30034067$export$896ae1ade6c829c4 && this.type === $d5b33d7c30034067$export$896ae1ade6c829c4;\n const fromVSM = _previousType === $d5b33d7c30034067$export$896ae1ade6c829c4 && this.type !== $d5b33d7c30034067$export$896ae1ade6c829c4;\n // render depth map\n for(let i = 0, il = lights.length; i < il; i++){\n const light = lights[i];\n const shadow = light.shadow;\n if (shadow === undefined) {\n console.warn(\"THREE.WebGLShadowMap:\", light, \"has no shadow.\");\n continue;\n }\n if (shadow.autoUpdate === false && shadow.needsUpdate === false) continue;\n _shadowMapSize.copy(shadow.mapSize);\n const shadowFrameExtents = shadow.getFrameExtents();\n _shadowMapSize.multiply(shadowFrameExtents);\n _viewportSize.copy(shadow.mapSize);\n if (_shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize) {\n if (_shadowMapSize.x > _maxTextureSize) {\n _viewportSize.x = Math.floor(_maxTextureSize / shadowFrameExtents.x);\n _shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n shadow.mapSize.x = _viewportSize.x;\n }\n if (_shadowMapSize.y > _maxTextureSize) {\n _viewportSize.y = Math.floor(_maxTextureSize / shadowFrameExtents.y);\n _shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n shadow.mapSize.y = _viewportSize.y;\n }\n }\n if (shadow.map === null || toVSM === true || fromVSM === true) {\n const pars = this.type !== $d5b33d7c30034067$export$896ae1ade6c829c4 ? {\n minFilter: $d5b33d7c30034067$export$727aa5ec3fe39bf0,\n magFilter: $d5b33d7c30034067$export$727aa5ec3fe39bf0\n } : {};\n if (shadow.map !== null) shadow.map.dispose();\n shadow.map = new $d5b33d7c30034067$export$3c052beb2e51e23f(_shadowMapSize.x, _shadowMapSize.y, pars);\n shadow.map.texture.name = light.name + \".shadowMap\";\n shadow.camera.updateProjectionMatrix();\n }\n _renderer.setRenderTarget(shadow.map);\n _renderer.clear();\n const viewportCount = shadow.getViewportCount();\n for(let vp = 0; vp < viewportCount; vp++){\n const viewport = shadow.getViewport(vp);\n _viewport.set(_viewportSize.x * viewport.x, _viewportSize.y * viewport.y, _viewportSize.x * viewport.z, _viewportSize.y * viewport.w);\n _state.viewport(_viewport);\n shadow.updateMatrices(light, vp);\n _frustum = shadow.getFrustum();\n renderObject(scene, camera, shadow.camera, light, this.type);\n }\n // do blur pass for VSM\n if (shadow.isPointLightShadow !== true && this.type === $d5b33d7c30034067$export$896ae1ade6c829c4) VSMPass(shadow, camera);\n shadow.needsUpdate = false;\n }\n _previousType = this.type;\n scope.needsUpdate = false;\n _renderer.setRenderTarget(currentRenderTarget, activeCubeFace, activeMipmapLevel);\n };\n function VSMPass(shadow, camera) {\n const geometry = _objects.update(fullScreenMesh);\n if (shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples) {\n shadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples;\n shadowMaterialHorizontal.defines.VSM_SAMPLES = shadow.blurSamples;\n shadowMaterialVertical.needsUpdate = true;\n shadowMaterialHorizontal.needsUpdate = true;\n }\n if (shadow.mapPass === null) shadow.mapPass = new $d5b33d7c30034067$export$3c052beb2e51e23f(_shadowMapSize.x, _shadowMapSize.y);\n // vertical pass\n shadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n shadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n shadowMaterialVertical.uniforms.radius.value = shadow.radius;\n _renderer.setRenderTarget(shadow.mapPass);\n _renderer.clear();\n _renderer.renderBufferDirect(camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null);\n // horizontal pass\n shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n shadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n _renderer.setRenderTarget(shadow.map);\n _renderer.clear();\n _renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);\n }\n function getDepthMaterial(object, material, light, type) {\n let result = null;\n const customMaterial = light.isPointLight === true ? object.customDistanceMaterial : object.customDepthMaterial;\n if (customMaterial !== undefined) result = customMaterial;\n else {\n result = light.isPointLight === true ? _distanceMaterial : _depthMaterial;\n if (_renderer.localClippingEnabled && material.clipShadows === true && Array.isArray(material.clippingPlanes) && material.clippingPlanes.length !== 0 || material.displacementMap && material.displacementScale !== 0 || material.alphaMap && material.alphaTest > 0 || material.map && material.alphaTest > 0) {\n // in this case we need a unique material instance reflecting the\n // appropriate state\n const keyA = result.uuid, keyB = material.uuid;\n let materialsForVariant = _materialCache[keyA];\n if (materialsForVariant === undefined) {\n materialsForVariant = {};\n _materialCache[keyA] = materialsForVariant;\n }\n let cachedMaterial = materialsForVariant[keyB];\n if (cachedMaterial === undefined) {\n cachedMaterial = result.clone();\n materialsForVariant[keyB] = cachedMaterial;\n }\n result = cachedMaterial;\n }\n }\n result.visible = material.visible;\n result.wireframe = material.wireframe;\n if (type === $d5b33d7c30034067$export$896ae1ade6c829c4) result.side = material.shadowSide !== null ? material.shadowSide : material.side;\n else result.side = material.shadowSide !== null ? material.shadowSide : shadowSide[material.side];\n result.alphaMap = material.alphaMap;\n result.alphaTest = material.alphaTest;\n result.map = material.map;\n result.clipShadows = material.clipShadows;\n result.clippingPlanes = material.clippingPlanes;\n result.clipIntersection = material.clipIntersection;\n result.displacementMap = material.displacementMap;\n result.displacementScale = material.displacementScale;\n result.displacementBias = material.displacementBias;\n result.wireframeLinewidth = material.wireframeLinewidth;\n result.linewidth = material.linewidth;\n if (light.isPointLight === true && result.isMeshDistanceMaterial === true) {\n const materialProperties = _renderer.properties.get(result);\n materialProperties.light = light;\n }\n return result;\n }\n function renderObject(object, camera, shadowCamera, light, type) {\n if (object.visible === false) return;\n const visible = object.layers.test(camera.layers);\n if (visible && (object.isMesh || object.isLine || object.isPoints)) {\n if ((object.castShadow || object.receiveShadow && type === $d5b33d7c30034067$export$896ae1ade6c829c4) && (!object.frustumCulled || _frustum.intersectsObject(object))) {\n object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld);\n const geometry = _objects.update(object);\n const material = object.material;\n if (Array.isArray(material)) {\n const groups = geometry.groups;\n for(let k = 0, kl = groups.length; k < kl; k++){\n const group = groups[k];\n const groupMaterial = material[group.materialIndex];\n if (groupMaterial && groupMaterial.visible) {\n const depthMaterial = getDepthMaterial(object, groupMaterial, light, type);\n _renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);\n }\n }\n } else if (material.visible) {\n const depthMaterial = getDepthMaterial(object, material, light, type);\n _renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);\n }\n }\n }\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)renderObject(children[i], camera, shadowCamera, light, type);\n }\n}\nfunction $d5b33d7c30034067$var$WebGLState(gl, extensions, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n function ColorBuffer() {\n let locked = false;\n const color = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n let currentColorMask = null;\n const currentColorClear = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, 0, 0);\n return {\n setMask: function(colorMask) {\n if (currentColorMask !== colorMask && !locked) {\n gl.colorMask(colorMask, colorMask, colorMask, colorMask);\n currentColorMask = colorMask;\n }\n },\n setLocked: function(lock) {\n locked = lock;\n },\n setClear: function(r, g, b, a, premultipliedAlpha) {\n if (premultipliedAlpha === true) {\n r *= a;\n g *= a;\n b *= a;\n }\n color.set(r, g, b, a);\n if (currentColorClear.equals(color) === false) {\n gl.clearColor(r, g, b, a);\n currentColorClear.copy(color);\n }\n },\n reset: function() {\n locked = false;\n currentColorMask = null;\n currentColorClear.set(-1, 0, 0, 0); // set to invalid state\n }\n };\n }\n function DepthBuffer() {\n let locked = false;\n let currentDepthMask = null;\n let currentDepthFunc = null;\n let currentDepthClear = null;\n return {\n setTest: function(depthTest) {\n if (depthTest) enable(gl.DEPTH_TEST);\n else disable(gl.DEPTH_TEST);\n },\n setMask: function(depthMask) {\n if (currentDepthMask !== depthMask && !locked) {\n gl.depthMask(depthMask);\n currentDepthMask = depthMask;\n }\n },\n setFunc: function(depthFunc) {\n if (currentDepthFunc !== depthFunc) {\n switch(depthFunc){\n case $d5b33d7c30034067$export$69025ce147cee220:\n gl.depthFunc(gl.NEVER);\n break;\n case $d5b33d7c30034067$export$7182eb52ea3b3f04:\n gl.depthFunc(gl.ALWAYS);\n break;\n case $d5b33d7c30034067$export$eedccec66ab7ebe:\n gl.depthFunc(gl.LESS);\n break;\n case $d5b33d7c30034067$export$296f78a0b892f81a:\n gl.depthFunc(gl.LEQUAL);\n break;\n case $d5b33d7c30034067$export$a60d398fc7b7590e:\n gl.depthFunc(gl.EQUAL);\n break;\n case $d5b33d7c30034067$export$7d7234c1240a1fc4:\n gl.depthFunc(gl.GEQUAL);\n break;\n case $d5b33d7c30034067$export$c5e2c52991f30937:\n gl.depthFunc(gl.GREATER);\n break;\n case $d5b33d7c30034067$export$2f843afa843d8916:\n gl.depthFunc(gl.NOTEQUAL);\n break;\n default:\n gl.depthFunc(gl.LEQUAL);\n }\n currentDepthFunc = depthFunc;\n }\n },\n setLocked: function(lock) {\n locked = lock;\n },\n setClear: function(depth) {\n if (currentDepthClear !== depth) {\n gl.clearDepth(depth);\n currentDepthClear = depth;\n }\n },\n reset: function() {\n locked = false;\n currentDepthMask = null;\n currentDepthFunc = null;\n currentDepthClear = null;\n }\n };\n }\n function StencilBuffer() {\n let locked = false;\n let currentStencilMask = null;\n let currentStencilFunc = null;\n let currentStencilRef = null;\n let currentStencilFuncMask = null;\n let currentStencilFail = null;\n let currentStencilZFail = null;\n let currentStencilZPass = null;\n let currentStencilClear = null;\n return {\n setTest: function(stencilTest) {\n if (!locked) {\n if (stencilTest) enable(gl.STENCIL_TEST);\n else disable(gl.STENCIL_TEST);\n }\n },\n setMask: function(stencilMask) {\n if (currentStencilMask !== stencilMask && !locked) {\n gl.stencilMask(stencilMask);\n currentStencilMask = stencilMask;\n }\n },\n setFunc: function(stencilFunc, stencilRef, stencilMask) {\n if (currentStencilFunc !== stencilFunc || currentStencilRef !== stencilRef || currentStencilFuncMask !== stencilMask) {\n gl.stencilFunc(stencilFunc, stencilRef, stencilMask);\n currentStencilFunc = stencilFunc;\n currentStencilRef = stencilRef;\n currentStencilFuncMask = stencilMask;\n }\n },\n setOp: function(stencilFail, stencilZFail, stencilZPass) {\n if (currentStencilFail !== stencilFail || currentStencilZFail !== stencilZFail || currentStencilZPass !== stencilZPass) {\n gl.stencilOp(stencilFail, stencilZFail, stencilZPass);\n currentStencilFail = stencilFail;\n currentStencilZFail = stencilZFail;\n currentStencilZPass = stencilZPass;\n }\n },\n setLocked: function(lock) {\n locked = lock;\n },\n setClear: function(stencil) {\n if (currentStencilClear !== stencil) {\n gl.clearStencil(stencil);\n currentStencilClear = stencil;\n }\n },\n reset: function() {\n locked = false;\n currentStencilMask = null;\n currentStencilFunc = null;\n currentStencilRef = null;\n currentStencilFuncMask = null;\n currentStencilFail = null;\n currentStencilZFail = null;\n currentStencilZPass = null;\n currentStencilClear = null;\n }\n };\n }\n //\n const colorBuffer = new ColorBuffer();\n const depthBuffer = new DepthBuffer();\n const stencilBuffer = new StencilBuffer();\n const uboBindings = new WeakMap();\n const uboProgramMap = new WeakMap();\n let enabledCapabilities = {};\n let currentBoundFramebuffers = {};\n let currentDrawbuffers = new WeakMap();\n let defaultDrawbuffers = [];\n let currentProgram = null;\n let currentBlendingEnabled = false;\n let currentBlending = null;\n let currentBlendEquation = null;\n let currentBlendSrc = null;\n let currentBlendDst = null;\n let currentBlendEquationAlpha = null;\n let currentBlendSrcAlpha = null;\n let currentBlendDstAlpha = null;\n let currentPremultipledAlpha = false;\n let currentFlipSided = null;\n let currentCullFace = null;\n let currentLineWidth = null;\n let currentPolygonOffsetFactor = null;\n let currentPolygonOffsetUnits = null;\n const maxTextures = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);\n let lineWidthAvailable = false;\n let version = 0;\n const glVersion = gl.getParameter(gl.VERSION);\n if (glVersion.indexOf(\"WebGL\") !== -1) {\n version = parseFloat(/^WebGL (\\d)/.exec(glVersion)[1]);\n lineWidthAvailable = version >= 1.0;\n } else if (glVersion.indexOf(\"OpenGL ES\") !== -1) {\n version = parseFloat(/^OpenGL ES (\\d)/.exec(glVersion)[1]);\n lineWidthAvailable = version >= 2.0;\n }\n let currentTextureSlot = null;\n let currentBoundTextures = {};\n const scissorParam = gl.getParameter(gl.SCISSOR_BOX);\n const viewportParam = gl.getParameter(gl.VIEWPORT);\n const currentScissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3().fromArray(scissorParam);\n const currentViewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3().fromArray(viewportParam);\n function createTexture(type, target, count, dimensions) {\n const data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4.\n const texture = gl.createTexture();\n gl.bindTexture(type, texture);\n gl.texParameteri(type, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(type, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n for(let i = 0; i < count; i++)if (isWebGL2 && (type === gl.TEXTURE_3D || type === gl.TEXTURE_2D_ARRAY)) gl.texImage3D(target, 0, gl.RGBA, 1, 1, dimensions, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);\n else gl.texImage2D(target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);\n return texture;\n }\n const emptyTextures = {};\n emptyTextures[gl.TEXTURE_2D] = createTexture(gl.TEXTURE_2D, gl.TEXTURE_2D, 1);\n emptyTextures[gl.TEXTURE_CUBE_MAP] = createTexture(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6);\n if (isWebGL2) {\n emptyTextures[gl.TEXTURE_2D_ARRAY] = createTexture(gl.TEXTURE_2D_ARRAY, gl.TEXTURE_2D_ARRAY, 1, 1);\n emptyTextures[gl.TEXTURE_3D] = createTexture(gl.TEXTURE_3D, gl.TEXTURE_3D, 1, 1);\n }\n // init\n colorBuffer.setClear(0, 0, 0, 1);\n depthBuffer.setClear(1);\n stencilBuffer.setClear(0);\n enable(gl.DEPTH_TEST);\n depthBuffer.setFunc($d5b33d7c30034067$export$296f78a0b892f81a);\n setFlipSided(false);\n setCullFace($d5b33d7c30034067$export$b9a7b4fc5cb15f9b);\n enable(gl.CULL_FACE);\n setBlending($d5b33d7c30034067$export$63b8d6b580fc65ba);\n //\n function enable(id) {\n if (enabledCapabilities[id] !== true) {\n gl.enable(id);\n enabledCapabilities[id] = true;\n }\n }\n function disable(id) {\n if (enabledCapabilities[id] !== false) {\n gl.disable(id);\n enabledCapabilities[id] = false;\n }\n }\n function bindFramebuffer(target, framebuffer) {\n if (currentBoundFramebuffers[target] !== framebuffer) {\n gl.bindFramebuffer(target, framebuffer);\n currentBoundFramebuffers[target] = framebuffer;\n if (isWebGL2) {\n // gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER\n if (target === gl.DRAW_FRAMEBUFFER) currentBoundFramebuffers[gl.FRAMEBUFFER] = framebuffer;\n if (target === gl.FRAMEBUFFER) currentBoundFramebuffers[gl.DRAW_FRAMEBUFFER] = framebuffer;\n }\n return true;\n }\n return false;\n }\n function drawBuffers(renderTarget, framebuffer) {\n let drawBuffers = defaultDrawbuffers;\n let needsUpdate = false;\n if (renderTarget) {\n drawBuffers = currentDrawbuffers.get(framebuffer);\n if (drawBuffers === undefined) {\n drawBuffers = [];\n currentDrawbuffers.set(framebuffer, drawBuffers);\n }\n if (renderTarget.isWebGLMultipleRenderTargets) {\n const textures = renderTarget.texture;\n if (drawBuffers.length !== textures.length || drawBuffers[0] !== gl.COLOR_ATTACHMENT0) {\n for(let i = 0, il = textures.length; i < il; i++)drawBuffers[i] = gl.COLOR_ATTACHMENT0 + i;\n drawBuffers.length = textures.length;\n needsUpdate = true;\n }\n } else if (drawBuffers[0] !== gl.COLOR_ATTACHMENT0) {\n drawBuffers[0] = gl.COLOR_ATTACHMENT0;\n needsUpdate = true;\n }\n } else if (drawBuffers[0] !== gl.BACK) {\n drawBuffers[0] = gl.BACK;\n needsUpdate = true;\n }\n if (needsUpdate) {\n if (capabilities.isWebGL2) gl.drawBuffers(drawBuffers);\n else extensions.get(\"WEBGL_draw_buffers\").drawBuffersWEBGL(drawBuffers);\n }\n }\n function useProgram(program) {\n if (currentProgram !== program) {\n gl.useProgram(program);\n currentProgram = program;\n return true;\n }\n return false;\n }\n const equationToGL = {\n [$d5b33d7c30034067$export$20183a0484ce21a0]: gl.FUNC_ADD,\n [$d5b33d7c30034067$export$73e0df5177988548]: gl.FUNC_SUBTRACT,\n [$d5b33d7c30034067$export$28e582859cbec660]: gl.FUNC_REVERSE_SUBTRACT\n };\n if (isWebGL2) {\n equationToGL[$d5b33d7c30034067$export$c8c1508da8d0600c] = gl.MIN;\n equationToGL[$d5b33d7c30034067$export$99948c02fb51055f] = gl.MAX;\n } else {\n const extension = extensions.get(\"EXT_blend_minmax\");\n if (extension !== null) {\n equationToGL[$d5b33d7c30034067$export$c8c1508da8d0600c] = extension.MIN_EXT;\n equationToGL[$d5b33d7c30034067$export$99948c02fb51055f] = extension.MAX_EXT;\n }\n }\n const factorToGL = {\n [$d5b33d7c30034067$export$2110f05edf778d3d]: gl.ZERO,\n [$d5b33d7c30034067$export$8805bad65e24940e]: gl.ONE,\n [$d5b33d7c30034067$export$7fbe15b28d28cf52]: gl.SRC_COLOR,\n [$d5b33d7c30034067$export$d5773124e86cf28c]: gl.SRC_ALPHA,\n [$d5b33d7c30034067$export$c05e2a1fc8609506]: gl.SRC_ALPHA_SATURATE,\n [$d5b33d7c30034067$export$ef5f2dd8ffac5574]: gl.DST_COLOR,\n [$d5b33d7c30034067$export$a78aed1ca2a87192]: gl.DST_ALPHA,\n [$d5b33d7c30034067$export$947829af9f2c17f6]: gl.ONE_MINUS_SRC_COLOR,\n [$d5b33d7c30034067$export$11d468cc7f19e971]: gl.ONE_MINUS_SRC_ALPHA,\n [$d5b33d7c30034067$export$56b85b2686ab16]: gl.ONE_MINUS_DST_COLOR,\n [$d5b33d7c30034067$export$5d0fe17fd8773bac]: gl.ONE_MINUS_DST_ALPHA\n };\n function setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha) {\n if (blending === $d5b33d7c30034067$export$63b8d6b580fc65ba) {\n if (currentBlendingEnabled === true) {\n disable(gl.BLEND);\n currentBlendingEnabled = false;\n }\n return;\n }\n if (currentBlendingEnabled === false) {\n enable(gl.BLEND);\n currentBlendingEnabled = true;\n }\n if (blending !== $d5b33d7c30034067$export$eda4864c68df1fa2) {\n if (blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha) {\n if (currentBlendEquation !== $d5b33d7c30034067$export$20183a0484ce21a0 || currentBlendEquationAlpha !== $d5b33d7c30034067$export$20183a0484ce21a0) {\n gl.blendEquation(gl.FUNC_ADD);\n currentBlendEquation = $d5b33d7c30034067$export$20183a0484ce21a0;\n currentBlendEquationAlpha = $d5b33d7c30034067$export$20183a0484ce21a0;\n }\n if (premultipliedAlpha) switch(blending){\n case $d5b33d7c30034067$export$5b29a26d96ee6af0:\n gl.blendFuncSeparate(gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n break;\n case $d5b33d7c30034067$export$777d8f9551c2216b:\n gl.blendFunc(gl.ONE, gl.ONE);\n break;\n case $d5b33d7c30034067$export$cdfa06f868e2e467:\n gl.blendFuncSeparate(gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE);\n break;\n case $d5b33d7c30034067$export$4138e1c684b46a20:\n gl.blendFuncSeparate(gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA);\n break;\n default:\n console.error(\"THREE.WebGLState: Invalid blending: \", blending);\n break;\n }\n else switch(blending){\n case $d5b33d7c30034067$export$5b29a26d96ee6af0:\n gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n break;\n case $d5b33d7c30034067$export$777d8f9551c2216b:\n gl.blendFunc(gl.SRC_ALPHA, gl.ONE);\n break;\n case $d5b33d7c30034067$export$cdfa06f868e2e467:\n gl.blendFuncSeparate(gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE);\n break;\n case $d5b33d7c30034067$export$4138e1c684b46a20:\n gl.blendFunc(gl.ZERO, gl.SRC_COLOR);\n break;\n default:\n console.error(\"THREE.WebGLState: Invalid blending: \", blending);\n break;\n }\n currentBlendSrc = null;\n currentBlendDst = null;\n currentBlendSrcAlpha = null;\n currentBlendDstAlpha = null;\n currentBlending = blending;\n currentPremultipledAlpha = premultipliedAlpha;\n }\n return;\n }\n // custom blending\n blendEquationAlpha = blendEquationAlpha || blendEquation;\n blendSrcAlpha = blendSrcAlpha || blendSrc;\n blendDstAlpha = blendDstAlpha || blendDst;\n if (blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha) {\n gl.blendEquationSeparate(equationToGL[blendEquation], equationToGL[blendEquationAlpha]);\n currentBlendEquation = blendEquation;\n currentBlendEquationAlpha = blendEquationAlpha;\n }\n if (blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha) {\n gl.blendFuncSeparate(factorToGL[blendSrc], factorToGL[blendDst], factorToGL[blendSrcAlpha], factorToGL[blendDstAlpha]);\n currentBlendSrc = blendSrc;\n currentBlendDst = blendDst;\n currentBlendSrcAlpha = blendSrcAlpha;\n currentBlendDstAlpha = blendDstAlpha;\n }\n currentBlending = blending;\n currentPremultipledAlpha = false;\n }\n function setMaterial(material, frontFaceCW) {\n material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 ? disable(gl.CULL_FACE) : enable(gl.CULL_FACE);\n let flipSided = material.side === $d5b33d7c30034067$export$d9f0486e75b5ace;\n if (frontFaceCW) flipSided = !flipSided;\n setFlipSided(flipSided);\n material.blending === $d5b33d7c30034067$export$5b29a26d96ee6af0 && material.transparent === false ? setBlending($d5b33d7c30034067$export$63b8d6b580fc65ba) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha);\n depthBuffer.setFunc(material.depthFunc);\n depthBuffer.setTest(material.depthTest);\n depthBuffer.setMask(material.depthWrite);\n colorBuffer.setMask(material.colorWrite);\n const stencilWrite = material.stencilWrite;\n stencilBuffer.setTest(stencilWrite);\n if (stencilWrite) {\n stencilBuffer.setMask(material.stencilWriteMask);\n stencilBuffer.setFunc(material.stencilFunc, material.stencilRef, material.stencilFuncMask);\n stencilBuffer.setOp(material.stencilFail, material.stencilZFail, material.stencilZPass);\n }\n setPolygonOffset(material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits);\n material.alphaToCoverage === true ? enable(gl.SAMPLE_ALPHA_TO_COVERAGE) : disable(gl.SAMPLE_ALPHA_TO_COVERAGE);\n }\n //\n function setFlipSided(flipSided) {\n if (currentFlipSided !== flipSided) {\n if (flipSided) gl.frontFace(gl.CW);\n else gl.frontFace(gl.CCW);\n currentFlipSided = flipSided;\n }\n }\n function setCullFace(cullFace) {\n if (cullFace !== $d5b33d7c30034067$export$3237e1f2c1ea1f44) {\n enable(gl.CULL_FACE);\n if (cullFace !== currentCullFace) {\n if (cullFace === $d5b33d7c30034067$export$b9a7b4fc5cb15f9b) gl.cullFace(gl.BACK);\n else if (cullFace === $d5b33d7c30034067$export$b8058bcc7037d3f3) gl.cullFace(gl.FRONT);\n else gl.cullFace(gl.FRONT_AND_BACK);\n }\n } else disable(gl.CULL_FACE);\n currentCullFace = cullFace;\n }\n function setLineWidth(width) {\n if (width !== currentLineWidth) {\n if (lineWidthAvailable) gl.lineWidth(width);\n currentLineWidth = width;\n }\n }\n function setPolygonOffset(polygonOffset, factor, units) {\n if (polygonOffset) {\n enable(gl.POLYGON_OFFSET_FILL);\n if (currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units) {\n gl.polygonOffset(factor, units);\n currentPolygonOffsetFactor = factor;\n currentPolygonOffsetUnits = units;\n }\n } else disable(gl.POLYGON_OFFSET_FILL);\n }\n function setScissorTest(scissorTest) {\n if (scissorTest) enable(gl.SCISSOR_TEST);\n else disable(gl.SCISSOR_TEST);\n }\n // texture\n function activeTexture(webglSlot) {\n if (webglSlot === undefined) webglSlot = gl.TEXTURE0 + maxTextures - 1;\n if (currentTextureSlot !== webglSlot) {\n gl.activeTexture(webglSlot);\n currentTextureSlot = webglSlot;\n }\n }\n function bindTexture(webglType, webglTexture, webglSlot) {\n if (webglSlot === undefined) {\n if (currentTextureSlot === null) webglSlot = gl.TEXTURE0 + maxTextures - 1;\n else webglSlot = currentTextureSlot;\n }\n let boundTexture = currentBoundTextures[webglSlot];\n if (boundTexture === undefined) {\n boundTexture = {\n type: undefined,\n texture: undefined\n };\n currentBoundTextures[webglSlot] = boundTexture;\n }\n if (boundTexture.type !== webglType || boundTexture.texture !== webglTexture) {\n if (currentTextureSlot !== webglSlot) {\n gl.activeTexture(webglSlot);\n currentTextureSlot = webglSlot;\n }\n gl.bindTexture(webglType, webglTexture || emptyTextures[webglType]);\n boundTexture.type = webglType;\n boundTexture.texture = webglTexture;\n }\n }\n function unbindTexture() {\n const boundTexture = currentBoundTextures[currentTextureSlot];\n if (boundTexture !== undefined && boundTexture.type !== undefined) {\n gl.bindTexture(boundTexture.type, null);\n boundTexture.type = undefined;\n boundTexture.texture = undefined;\n }\n }\n function compressedTexImage2D() {\n try {\n gl.compressedTexImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function compressedTexImage3D() {\n try {\n gl.compressedTexImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texSubImage2D() {\n try {\n gl.texSubImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texSubImage3D() {\n try {\n gl.texSubImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function compressedTexSubImage2D() {\n try {\n gl.compressedTexSubImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function compressedTexSubImage3D() {\n try {\n gl.compressedTexSubImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texStorage2D() {\n try {\n gl.texStorage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texStorage3D() {\n try {\n gl.texStorage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texImage2D() {\n try {\n gl.texImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texImage3D() {\n try {\n gl.texImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n //\n function scissor(scissor) {\n if (currentScissor.equals(scissor) === false) {\n gl.scissor(scissor.x, scissor.y, scissor.z, scissor.w);\n currentScissor.copy(scissor);\n }\n }\n function viewport(viewport) {\n if (currentViewport.equals(viewport) === false) {\n gl.viewport(viewport.x, viewport.y, viewport.z, viewport.w);\n currentViewport.copy(viewport);\n }\n }\n function updateUBOMapping(uniformsGroup, program) {\n let mapping = uboProgramMap.get(program);\n if (mapping === undefined) {\n mapping = new WeakMap();\n uboProgramMap.set(program, mapping);\n }\n let blockIndex = mapping.get(uniformsGroup);\n if (blockIndex === undefined) {\n blockIndex = gl.getUniformBlockIndex(program, uniformsGroup.name);\n mapping.set(uniformsGroup, blockIndex);\n }\n }\n function uniformBlockBinding(uniformsGroup, program) {\n const mapping = uboProgramMap.get(program);\n const blockIndex = mapping.get(uniformsGroup);\n if (uboBindings.get(program) !== blockIndex) {\n // bind shader specific block index to global block point\n gl.uniformBlockBinding(program, blockIndex, uniformsGroup.__bindingPointIndex);\n uboBindings.set(program, blockIndex);\n }\n }\n //\n function reset() {\n // reset state\n gl.disable(gl.BLEND);\n gl.disable(gl.CULL_FACE);\n gl.disable(gl.DEPTH_TEST);\n gl.disable(gl.POLYGON_OFFSET_FILL);\n gl.disable(gl.SCISSOR_TEST);\n gl.disable(gl.STENCIL_TEST);\n gl.disable(gl.SAMPLE_ALPHA_TO_COVERAGE);\n gl.blendEquation(gl.FUNC_ADD);\n gl.blendFunc(gl.ONE, gl.ZERO);\n gl.blendFuncSeparate(gl.ONE, gl.ZERO, gl.ONE, gl.ZERO);\n gl.colorMask(true, true, true, true);\n gl.clearColor(0, 0, 0, 0);\n gl.depthMask(true);\n gl.depthFunc(gl.LESS);\n gl.clearDepth(1);\n gl.stencilMask(0xffffffff);\n gl.stencilFunc(gl.ALWAYS, 0, 0xffffffff);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n gl.clearStencil(0);\n gl.cullFace(gl.BACK);\n gl.frontFace(gl.CCW);\n gl.polygonOffset(0, 0);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n if (isWebGL2 === true) {\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null);\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null);\n }\n gl.useProgram(null);\n gl.lineWidth(1);\n gl.scissor(0, 0, gl.canvas.width, gl.canvas.height);\n gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);\n // reset internals\n enabledCapabilities = {};\n currentTextureSlot = null;\n currentBoundTextures = {};\n currentBoundFramebuffers = {};\n currentDrawbuffers = new WeakMap();\n defaultDrawbuffers = [];\n currentProgram = null;\n currentBlendingEnabled = false;\n currentBlending = null;\n currentBlendEquation = null;\n currentBlendSrc = null;\n currentBlendDst = null;\n currentBlendEquationAlpha = null;\n currentBlendSrcAlpha = null;\n currentBlendDstAlpha = null;\n currentPremultipledAlpha = false;\n currentFlipSided = null;\n currentCullFace = null;\n currentLineWidth = null;\n currentPolygonOffsetFactor = null;\n currentPolygonOffsetUnits = null;\n currentScissor.set(0, 0, gl.canvas.width, gl.canvas.height);\n currentViewport.set(0, 0, gl.canvas.width, gl.canvas.height);\n colorBuffer.reset();\n depthBuffer.reset();\n stencilBuffer.reset();\n }\n return {\n buffers: {\n color: colorBuffer,\n depth: depthBuffer,\n stencil: stencilBuffer\n },\n enable: enable,\n disable: disable,\n bindFramebuffer: bindFramebuffer,\n drawBuffers: drawBuffers,\n useProgram: useProgram,\n setBlending: setBlending,\n setMaterial: setMaterial,\n setFlipSided: setFlipSided,\n setCullFace: setCullFace,\n setLineWidth: setLineWidth,\n setPolygonOffset: setPolygonOffset,\n setScissorTest: setScissorTest,\n activeTexture: activeTexture,\n bindTexture: bindTexture,\n unbindTexture: unbindTexture,\n compressedTexImage2D: compressedTexImage2D,\n compressedTexImage3D: compressedTexImage3D,\n texImage2D: texImage2D,\n texImage3D: texImage3D,\n updateUBOMapping: updateUBOMapping,\n uniformBlockBinding: uniformBlockBinding,\n texStorage2D: texStorage2D,\n texStorage3D: texStorage3D,\n texSubImage2D: texSubImage2D,\n texSubImage3D: texSubImage3D,\n compressedTexSubImage2D: compressedTexSubImage2D,\n compressedTexSubImage3D: compressedTexSubImage3D,\n scissor: scissor,\n viewport: viewport,\n reset: reset\n };\n}\nfunction $d5b33d7c30034067$var$WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) {\n const isWebGL2 = capabilities.isWebGL2;\n const maxTextures = capabilities.maxTextures;\n const maxCubemapSize = capabilities.maxCubemapSize;\n const maxTextureSize = capabilities.maxTextureSize;\n const maxSamples = capabilities.maxSamples;\n const multisampledRTTExt = extensions.has(\"WEBGL_multisampled_render_to_texture\") ? extensions.get(\"WEBGL_multisampled_render_to_texture\") : null;\n const supportsInvalidateFramebuffer = typeof navigator === \"undefined\" ? false : /OculusBrowser/g.test(navigator.userAgent);\n const _videoTextures = new WeakMap();\n let _canvas;\n const _sources = new WeakMap(); // maps WebglTexture objects to instances of Source\n // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n // also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n // Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n let useOffscreenCanvas = false;\n try {\n useOffscreenCanvas = typeof OffscreenCanvas !== \"undefined\" && new OffscreenCanvas(1, 1).getContext(\"2d\") !== null;\n } catch (err) {\n // Ignore any errors\n }\n function createCanvas(width, height) {\n // Use OffscreenCanvas when available. Specially needed in web workers\n return useOffscreenCanvas ? // eslint-disable-next-line compat/compat\n new OffscreenCanvas(width, height) : $d5b33d7c30034067$var$createElementNS(\"canvas\");\n }\n function resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) {\n let scale = 1;\n // handle case if texture exceeds max size\n if (image.width > maxSize || image.height > maxSize) scale = maxSize / Math.max(image.width, image.height);\n // only perform resize if necessary\n if (scale < 1 || needsPowerOfTwo === true) {\n // only perform resize for certain image types\n if (typeof HTMLImageElement !== \"undefined\" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== \"undefined\" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== \"undefined\" && image instanceof ImageBitmap) {\n const floor = needsPowerOfTwo ? $d5b33d7c30034067$var$floorPowerOfTwo : Math.floor;\n const width = floor(scale * image.width);\n const height = floor(scale * image.height);\n if (_canvas === undefined) _canvas = createCanvas(width, height);\n // cube textures can't reuse the same canvas\n const canvas = needsNewCanvas ? createCanvas(width, height) : _canvas;\n canvas.width = width;\n canvas.height = height;\n const context = canvas.getContext(\"2d\");\n context.drawImage(image, 0, 0, width, height);\n console.warn(\"THREE.WebGLRenderer: Texture has been resized from (\" + image.width + \"x\" + image.height + \") to (\" + width + \"x\" + height + \").\");\n return canvas;\n } else {\n if (\"data\" in image) console.warn(\"THREE.WebGLRenderer: Image in DataTexture is too big (\" + image.width + \"x\" + image.height + \").\");\n return image;\n }\n }\n return image;\n }\n function isPowerOfTwo$1(image) {\n return $d5b33d7c30034067$var$isPowerOfTwo(image.width) && $d5b33d7c30034067$var$isPowerOfTwo(image.height);\n }\n function textureNeedsPowerOfTwo(texture) {\n if (isWebGL2) return false;\n return texture.wrapS !== $d5b33d7c30034067$export$9d9334239a5a5e06 || texture.wrapT !== $d5b33d7c30034067$export$9d9334239a5a5e06 || texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8;\n }\n function textureNeedsGenerateMipmaps(texture, supportsMips) {\n return texture.generateMipmaps && supportsMips && texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8;\n }\n function generateMipmap(target) {\n _gl.generateMipmap(target);\n }\n function getInternalFormat(internalFormatName, glFormat, glType, colorSpace1, forceLinearTransfer = false) {\n if (isWebGL2 === false) return glFormat;\n if (internalFormatName !== null) {\n if (_gl[internalFormatName] !== undefined) return _gl[internalFormatName];\n console.warn(\"THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '\" + internalFormatName + \"'\");\n }\n let internalFormat = glFormat;\n if (glFormat === _gl.RED) {\n if (glType === _gl.FLOAT) internalFormat = _gl.R32F;\n if (glType === _gl.HALF_FLOAT) internalFormat = _gl.R16F;\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.R8;\n }\n if (glFormat === _gl.RED_INTEGER) {\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.R8UI;\n if (glType === _gl.UNSIGNED_SHORT) internalFormat = _gl.R16UI;\n if (glType === _gl.UNSIGNED_INT) internalFormat = _gl.R32UI;\n if (glType === _gl.BYTE) internalFormat = _gl.R8I;\n if (glType === _gl.SHORT) internalFormat = _gl.R16I;\n if (glType === _gl.INT) internalFormat = _gl.R32I;\n }\n if (glFormat === _gl.RG) {\n if (glType === _gl.FLOAT) internalFormat = _gl.RG32F;\n if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RG16F;\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.RG8;\n }\n if (glFormat === _gl.RGBA) {\n if (glType === _gl.FLOAT) internalFormat = _gl.RGBA32F;\n if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGBA16F;\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa && forceLinearTransfer === false ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;\n if (glType === _gl.UNSIGNED_SHORT_4_4_4_4) internalFormat = _gl.RGBA4;\n if (glType === _gl.UNSIGNED_SHORT_5_5_5_1) internalFormat = _gl.RGB5_A1;\n }\n if (internalFormat === _gl.R16F || internalFormat === _gl.R32F || internalFormat === _gl.RG16F || internalFormat === _gl.RG32F || internalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F) extensions.get(\"EXT_color_buffer_float\");\n return internalFormat;\n }\n function getMipLevels(texture, image, supportsMips) {\n if (textureNeedsGenerateMipmaps(texture, supportsMips) === true || texture.isFramebufferTexture && texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8) return Math.log2(Math.max(image.width, image.height)) + 1;\n else if (texture.mipmaps !== undefined && texture.mipmaps.length > 0) // user-defined mipmaps\n return texture.mipmaps.length;\n else if (texture.isCompressedTexture && Array.isArray(texture.image)) return image.mipmaps.length;\n else // texture without mipmaps (only base level)\n return 1;\n }\n // Fallback filters for non-power-of-2 textures\n function filterFallback(f) {\n if (f === $d5b33d7c30034067$export$727aa5ec3fe39bf0 || f === $d5b33d7c30034067$export$d129e38cf6feaa8c || f === $d5b33d7c30034067$export$d2327c1afe5bfdf2) return _gl.NEAREST;\n return _gl.LINEAR;\n }\n //\n function onTextureDispose(event) {\n const texture = event.target;\n texture.removeEventListener(\"dispose\", onTextureDispose);\n deallocateTexture(texture);\n if (texture.isVideoTexture) _videoTextures.delete(texture);\n }\n function onRenderTargetDispose(event) {\n const renderTarget = event.target;\n renderTarget.removeEventListener(\"dispose\", onRenderTargetDispose);\n deallocateRenderTarget(renderTarget);\n }\n //\n function deallocateTexture(texture) {\n const textureProperties = properties.get(texture);\n if (textureProperties.__webglInit === undefined) return;\n // check if it's necessary to remove the WebGLTexture object\n const source = texture.source;\n const webglTextures = _sources.get(source);\n if (webglTextures) {\n const webglTexture = webglTextures[textureProperties.__cacheKey];\n webglTexture.usedTimes--;\n // the WebGLTexture object is not used anymore, remove it\n if (webglTexture.usedTimes === 0) deleteTexture(texture);\n // remove the weak map entry if no WebGLTexture uses the source anymore\n if (Object.keys(webglTextures).length === 0) _sources.delete(source);\n }\n properties.remove(texture);\n }\n function deleteTexture(texture) {\n const textureProperties = properties.get(texture);\n _gl.deleteTexture(textureProperties.__webglTexture);\n const source = texture.source;\n const webglTextures = _sources.get(source);\n delete webglTextures[textureProperties.__cacheKey];\n info.memory.textures--;\n }\n function deallocateRenderTarget(renderTarget) {\n const texture = renderTarget.texture;\n const renderTargetProperties = properties.get(renderTarget);\n const textureProperties = properties.get(texture);\n if (textureProperties.__webglTexture !== undefined) {\n _gl.deleteTexture(textureProperties.__webglTexture);\n info.memory.textures--;\n }\n if (renderTarget.depthTexture) renderTarget.depthTexture.dispose();\n if (renderTarget.isWebGLCubeRenderTarget) for(let i = 0; i < 6; i++){\n if (Array.isArray(renderTargetProperties.__webglFramebuffer[i])) for(let level = 0; level < renderTargetProperties.__webglFramebuffer[i].length; level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i][level]);\n else _gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i]);\n if (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i]);\n }\n else {\n if (Array.isArray(renderTargetProperties.__webglFramebuffer)) for(let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[level]);\n else _gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer);\n if (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer);\n if (renderTargetProperties.__webglMultisampledFramebuffer) _gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer);\n if (renderTargetProperties.__webglColorRenderbuffer) {\n for(let i = 0; i < renderTargetProperties.__webglColorRenderbuffer.length; i++)if (renderTargetProperties.__webglColorRenderbuffer[i]) _gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer[i]);\n }\n if (renderTargetProperties.__webglDepthRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer);\n }\n if (renderTarget.isWebGLMultipleRenderTargets) for(let i = 0, il = texture.length; i < il; i++){\n const attachmentProperties = properties.get(texture[i]);\n if (attachmentProperties.__webglTexture) {\n _gl.deleteTexture(attachmentProperties.__webglTexture);\n info.memory.textures--;\n }\n properties.remove(texture[i]);\n }\n properties.remove(texture);\n properties.remove(renderTarget);\n }\n //\n let textureUnits = 0;\n function resetTextureUnits() {\n textureUnits = 0;\n }\n function allocateTextureUnit() {\n const textureUnit = textureUnits;\n if (textureUnit >= maxTextures) console.warn(\"THREE.WebGLTextures: Trying to use \" + textureUnit + \" texture units while this GPU supports only \" + maxTextures);\n textureUnits += 1;\n return textureUnit;\n }\n function getTextureCacheKey(texture) {\n const array = [];\n array.push(texture.wrapS);\n array.push(texture.wrapT);\n array.push(texture.wrapR || 0);\n array.push(texture.magFilter);\n array.push(texture.minFilter);\n array.push(texture.anisotropy);\n array.push(texture.internalFormat);\n array.push(texture.format);\n array.push(texture.type);\n array.push(texture.generateMipmaps);\n array.push(texture.premultiplyAlpha);\n array.push(texture.flipY);\n array.push(texture.unpackAlignment);\n array.push(texture.colorSpace);\n return array.join();\n }\n //\n function setTexture2D(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.isVideoTexture) updateVideoTexture(texture);\n if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {\n const image = texture.image;\n if (image === null) console.warn(\"THREE.WebGLRenderer: Texture marked for update but no image data found.\");\n else if (image.complete === false) console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\");\n else {\n uploadTexture(textureProperties, texture, slot);\n return;\n }\n }\n state.bindTexture(_gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n function setTexture2DArray(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.version > 0 && textureProperties.__version !== texture.version) {\n uploadTexture(textureProperties, texture, slot);\n return;\n }\n state.bindTexture(_gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n function setTexture3D(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.version > 0 && textureProperties.__version !== texture.version) {\n uploadTexture(textureProperties, texture, slot);\n return;\n }\n state.bindTexture(_gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n function setTextureCube(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.version > 0 && textureProperties.__version !== texture.version) {\n uploadCubeTexture(textureProperties, texture, slot);\n return;\n }\n state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n const wrappingToGL = {\n [$d5b33d7c30034067$export$533346c8e8dac0f5]: _gl.REPEAT,\n [$d5b33d7c30034067$export$9d9334239a5a5e06]: _gl.CLAMP_TO_EDGE,\n [$d5b33d7c30034067$export$c7e7c00b14f51a4f]: _gl.MIRRORED_REPEAT\n };\n const filterToGL = {\n [$d5b33d7c30034067$export$727aa5ec3fe39bf0]: _gl.NEAREST,\n [$d5b33d7c30034067$export$d129e38cf6feaa8c]: _gl.NEAREST_MIPMAP_NEAREST,\n [$d5b33d7c30034067$export$d2327c1afe5bfdf2]: _gl.NEAREST_MIPMAP_LINEAR,\n [$d5b33d7c30034067$export$8a72f490b25c56c8]: _gl.LINEAR,\n [$d5b33d7c30034067$export$19a719f377145a13]: _gl.LINEAR_MIPMAP_NEAREST,\n [$d5b33d7c30034067$export$5d8599b6a933fb1b]: _gl.LINEAR_MIPMAP_LINEAR\n };\n const compareToGL = {\n [$d5b33d7c30034067$export$d9e2d19a747baaab]: _gl.NEVER,\n [$d5b33d7c30034067$export$187b73a3e352c145]: _gl.ALWAYS,\n [$d5b33d7c30034067$export$36bcf49c713b3eb7]: _gl.LESS,\n [$d5b33d7c30034067$export$64eea11eb407ddf1]: _gl.LEQUAL,\n [$d5b33d7c30034067$export$66f28d946fc6a0d5]: _gl.EQUAL,\n [$d5b33d7c30034067$export$1cdcb70d53d65f61]: _gl.GEQUAL,\n [$d5b33d7c30034067$export$155af022118f3a38]: _gl.GREATER,\n [$d5b33d7c30034067$export$67ab95dde6bed156]: _gl.NOTEQUAL\n };\n function setTextureParameters(textureType, texture, supportsMips) {\n if (supportsMips) {\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[texture.wrapS]);\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[texture.wrapT]);\n if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[texture.wrapR]);\n _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[texture.magFilter]);\n _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[texture.minFilter]);\n } else {\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE);\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE);\n if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, _gl.CLAMP_TO_EDGE);\n if (texture.wrapS !== $d5b33d7c30034067$export$9d9334239a5a5e06 || texture.wrapT !== $d5b33d7c30034067$export$9d9334239a5a5e06) console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.\");\n _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterFallback(texture.magFilter));\n _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterFallback(texture.minFilter));\n if (texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8) console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.\");\n }\n if (texture.compareFunction) {\n _gl.texParameteri(textureType, _gl.TEXTURE_COMPARE_MODE, _gl.COMPARE_REF_TO_TEXTURE);\n _gl.texParameteri(textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[texture.compareFunction]);\n }\n if (extensions.has(\"EXT_texture_filter_anisotropic\") === true) {\n const extension = extensions.get(\"EXT_texture_filter_anisotropic\");\n if (texture.magFilter === $d5b33d7c30034067$export$727aa5ec3fe39bf0) return;\n if (texture.minFilter !== $d5b33d7c30034067$export$d2327c1afe5bfdf2 && texture.minFilter !== $d5b33d7c30034067$export$5d8599b6a933fb1b) return;\n if (texture.type === $d5b33d7c30034067$export$f6d331659b644596 && extensions.has(\"OES_texture_float_linear\") === false) return; // verify extension for WebGL 1 and WebGL 2\n if (isWebGL2 === false && texture.type === $d5b33d7c30034067$export$2697304443f382bc && extensions.has(\"OES_texture_half_float_linear\") === false) return; // verify extension for WebGL 1 only\n if (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) {\n _gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, capabilities.getMaxAnisotropy()));\n properties.get(texture).__currentAnisotropy = texture.anisotropy;\n }\n }\n }\n function initTexture(textureProperties, texture) {\n let forceUpload = false;\n if (textureProperties.__webglInit === undefined) {\n textureProperties.__webglInit = true;\n texture.addEventListener(\"dispose\", onTextureDispose);\n }\n // create Source <-> WebGLTextures mapping if necessary\n const source = texture.source;\n let webglTextures = _sources.get(source);\n if (webglTextures === undefined) {\n webglTextures = {};\n _sources.set(source, webglTextures);\n }\n // check if there is already a WebGLTexture object for the given texture parameters\n const textureCacheKey = getTextureCacheKey(texture);\n if (textureCacheKey !== textureProperties.__cacheKey) {\n // if not, create a new instance of WebGLTexture\n if (webglTextures[textureCacheKey] === undefined) {\n // create new entry\n webglTextures[textureCacheKey] = {\n texture: _gl.createTexture(),\n usedTimes: 0\n };\n info.memory.textures++;\n // when a new instance of WebGLTexture was created, a texture upload is required\n // even if the image contents are identical\n forceUpload = true;\n }\n webglTextures[textureCacheKey].usedTimes++;\n // every time the texture cache key changes, it's necessary to check if an instance of\n // WebGLTexture can be deleted in order to avoid a memory leak.\n const webglTexture = webglTextures[textureProperties.__cacheKey];\n if (webglTexture !== undefined) {\n webglTextures[textureProperties.__cacheKey].usedTimes--;\n if (webglTexture.usedTimes === 0) deleteTexture(texture);\n }\n // store references to cache key and WebGLTexture object\n textureProperties.__cacheKey = textureCacheKey;\n textureProperties.__webglTexture = webglTextures[textureCacheKey].texture;\n }\n return forceUpload;\n }\n function uploadTexture(textureProperties, texture, slot) {\n let textureType = _gl.TEXTURE_2D;\n if (texture.isDataArrayTexture || texture.isCompressedArrayTexture) textureType = _gl.TEXTURE_2D_ARRAY;\n if (texture.isData3DTexture) textureType = _gl.TEXTURE_3D;\n const forceUpload = initTexture(textureProperties, texture);\n const source = texture.source;\n state.bindTexture(textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n const sourceProperties = properties.get(source);\n if (source.version !== sourceProperties.__version || forceUpload === true) {\n state.activeTexture(_gl.TEXTURE0 + slot);\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment);\n _gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE);\n const needsPowerOfTwo = textureNeedsPowerOfTwo(texture) && isPowerOfTwo$1(texture.image) === false;\n let image = resizeImage(texture.image, needsPowerOfTwo, false, maxTextureSize);\n image = verifyColorSpace(texture, image);\n const supportsMips = isPowerOfTwo$1(image) || isWebGL2, glFormat = utils.convert(texture.format, texture.colorSpace);\n let glType = utils.convert(texture.type), glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n setTextureParameters(textureType, texture, supportsMips);\n let mipmap;\n const mipmaps = texture.mipmaps;\n const useTexStorage = isWebGL2 && texture.isVideoTexture !== true;\n const allocateMemory = sourceProperties.__version === undefined || forceUpload === true;\n const levels = getMipLevels(texture, image, supportsMips);\n if (texture.isDepthTexture) {\n // populate depth texture with dummy data\n glInternalFormat = _gl.DEPTH_COMPONENT;\n if (isWebGL2) {\n if (texture.type === $d5b33d7c30034067$export$f6d331659b644596) glInternalFormat = _gl.DEPTH_COMPONENT32F;\n else if (texture.type === $d5b33d7c30034067$export$c3c7fc4518ebba96) glInternalFormat = _gl.DEPTH_COMPONENT24;\n else if (texture.type === $d5b33d7c30034067$export$6c8ea339bfab1301) glInternalFormat = _gl.DEPTH24_STENCIL8;\n else glInternalFormat = _gl.DEPTH_COMPONENT16; // WebGL2 requires sized internalformat for glTexImage2D\n } else if (texture.type === $d5b33d7c30034067$export$f6d331659b644596) console.error(\"WebGLRenderer: Floating point depth texture requires WebGL2.\");\n // validation checks for WebGL 1\n if (texture.format === $d5b33d7c30034067$export$c1b6b5136be58045 && glInternalFormat === _gl.DEPTH_COMPONENT) // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n // DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n {\n if (texture.type !== $d5b33d7c30034067$export$c63dc51868b06a9d && texture.type !== $d5b33d7c30034067$export$c3c7fc4518ebba96) {\n console.warn(\"THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.\");\n texture.type = $d5b33d7c30034067$export$c3c7fc4518ebba96;\n glType = utils.convert(texture.type);\n }\n }\n if (texture.format === $d5b33d7c30034067$export$1e113ac2d0905829 && glInternalFormat === _gl.DEPTH_COMPONENT) {\n // Depth stencil textures need the DEPTH_STENCIL internal format\n // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n glInternalFormat = _gl.DEPTH_STENCIL;\n // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n // DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n if (texture.type !== $d5b33d7c30034067$export$6c8ea339bfab1301) {\n console.warn(\"THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.\");\n texture.type = $d5b33d7c30034067$export$6c8ea339bfab1301;\n glType = utils.convert(texture.type);\n }\n }\n //\n if (allocateMemory) {\n if (useTexStorage) state.texStorage2D(_gl.TEXTURE_2D, 1, glInternalFormat, image.width, image.height);\n else state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null);\n }\n } else if (texture.isDataTexture) {\n // use manually created mipmaps if available\n // if there are no manual mipmaps\n // set 0 level mipmap and then use GL to generate other mipmap levels\n if (mipmaps.length > 0 && supportsMips) {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);\n else state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n }\n texture.generateMipmaps = false;\n } else if (useTexStorage) {\n if (allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);\n state.texSubImage2D(_gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data);\n } else state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data);\n } else if (texture.isCompressedTexture) {\n if (texture.isCompressedArrayTexture) {\n if (useTexStorage && allocateMemory) state.texStorage3D(_gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height, image.depth);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (texture.format !== $d5b33d7c30034067$export$3f8bb04b555a363c) {\n if (glFormat !== null) {\n if (useTexStorage) state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0);\n else state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0);\n } else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\");\n } else if (useTexStorage) state.texSubImage3D(_gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data);\n else state.texImage3D(_gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data);\n }\n } else {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (texture.format !== $d5b33d7c30034067$export$3f8bb04b555a363c) {\n if (glFormat !== null) {\n if (useTexStorage) state.compressedTexSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data);\n else state.compressedTexImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n } else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\");\n } else if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);\n else state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n }\n }\n } else if (texture.isDataArrayTexture) {\n if (useTexStorage) {\n if (allocateMemory) state.texStorage3D(_gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, image.width, image.height, image.depth);\n state.texSubImage3D(_gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data);\n } else state.texImage3D(_gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n } else if (texture.isData3DTexture) {\n if (useTexStorage) {\n if (allocateMemory) state.texStorage3D(_gl.TEXTURE_3D, levels, glInternalFormat, image.width, image.height, image.depth);\n state.texSubImage3D(_gl.TEXTURE_3D, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data);\n } else state.texImage3D(_gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n } else if (texture.isFramebufferTexture) {\n if (allocateMemory) {\n if (useTexStorage) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);\n else {\n let width = image.width, height = image.height;\n for(let i = 0; i < levels; i++){\n state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, width, height, 0, glFormat, glType, null);\n width >>= 1;\n height >>= 1;\n }\n }\n }\n } else {\n // regular Texture (image, video, canvas)\n // use manually created mipmaps if available\n // if there are no manual mipmaps\n // set 0 level mipmap and then use GL to generate other mipmap levels\n if (mipmaps.length > 0 && supportsMips) {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_2D, i, 0, 0, glFormat, glType, mipmap);\n else state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap);\n }\n texture.generateMipmaps = false;\n } else if (useTexStorage) {\n if (allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);\n state.texSubImage2D(_gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image);\n } else state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image);\n }\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) generateMipmap(textureType);\n sourceProperties.__version = source.version;\n if (texture.onUpdate) texture.onUpdate(texture);\n }\n textureProperties.__version = texture.version;\n }\n function uploadCubeTexture(textureProperties, texture, slot) {\n if (texture.image.length !== 6) return;\n const forceUpload = initTexture(textureProperties, texture);\n const source = texture.source;\n state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n const sourceProperties = properties.get(source);\n if (source.version !== sourceProperties.__version || forceUpload === true) {\n state.activeTexture(_gl.TEXTURE0 + slot);\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment);\n _gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE);\n const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;\n const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;\n const cubeImage = [];\n for(let i = 0; i < 6; i++){\n if (!isCompressed && !isDataTexture) cubeImage[i] = resizeImage(texture.image[i], false, true, maxCubemapSize);\n else cubeImage[i] = isDataTexture ? texture.image[i].image : texture.image[i];\n cubeImage[i] = verifyColorSpace(texture, cubeImage[i]);\n }\n const image = cubeImage[0], supportsMips = isPowerOfTwo$1(image) || isWebGL2, glFormat = utils.convert(texture.format, texture.colorSpace), glType = utils.convert(texture.type), glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n const useTexStorage = isWebGL2 && texture.isVideoTexture !== true;\n const allocateMemory = sourceProperties.__version === undefined || forceUpload === true;\n let levels = getMipLevels(texture, image, supportsMips);\n setTextureParameters(_gl.TEXTURE_CUBE_MAP, texture, supportsMips);\n let mipmaps;\n if (isCompressed) {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, image.width, image.height);\n for(let i = 0; i < 6; i++){\n mipmaps = cubeImage[i].mipmaps;\n for(let j = 0; j < mipmaps.length; j++){\n const mipmap = mipmaps[j];\n if (texture.format !== $d5b33d7c30034067$export$3f8bb04b555a363c) {\n if (glFormat !== null) {\n if (useTexStorage) state.compressedTexSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data);\n else state.compressedTexImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n } else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\");\n } else if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n }\n }\n } else {\n mipmaps = texture.mipmaps;\n if (useTexStorage && allocateMemory) {\n // TODO: Uniformly handle mipmap definitions\n // Normal textures and compressed cube textures define base level + mips with their mipmap array\n // Uncompressed cube textures use their mipmap array only for mips (no base level)\n if (mipmaps.length > 0) levels++;\n state.texStorage2D(_gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, cubeImage[0].width, cubeImage[0].height);\n }\n for(let i = 0; i < 6; i++)if (isDataTexture) {\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, cubeImage[i].width, cubeImage[i].height, glFormat, glType, cubeImage[i].data);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[i].width, cubeImage[i].height, 0, glFormat, glType, cubeImage[i].data);\n for(let j = 0; j < mipmaps.length; j++){\n const mipmap = mipmaps[j];\n const mipmapImage = mipmap.image[i].image;\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, mipmapImage.width, mipmapImage.height, glFormat, glType, mipmapImage.data);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data);\n }\n } else {\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, glFormat, glType, cubeImage[i]);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[i]);\n for(let j = 0; j < mipmaps.length; j++){\n const mipmap = mipmaps[j];\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, glFormat, glType, mipmap.image[i]);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[i]);\n }\n }\n }\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) // We assume images for cube map have the same size.\n generateMipmap(_gl.TEXTURE_CUBE_MAP);\n sourceProperties.__version = source.version;\n if (texture.onUpdate) texture.onUpdate(texture);\n }\n textureProperties.__version = texture.version;\n }\n // Render targets\n // Setup storage for target texture and bind it to correct framebuffer\n function setupFrameBufferTexture(framebuffer, renderTarget, texture, attachment, textureTarget, level) {\n const glFormat = utils.convert(texture.format, texture.colorSpace);\n const glType = utils.convert(texture.type);\n const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n const renderTargetProperties = properties.get(renderTarget);\n if (!renderTargetProperties.__hasExternalTextures) {\n const width = Math.max(1, renderTarget.width >> level);\n const height = Math.max(1, renderTarget.height >> level);\n if (textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY) state.texImage3D(textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null);\n else state.texImage2D(textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null);\n }\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0, getRenderTargetSamples(renderTarget));\n else if (textureTarget === _gl.TEXTURE_2D || textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z) _gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, level);\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n }\n // Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n function setupRenderBufferStorage(renderbuffer, renderTarget, isMultisample) {\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderbuffer);\n if (renderTarget.depthBuffer && !renderTarget.stencilBuffer) {\n let glInternalFormat = _gl.DEPTH_COMPONENT16;\n if (isMultisample || useMultisampledRTT(renderTarget)) {\n const depthTexture = renderTarget.depthTexture;\n if (depthTexture && depthTexture.isDepthTexture) {\n if (depthTexture.type === $d5b33d7c30034067$export$f6d331659b644596) glInternalFormat = _gl.DEPTH_COMPONENT32F;\n else if (depthTexture.type === $d5b33d7c30034067$export$c3c7fc4518ebba96) glInternalFormat = _gl.DEPTH_COMPONENT24;\n }\n const samples = getRenderTargetSamples(renderTarget);\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n else _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n } else _gl.renderbufferStorage(_gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer);\n } else if (renderTarget.depthBuffer && renderTarget.stencilBuffer) {\n const samples = getRenderTargetSamples(renderTarget);\n if (isMultisample && useMultisampledRTT(renderTarget) === false) _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height);\n else if (useMultisampledRTT(renderTarget)) multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height);\n else _gl.renderbufferStorage(_gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer);\n } else {\n const textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [\n renderTarget.texture\n ];\n for(let i = 0; i < textures.length; i++){\n const texture = textures[i];\n const glFormat = utils.convert(texture.format, texture.colorSpace);\n const glType = utils.convert(texture.type);\n const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n const samples = getRenderTargetSamples(renderTarget);\n if (isMultisample && useMultisampledRTT(renderTarget) === false) _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n else if (useMultisampledRTT(renderTarget)) multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n else _gl.renderbufferStorage(_gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height);\n }\n }\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, null);\n }\n // Setup resources for a Depth Texture for a FBO (needs an extension)\n function setupDepthTexture(framebuffer, renderTarget) {\n const isCube = renderTarget && renderTarget.isWebGLCubeRenderTarget;\n if (isCube) throw new Error(\"Depth Texture with cube render targets is not supported\");\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n if (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) throw new Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");\n // upload an empty depth texture with framebuffer size\n if (!properties.get(renderTarget.depthTexture).__webglTexture || renderTarget.depthTexture.image.width !== renderTarget.width || renderTarget.depthTexture.image.height !== renderTarget.height) {\n renderTarget.depthTexture.image.width = renderTarget.width;\n renderTarget.depthTexture.image.height = renderTarget.height;\n renderTarget.depthTexture.needsUpdate = true;\n }\n setTexture2D(renderTarget.depthTexture, 0);\n const webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture;\n const samples = getRenderTargetSamples(renderTarget);\n if (renderTarget.depthTexture.format === $d5b33d7c30034067$export$c1b6b5136be58045) {\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);\n else _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);\n } else if (renderTarget.depthTexture.format === $d5b33d7c30034067$export$1e113ac2d0905829) {\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);\n else _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);\n } else throw new Error(\"Unknown depthTexture format\");\n }\n // Setup GL resources for a non-texture depth buffer\n function setupDepthRenderbuffer(renderTarget) {\n const renderTargetProperties = properties.get(renderTarget);\n const isCube = renderTarget.isWebGLCubeRenderTarget === true;\n if (renderTarget.depthTexture && !renderTargetProperties.__autoAllocateDepthBuffer) {\n if (isCube) throw new Error(\"target.depthTexture not supported in Cube render targets\");\n setupDepthTexture(renderTargetProperties.__webglFramebuffer, renderTarget);\n } else if (isCube) {\n renderTargetProperties.__webglDepthbuffer = [];\n for(let i = 0; i < 6; i++){\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[i]);\n renderTargetProperties.__webglDepthbuffer[i] = _gl.createRenderbuffer();\n setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i], renderTarget, false);\n }\n } else {\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n renderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer, renderTarget, false);\n }\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n }\n // rebind framebuffer with external textures\n function rebindTextures(renderTarget, colorTexture, depthTexture) {\n const renderTargetProperties = properties.get(renderTarget);\n if (colorTexture !== undefined) setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0);\n if (depthTexture !== undefined) setupDepthRenderbuffer(renderTarget);\n }\n // Set up GL resources for the render target\n function setupRenderTarget(renderTarget) {\n const texture = renderTarget.texture;\n const renderTargetProperties = properties.get(renderTarget);\n const textureProperties = properties.get(texture);\n renderTarget.addEventListener(\"dispose\", onRenderTargetDispose);\n if (renderTarget.isWebGLMultipleRenderTargets !== true) {\n if (textureProperties.__webglTexture === undefined) textureProperties.__webglTexture = _gl.createTexture();\n textureProperties.__version = texture.version;\n info.memory.textures++;\n }\n const isCube = renderTarget.isWebGLCubeRenderTarget === true;\n const isMultipleRenderTargets = renderTarget.isWebGLMultipleRenderTargets === true;\n const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;\n // Setup framebuffer\n if (isCube) {\n renderTargetProperties.__webglFramebuffer = [];\n for(let i = 0; i < 6; i++)if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) {\n renderTargetProperties.__webglFramebuffer[i] = [];\n for(let level = 0; level < texture.mipmaps.length; level++)renderTargetProperties.__webglFramebuffer[i][level] = _gl.createFramebuffer();\n } else renderTargetProperties.__webglFramebuffer[i] = _gl.createFramebuffer();\n } else {\n if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) {\n renderTargetProperties.__webglFramebuffer = [];\n for(let level = 0; level < texture.mipmaps.length; level++)renderTargetProperties.__webglFramebuffer[level] = _gl.createFramebuffer();\n } else renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n if (isMultipleRenderTargets) {\n if (capabilities.drawBuffers) {\n const textures = renderTarget.texture;\n for(let i = 0, il = textures.length; i < il; i++){\n const attachmentProperties = properties.get(textures[i]);\n if (attachmentProperties.__webglTexture === undefined) {\n attachmentProperties.__webglTexture = _gl.createTexture();\n info.memory.textures++;\n }\n }\n } else console.warn(\"THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.\");\n }\n if (isWebGL2 && renderTarget.samples > 0 && useMultisampledRTT(renderTarget) === false) {\n const textures = isMultipleRenderTargets ? texture : [\n texture\n ];\n renderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n renderTargetProperties.__webglColorRenderbuffer = [];\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n for(let i = 0; i < textures.length; i++){\n const texture = textures[i];\n renderTargetProperties.__webglColorRenderbuffer[i] = _gl.createRenderbuffer();\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n const glFormat = utils.convert(texture.format, texture.colorSpace);\n const glType = utils.convert(texture.type);\n const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true);\n const samples = getRenderTargetSamples(renderTarget);\n _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n }\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, null);\n if (renderTarget.depthBuffer) {\n renderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n setupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true);\n }\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n }\n }\n // Setup color buffer\n if (isCube) {\n state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture);\n setTextureParameters(_gl.TEXTURE_CUBE_MAP, texture, supportsMips);\n for(let i = 0; i < 6; i++){\n if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) for(let level = 0; level < texture.mipmaps.length; level++)setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i][level], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level);\n else setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0);\n }\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) generateMipmap(_gl.TEXTURE_CUBE_MAP);\n state.unbindTexture();\n } else if (isMultipleRenderTargets) {\n const textures = renderTarget.texture;\n for(let i = 0, il = textures.length; i < il; i++){\n const attachment = textures[i];\n const attachmentProperties = properties.get(attachment);\n state.bindTexture(_gl.TEXTURE_2D, attachmentProperties.__webglTexture);\n setTextureParameters(_gl.TEXTURE_2D, attachment, supportsMips);\n setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0);\n if (textureNeedsGenerateMipmaps(attachment, supportsMips)) generateMipmap(_gl.TEXTURE_2D);\n }\n state.unbindTexture();\n } else {\n let glTextureType = _gl.TEXTURE_2D;\n if (renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget) {\n if (isWebGL2) glTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;\n else console.error(\"THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.\");\n }\n state.bindTexture(glTextureType, textureProperties.__webglTexture);\n setTextureParameters(glTextureType, texture, supportsMips);\n if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) for(let level = 0; level < texture.mipmaps.length; level++)setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[level], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level);\n else setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0);\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) generateMipmap(glTextureType);\n state.unbindTexture();\n }\n // Setup depth and stencil buffers\n if (renderTarget.depthBuffer) setupDepthRenderbuffer(renderTarget);\n }\n function updateRenderTargetMipmap(renderTarget) {\n const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;\n const textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [\n renderTarget.texture\n ];\n for(let i = 0, il = textures.length; i < il; i++){\n const texture = textures[i];\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n const target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D;\n const webglTexture = properties.get(texture).__webglTexture;\n state.bindTexture(target, webglTexture);\n generateMipmap(target);\n state.unbindTexture();\n }\n }\n }\n function updateMultisampleRenderTarget(renderTarget) {\n if (isWebGL2 && renderTarget.samples > 0 && useMultisampledRTT(renderTarget) === false) {\n const textures = renderTarget.isWebGLMultipleRenderTargets ? renderTarget.texture : [\n renderTarget.texture\n ];\n const width = renderTarget.width;\n const height = renderTarget.height;\n let mask = _gl.COLOR_BUFFER_BIT;\n const invalidationArray = [];\n const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT;\n const renderTargetProperties = properties.get(renderTarget);\n const isMultipleRenderTargets = renderTarget.isWebGLMultipleRenderTargets === true;\n // If MRT we need to remove FBO attachments\n if (isMultipleRenderTargets) for(let i = 0; i < textures.length; i++){\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, null);\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n _gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, null, 0);\n }\n state.bindFramebuffer(_gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n for(let i = 0; i < textures.length; i++){\n invalidationArray.push(_gl.COLOR_ATTACHMENT0 + i);\n if (renderTarget.depthBuffer) invalidationArray.push(depthStyle);\n const ignoreDepthValues = renderTargetProperties.__ignoreDepthValues !== undefined ? renderTargetProperties.__ignoreDepthValues : false;\n if (ignoreDepthValues === false) {\n if (renderTarget.depthBuffer) mask |= _gl.DEPTH_BUFFER_BIT;\n if (renderTarget.stencilBuffer) mask |= _gl.STENCIL_BUFFER_BIT;\n }\n if (isMultipleRenderTargets) _gl.framebufferRenderbuffer(_gl.READ_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n if (ignoreDepthValues === true) {\n _gl.invalidateFramebuffer(_gl.READ_FRAMEBUFFER, [\n depthStyle\n ]);\n _gl.invalidateFramebuffer(_gl.DRAW_FRAMEBUFFER, [\n depthStyle\n ]);\n }\n if (isMultipleRenderTargets) {\n const webglTexture = properties.get(textures[i]).__webglTexture;\n _gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0);\n }\n _gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST);\n if (supportsInvalidateFramebuffer) _gl.invalidateFramebuffer(_gl.READ_FRAMEBUFFER, invalidationArray);\n }\n state.bindFramebuffer(_gl.READ_FRAMEBUFFER, null);\n state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, null);\n // If MRT since pre-blit we removed the FBO we need to reconstruct the attachments\n if (isMultipleRenderTargets) for(let i = 0; i < textures.length; i++){\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n const webglTexture = properties.get(textures[i]).__webglTexture;\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n _gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, webglTexture, 0);\n }\n state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n }\n }\n function getRenderTargetSamples(renderTarget) {\n return Math.min(maxSamples, renderTarget.samples);\n }\n function useMultisampledRTT(renderTarget) {\n const renderTargetProperties = properties.get(renderTarget);\n return isWebGL2 && renderTarget.samples > 0 && extensions.has(\"WEBGL_multisampled_render_to_texture\") === true && renderTargetProperties.__useRenderToTexture !== false;\n }\n function updateVideoTexture(texture) {\n const frame = info.render.frame;\n // Check the last frame we updated the VideoTexture\n if (_videoTextures.get(texture) !== frame) {\n _videoTextures.set(texture, frame);\n texture.update();\n }\n }\n function verifyColorSpace(texture, image) {\n const colorSpace1 = texture.colorSpace;\n const format = texture.format;\n const type = texture.type;\n if (texture.isCompressedTexture === true || texture.format === $d5b33d7c30034067$export$ca1dce8b5e1de74d) return image;\n if (colorSpace1 !== $d5b33d7c30034067$export$42429b3acfb233a4 && colorSpace1 !== $d5b33d7c30034067$export$bfcb490c2dd3db51) {\n // sRGB\n if (colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa) {\n if (isWebGL2 === false) {\n // in WebGL 1, try to use EXT_sRGB extension and unsized formats\n if (extensions.has(\"EXT_sRGB\") === true && format === $d5b33d7c30034067$export$3f8bb04b555a363c) {\n texture.format = $d5b33d7c30034067$export$ca1dce8b5e1de74d;\n // it's not possible to generate mips in WebGL 1 with this extension\n texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.generateMipmaps = false;\n } else // slow fallback (CPU decode)\n image = $d5b33d7c30034067$export$698882cf06df44aa.sRGBToLinear(image);\n } else // in WebGL 2 uncompressed textures can only be sRGB encoded if they have the RGBA8 format\n if (format !== $d5b33d7c30034067$export$3f8bb04b555a363c || type !== $d5b33d7c30034067$export$2e8ce08d3f6f5e10) console.warn(\"THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.\");\n } else console.error(\"THREE.WebGLTextures: Unsupported texture color space:\", colorSpace1);\n }\n return image;\n }\n //\n this.allocateTextureUnit = allocateTextureUnit;\n this.resetTextureUnits = resetTextureUnits;\n this.setTexture2D = setTexture2D;\n this.setTexture2DArray = setTexture2DArray;\n this.setTexture3D = setTexture3D;\n this.setTextureCube = setTextureCube;\n this.rebindTextures = rebindTextures;\n this.setupRenderTarget = setupRenderTarget;\n this.updateRenderTargetMipmap = updateRenderTargetMipmap;\n this.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n this.setupDepthRenderbuffer = setupDepthRenderbuffer;\n this.setupFrameBufferTexture = setupFrameBufferTexture;\n this.useMultisampledRTT = useMultisampledRTT;\n}\nfunction $d5b33d7c30034067$export$ddaebcad857649a8(gl, extensions, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n function convert(p, colorSpace1 = $d5b33d7c30034067$export$bfcb490c2dd3db51) {\n let extension;\n if (p === $d5b33d7c30034067$export$2e8ce08d3f6f5e10) return gl.UNSIGNED_BYTE;\n if (p === $d5b33d7c30034067$export$b3969b01faf587f2) return gl.UNSIGNED_SHORT_4_4_4_4;\n if (p === $d5b33d7c30034067$export$18886f8ae33e90de) return gl.UNSIGNED_SHORT_5_5_5_1;\n if (p === $d5b33d7c30034067$export$545fce0311a9796a) return gl.BYTE;\n if (p === $d5b33d7c30034067$export$88572337f312435f) return gl.SHORT;\n if (p === $d5b33d7c30034067$export$c63dc51868b06a9d) return gl.UNSIGNED_SHORT;\n if (p === $d5b33d7c30034067$export$5c612977753abe2) return gl.INT;\n if (p === $d5b33d7c30034067$export$c3c7fc4518ebba96) return gl.UNSIGNED_INT;\n if (p === $d5b33d7c30034067$export$f6d331659b644596) return gl.FLOAT;\n if (p === $d5b33d7c30034067$export$2697304443f382bc) {\n if (isWebGL2) return gl.HALF_FLOAT;\n extension = extensions.get(\"OES_texture_half_float\");\n if (extension !== null) return extension.HALF_FLOAT_OES;\n else return null;\n }\n if (p === $d5b33d7c30034067$export$988473390501ed4b) return gl.ALPHA;\n if (p === $d5b33d7c30034067$export$3f8bb04b555a363c) return gl.RGBA;\n if (p === $d5b33d7c30034067$export$cc09ccbf6d1ed449) return gl.LUMINANCE;\n if (p === $d5b33d7c30034067$export$9053a81c4a69c289) return gl.LUMINANCE_ALPHA;\n if (p === $d5b33d7c30034067$export$c1b6b5136be58045) return gl.DEPTH_COMPONENT;\n if (p === $d5b33d7c30034067$export$1e113ac2d0905829) return gl.DEPTH_STENCIL;\n // WebGL 1 sRGB fallback\n if (p === $d5b33d7c30034067$export$ca1dce8b5e1de74d) {\n extension = extensions.get(\"EXT_sRGB\");\n if (extension !== null) return extension.SRGB_ALPHA_EXT;\n else return null;\n }\n // WebGL2 formats.\n if (p === $d5b33d7c30034067$export$4e041a7967d15c4b) return gl.RED;\n if (p === $d5b33d7c30034067$export$aa92e870a709d190) return gl.RED_INTEGER;\n if (p === $d5b33d7c30034067$export$6cdf0b461c7ce8a0) return gl.RG;\n if (p === $d5b33d7c30034067$export$1ba1c45f9f77d4d7) return gl.RG_INTEGER;\n if (p === $d5b33d7c30034067$export$c200e7d26f592f21) return gl.RGBA_INTEGER;\n // S3TC\n if (p === $d5b33d7c30034067$export$21d1799c6d552fc0 || p === $d5b33d7c30034067$export$afa304c3e981b668 || p === $d5b33d7c30034067$export$d2a1a68024a3e56c || p === $d5b33d7c30034067$export$9a79c424327dacf9) {\n if (colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa) {\n extension = extensions.get(\"WEBGL_compressed_texture_s3tc_srgb\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$21d1799c6d552fc0) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$afa304c3e981b668) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$d2a1a68024a3e56c) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;\n if (p === $d5b33d7c30034067$export$9a79c424327dacf9) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;\n } else return null;\n } else {\n extension = extensions.get(\"WEBGL_compressed_texture_s3tc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$21d1799c6d552fc0) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$afa304c3e981b668) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$d2a1a68024a3e56c) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n if (p === $d5b33d7c30034067$export$9a79c424327dacf9) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n } else return null;\n }\n }\n // PVRTC\n if (p === $d5b33d7c30034067$export$19ada9bbb1af3573 || p === $d5b33d7c30034067$export$d0f0355bb3d948e4 || p === $d5b33d7c30034067$export$b82296714358084c || p === $d5b33d7c30034067$export$b71692456c47b6c3) {\n extension = extensions.get(\"WEBGL_compressed_texture_pvrtc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$19ada9bbb1af3573) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n if (p === $d5b33d7c30034067$export$d0f0355bb3d948e4) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n if (p === $d5b33d7c30034067$export$b82296714358084c) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n if (p === $d5b33d7c30034067$export$b71692456c47b6c3) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n } else return null;\n }\n // ETC1\n if (p === $d5b33d7c30034067$export$6ab91af2d757aee7) {\n extension = extensions.get(\"WEBGL_compressed_texture_etc1\");\n if (extension !== null) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n else return null;\n }\n // ETC2\n if (p === $d5b33d7c30034067$export$7800993ef8106a6a || p === $d5b33d7c30034067$export$23ed8300a860e7d8) {\n extension = extensions.get(\"WEBGL_compressed_texture_etc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$7800993ef8106a6a) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;\n if (p === $d5b33d7c30034067$export$23ed8300a860e7d8) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;\n } else return null;\n }\n // ASTC\n if (p === $d5b33d7c30034067$export$dc5570b4a2b92d48 || p === $d5b33d7c30034067$export$68880cd325f8b2fb || p === $d5b33d7c30034067$export$7d2c0be323373d95 || p === $d5b33d7c30034067$export$22b52da301fc3a3e || p === $d5b33d7c30034067$export$c009e2cb4a66485e || p === $d5b33d7c30034067$export$118fff5afa255b63 || p === $d5b33d7c30034067$export$120713c829ae0667 || p === $d5b33d7c30034067$export$c79eeabbf53313e9 || p === $d5b33d7c30034067$export$443cf6567cdd6424 || p === $d5b33d7c30034067$export$6573984fc9840780 || p === $d5b33d7c30034067$export$e7aee563f30091de || p === $d5b33d7c30034067$export$2eb8634622ddeab7 || p === $d5b33d7c30034067$export$202b1ce7b5d25742 || p === $d5b33d7c30034067$export$18ab77abd087e467) {\n extension = extensions.get(\"WEBGL_compressed_texture_astc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$dc5570b4a2b92d48) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;\n if (p === $d5b33d7c30034067$export$68880cd325f8b2fb) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;\n if (p === $d5b33d7c30034067$export$7d2c0be323373d95) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;\n if (p === $d5b33d7c30034067$export$22b52da301fc3a3e) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;\n if (p === $d5b33d7c30034067$export$c009e2cb4a66485e) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;\n if (p === $d5b33d7c30034067$export$118fff5afa255b63) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;\n if (p === $d5b33d7c30034067$export$120713c829ae0667) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;\n if (p === $d5b33d7c30034067$export$c79eeabbf53313e9) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;\n if (p === $d5b33d7c30034067$export$443cf6567cdd6424) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;\n if (p === $d5b33d7c30034067$export$6573984fc9840780) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;\n if (p === $d5b33d7c30034067$export$e7aee563f30091de) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;\n if (p === $d5b33d7c30034067$export$2eb8634622ddeab7) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;\n if (p === $d5b33d7c30034067$export$202b1ce7b5d25742) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;\n if (p === $d5b33d7c30034067$export$18ab77abd087e467) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;\n } else return null;\n }\n // BPTC\n if (p === $d5b33d7c30034067$export$ce40b115e188bc81) {\n extension = extensions.get(\"EXT_texture_compression_bptc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$ce40b115e188bc81) return colorSpace1 === $d5b33d7c30034067$export$561f394b24edfcaa ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;\n } else return null;\n }\n // RGTC\n if (p === $d5b33d7c30034067$export$b1688df4c4c21670 || p === $d5b33d7c30034067$export$fc15e5d8261eed58 || p === $d5b33d7c30034067$export$d220f6ade8463a0f || p === $d5b33d7c30034067$export$768646d09dc1b6ef) {\n extension = extensions.get(\"EXT_texture_compression_rgtc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$ce40b115e188bc81) return extension.COMPRESSED_RED_RGTC1_EXT;\n if (p === $d5b33d7c30034067$export$fc15e5d8261eed58) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;\n if (p === $d5b33d7c30034067$export$d220f6ade8463a0f) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;\n if (p === $d5b33d7c30034067$export$768646d09dc1b6ef) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;\n } else return null;\n }\n //\n if (p === $d5b33d7c30034067$export$6c8ea339bfab1301) {\n if (isWebGL2) return gl.UNSIGNED_INT_24_8;\n extension = extensions.get(\"WEBGL_depth_texture\");\n if (extension !== null) return extension.UNSIGNED_INT_24_8_WEBGL;\n else return null;\n }\n // if \"p\" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats)\n return gl[p] !== undefined ? gl[p] : null;\n }\n return {\n convert: convert\n };\n}\nclass $d5b33d7c30034067$export$56b937d9e5581166 extends $d5b33d7c30034067$export$74e4ae24825f68d7 {\n constructor(array = []){\n super();\n this.isArrayCamera = true;\n this.cameras = array;\n }\n}\nclass $d5b33d7c30034067$export$eb2fcfdbd7ba97d4 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isGroup = true;\n this.type = \"Group\";\n }\n}\nconst $d5b33d7c30034067$var$_moveEvent = {\n type: \"move\"\n};\nclass $d5b33d7c30034067$var$WebXRController {\n constructor(){\n this._targetRay = null;\n this._grip = null;\n this._hand = null;\n }\n getHandSpace() {\n if (this._hand === null) {\n this._hand = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n this._hand.matrixAutoUpdate = false;\n this._hand.visible = false;\n this._hand.joints = {};\n this._hand.inputState = {\n pinching: false\n };\n }\n return this._hand;\n }\n getTargetRaySpace() {\n if (this._targetRay === null) {\n this._targetRay = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n this._targetRay.matrixAutoUpdate = false;\n this._targetRay.visible = false;\n this._targetRay.hasLinearVelocity = false;\n this._targetRay.linearVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n this._targetRay.hasAngularVelocity = false;\n this._targetRay.angularVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n return this._targetRay;\n }\n getGripSpace() {\n if (this._grip === null) {\n this._grip = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n this._grip.matrixAutoUpdate = false;\n this._grip.visible = false;\n this._grip.hasLinearVelocity = false;\n this._grip.linearVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n this._grip.hasAngularVelocity = false;\n this._grip.angularVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n return this._grip;\n }\n dispatchEvent(event) {\n if (this._targetRay !== null) this._targetRay.dispatchEvent(event);\n if (this._grip !== null) this._grip.dispatchEvent(event);\n if (this._hand !== null) this._hand.dispatchEvent(event);\n return this;\n }\n connect(inputSource) {\n if (inputSource && inputSource.hand) {\n const hand = this._hand;\n if (hand) for (const inputjoint of inputSource.hand.values())// Initialize hand with joints when connected\n this._getHandJoint(hand, inputjoint);\n }\n this.dispatchEvent({\n type: \"connected\",\n data: inputSource\n });\n return this;\n }\n disconnect(inputSource) {\n this.dispatchEvent({\n type: \"disconnected\",\n data: inputSource\n });\n if (this._targetRay !== null) this._targetRay.visible = false;\n if (this._grip !== null) this._grip.visible = false;\n if (this._hand !== null) this._hand.visible = false;\n return this;\n }\n update(inputSource, frame, referenceSpace) {\n let inputPose = null;\n let gripPose = null;\n let handPose = null;\n const targetRay = this._targetRay;\n const grip = this._grip;\n const hand = this._hand;\n if (inputSource && frame.session.visibilityState !== \"visible-blurred\") {\n if (hand && inputSource.hand) {\n handPose = true;\n for (const inputjoint of inputSource.hand.values()){\n // Update the joints groups with the XRJoint poses\n const jointPose = frame.getJointPose(inputjoint, referenceSpace);\n // The transform of this joint will be updated with the joint pose on each frame\n const joint = this._getHandJoint(hand, inputjoint);\n if (jointPose !== null) {\n joint.matrix.fromArray(jointPose.transform.matrix);\n joint.matrix.decompose(joint.position, joint.rotation, joint.scale);\n joint.matrixWorldNeedsUpdate = true;\n joint.jointRadius = jointPose.radius;\n }\n joint.visible = jointPose !== null;\n }\n // Custom events\n // Check pinchz\n const indexTip = hand.joints[\"index-finger-tip\"];\n const thumbTip = hand.joints[\"thumb-tip\"];\n const distance = indexTip.position.distanceTo(thumbTip.position);\n const distanceToPinch = 0.02;\n const threshold = 0.005;\n if (hand.inputState.pinching && distance > distanceToPinch + threshold) {\n hand.inputState.pinching = false;\n this.dispatchEvent({\n type: \"pinchend\",\n handedness: inputSource.handedness,\n target: this\n });\n } else if (!hand.inputState.pinching && distance <= distanceToPinch - threshold) {\n hand.inputState.pinching = true;\n this.dispatchEvent({\n type: \"pinchstart\",\n handedness: inputSource.handedness,\n target: this\n });\n }\n } else if (grip !== null && inputSource.gripSpace) {\n gripPose = frame.getPose(inputSource.gripSpace, referenceSpace);\n if (gripPose !== null) {\n grip.matrix.fromArray(gripPose.transform.matrix);\n grip.matrix.decompose(grip.position, grip.rotation, grip.scale);\n grip.matrixWorldNeedsUpdate = true;\n if (gripPose.linearVelocity) {\n grip.hasLinearVelocity = true;\n grip.linearVelocity.copy(gripPose.linearVelocity);\n } else grip.hasLinearVelocity = false;\n if (gripPose.angularVelocity) {\n grip.hasAngularVelocity = true;\n grip.angularVelocity.copy(gripPose.angularVelocity);\n } else grip.hasAngularVelocity = false;\n }\n }\n if (targetRay !== null) {\n inputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace);\n // Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it\n if (inputPose === null && gripPose !== null) inputPose = gripPose;\n if (inputPose !== null) {\n targetRay.matrix.fromArray(inputPose.transform.matrix);\n targetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale);\n targetRay.matrixWorldNeedsUpdate = true;\n if (inputPose.linearVelocity) {\n targetRay.hasLinearVelocity = true;\n targetRay.linearVelocity.copy(inputPose.linearVelocity);\n } else targetRay.hasLinearVelocity = false;\n if (inputPose.angularVelocity) {\n targetRay.hasAngularVelocity = true;\n targetRay.angularVelocity.copy(inputPose.angularVelocity);\n } else targetRay.hasAngularVelocity = false;\n this.dispatchEvent($d5b33d7c30034067$var$_moveEvent);\n }\n }\n }\n if (targetRay !== null) targetRay.visible = inputPose !== null;\n if (grip !== null) grip.visible = gripPose !== null;\n if (hand !== null) hand.visible = handPose !== null;\n return this;\n }\n // private method\n _getHandJoint(hand, inputjoint) {\n if (hand.joints[inputjoint.jointName] === undefined) {\n const joint = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n joint.matrixAutoUpdate = false;\n joint.visible = false;\n hand.joints[inputjoint.jointName] = joint;\n hand.add(joint);\n }\n return hand.joints[inputjoint.jointName];\n }\n}\nclass $d5b33d7c30034067$export$fc830aa069cc8c2f extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format){\n format = format !== undefined ? format : $d5b33d7c30034067$export$c1b6b5136be58045;\n if (format !== $d5b33d7c30034067$export$c1b6b5136be58045 && format !== $d5b33d7c30034067$export$1e113ac2d0905829) throw new Error(\"DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat\");\n if (type === undefined && format === $d5b33d7c30034067$export$c1b6b5136be58045) type = $d5b33d7c30034067$export$c3c7fc4518ebba96;\n if (type === undefined && format === $d5b33d7c30034067$export$1e113ac2d0905829) type = $d5b33d7c30034067$export$6c8ea339bfab1301;\n super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n this.isDepthTexture = true;\n this.image = {\n width: width,\n height: height\n };\n this.magFilter = magFilter !== undefined ? magFilter : $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = minFilter !== undefined ? minFilter : $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.flipY = false;\n this.generateMipmaps = false;\n this.compareFunction = null;\n }\n copy(source) {\n super.copy(source);\n this.compareFunction = source.compareFunction;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n if (this.compareFunction !== null) data.compareFunction = this.compareFunction;\n return data;\n }\n}\nclass $d5b33d7c30034067$var$WebXRManager extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(renderer, gl){\n super();\n const scope = this;\n let session = null;\n let framebufferScaleFactor = 1.0;\n let referenceSpace = null;\n let referenceSpaceType = \"local-floor\";\n // Set default foveation to maximum.\n let foveation = 1.0;\n let customReferenceSpace = null;\n let pose = null;\n let glBinding = null;\n let glProjLayer = null;\n let glBaseLayer = null;\n let xrFrame = null;\n const attributes = gl.getContextAttributes();\n let initialRenderTarget = null;\n let newRenderTarget = null;\n const controllers = [];\n const controllerInputSources = [];\n //\n const cameraL = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n cameraL.layers.enable(1);\n cameraL.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const cameraR = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n cameraR.layers.enable(2);\n cameraR.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const cameras = [\n cameraL,\n cameraR\n ];\n const cameraXR = new $d5b33d7c30034067$export$56b937d9e5581166();\n cameraXR.layers.enable(1);\n cameraXR.layers.enable(2);\n let _currentDepthNear = null;\n let _currentDepthFar = null;\n //\n this.cameraAutoUpdate = true;\n this.enabled = false;\n this.isPresenting = false;\n this.getController = function(index) {\n let controller = controllers[index];\n if (controller === undefined) {\n controller = new $d5b33d7c30034067$var$WebXRController();\n controllers[index] = controller;\n }\n return controller.getTargetRaySpace();\n };\n this.getControllerGrip = function(index) {\n let controller = controllers[index];\n if (controller === undefined) {\n controller = new $d5b33d7c30034067$var$WebXRController();\n controllers[index] = controller;\n }\n return controller.getGripSpace();\n };\n this.getHand = function(index) {\n let controller = controllers[index];\n if (controller === undefined) {\n controller = new $d5b33d7c30034067$var$WebXRController();\n controllers[index] = controller;\n }\n return controller.getHandSpace();\n };\n //\n function onSessionEvent(event) {\n const controllerIndex = controllerInputSources.indexOf(event.inputSource);\n if (controllerIndex === -1) return;\n const controller = controllers[controllerIndex];\n if (controller !== undefined) {\n controller.update(event.inputSource, event.frame, customReferenceSpace || referenceSpace);\n controller.dispatchEvent({\n type: event.type,\n data: event.inputSource\n });\n }\n }\n function onSessionEnd() {\n session.removeEventListener(\"select\", onSessionEvent);\n session.removeEventListener(\"selectstart\", onSessionEvent);\n session.removeEventListener(\"selectend\", onSessionEvent);\n session.removeEventListener(\"squeeze\", onSessionEvent);\n session.removeEventListener(\"squeezestart\", onSessionEvent);\n session.removeEventListener(\"squeezeend\", onSessionEvent);\n session.removeEventListener(\"end\", onSessionEnd);\n session.removeEventListener(\"inputsourceschange\", onInputSourcesChange);\n for(let i = 0; i < controllers.length; i++){\n const inputSource = controllerInputSources[i];\n if (inputSource === null) continue;\n controllerInputSources[i] = null;\n controllers[i].disconnect(inputSource);\n }\n _currentDepthNear = null;\n _currentDepthFar = null;\n // restore framebuffer/rendering state\n renderer.setRenderTarget(initialRenderTarget);\n glBaseLayer = null;\n glProjLayer = null;\n glBinding = null;\n session = null;\n newRenderTarget = null;\n //\n animation.stop();\n scope.isPresenting = false;\n scope.dispatchEvent({\n type: \"sessionend\"\n });\n }\n this.setFramebufferScaleFactor = function(value) {\n framebufferScaleFactor = value;\n if (scope.isPresenting === true) console.warn(\"THREE.WebXRManager: Cannot change framebuffer scale while presenting.\");\n };\n this.setReferenceSpaceType = function(value) {\n referenceSpaceType = value;\n if (scope.isPresenting === true) console.warn(\"THREE.WebXRManager: Cannot change reference space type while presenting.\");\n };\n this.getReferenceSpace = function() {\n return customReferenceSpace || referenceSpace;\n };\n this.setReferenceSpace = function(space) {\n customReferenceSpace = space;\n };\n this.getBaseLayer = function() {\n return glProjLayer !== null ? glProjLayer : glBaseLayer;\n };\n this.getBinding = function() {\n return glBinding;\n };\n this.getFrame = function() {\n return xrFrame;\n };\n this.getSession = function() {\n return session;\n };\n this.setSession = async function(value) {\n session = value;\n if (session !== null) {\n initialRenderTarget = renderer.getRenderTarget();\n session.addEventListener(\"select\", onSessionEvent);\n session.addEventListener(\"selectstart\", onSessionEvent);\n session.addEventListener(\"selectend\", onSessionEvent);\n session.addEventListener(\"squeeze\", onSessionEvent);\n session.addEventListener(\"squeezestart\", onSessionEvent);\n session.addEventListener(\"squeezeend\", onSessionEvent);\n session.addEventListener(\"end\", onSessionEnd);\n session.addEventListener(\"inputsourceschange\", onInputSourcesChange);\n if (attributes.xrCompatible !== true) await gl.makeXRCompatible();\n if (session.renderState.layers === undefined || renderer.capabilities.isWebGL2 === false) {\n const layerInit = {\n antialias: session.renderState.layers === undefined ? attributes.antialias : true,\n alpha: true,\n depth: attributes.depth,\n stencil: attributes.stencil,\n framebufferScaleFactor: framebufferScaleFactor\n };\n glBaseLayer = new XRWebGLLayer(session, gl, layerInit);\n session.updateRenderState({\n baseLayer: glBaseLayer\n });\n newRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(glBaseLayer.framebufferWidth, glBaseLayer.framebufferHeight, {\n format: $d5b33d7c30034067$export$3f8bb04b555a363c,\n type: $d5b33d7c30034067$export$2e8ce08d3f6f5e10,\n colorSpace: renderer.outputColorSpace,\n stencilBuffer: attributes.stencil\n });\n } else {\n let depthFormat = null;\n let depthType = null;\n let glDepthFormat = null;\n if (attributes.depth) {\n glDepthFormat = attributes.stencil ? gl.DEPTH24_STENCIL8 : gl.DEPTH_COMPONENT24;\n depthFormat = attributes.stencil ? $d5b33d7c30034067$export$1e113ac2d0905829 : $d5b33d7c30034067$export$c1b6b5136be58045;\n depthType = attributes.stencil ? $d5b33d7c30034067$export$6c8ea339bfab1301 : $d5b33d7c30034067$export$c3c7fc4518ebba96;\n }\n const projectionlayerInit = {\n colorFormat: gl.RGBA8,\n depthFormat: glDepthFormat,\n scaleFactor: framebufferScaleFactor\n };\n glBinding = new XRWebGLBinding(session, gl);\n glProjLayer = glBinding.createProjectionLayer(projectionlayerInit);\n session.updateRenderState({\n layers: [\n glProjLayer\n ]\n });\n newRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(glProjLayer.textureWidth, glProjLayer.textureHeight, {\n format: $d5b33d7c30034067$export$3f8bb04b555a363c,\n type: $d5b33d7c30034067$export$2e8ce08d3f6f5e10,\n depthTexture: new $d5b33d7c30034067$export$fc830aa069cc8c2f(glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat),\n stencilBuffer: attributes.stencil,\n colorSpace: renderer.outputColorSpace,\n samples: attributes.antialias ? 4 : 0\n });\n const renderTargetProperties = renderer.properties.get(newRenderTarget);\n renderTargetProperties.__ignoreDepthValues = glProjLayer.ignoreDepthValues;\n }\n newRenderTarget.isXRRenderTarget = true; // TODO Remove this when possible, see #23278\n this.setFoveation(foveation);\n customReferenceSpace = null;\n referenceSpace = await session.requestReferenceSpace(referenceSpaceType);\n animation.setContext(session);\n animation.start();\n scope.isPresenting = true;\n scope.dispatchEvent({\n type: \"sessionstart\"\n });\n }\n };\n this.getEnvironmentBlendMode = function() {\n if (session !== null) return session.environmentBlendMode;\n };\n function onInputSourcesChange(event) {\n // Notify disconnected\n for(let i = 0; i < event.removed.length; i++){\n const inputSource = event.removed[i];\n const index = controllerInputSources.indexOf(inputSource);\n if (index >= 0) {\n controllerInputSources[index] = null;\n controllers[index].disconnect(inputSource);\n }\n }\n // Notify connected\n for(let i = 0; i < event.added.length; i++){\n const inputSource = event.added[i];\n let controllerIndex = controllerInputSources.indexOf(inputSource);\n if (controllerIndex === -1) {\n // Assign input source a controller that currently has no input source\n for(let i = 0; i < controllers.length; i++){\n if (i >= controllerInputSources.length) {\n controllerInputSources.push(inputSource);\n controllerIndex = i;\n break;\n } else if (controllerInputSources[i] === null) {\n controllerInputSources[i] = inputSource;\n controllerIndex = i;\n break;\n }\n }\n // If all controllers do currently receive input we ignore new ones\n if (controllerIndex === -1) break;\n }\n const controller = controllers[controllerIndex];\n if (controller) controller.connect(inputSource);\n }\n }\n //\n const cameraLPos = new $d5b33d7c30034067$export$64b5c384219d3699();\n const cameraRPos = new $d5b33d7c30034067$export$64b5c384219d3699();\n /**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */ function setProjectionFromUnion(camera, cameraL, cameraR) {\n cameraLPos.setFromMatrixPosition(cameraL.matrixWorld);\n cameraRPos.setFromMatrixPosition(cameraR.matrixWorld);\n const ipd = cameraLPos.distanceTo(cameraRPos);\n const projL = cameraL.projectionMatrix.elements;\n const projR = cameraR.projectionMatrix.elements;\n // VR systems will have identical far and near planes, and\n // most likely identical top and bottom frustum extents.\n // Use the left camera for these values.\n const near = projL[14] / (projL[10] - 1);\n const far = projL[14] / (projL[10] + 1);\n const topFov = (projL[9] + 1) / projL[5];\n const bottomFov = (projL[9] - 1) / projL[5];\n const leftFov = (projL[8] - 1) / projL[0];\n const rightFov = (projR[8] + 1) / projR[0];\n const left = near * leftFov;\n const right = near * rightFov;\n // Calculate the new camera's position offset from the\n // left camera. xOffset should be roughly half `ipd`.\n const zOffset = ipd / (-leftFov + rightFov);\n const xOffset = zOffset * -leftFov;\n // TODO: Better way to apply this offset?\n cameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);\n camera.translateX(xOffset);\n camera.translateZ(zOffset);\n camera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);\n camera.matrixWorldInverse.copy(camera.matrixWorld).invert();\n // Find the union of the frustum values of the cameras and scale\n // the values so that the near plane's position does not change in world space,\n // although must now be relative to the new union camera.\n const near2 = near + zOffset;\n const far2 = far + zOffset;\n const left2 = left - xOffset;\n const right2 = right + (ipd - xOffset);\n const top2 = topFov * far / far2 * near2;\n const bottom2 = bottomFov * far / far2 * near2;\n camera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);\n camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();\n }\n function updateCamera(camera, parent) {\n if (parent === null) camera.matrixWorld.copy(camera.matrix);\n else camera.matrixWorld.multiplyMatrices(parent.matrixWorld, camera.matrix);\n camera.matrixWorldInverse.copy(camera.matrixWorld).invert();\n }\n this.updateCamera = function(camera) {\n if (session === null) return;\n cameraXR.near = cameraR.near = cameraL.near = camera.near;\n cameraXR.far = cameraR.far = cameraL.far = camera.far;\n if (_currentDepthNear !== cameraXR.near || _currentDepthFar !== cameraXR.far) {\n // Note that the new renderState won't apply until the next frame. See #18320\n session.updateRenderState({\n depthNear: cameraXR.near,\n depthFar: cameraXR.far\n });\n _currentDepthNear = cameraXR.near;\n _currentDepthFar = cameraXR.far;\n }\n const parent = camera.parent;\n const cameras = cameraXR.cameras;\n updateCamera(cameraXR, parent);\n for(let i = 0; i < cameras.length; i++)updateCamera(cameras[i], parent);\n // update projection matrix for proper view frustum culling\n if (cameras.length === 2) setProjectionFromUnion(cameraXR, cameraL, cameraR);\n else // assume single camera setup (AR)\n cameraXR.projectionMatrix.copy(cameraL.projectionMatrix);\n // update user camera and its children\n updateUserCamera(camera, cameraXR, parent);\n };\n function updateUserCamera(camera, cameraXR, parent) {\n if (parent === null) camera.matrix.copy(cameraXR.matrixWorld);\n else {\n camera.matrix.copy(parent.matrixWorld);\n camera.matrix.invert();\n camera.matrix.multiply(cameraXR.matrixWorld);\n }\n camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);\n camera.updateMatrixWorld(true);\n const children = camera.children;\n for(let i = 0, l = children.length; i < l; i++)children[i].updateMatrixWorld(true);\n camera.projectionMatrix.copy(cameraXR.projectionMatrix);\n camera.projectionMatrixInverse.copy(cameraXR.projectionMatrixInverse);\n if (camera.isPerspectiveCamera) {\n camera.fov = $d5b33d7c30034067$var$RAD2DEG * 2 * Math.atan(1 / camera.projectionMatrix.elements[5]);\n camera.zoom = 1;\n }\n }\n this.getCamera = function() {\n return cameraXR;\n };\n this.getFoveation = function() {\n if (glProjLayer === null && glBaseLayer === null) return undefined;\n return foveation;\n };\n this.setFoveation = function(value) {\n // 0 = no foveation = full resolution\n // 1 = maximum foveation = the edges render at lower resolution\n foveation = value;\n if (glProjLayer !== null) glProjLayer.fixedFoveation = value;\n if (glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined) glBaseLayer.fixedFoveation = value;\n };\n // Animation Loop\n let onAnimationFrameCallback = null;\n function onAnimationFrame(time, frame) {\n pose = frame.getViewerPose(customReferenceSpace || referenceSpace);\n xrFrame = frame;\n if (pose !== null) {\n const views = pose.views;\n if (glBaseLayer !== null) {\n renderer.setRenderTargetFramebuffer(newRenderTarget, glBaseLayer.framebuffer);\n renderer.setRenderTarget(newRenderTarget);\n }\n let cameraXRNeedsUpdate = false;\n // check if it's necessary to rebuild cameraXR's camera list\n if (views.length !== cameraXR.cameras.length) {\n cameraXR.cameras.length = 0;\n cameraXRNeedsUpdate = true;\n }\n for(let i = 0; i < views.length; i++){\n const view = views[i];\n let viewport = null;\n if (glBaseLayer !== null) viewport = glBaseLayer.getViewport(view);\n else {\n const glSubImage = glBinding.getViewSubImage(glProjLayer, view);\n viewport = glSubImage.viewport;\n // For side-by-side projection, we only produce a single texture for both eyes.\n if (i === 0) {\n renderer.setRenderTargetTextures(newRenderTarget, glSubImage.colorTexture, glProjLayer.ignoreDepthValues ? undefined : glSubImage.depthStencilTexture);\n renderer.setRenderTarget(newRenderTarget);\n }\n }\n let camera = cameras[i];\n if (camera === undefined) {\n camera = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n camera.layers.enable(i);\n camera.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n cameras[i] = camera;\n }\n camera.matrix.fromArray(view.transform.matrix);\n camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);\n camera.projectionMatrix.fromArray(view.projectionMatrix);\n camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();\n camera.viewport.set(viewport.x, viewport.y, viewport.width, viewport.height);\n if (i === 0) {\n cameraXR.matrix.copy(camera.matrix);\n cameraXR.matrix.decompose(cameraXR.position, cameraXR.quaternion, cameraXR.scale);\n }\n if (cameraXRNeedsUpdate === true) cameraXR.cameras.push(camera);\n }\n }\n //\n for(let i = 0; i < controllers.length; i++){\n const inputSource = controllerInputSources[i];\n const controller = controllers[i];\n if (inputSource !== null && controller !== undefined) controller.update(inputSource, frame, customReferenceSpace || referenceSpace);\n }\n if (onAnimationFrameCallback) onAnimationFrameCallback(time, frame);\n if (frame.detectedPlanes) scope.dispatchEvent({\n type: \"planesdetected\",\n data: frame\n });\n xrFrame = null;\n }\n const animation = new $d5b33d7c30034067$var$WebGLAnimation();\n animation.setAnimationLoop(onAnimationFrame);\n this.setAnimationLoop = function(callback) {\n onAnimationFrameCallback = callback;\n };\n this.dispose = function() {};\n }\n}\nfunction $d5b33d7c30034067$var$WebGLMaterials(renderer, properties) {\n function refreshTransformUniform(map, uniform) {\n if (map.matrixAutoUpdate === true) map.updateMatrix();\n uniform.value.copy(map.matrix);\n }\n function refreshFogUniforms(uniforms, fog) {\n fog.color.getRGB(uniforms.fogColor.value, $d5b33d7c30034067$var$getUnlitUniformColorSpace(renderer));\n if (fog.isFog) {\n uniforms.fogNear.value = fog.near;\n uniforms.fogFar.value = fog.far;\n } else if (fog.isFogExp2) uniforms.fogDensity.value = fog.density;\n }\n function refreshMaterialUniforms(uniforms, material, pixelRatio, height, transmissionRenderTarget) {\n if (material.isMeshBasicMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isMeshLambertMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isMeshToonMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsToon(uniforms, material);\n } else if (material.isMeshPhongMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsPhong(uniforms, material);\n } else if (material.isMeshStandardMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsStandard(uniforms, material);\n if (material.isMeshPhysicalMaterial) refreshUniformsPhysical(uniforms, material, transmissionRenderTarget);\n } else if (material.isMeshMatcapMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsMatcap(uniforms, material);\n } else if (material.isMeshDepthMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isMeshDistanceMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsDistance(uniforms, material);\n } else if (material.isMeshNormalMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isLineBasicMaterial) {\n refreshUniformsLine(uniforms, material);\n if (material.isLineDashedMaterial) refreshUniformsDash(uniforms, material);\n } else if (material.isPointsMaterial) refreshUniformsPoints(uniforms, material, pixelRatio, height);\n else if (material.isSpriteMaterial) refreshUniformsSprites(uniforms, material);\n else if (material.isShadowMaterial) {\n uniforms.color.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n } else if (material.isShaderMaterial) material.uniformsNeedUpdate = false; // #15581\n }\n function refreshUniformsCommon(uniforms, material) {\n uniforms.opacity.value = material.opacity;\n if (material.color) uniforms.diffuse.value.copy(material.color);\n if (material.emissive) uniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity);\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.mapTransform);\n }\n if (material.alphaMap) {\n uniforms.alphaMap.value = material.alphaMap;\n refreshTransformUniform(material.alphaMap, uniforms.alphaMapTransform);\n }\n if (material.bumpMap) {\n uniforms.bumpMap.value = material.bumpMap;\n refreshTransformUniform(material.bumpMap, uniforms.bumpMapTransform);\n uniforms.bumpScale.value = material.bumpScale;\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) uniforms.bumpScale.value *= -1;\n }\n if (material.normalMap) {\n uniforms.normalMap.value = material.normalMap;\n refreshTransformUniform(material.normalMap, uniforms.normalMapTransform);\n uniforms.normalScale.value.copy(material.normalScale);\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) uniforms.normalScale.value.negate();\n }\n if (material.displacementMap) {\n uniforms.displacementMap.value = material.displacementMap;\n refreshTransformUniform(material.displacementMap, uniforms.displacementMapTransform);\n uniforms.displacementScale.value = material.displacementScale;\n uniforms.displacementBias.value = material.displacementBias;\n }\n if (material.emissiveMap) {\n uniforms.emissiveMap.value = material.emissiveMap;\n refreshTransformUniform(material.emissiveMap, uniforms.emissiveMapTransform);\n }\n if (material.specularMap) {\n uniforms.specularMap.value = material.specularMap;\n refreshTransformUniform(material.specularMap, uniforms.specularMapTransform);\n }\n if (material.alphaTest > 0) uniforms.alphaTest.value = material.alphaTest;\n const envMap = properties.get(material).envMap;\n if (envMap) {\n uniforms.envMap.value = envMap;\n uniforms.flipEnvMap.value = envMap.isCubeTexture && envMap.isRenderTargetTexture === false ? -1 : 1;\n uniforms.reflectivity.value = material.reflectivity;\n uniforms.ior.value = material.ior;\n uniforms.refractionRatio.value = material.refractionRatio;\n }\n if (material.lightMap) {\n uniforms.lightMap.value = material.lightMap;\n // artist-friendly light intensity scaling factor\n const scaleFactor = renderer._useLegacyLights === true ? Math.PI : 1;\n uniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor;\n refreshTransformUniform(material.lightMap, uniforms.lightMapTransform);\n }\n if (material.aoMap) {\n uniforms.aoMap.value = material.aoMap;\n uniforms.aoMapIntensity.value = material.aoMapIntensity;\n refreshTransformUniform(material.aoMap, uniforms.aoMapTransform);\n }\n }\n function refreshUniformsLine(uniforms, material) {\n uniforms.diffuse.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.mapTransform);\n }\n }\n function refreshUniformsDash(uniforms, material) {\n uniforms.dashSize.value = material.dashSize;\n uniforms.totalSize.value = material.dashSize + material.gapSize;\n uniforms.scale.value = material.scale;\n }\n function refreshUniformsPoints(uniforms, material, pixelRatio, height) {\n uniforms.diffuse.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n uniforms.size.value = material.size * pixelRatio;\n uniforms.scale.value = height * 0.5;\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.uvTransform);\n }\n if (material.alphaMap) {\n uniforms.alphaMap.value = material.alphaMap;\n refreshTransformUniform(material.alphaMap, uniforms.alphaMapTransform);\n }\n if (material.alphaTest > 0) uniforms.alphaTest.value = material.alphaTest;\n }\n function refreshUniformsSprites(uniforms, material) {\n uniforms.diffuse.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n uniforms.rotation.value = material.rotation;\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.mapTransform);\n }\n if (material.alphaMap) {\n uniforms.alphaMap.value = material.alphaMap;\n refreshTransformUniform(material.alphaMap, uniforms.alphaMapTransform);\n }\n if (material.alphaTest > 0) uniforms.alphaTest.value = material.alphaTest;\n }\n function refreshUniformsPhong(uniforms, material) {\n uniforms.specular.value.copy(material.specular);\n uniforms.shininess.value = Math.max(material.shininess, 1e-4); // to prevent pow( 0.0, 0.0 )\n }\n function refreshUniformsToon(uniforms, material) {\n if (material.gradientMap) uniforms.gradientMap.value = material.gradientMap;\n }\n function refreshUniformsStandard(uniforms, material) {\n uniforms.metalness.value = material.metalness;\n if (material.metalnessMap) {\n uniforms.metalnessMap.value = material.metalnessMap;\n refreshTransformUniform(material.metalnessMap, uniforms.metalnessMapTransform);\n }\n uniforms.roughness.value = material.roughness;\n if (material.roughnessMap) {\n uniforms.roughnessMap.value = material.roughnessMap;\n refreshTransformUniform(material.roughnessMap, uniforms.roughnessMapTransform);\n }\n const envMap = properties.get(material).envMap;\n if (envMap) //uniforms.envMap.value = material.envMap; // part of uniforms common\n uniforms.envMapIntensity.value = material.envMapIntensity;\n }\n function refreshUniformsPhysical(uniforms, material, transmissionRenderTarget) {\n uniforms.ior.value = material.ior; // also part of uniforms common\n if (material.sheen > 0) {\n uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen);\n uniforms.sheenRoughness.value = material.sheenRoughness;\n if (material.sheenColorMap) {\n uniforms.sheenColorMap.value = material.sheenColorMap;\n refreshTransformUniform(material.sheenColorMap, uniforms.sheenColorMapTransform);\n }\n if (material.sheenRoughnessMap) {\n uniforms.sheenRoughnessMap.value = material.sheenRoughnessMap;\n refreshTransformUniform(material.sheenRoughnessMap, uniforms.sheenRoughnessMapTransform);\n }\n }\n if (material.clearcoat > 0) {\n uniforms.clearcoat.value = material.clearcoat;\n uniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n if (material.clearcoatMap) {\n uniforms.clearcoatMap.value = material.clearcoatMap;\n refreshTransformUniform(material.clearcoatMap, uniforms.clearcoatMapTransform);\n }\n if (material.clearcoatRoughnessMap) {\n uniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n refreshTransformUniform(material.clearcoatRoughnessMap, uniforms.clearcoatRoughnessMapTransform);\n }\n if (material.clearcoatNormalMap) {\n uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n refreshTransformUniform(material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform);\n uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) uniforms.clearcoatNormalScale.value.negate();\n }\n }\n if (material.iridescence > 0) {\n uniforms.iridescence.value = material.iridescence;\n uniforms.iridescenceIOR.value = material.iridescenceIOR;\n uniforms.iridescenceThicknessMinimum.value = material.iridescenceThicknessRange[0];\n uniforms.iridescenceThicknessMaximum.value = material.iridescenceThicknessRange[1];\n if (material.iridescenceMap) {\n uniforms.iridescenceMap.value = material.iridescenceMap;\n refreshTransformUniform(material.iridescenceMap, uniforms.iridescenceMapTransform);\n }\n if (material.iridescenceThicknessMap) {\n uniforms.iridescenceThicknessMap.value = material.iridescenceThicknessMap;\n refreshTransformUniform(material.iridescenceThicknessMap, uniforms.iridescenceThicknessMapTransform);\n }\n }\n if (material.transmission > 0) {\n uniforms.transmission.value = material.transmission;\n uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;\n uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width, transmissionRenderTarget.height);\n if (material.transmissionMap) {\n uniforms.transmissionMap.value = material.transmissionMap;\n refreshTransformUniform(material.transmissionMap, uniforms.transmissionMapTransform);\n }\n uniforms.thickness.value = material.thickness;\n if (material.thicknessMap) {\n uniforms.thicknessMap.value = material.thicknessMap;\n refreshTransformUniform(material.thicknessMap, uniforms.thicknessMapTransform);\n }\n uniforms.attenuationDistance.value = material.attenuationDistance;\n uniforms.attenuationColor.value.copy(material.attenuationColor);\n }\n if (material.anisotropy > 0) {\n uniforms.anisotropyVector.value.set(material.anisotropy * Math.cos(material.anisotropyRotation), material.anisotropy * Math.sin(material.anisotropyRotation));\n if (material.anisotropyMap) {\n uniforms.anisotropyMap.value = material.anisotropyMap;\n refreshTransformUniform(material.anisotropyMap, uniforms.anisotropyMapTransform);\n }\n }\n uniforms.specularIntensity.value = material.specularIntensity;\n uniforms.specularColor.value.copy(material.specularColor);\n if (material.specularColorMap) {\n uniforms.specularColorMap.value = material.specularColorMap;\n refreshTransformUniform(material.specularColorMap, uniforms.specularColorMapTransform);\n }\n if (material.specularIntensityMap) {\n uniforms.specularIntensityMap.value = material.specularIntensityMap;\n refreshTransformUniform(material.specularIntensityMap, uniforms.specularIntensityMapTransform);\n }\n }\n function refreshUniformsMatcap(uniforms, material) {\n if (material.matcap) uniforms.matcap.value = material.matcap;\n }\n function refreshUniformsDistance(uniforms, material) {\n const light = properties.get(material).light;\n uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld);\n uniforms.nearDistance.value = light.shadow.camera.near;\n uniforms.farDistance.value = light.shadow.camera.far;\n }\n return {\n refreshFogUniforms: refreshFogUniforms,\n refreshMaterialUniforms: refreshMaterialUniforms\n };\n}\nfunction $d5b33d7c30034067$var$WebGLUniformsGroups(gl, info, capabilities, state) {\n let buffers = {};\n let updateList = {};\n let allocatedBindingPoints = [];\n const maxBindingPoints = capabilities.isWebGL2 ? gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS) : 0; // binding points are global whereas block indices are per shader program\n function bind(uniformsGroup, program) {\n const webglProgram = program.program;\n state.uniformBlockBinding(uniformsGroup, webglProgram);\n }\n function update(uniformsGroup, program) {\n let buffer = buffers[uniformsGroup.id];\n if (buffer === undefined) {\n prepareUniformsGroup(uniformsGroup);\n buffer = createBuffer(uniformsGroup);\n buffers[uniformsGroup.id] = buffer;\n uniformsGroup.addEventListener(\"dispose\", onUniformsGroupsDispose);\n }\n // ensure to update the binding points/block indices mapping for this program\n const webglProgram = program.program;\n state.updateUBOMapping(uniformsGroup, webglProgram);\n // update UBO once per frame\n const frame = info.render.frame;\n if (updateList[uniformsGroup.id] !== frame) {\n updateBufferData(uniformsGroup);\n updateList[uniformsGroup.id] = frame;\n }\n }\n function createBuffer(uniformsGroup) {\n // the setup of an UBO is independent of a particular shader program but global\n const bindingPointIndex = allocateBindingPointIndex();\n uniformsGroup.__bindingPointIndex = bindingPointIndex;\n const buffer = gl.createBuffer();\n const size = uniformsGroup.__size;\n const usage = uniformsGroup.usage;\n gl.bindBuffer(gl.UNIFORM_BUFFER, buffer);\n gl.bufferData(gl.UNIFORM_BUFFER, size, usage);\n gl.bindBuffer(gl.UNIFORM_BUFFER, null);\n gl.bindBufferBase(gl.UNIFORM_BUFFER, bindingPointIndex, buffer);\n return buffer;\n }\n function allocateBindingPointIndex() {\n for(let i = 0; i < maxBindingPoints; i++)if (allocatedBindingPoints.indexOf(i) === -1) {\n allocatedBindingPoints.push(i);\n return i;\n }\n console.error(\"THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.\");\n return 0;\n }\n function updateBufferData(uniformsGroup) {\n const buffer = buffers[uniformsGroup.id];\n const uniforms = uniformsGroup.uniforms;\n const cache = uniformsGroup.__cache;\n gl.bindBuffer(gl.UNIFORM_BUFFER, buffer);\n for(let i = 0, il = uniforms.length; i < il; i++){\n const uniform = uniforms[i];\n // partly update the buffer if necessary\n if (hasUniformChanged(uniform, i, cache) === true) {\n const offset = uniform.__offset;\n const values = Array.isArray(uniform.value) ? uniform.value : [\n uniform.value\n ];\n let arrayOffset = 0;\n for(let i = 0; i < values.length; i++){\n const value = values[i];\n const info = getUniformSize(value);\n if (typeof value === \"number\") {\n uniform.__data[0] = value;\n gl.bufferSubData(gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data);\n } else if (value.isMatrix3) {\n // manually converting 3x3 to 3x4\n uniform.__data[0] = value.elements[0];\n uniform.__data[1] = value.elements[1];\n uniform.__data[2] = value.elements[2];\n uniform.__data[3] = value.elements[0];\n uniform.__data[4] = value.elements[3];\n uniform.__data[5] = value.elements[4];\n uniform.__data[6] = value.elements[5];\n uniform.__data[7] = value.elements[0];\n uniform.__data[8] = value.elements[6];\n uniform.__data[9] = value.elements[7];\n uniform.__data[10] = value.elements[8];\n uniform.__data[11] = value.elements[0];\n } else {\n value.toArray(uniform.__data, arrayOffset);\n arrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT;\n }\n }\n gl.bufferSubData(gl.UNIFORM_BUFFER, offset, uniform.__data);\n }\n }\n gl.bindBuffer(gl.UNIFORM_BUFFER, null);\n }\n function hasUniformChanged(uniform, index, cache) {\n const value = uniform.value;\n if (cache[index] === undefined) {\n // cache entry does not exist so far\n if (typeof value === \"number\") cache[index] = value;\n else {\n const values = Array.isArray(value) ? value : [\n value\n ];\n const tempValues = [];\n for(let i = 0; i < values.length; i++)tempValues.push(values[i].clone());\n cache[index] = tempValues;\n }\n return true;\n } else {\n // compare current value with cached entry\n if (typeof value === \"number\") {\n if (cache[index] !== value) {\n cache[index] = value;\n return true;\n }\n } else {\n const cachedObjects = Array.isArray(cache[index]) ? cache[index] : [\n cache[index]\n ];\n const values = Array.isArray(value) ? value : [\n value\n ];\n for(let i = 0; i < cachedObjects.length; i++){\n const cachedObject = cachedObjects[i];\n if (cachedObject.equals(values[i]) === false) {\n cachedObject.copy(values[i]);\n return true;\n }\n }\n }\n }\n return false;\n }\n function prepareUniformsGroup(uniformsGroup) {\n // determine total buffer size according to the STD140 layout\n // Hint: STD140 is the only supported layout in WebGL 2\n const uniforms = uniformsGroup.uniforms;\n let offset = 0; // global buffer offset in bytes\n const chunkSize = 16; // size of a chunk in bytes\n let chunkOffset = 0; // offset within a single chunk in bytes\n for(let i = 0, l = uniforms.length; i < l; i++){\n const uniform = uniforms[i];\n const infos = {\n boundary: 0,\n storage: 0 // bytes\n };\n const values = Array.isArray(uniform.value) ? uniform.value : [\n uniform.value\n ];\n for(let j = 0, jl = values.length; j < jl; j++){\n const value = values[j];\n const info = getUniformSize(value);\n infos.boundary += info.boundary;\n infos.storage += info.storage;\n }\n // the following two properties will be used for partial buffer updates\n uniform.__data = new Float32Array(infos.storage / Float32Array.BYTES_PER_ELEMENT);\n uniform.__offset = offset;\n //\n if (i > 0) {\n chunkOffset = offset % chunkSize;\n const remainingSizeInChunk = chunkSize - chunkOffset;\n // check for chunk overflow\n if (chunkOffset !== 0 && remainingSizeInChunk - infos.boundary < 0) {\n // add padding and adjust offset\n offset += chunkSize - chunkOffset;\n uniform.__offset = offset;\n }\n }\n offset += infos.storage;\n }\n // ensure correct final padding\n chunkOffset = offset % chunkSize;\n if (chunkOffset > 0) offset += chunkSize - chunkOffset;\n //\n uniformsGroup.__size = offset;\n uniformsGroup.__cache = {};\n return this;\n }\n function getUniformSize(value) {\n const info = {\n boundary: 0,\n storage: 0 // bytes\n };\n // determine sizes according to STD140\n if (typeof value === \"number\") {\n // float/int\n info.boundary = 4;\n info.storage = 4;\n } else if (value.isVector2) {\n // vec2\n info.boundary = 8;\n info.storage = 8;\n } else if (value.isVector3 || value.isColor) {\n // vec3\n info.boundary = 16;\n info.storage = 12; // evil: vec3 must start on a 16-byte boundary but it only consumes 12 bytes\n } else if (value.isVector4) {\n // vec4\n info.boundary = 16;\n info.storage = 16;\n } else if (value.isMatrix3) {\n // mat3 (in STD140 a 3x3 matrix is represented as 3x4)\n info.boundary = 48;\n info.storage = 48;\n } else if (value.isMatrix4) {\n // mat4\n info.boundary = 64;\n info.storage = 64;\n } else if (value.isTexture) console.warn(\"THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.\");\n else console.warn(\"THREE.WebGLRenderer: Unsupported uniform value type.\", value);\n return info;\n }\n function onUniformsGroupsDispose(event) {\n const uniformsGroup = event.target;\n uniformsGroup.removeEventListener(\"dispose\", onUniformsGroupsDispose);\n const index = allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);\n allocatedBindingPoints.splice(index, 1);\n gl.deleteBuffer(buffers[uniformsGroup.id]);\n delete buffers[uniformsGroup.id];\n delete updateList[uniformsGroup.id];\n }\n function dispose() {\n for(const id in buffers)gl.deleteBuffer(buffers[id]);\n allocatedBindingPoints = [];\n buffers = {};\n updateList = {};\n }\n return {\n bind: bind,\n update: update,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$createCanvasElement() {\n const canvas = $d5b33d7c30034067$var$createElementNS(\"canvas\");\n canvas.style.display = \"block\";\n return canvas;\n}\nclass $d5b33d7c30034067$export$f6cc00ef28d7cf97 {\n constructor(parameters = {}){\n const { canvas: canvas = $d5b33d7c30034067$var$createCanvasElement(), context: context = null, depth: depth = true, stencil: stencil = true, alpha: alpha = false, antialias: antialias = false, premultipliedAlpha: premultipliedAlpha = true, preserveDrawingBuffer: preserveDrawingBuffer = false, powerPreference: powerPreference = \"default\", failIfMajorPerformanceCaveat: failIfMajorPerformanceCaveat = false } = parameters;\n this.isWebGLRenderer = true;\n let _alpha;\n if (context !== null) _alpha = context.getContextAttributes().alpha;\n else _alpha = alpha;\n const uintClearColor = new Uint32Array(4);\n const intClearColor = new Int32Array(4);\n let currentRenderList = null;\n let currentRenderState = null;\n // render() can be called from within a callback triggered by another render.\n // We track this so that the nested render call gets its list and state isolated from the parent render call.\n const renderListStack = [];\n const renderStateStack = [];\n // public properties\n this.domElement = canvas;\n // Debug configuration container\n this.debug = {\n /**\n\t\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t\t * @type {boolean}\n\t\t\t */ checkShaderErrors: true,\n /**\n\t\t\t * Callback for custom error reporting.\n\t\t\t * @type {?Function}\n\t\t\t */ onShaderError: null\n };\n // clearing\n this.autoClear = true;\n this.autoClearColor = true;\n this.autoClearDepth = true;\n this.autoClearStencil = true;\n // scene graph\n this.sortObjects = true;\n // user-defined clipping\n this.clippingPlanes = [];\n this.localClippingEnabled = false;\n // physically based shading\n this.outputColorSpace = $d5b33d7c30034067$export$561f394b24edfcaa;\n // physical lights\n this._useLegacyLights = false;\n // tone mapping\n this.toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n this.toneMappingExposure = 1.0;\n // internal properties\n const _this = this;\n let _isContextLost = false;\n // internal state cache\n let _currentActiveCubeFace = 0;\n let _currentActiveMipmapLevel = 0;\n let _currentRenderTarget = null;\n let _currentMaterialId = -1;\n let _currentCamera = null;\n const _currentViewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const _currentScissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n let _currentScissorTest = null;\n const _currentClearColor = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n let _currentClearAlpha = 0;\n //\n let _width = canvas.width;\n let _height = canvas.height;\n let _pixelRatio = 1;\n let _opaqueSort = null;\n let _transparentSort = null;\n const _viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, _width, _height);\n const _scissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, _width, _height);\n let _scissorTest = false;\n // frustum\n const _frustum = new $d5b33d7c30034067$export$35efe6f4c85463d2();\n // clipping\n let _clippingEnabled = false;\n let _localClippingEnabled = false;\n // transmission\n let _transmissionRenderTarget = null;\n // camera matrices cache\n const _projScreenMatrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n const _vector2 = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const _vector3 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const _emptyScene = {\n background: null,\n fog: null,\n environment: null,\n overrideMaterial: null,\n isScene: true\n };\n function getTargetPixelRatio() {\n return _currentRenderTarget === null ? _pixelRatio : 1;\n }\n // initialize\n let _gl = context;\n function getContext(contextNames, contextAttributes) {\n for(let i = 0; i < contextNames.length; i++){\n const contextName = contextNames[i];\n const context = canvas.getContext(contextName, contextAttributes);\n if (context !== null) return context;\n }\n return null;\n }\n try {\n const contextAttributes = {\n alpha: true,\n depth: depth,\n stencil: stencil,\n antialias: antialias,\n premultipliedAlpha: premultipliedAlpha,\n preserveDrawingBuffer: preserveDrawingBuffer,\n powerPreference: powerPreference,\n failIfMajorPerformanceCaveat: failIfMajorPerformanceCaveat\n };\n // OffscreenCanvas does not have setAttribute, see #22811\n if (\"setAttribute\" in canvas) canvas.setAttribute(\"data-engine\", `three.js r${$d5b33d7c30034067$export$3545e07a80636437}`);\n // event listeners must be registered before WebGL context is created, see #12753\n canvas.addEventListener(\"webglcontextlost\", onContextLost, false);\n canvas.addEventListener(\"webglcontextrestored\", onContextRestore, false);\n canvas.addEventListener(\"webglcontextcreationerror\", onContextCreationError, false);\n if (_gl === null) {\n const contextNames = [\n \"webgl2\",\n \"webgl\",\n \"experimental-webgl\"\n ];\n if (_this.isWebGL1Renderer === true) contextNames.shift();\n _gl = getContext(contextNames, contextAttributes);\n if (_gl === null) {\n if (getContext(contextNames)) throw new Error(\"Error creating WebGL context with your selected attributes.\");\n else throw new Error(\"Error creating WebGL context.\");\n }\n }\n if (typeof WebGLRenderingContext !== \"undefined\" && _gl instanceof WebGLRenderingContext) console.warn(\"THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163.\");\n // Some experimental-webgl implementations do not have getShaderPrecisionFormat\n if (_gl.getShaderPrecisionFormat === undefined) _gl.getShaderPrecisionFormat = function() {\n return {\n \"rangeMin\": 1,\n \"rangeMax\": 1,\n \"precision\": 1\n };\n };\n } catch (error) {\n console.error(\"THREE.WebGLRenderer: \" + error.message);\n throw error;\n }\n let extensions, capabilities, state, info;\n let properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects;\n let programCache, materials, renderLists, renderStates, clipping, shadowMap;\n let background, morphtargets, bufferRenderer, indexedBufferRenderer;\n let utils, bindingStates, uniformsGroups;\n function initGLContext() {\n extensions = new $d5b33d7c30034067$var$WebGLExtensions(_gl);\n capabilities = new $d5b33d7c30034067$var$WebGLCapabilities(_gl, extensions, parameters);\n extensions.init(capabilities);\n utils = new $d5b33d7c30034067$export$ddaebcad857649a8(_gl, extensions, capabilities);\n state = new $d5b33d7c30034067$var$WebGLState(_gl, extensions, capabilities);\n info = new $d5b33d7c30034067$var$WebGLInfo(_gl);\n properties = new $d5b33d7c30034067$var$WebGLProperties();\n textures = new $d5b33d7c30034067$var$WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info);\n cubemaps = new $d5b33d7c30034067$var$WebGLCubeMaps(_this);\n cubeuvmaps = new $d5b33d7c30034067$var$WebGLCubeUVMaps(_this);\n attributes = new $d5b33d7c30034067$var$WebGLAttributes(_gl, capabilities);\n bindingStates = new $d5b33d7c30034067$var$WebGLBindingStates(_gl, extensions, attributes, capabilities);\n geometries = new $d5b33d7c30034067$var$WebGLGeometries(_gl, attributes, info, bindingStates);\n objects = new $d5b33d7c30034067$var$WebGLObjects(_gl, geometries, attributes, info);\n morphtargets = new $d5b33d7c30034067$var$WebGLMorphtargets(_gl, capabilities, textures);\n clipping = new $d5b33d7c30034067$var$WebGLClipping(properties);\n programCache = new $d5b33d7c30034067$var$WebGLPrograms(_this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping);\n materials = new $d5b33d7c30034067$var$WebGLMaterials(_this, properties);\n renderLists = new $d5b33d7c30034067$var$WebGLRenderLists();\n renderStates = new $d5b33d7c30034067$var$WebGLRenderStates(extensions, capabilities);\n background = new $d5b33d7c30034067$var$WebGLBackground(_this, cubemaps, cubeuvmaps, state, objects, _alpha, premultipliedAlpha);\n shadowMap = new $d5b33d7c30034067$var$WebGLShadowMap(_this, objects, capabilities);\n uniformsGroups = new $d5b33d7c30034067$var$WebGLUniformsGroups(_gl, info, capabilities, state);\n bufferRenderer = new $d5b33d7c30034067$var$WebGLBufferRenderer(_gl, extensions, info, capabilities);\n indexedBufferRenderer = new $d5b33d7c30034067$var$WebGLIndexedBufferRenderer(_gl, extensions, info, capabilities);\n info.programs = programCache.programs;\n _this.capabilities = capabilities;\n _this.extensions = extensions;\n _this.properties = properties;\n _this.renderLists = renderLists;\n _this.shadowMap = shadowMap;\n _this.state = state;\n _this.info = info;\n }\n initGLContext();\n // xr\n const xr = new $d5b33d7c30034067$var$WebXRManager(_this, _gl);\n this.xr = xr;\n // API\n this.getContext = function() {\n return _gl;\n };\n this.getContextAttributes = function() {\n return _gl.getContextAttributes();\n };\n this.forceContextLoss = function() {\n const extension = extensions.get(\"WEBGL_lose_context\");\n if (extension) extension.loseContext();\n };\n this.forceContextRestore = function() {\n const extension = extensions.get(\"WEBGL_lose_context\");\n if (extension) extension.restoreContext();\n };\n this.getPixelRatio = function() {\n return _pixelRatio;\n };\n this.setPixelRatio = function(value) {\n if (value === undefined) return;\n _pixelRatio = value;\n this.setSize(_width, _height, false);\n };\n this.getSize = function(target) {\n return target.set(_width, _height);\n };\n this.setSize = function(width, height, updateStyle = true) {\n if (xr.isPresenting) {\n console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\");\n return;\n }\n _width = width;\n _height = height;\n canvas.width = Math.floor(width * _pixelRatio);\n canvas.height = Math.floor(height * _pixelRatio);\n if (updateStyle === true) {\n canvas.style.width = width + \"px\";\n canvas.style.height = height + \"px\";\n }\n this.setViewport(0, 0, width, height);\n };\n this.getDrawingBufferSize = function(target) {\n return target.set(_width * _pixelRatio, _height * _pixelRatio).floor();\n };\n this.setDrawingBufferSize = function(width, height, pixelRatio) {\n _width = width;\n _height = height;\n _pixelRatio = pixelRatio;\n canvas.width = Math.floor(width * pixelRatio);\n canvas.height = Math.floor(height * pixelRatio);\n this.setViewport(0, 0, width, height);\n };\n this.getCurrentViewport = function(target) {\n return target.copy(_currentViewport);\n };\n this.getViewport = function(target) {\n return target.copy(_viewport);\n };\n this.setViewport = function(x, y, width, height) {\n if (x.isVector4) _viewport.set(x.x, x.y, x.z, x.w);\n else _viewport.set(x, y, width, height);\n state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor());\n };\n this.getScissor = function(target) {\n return target.copy(_scissor);\n };\n this.setScissor = function(x, y, width, height) {\n if (x.isVector4) _scissor.set(x.x, x.y, x.z, x.w);\n else _scissor.set(x, y, width, height);\n state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());\n };\n this.getScissorTest = function() {\n return _scissorTest;\n };\n this.setScissorTest = function(boolean) {\n state.setScissorTest(_scissorTest = boolean);\n };\n this.setOpaqueSort = function(method) {\n _opaqueSort = method;\n };\n this.setTransparentSort = function(method) {\n _transparentSort = method;\n };\n // Clearing\n this.getClearColor = function(target) {\n return target.copy(background.getClearColor());\n };\n this.setClearColor = function() {\n background.setClearColor.apply(background, arguments);\n };\n this.getClearAlpha = function() {\n return background.getClearAlpha();\n };\n this.setClearAlpha = function() {\n background.setClearAlpha.apply(background, arguments);\n };\n this.clear = function(color = true, depth = true, stencil = true) {\n let bits = 0;\n if (color) {\n // check if we're trying to clear an integer target\n let isIntegerFormat = false;\n if (_currentRenderTarget !== null) {\n const targetFormat = _currentRenderTarget.texture.format;\n isIntegerFormat = targetFormat === $d5b33d7c30034067$export$c200e7d26f592f21 || targetFormat === $d5b33d7c30034067$export$1ba1c45f9f77d4d7 || targetFormat === $d5b33d7c30034067$export$aa92e870a709d190;\n }\n // use the appropriate clear functions to clear the target if it's a signed\n // or unsigned integer target\n if (isIntegerFormat) {\n const targetType = _currentRenderTarget.texture.type;\n const isUnsignedType = targetType === $d5b33d7c30034067$export$2e8ce08d3f6f5e10 || targetType === $d5b33d7c30034067$export$c3c7fc4518ebba96 || targetType === $d5b33d7c30034067$export$c63dc51868b06a9d || targetType === $d5b33d7c30034067$export$6c8ea339bfab1301 || targetType === $d5b33d7c30034067$export$b3969b01faf587f2 || targetType === $d5b33d7c30034067$export$18886f8ae33e90de;\n const clearColor = background.getClearColor();\n const a = background.getClearAlpha();\n const r = clearColor.r;\n const g = clearColor.g;\n const b = clearColor.b;\n if (isUnsignedType) {\n uintClearColor[0] = r;\n uintClearColor[1] = g;\n uintClearColor[2] = b;\n uintClearColor[3] = a;\n _gl.clearBufferuiv(_gl.COLOR, 0, uintClearColor);\n } else {\n intClearColor[0] = r;\n intClearColor[1] = g;\n intClearColor[2] = b;\n intClearColor[3] = a;\n _gl.clearBufferiv(_gl.COLOR, 0, intClearColor);\n }\n } else bits |= _gl.COLOR_BUFFER_BIT;\n }\n if (depth) bits |= _gl.DEPTH_BUFFER_BIT;\n if (stencil) bits |= _gl.STENCIL_BUFFER_BIT;\n _gl.clear(bits);\n };\n this.clearColor = function() {\n this.clear(true, false, false);\n };\n this.clearDepth = function() {\n this.clear(false, true, false);\n };\n this.clearStencil = function() {\n this.clear(false, false, true);\n };\n //\n this.dispose = function() {\n canvas.removeEventListener(\"webglcontextlost\", onContextLost, false);\n canvas.removeEventListener(\"webglcontextrestored\", onContextRestore, false);\n canvas.removeEventListener(\"webglcontextcreationerror\", onContextCreationError, false);\n renderLists.dispose();\n renderStates.dispose();\n properties.dispose();\n cubemaps.dispose();\n cubeuvmaps.dispose();\n objects.dispose();\n bindingStates.dispose();\n uniformsGroups.dispose();\n programCache.dispose();\n xr.dispose();\n xr.removeEventListener(\"sessionstart\", onXRSessionStart);\n xr.removeEventListener(\"sessionend\", onXRSessionEnd);\n if (_transmissionRenderTarget) {\n _transmissionRenderTarget.dispose();\n _transmissionRenderTarget = null;\n }\n animation.stop();\n };\n // Events\n function onContextLost(event) {\n event.preventDefault();\n console.log(\"THREE.WebGLRenderer: Context Lost.\");\n _isContextLost = true;\n }\n function onContextRestore() {\n console.log(\"THREE.WebGLRenderer: Context Restored.\");\n _isContextLost = false;\n const infoAutoReset = info.autoReset;\n const shadowMapEnabled = shadowMap.enabled;\n const shadowMapAutoUpdate = shadowMap.autoUpdate;\n const shadowMapNeedsUpdate = shadowMap.needsUpdate;\n const shadowMapType = shadowMap.type;\n initGLContext();\n info.autoReset = infoAutoReset;\n shadowMap.enabled = shadowMapEnabled;\n shadowMap.autoUpdate = shadowMapAutoUpdate;\n shadowMap.needsUpdate = shadowMapNeedsUpdate;\n shadowMap.type = shadowMapType;\n }\n function onContextCreationError(event) {\n console.error(\"THREE.WebGLRenderer: A WebGL context could not be created. Reason: \", event.statusMessage);\n }\n function onMaterialDispose(event) {\n const material = event.target;\n material.removeEventListener(\"dispose\", onMaterialDispose);\n deallocateMaterial(material);\n }\n // Buffer deallocation\n function deallocateMaterial(material) {\n releaseMaterialProgramReferences(material);\n properties.remove(material);\n }\n function releaseMaterialProgramReferences(material) {\n const programs = properties.get(material).programs;\n if (programs !== undefined) {\n programs.forEach(function(program) {\n programCache.releaseProgram(program);\n });\n if (material.isShaderMaterial) programCache.releaseShaderCache(material);\n }\n }\n // Buffer rendering\n this.renderBufferDirect = function(camera, scene, geometry, material, object, group) {\n if (scene === null) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n const frontFaceCW = object.isMesh && object.matrixWorld.determinant() < 0;\n const program = setProgram(camera, scene, geometry, material, object);\n state.setMaterial(material, frontFaceCW);\n //\n let index = geometry.index;\n let rangeFactor = 1;\n if (material.wireframe === true) {\n index = geometries.getWireframeAttribute(geometry);\n if (index === undefined) return;\n rangeFactor = 2;\n }\n //\n const drawRange = geometry.drawRange;\n const position = geometry.attributes.position;\n let drawStart = drawRange.start * rangeFactor;\n let drawEnd = (drawRange.start + drawRange.count) * rangeFactor;\n if (group !== null) {\n drawStart = Math.max(drawStart, group.start * rangeFactor);\n drawEnd = Math.min(drawEnd, (group.start + group.count) * rangeFactor);\n }\n if (index !== null) {\n drawStart = Math.max(drawStart, 0);\n drawEnd = Math.min(drawEnd, index.count);\n } else if (position !== undefined && position !== null) {\n drawStart = Math.max(drawStart, 0);\n drawEnd = Math.min(drawEnd, position.count);\n }\n const drawCount = drawEnd - drawStart;\n if (drawCount < 0 || drawCount === Infinity) return;\n //\n bindingStates.setup(object, material, program, geometry, index);\n let attribute;\n let renderer = bufferRenderer;\n if (index !== null) {\n attribute = attributes.get(index);\n renderer = indexedBufferRenderer;\n renderer.setIndex(attribute);\n }\n //\n if (object.isMesh) {\n if (material.wireframe === true) {\n state.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio());\n renderer.setMode(_gl.LINES);\n } else renderer.setMode(_gl.TRIANGLES);\n } else if (object.isLine) {\n let lineWidth = material.linewidth;\n if (lineWidth === undefined) lineWidth = 1; // Not using Line*Material\n state.setLineWidth(lineWidth * getTargetPixelRatio());\n if (object.isLineSegments) renderer.setMode(_gl.LINES);\n else if (object.isLineLoop) renderer.setMode(_gl.LINE_LOOP);\n else renderer.setMode(_gl.LINE_STRIP);\n } else if (object.isPoints) renderer.setMode(_gl.POINTS);\n else if (object.isSprite) renderer.setMode(_gl.TRIANGLES);\n if (object.isInstancedMesh) renderer.renderInstances(drawStart, drawCount, object.count);\n else if (geometry.isInstancedBufferGeometry) {\n const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;\n const instanceCount = Math.min(geometry.instanceCount, maxInstanceCount);\n renderer.renderInstances(drawStart, drawCount, instanceCount);\n } else renderer.render(drawStart, drawCount);\n };\n // Compile\n this.compile = function(scene, camera) {\n function prepare(material, scene, object) {\n if (material.transparent === true && material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 && material.forceSinglePass === false) {\n material.side = $d5b33d7c30034067$export$d9f0486e75b5ace;\n material.needsUpdate = true;\n getProgram(material, scene, object);\n material.side = $d5b33d7c30034067$export$2ede184fc2998901;\n material.needsUpdate = true;\n getProgram(material, scene, object);\n material.side = $d5b33d7c30034067$export$3b296b6f144d5b03;\n } else getProgram(material, scene, object);\n }\n currentRenderState = renderStates.get(scene);\n currentRenderState.init();\n renderStateStack.push(currentRenderState);\n scene.traverseVisible(function(object) {\n if (object.isLight && object.layers.test(camera.layers)) {\n currentRenderState.pushLight(object);\n if (object.castShadow) currentRenderState.pushShadow(object);\n }\n });\n currentRenderState.setupLights(_this._useLegacyLights);\n scene.traverse(function(object) {\n const material = object.material;\n if (material) {\n if (Array.isArray(material)) for(let i = 0; i < material.length; i++){\n const material2 = material[i];\n prepare(material2, scene, object);\n }\n else prepare(material, scene, object);\n }\n });\n renderStateStack.pop();\n currentRenderState = null;\n };\n // Animation Loop\n let onAnimationFrameCallback = null;\n function onAnimationFrame(time) {\n if (onAnimationFrameCallback) onAnimationFrameCallback(time);\n }\n function onXRSessionStart() {\n animation.stop();\n }\n function onXRSessionEnd() {\n animation.start();\n }\n const animation = new $d5b33d7c30034067$var$WebGLAnimation();\n animation.setAnimationLoop(onAnimationFrame);\n if (typeof self !== \"undefined\") animation.setContext(self);\n this.setAnimationLoop = function(callback) {\n onAnimationFrameCallback = callback;\n xr.setAnimationLoop(callback);\n callback === null ? animation.stop() : animation.start();\n };\n xr.addEventListener(\"sessionstart\", onXRSessionStart);\n xr.addEventListener(\"sessionend\", onXRSessionEnd);\n // Rendering\n this.render = function(scene, camera) {\n if (camera !== undefined && camera.isCamera !== true) {\n console.error(\"THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.\");\n return;\n }\n if (_isContextLost === true) return;\n // update scene graph\n if (scene.matrixWorldAutoUpdate === true) scene.updateMatrixWorld();\n // update camera matrices and frustum\n if (camera.parent === null && camera.matrixWorldAutoUpdate === true) camera.updateMatrixWorld();\n if (xr.enabled === true && xr.isPresenting === true) {\n if (xr.cameraAutoUpdate === true) xr.updateCamera(camera);\n camera = xr.getCamera(); // use XR camera for rendering\n }\n //\n if (scene.isScene === true) scene.onBeforeRender(_this, scene, camera, _currentRenderTarget);\n currentRenderState = renderStates.get(scene, renderStateStack.length);\n currentRenderState.init();\n renderStateStack.push(currentRenderState);\n _projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n _frustum.setFromProjectionMatrix(_projScreenMatrix);\n _localClippingEnabled = this.localClippingEnabled;\n _clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled);\n currentRenderList = renderLists.get(scene, renderListStack.length);\n currentRenderList.init();\n renderListStack.push(currentRenderList);\n projectObject(scene, camera, 0, _this.sortObjects);\n currentRenderList.finish();\n if (_this.sortObjects === true) currentRenderList.sort(_opaqueSort, _transparentSort);\n //\n this.info.render.frame++;\n if (_clippingEnabled === true) clipping.beginShadows();\n const shadowsArray = currentRenderState.state.shadowsArray;\n shadowMap.render(shadowsArray, scene, camera);\n if (_clippingEnabled === true) clipping.endShadows();\n //\n if (this.info.autoReset === true) this.info.reset();\n //\n background.render(currentRenderList, scene);\n // render scene\n currentRenderState.setupLights(_this._useLegacyLights);\n if (camera.isArrayCamera) {\n const cameras = camera.cameras;\n for(let i = 0, l = cameras.length; i < l; i++){\n const camera2 = cameras[i];\n renderScene(currentRenderList, scene, camera2, camera2.viewport);\n }\n } else renderScene(currentRenderList, scene, camera);\n //\n if (_currentRenderTarget !== null) {\n // resolve multisample renderbuffers to a single-sample texture if necessary\n textures.updateMultisampleRenderTarget(_currentRenderTarget);\n // Generate mipmap if we're using any kind of mipmap filtering\n textures.updateRenderTargetMipmap(_currentRenderTarget);\n }\n //\n if (scene.isScene === true) scene.onAfterRender(_this, scene, camera);\n // _gl.finish();\n bindingStates.resetDefaultState();\n _currentMaterialId = -1;\n _currentCamera = null;\n renderStateStack.pop();\n if (renderStateStack.length > 0) currentRenderState = renderStateStack[renderStateStack.length - 1];\n else currentRenderState = null;\n renderListStack.pop();\n if (renderListStack.length > 0) currentRenderList = renderListStack[renderListStack.length - 1];\n else currentRenderList = null;\n };\n function projectObject(object, camera, groupOrder, sortObjects) {\n if (object.visible === false) return;\n const visible = object.layers.test(camera.layers);\n if (visible) {\n if (object.isGroup) groupOrder = object.renderOrder;\n else if (object.isLOD) {\n if (object.autoUpdate === true) object.update(camera);\n } else if (object.isLight) {\n currentRenderState.pushLight(object);\n if (object.castShadow) currentRenderState.pushShadow(object);\n } else if (object.isSprite) {\n if (!object.frustumCulled || _frustum.intersectsSprite(object)) {\n if (sortObjects) _vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n const geometry = objects.update(object);\n const material = object.material;\n if (material.visible) currentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null);\n }\n } else if (object.isMesh || object.isLine || object.isPoints) {\n if (!object.frustumCulled || _frustum.intersectsObject(object)) {\n const geometry = objects.update(object);\n const material = object.material;\n if (sortObjects) {\n if (object.boundingSphere !== undefined) {\n if (object.boundingSphere === null) object.computeBoundingSphere();\n _vector3.copy(object.boundingSphere.center);\n } else {\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n _vector3.copy(geometry.boundingSphere.center);\n }\n _vector3.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n }\n if (Array.isArray(material)) {\n const groups = geometry.groups;\n for(let i = 0, l = groups.length; i < l; i++){\n const group = groups[i];\n const groupMaterial = material[group.materialIndex];\n if (groupMaterial && groupMaterial.visible) currentRenderList.push(object, geometry, groupMaterial, groupOrder, _vector3.z, group);\n }\n } else if (material.visible) currentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null);\n }\n }\n }\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)projectObject(children[i], camera, groupOrder, sortObjects);\n }\n function renderScene(currentRenderList, scene, camera, viewport) {\n const opaqueObjects = currentRenderList.opaque;\n const transmissiveObjects = currentRenderList.transmissive;\n const transparentObjects = currentRenderList.transparent;\n currentRenderState.setupLightsView(camera);\n if (_clippingEnabled === true) clipping.setGlobalState(_this.clippingPlanes, camera);\n if (transmissiveObjects.length > 0) renderTransmissionPass(opaqueObjects, transmissiveObjects, scene, camera);\n if (viewport) state.viewport(_currentViewport.copy(viewport));\n if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);\n if (transmissiveObjects.length > 0) renderObjects(transmissiveObjects, scene, camera);\n if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera);\n // Ensure depth buffer writing is enabled so it can be cleared on next render\n state.buffers.depth.setTest(true);\n state.buffers.depth.setMask(true);\n state.buffers.color.setMask(true);\n state.setPolygonOffset(false);\n }\n function renderTransmissionPass(opaqueObjects, transmissiveObjects, scene, camera) {\n const isWebGL2 = capabilities.isWebGL2;\n if (_transmissionRenderTarget === null) _transmissionRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(1, 1, {\n generateMipmaps: true,\n type: extensions.has(\"EXT_color_buffer_half_float\") ? $d5b33d7c30034067$export$2697304443f382bc : $d5b33d7c30034067$export$2e8ce08d3f6f5e10,\n minFilter: $d5b33d7c30034067$export$5d8599b6a933fb1b,\n samples: isWebGL2 ? 4 : 0\n });\n _this.getDrawingBufferSize(_vector2);\n if (isWebGL2) _transmissionRenderTarget.setSize(_vector2.x, _vector2.y);\n else _transmissionRenderTarget.setSize($d5b33d7c30034067$var$floorPowerOfTwo(_vector2.x), $d5b33d7c30034067$var$floorPowerOfTwo(_vector2.y));\n //\n const currentRenderTarget = _this.getRenderTarget();\n _this.setRenderTarget(_transmissionRenderTarget);\n _this.getClearColor(_currentClearColor);\n _currentClearAlpha = _this.getClearAlpha();\n if (_currentClearAlpha < 1) _this.setClearColor(0xffffff, 0.5);\n _this.clear();\n // Turn off the features which can affect the frag color for opaque objects pass.\n // Otherwise they are applied twice in opaque objects pass and transmission objects pass.\n const currentToneMapping = _this.toneMapping;\n _this.toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n renderObjects(opaqueObjects, scene, camera);\n textures.updateMultisampleRenderTarget(_transmissionRenderTarget);\n textures.updateRenderTargetMipmap(_transmissionRenderTarget);\n let renderTargetNeedsUpdate = false;\n for(let i = 0, l = transmissiveObjects.length; i < l; i++){\n const renderItem = transmissiveObjects[i];\n const object = renderItem.object;\n const geometry = renderItem.geometry;\n const material = renderItem.material;\n const group = renderItem.group;\n if (material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 && object.layers.test(camera.layers)) {\n const currentSide = material.side;\n material.side = $d5b33d7c30034067$export$d9f0486e75b5ace;\n material.needsUpdate = true;\n renderObject(object, scene, camera, geometry, material, group);\n material.side = currentSide;\n material.needsUpdate = true;\n renderTargetNeedsUpdate = true;\n }\n }\n if (renderTargetNeedsUpdate === true) {\n textures.updateMultisampleRenderTarget(_transmissionRenderTarget);\n textures.updateRenderTargetMipmap(_transmissionRenderTarget);\n }\n _this.setRenderTarget(currentRenderTarget);\n _this.setClearColor(_currentClearColor, _currentClearAlpha);\n _this.toneMapping = currentToneMapping;\n }\n function renderObjects(renderList, scene, camera) {\n const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n for(let i = 0, l = renderList.length; i < l; i++){\n const renderItem = renderList[i];\n const object = renderItem.object;\n const geometry = renderItem.geometry;\n const material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n const group = renderItem.group;\n if (object.layers.test(camera.layers)) renderObject(object, scene, camera, geometry, material, group);\n }\n }\n function renderObject(object, scene, camera, geometry, material, group) {\n object.onBeforeRender(_this, scene, camera, geometry, material, group);\n object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);\n object.normalMatrix.getNormalMatrix(object.modelViewMatrix);\n material.onBeforeRender(_this, scene, camera, geometry, object, group);\n if (material.transparent === true && material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 && material.forceSinglePass === false) {\n material.side = $d5b33d7c30034067$export$d9f0486e75b5ace;\n material.needsUpdate = true;\n _this.renderBufferDirect(camera, scene, geometry, material, object, group);\n material.side = $d5b33d7c30034067$export$2ede184fc2998901;\n material.needsUpdate = true;\n _this.renderBufferDirect(camera, scene, geometry, material, object, group);\n material.side = $d5b33d7c30034067$export$3b296b6f144d5b03;\n } else _this.renderBufferDirect(camera, scene, geometry, material, object, group);\n object.onAfterRender(_this, scene, camera, geometry, material, group);\n }\n function getProgram(material, scene, object) {\n if (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n const materialProperties = properties.get(material);\n const lights = currentRenderState.state.lights;\n const shadowsArray = currentRenderState.state.shadowsArray;\n const lightsStateVersion = lights.state.version;\n const parameters = programCache.getParameters(material, lights.state, shadowsArray, scene, object);\n const programCacheKey = programCache.getProgramCacheKey(parameters);\n let programs = materialProperties.programs;\n // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change\n materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n materialProperties.fog = scene.fog;\n materialProperties.envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || materialProperties.environment);\n if (programs === undefined) {\n // new material\n material.addEventListener(\"dispose\", onMaterialDispose);\n programs = new Map();\n materialProperties.programs = programs;\n }\n let program = programs.get(programCacheKey);\n if (program !== undefined) // early out if program and light state is identical\n {\n if (materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion) {\n updateCommonMaterialProperties(material, parameters);\n return program;\n }\n } else {\n parameters.uniforms = programCache.getUniforms(material);\n material.onBuild(object, parameters, _this);\n material.onBeforeCompile(parameters, _this);\n program = programCache.acquireProgram(parameters, programCacheKey);\n programs.set(programCacheKey, program);\n materialProperties.uniforms = parameters.uniforms;\n }\n const uniforms = materialProperties.uniforms;\n if (!material.isShaderMaterial && !material.isRawShaderMaterial || material.clipping === true) uniforms.clippingPlanes = clipping.uniform;\n updateCommonMaterialProperties(material, parameters);\n // store the light setup it was created for\n materialProperties.needsLights = materialNeedsLights(material);\n materialProperties.lightsStateVersion = lightsStateVersion;\n if (materialProperties.needsLights) {\n // wire up the material to this renderer's lighting state\n uniforms.ambientLightColor.value = lights.state.ambient;\n uniforms.lightProbe.value = lights.state.probe;\n uniforms.directionalLights.value = lights.state.directional;\n uniforms.directionalLightShadows.value = lights.state.directionalShadow;\n uniforms.spotLights.value = lights.state.spot;\n uniforms.spotLightShadows.value = lights.state.spotShadow;\n uniforms.rectAreaLights.value = lights.state.rectArea;\n uniforms.ltc_1.value = lights.state.rectAreaLTC1;\n uniforms.ltc_2.value = lights.state.rectAreaLTC2;\n uniforms.pointLights.value = lights.state.point;\n uniforms.pointLightShadows.value = lights.state.pointShadow;\n uniforms.hemisphereLights.value = lights.state.hemi;\n uniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n uniforms.spotShadowMap.value = lights.state.spotShadowMap;\n uniforms.spotLightMatrix.value = lights.state.spotLightMatrix;\n uniforms.spotLightMap.value = lights.state.spotLightMap;\n uniforms.pointShadowMap.value = lights.state.pointShadowMap;\n uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;\n // TODO (abelnation): add area lights shadow info to uniforms\n }\n const progUniforms = program.getUniforms();\n const uniformsList = $d5b33d7c30034067$var$WebGLUniforms.seqWithValue(progUniforms.seq, uniforms);\n materialProperties.currentProgram = program;\n materialProperties.uniformsList = uniformsList;\n return program;\n }\n function updateCommonMaterialProperties(material, parameters) {\n const materialProperties = properties.get(material);\n materialProperties.outputColorSpace = parameters.outputColorSpace;\n materialProperties.instancing = parameters.instancing;\n materialProperties.instancingColor = parameters.instancingColor;\n materialProperties.skinning = parameters.skinning;\n materialProperties.morphTargets = parameters.morphTargets;\n materialProperties.morphNormals = parameters.morphNormals;\n materialProperties.morphColors = parameters.morphColors;\n materialProperties.morphTargetsCount = parameters.morphTargetsCount;\n materialProperties.numClippingPlanes = parameters.numClippingPlanes;\n materialProperties.numIntersection = parameters.numClipIntersection;\n materialProperties.vertexAlphas = parameters.vertexAlphas;\n materialProperties.vertexTangents = parameters.vertexTangents;\n materialProperties.toneMapping = parameters.toneMapping;\n }\n function setProgram(camera, scene, geometry, material, object) {\n if (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n textures.resetTextureUnits();\n const fog = scene.fog;\n const environment = material.isMeshStandardMaterial ? scene.environment : null;\n const colorSpace1 = _currentRenderTarget === null ? _this.outputColorSpace : _currentRenderTarget.isXRRenderTarget === true ? _currentRenderTarget.texture.colorSpace : $d5b33d7c30034067$export$42429b3acfb233a4;\n const envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || environment);\n const vertexAlphas = material.vertexColors === true && !!geometry.attributes.color && geometry.attributes.color.itemSize === 4;\n const vertexTangents = !!geometry.attributes.tangent && (!!material.normalMap || material.anisotropy > 0);\n const morphTargets = !!geometry.morphAttributes.position;\n const morphNormals = !!geometry.morphAttributes.normal;\n const morphColors = !!geometry.morphAttributes.color;\n let toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n if (material.toneMapped) {\n if (_currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true) toneMapping = _this.toneMapping;\n }\n const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n const morphTargetsCount = morphAttribute !== undefined ? morphAttribute.length : 0;\n const materialProperties = properties.get(material);\n const lights = currentRenderState.state.lights;\n if (_clippingEnabled === true) {\n if (_localClippingEnabled === true || camera !== _currentCamera) {\n const useCache = camera === _currentCamera && material.id === _currentMaterialId;\n // we might want to call this function with some ClippingGroup\n // object instead of the material, once it becomes feasible\n // (#8465, #8379)\n clipping.setState(material, camera, useCache);\n }\n }\n //\n let needsProgramChange = false;\n if (material.version === materialProperties.__version) {\n if (materialProperties.needsLights && materialProperties.lightsStateVersion !== lights.state.version) needsProgramChange = true;\n else if (materialProperties.outputColorSpace !== colorSpace1) needsProgramChange = true;\n else if (object.isInstancedMesh && materialProperties.instancing === false) needsProgramChange = true;\n else if (!object.isInstancedMesh && materialProperties.instancing === true) needsProgramChange = true;\n else if (object.isSkinnedMesh && materialProperties.skinning === false) needsProgramChange = true;\n else if (!object.isSkinnedMesh && materialProperties.skinning === true) needsProgramChange = true;\n else if (object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null) needsProgramChange = true;\n else if (object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null) needsProgramChange = true;\n else if (materialProperties.envMap !== envMap) needsProgramChange = true;\n else if (material.fog === true && materialProperties.fog !== fog) needsProgramChange = true;\n else if (materialProperties.numClippingPlanes !== undefined && (materialProperties.numClippingPlanes !== clipping.numPlanes || materialProperties.numIntersection !== clipping.numIntersection)) needsProgramChange = true;\n else if (materialProperties.vertexAlphas !== vertexAlphas) needsProgramChange = true;\n else if (materialProperties.vertexTangents !== vertexTangents) needsProgramChange = true;\n else if (materialProperties.morphTargets !== morphTargets) needsProgramChange = true;\n else if (materialProperties.morphNormals !== morphNormals) needsProgramChange = true;\n else if (materialProperties.morphColors !== morphColors) needsProgramChange = true;\n else if (materialProperties.toneMapping !== toneMapping) needsProgramChange = true;\n else if (capabilities.isWebGL2 === true && materialProperties.morphTargetsCount !== morphTargetsCount) needsProgramChange = true;\n } else {\n needsProgramChange = true;\n materialProperties.__version = material.version;\n }\n //\n let program = materialProperties.currentProgram;\n if (needsProgramChange === true) program = getProgram(material, scene, object);\n let refreshProgram = false;\n let refreshMaterial = false;\n let refreshLights = false;\n const p_uniforms = program.getUniforms(), m_uniforms = materialProperties.uniforms;\n if (state.useProgram(program.program)) {\n refreshProgram = true;\n refreshMaterial = true;\n refreshLights = true;\n }\n if (material.id !== _currentMaterialId) {\n _currentMaterialId = material.id;\n refreshMaterial = true;\n }\n if (refreshProgram || _currentCamera !== camera) {\n p_uniforms.setValue(_gl, \"projectionMatrix\", camera.projectionMatrix);\n if (capabilities.logarithmicDepthBuffer) p_uniforms.setValue(_gl, \"logDepthBufFC\", 2.0 / (Math.log(camera.far + 1.0) / Math.LN2));\n if (_currentCamera !== camera) {\n _currentCamera = camera;\n // lighting uniforms depend on the camera so enforce an update\n // now, in case this material supports lights - or later, when\n // the next material that does gets activated:\n refreshMaterial = true; // set to true on material change\n refreshLights = true; // remains set until update done\n }\n // load material specific uniforms\n // (shader material also gets them for the sake of genericity)\n if (material.isShaderMaterial || material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshStandardMaterial || material.envMap) {\n const uCamPos = p_uniforms.map.cameraPosition;\n if (uCamPos !== undefined) uCamPos.setValue(_gl, _vector3.setFromMatrixPosition(camera.matrixWorld));\n }\n if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) p_uniforms.setValue(_gl, \"isOrthographic\", camera.isOrthographicCamera === true);\n if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial || material.isShadowMaterial || object.isSkinnedMesh) p_uniforms.setValue(_gl, \"viewMatrix\", camera.matrixWorldInverse);\n }\n // skinning and morph target uniforms must be set even if material didn't change\n // auto-setting of texture unit for bone and morph texture must go before other textures\n // otherwise textures used for skinning and morphing can take over texture units reserved for other material textures\n if (object.isSkinnedMesh) {\n p_uniforms.setOptional(_gl, object, \"bindMatrix\");\n p_uniforms.setOptional(_gl, object, \"bindMatrixInverse\");\n const skeleton = object.skeleton;\n if (skeleton) {\n if (capabilities.floatVertexTextures) {\n if (skeleton.boneTexture === null) skeleton.computeBoneTexture();\n p_uniforms.setValue(_gl, \"boneTexture\", skeleton.boneTexture, textures);\n p_uniforms.setValue(_gl, \"boneTextureSize\", skeleton.boneTextureSize);\n } else console.warn(\"THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.\");\n }\n }\n const morphAttributes = geometry.morphAttributes;\n if (morphAttributes.position !== undefined || morphAttributes.normal !== undefined || morphAttributes.color !== undefined && capabilities.isWebGL2 === true) morphtargets.update(object, geometry, program);\n if (refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow) {\n materialProperties.receiveShadow = object.receiveShadow;\n p_uniforms.setValue(_gl, \"receiveShadow\", object.receiveShadow);\n }\n // https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512\n if (material.isMeshGouraudMaterial && material.envMap !== null) {\n m_uniforms.envMap.value = envMap;\n m_uniforms.flipEnvMap.value = envMap.isCubeTexture && envMap.isRenderTargetTexture === false ? -1 : 1;\n }\n if (refreshMaterial) {\n p_uniforms.setValue(_gl, \"toneMappingExposure\", _this.toneMappingExposure);\n if (materialProperties.needsLights) // the current material requires lighting info\n // note: all lighting uniforms are always set correctly\n // they simply reference the renderer's state for their\n // values\n //\n // use the current material's .needsUpdate flags to set\n // the GL state when required\n markUniformsLightsNeedsUpdate(m_uniforms, refreshLights);\n // refresh uniforms common to several materials\n if (fog && material.fog === true) materials.refreshFogUniforms(m_uniforms, fog);\n materials.refreshMaterialUniforms(m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget);\n $d5b33d7c30034067$var$WebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures);\n }\n if (material.isShaderMaterial && material.uniformsNeedUpdate === true) {\n $d5b33d7c30034067$var$WebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures);\n material.uniformsNeedUpdate = false;\n }\n if (material.isSpriteMaterial) p_uniforms.setValue(_gl, \"center\", object.center);\n // common matrices\n p_uniforms.setValue(_gl, \"modelViewMatrix\", object.modelViewMatrix);\n p_uniforms.setValue(_gl, \"normalMatrix\", object.normalMatrix);\n p_uniforms.setValue(_gl, \"modelMatrix\", object.matrixWorld);\n // UBOs\n if (material.isShaderMaterial || material.isRawShaderMaterial) {\n const groups = material.uniformsGroups;\n for(let i = 0, l = groups.length; i < l; i++)if (capabilities.isWebGL2) {\n const group = groups[i];\n uniformsGroups.update(group, program);\n uniformsGroups.bind(group, program);\n } else console.warn(\"THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.\");\n }\n return program;\n }\n // If uniforms are marked as clean, they don't need to be loaded to the GPU.\n function markUniformsLightsNeedsUpdate(uniforms, value) {\n uniforms.ambientLightColor.needsUpdate = value;\n uniforms.lightProbe.needsUpdate = value;\n uniforms.directionalLights.needsUpdate = value;\n uniforms.directionalLightShadows.needsUpdate = value;\n uniforms.pointLights.needsUpdate = value;\n uniforms.pointLightShadows.needsUpdate = value;\n uniforms.spotLights.needsUpdate = value;\n uniforms.spotLightShadows.needsUpdate = value;\n uniforms.rectAreaLights.needsUpdate = value;\n uniforms.hemisphereLights.needsUpdate = value;\n }\n function materialNeedsLights(material) {\n return material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || material.isMeshStandardMaterial || material.isShadowMaterial || material.isShaderMaterial && material.lights === true;\n }\n this.getActiveCubeFace = function() {\n return _currentActiveCubeFace;\n };\n this.getActiveMipmapLevel = function() {\n return _currentActiveMipmapLevel;\n };\n this.getRenderTarget = function() {\n return _currentRenderTarget;\n };\n this.setRenderTargetTextures = function(renderTarget, colorTexture, depthTexture) {\n properties.get(renderTarget.texture).__webglTexture = colorTexture;\n properties.get(renderTarget.depthTexture).__webglTexture = depthTexture;\n const renderTargetProperties = properties.get(renderTarget);\n renderTargetProperties.__hasExternalTextures = true;\n if (renderTargetProperties.__hasExternalTextures) {\n renderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined;\n if (!renderTargetProperties.__autoAllocateDepthBuffer) // The multisample_render_to_texture extension doesn't work properly if there\n // are midframe flushes and an external depth buffer. Disable use of the extension.\n {\n if (extensions.has(\"WEBGL_multisampled_render_to_texture\") === true) {\n console.warn(\"THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided\");\n renderTargetProperties.__useRenderToTexture = false;\n }\n }\n }\n };\n this.setRenderTargetFramebuffer = function(renderTarget, defaultFramebuffer) {\n const renderTargetProperties = properties.get(renderTarget);\n renderTargetProperties.__webglFramebuffer = defaultFramebuffer;\n renderTargetProperties.__useDefaultFramebuffer = defaultFramebuffer === undefined;\n };\n this.setRenderTarget = function(renderTarget, activeCubeFace = 0, activeMipmapLevel = 0) {\n _currentRenderTarget = renderTarget;\n _currentActiveCubeFace = activeCubeFace;\n _currentActiveMipmapLevel = activeMipmapLevel;\n let useDefaultFramebuffer = true;\n let framebuffer = null;\n let isCube = false;\n let isRenderTarget3D = false;\n if (renderTarget) {\n const renderTargetProperties = properties.get(renderTarget);\n if (renderTargetProperties.__useDefaultFramebuffer !== undefined) {\n // We need to make sure to rebind the framebuffer.\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n useDefaultFramebuffer = false;\n } else if (renderTargetProperties.__webglFramebuffer === undefined) textures.setupRenderTarget(renderTarget);\n else if (renderTargetProperties.__hasExternalTextures) // Color and depth texture must be rebound in order for the swapchain to update.\n textures.rebindTextures(renderTarget, properties.get(renderTarget.texture).__webglTexture, properties.get(renderTarget.depthTexture).__webglTexture);\n const texture = renderTarget.texture;\n if (texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture) isRenderTarget3D = true;\n const __webglFramebuffer = properties.get(renderTarget).__webglFramebuffer;\n if (renderTarget.isWebGLCubeRenderTarget) {\n if (Array.isArray(__webglFramebuffer[activeCubeFace])) framebuffer = __webglFramebuffer[activeCubeFace][activeMipmapLevel];\n else framebuffer = __webglFramebuffer[activeCubeFace];\n isCube = true;\n } else if (capabilities.isWebGL2 && renderTarget.samples > 0 && textures.useMultisampledRTT(renderTarget) === false) framebuffer = properties.get(renderTarget).__webglMultisampledFramebuffer;\n else if (Array.isArray(__webglFramebuffer)) framebuffer = __webglFramebuffer[activeMipmapLevel];\n else framebuffer = __webglFramebuffer;\n _currentViewport.copy(renderTarget.viewport);\n _currentScissor.copy(renderTarget.scissor);\n _currentScissorTest = renderTarget.scissorTest;\n } else {\n _currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();\n _currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();\n _currentScissorTest = _scissorTest;\n }\n const framebufferBound = state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n if (framebufferBound && capabilities.drawBuffers && useDefaultFramebuffer) state.drawBuffers(renderTarget, framebuffer);\n state.viewport(_currentViewport);\n state.scissor(_currentScissor);\n state.setScissorTest(_currentScissorTest);\n if (isCube) {\n const textureProperties = properties.get(renderTarget.texture);\n _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel);\n } else if (isRenderTarget3D) {\n const textureProperties = properties.get(renderTarget.texture);\n const layer = activeCubeFace || 0;\n _gl.framebufferTextureLayer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer);\n }\n _currentMaterialId = -1; // reset current material to ensure correct uniform bindings\n };\n this.readRenderTargetPixels = function(renderTarget, x, y, width, height, buffer, activeCubeFaceIndex) {\n if (!(renderTarget && renderTarget.isWebGLRenderTarget)) {\n console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\");\n return;\n }\n let framebuffer = properties.get(renderTarget).__webglFramebuffer;\n if (renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined) framebuffer = framebuffer[activeCubeFaceIndex];\n if (framebuffer) {\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n try {\n const texture = renderTarget.texture;\n const textureFormat = texture.format;\n const textureType = texture.type;\n if (textureFormat !== $d5b33d7c30034067$export$3f8bb04b555a363c && utils.convert(textureFormat) !== _gl.getParameter(_gl.IMPLEMENTATION_COLOR_READ_FORMAT)) {\n console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.\");\n return;\n }\n const halfFloatSupportedByExt = textureType === $d5b33d7c30034067$export$2697304443f382bc && (extensions.has(\"EXT_color_buffer_half_float\") || capabilities.isWebGL2 && extensions.has(\"EXT_color_buffer_float\"));\n if (textureType !== $d5b33d7c30034067$export$2e8ce08d3f6f5e10 && utils.convert(textureType) !== _gl.getParameter(_gl.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)\n !(textureType === $d5b33d7c30034067$export$f6d331659b644596 && (capabilities.isWebGL2 || extensions.has(\"OES_texture_float\") || extensions.has(\"WEBGL_color_buffer_float\"))) && // Chrome Mac >= 52 and Firefox\n !halfFloatSupportedByExt) {\n console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.\");\n return;\n }\n // the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n if (x >= 0 && x <= renderTarget.width - width && y >= 0 && y <= renderTarget.height - height) _gl.readPixels(x, y, width, height, utils.convert(textureFormat), utils.convert(textureType), buffer);\n } finally{\n // restore framebuffer of current render target if necessary\n const framebuffer = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null;\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n }\n }\n };\n this.copyFramebufferToTexture = function(position, texture, level = 0) {\n const levelScale = Math.pow(2, -level);\n const width = Math.floor(texture.image.width * levelScale);\n const height = Math.floor(texture.image.height * levelScale);\n textures.setTexture2D(texture, 0);\n _gl.copyTexSubImage2D(_gl.TEXTURE_2D, level, 0, 0, position.x, position.y, width, height);\n state.unbindTexture();\n };\n this.copyTextureToTexture = function(position, srcTexture, dstTexture, level = 0) {\n const width = srcTexture.image.width;\n const height = srcTexture.image.height;\n const glFormat = utils.convert(dstTexture.format);\n const glType = utils.convert(dstTexture.type);\n textures.setTexture2D(dstTexture, 0);\n // As another texture upload may have changed pixelStorei\n // parameters, make sure they are correct for the dstTexture\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment);\n if (srcTexture.isDataTexture) _gl.texSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data);\n else if (srcTexture.isCompressedTexture) _gl.compressedTexSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[0].width, srcTexture.mipmaps[0].height, glFormat, srcTexture.mipmaps[0].data);\n else _gl.texSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image);\n // Generate mipmaps only when copying level 0\n if (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(_gl.TEXTURE_2D);\n state.unbindTexture();\n };\n this.copyTextureToTexture3D = function(sourceBox, position, srcTexture, dstTexture, level = 0) {\n if (_this.isWebGL1Renderer) {\n console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.\");\n return;\n }\n const width = sourceBox.max.x - sourceBox.min.x + 1;\n const height = sourceBox.max.y - sourceBox.min.y + 1;\n const depth = sourceBox.max.z - sourceBox.min.z + 1;\n const glFormat = utils.convert(dstTexture.format);\n const glType = utils.convert(dstTexture.type);\n let glTarget;\n if (dstTexture.isData3DTexture) {\n textures.setTexture3D(dstTexture, 0);\n glTarget = _gl.TEXTURE_3D;\n } else if (dstTexture.isDataArrayTexture) {\n textures.setTexture2DArray(dstTexture, 0);\n glTarget = _gl.TEXTURE_2D_ARRAY;\n } else {\n console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.\");\n return;\n }\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment);\n const unpackRowLen = _gl.getParameter(_gl.UNPACK_ROW_LENGTH);\n const unpackImageHeight = _gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT);\n const unpackSkipPixels = _gl.getParameter(_gl.UNPACK_SKIP_PIXELS);\n const unpackSkipRows = _gl.getParameter(_gl.UNPACK_SKIP_ROWS);\n const unpackSkipImages = _gl.getParameter(_gl.UNPACK_SKIP_IMAGES);\n const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[0] : srcTexture.image;\n _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, image.width);\n _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, image.height);\n _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, sourceBox.min.x);\n _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, sourceBox.min.y);\n _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, sourceBox.min.z);\n if (srcTexture.isDataTexture || srcTexture.isData3DTexture) _gl.texSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data);\n else if (srcTexture.isCompressedArrayTexture) {\n console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.\");\n _gl.compressedTexSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data);\n } else _gl.texSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image);\n _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, unpackRowLen);\n _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight);\n _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, unpackSkipPixels);\n _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, unpackSkipRows);\n _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, unpackSkipImages);\n // Generate mipmaps only when copying level 0\n if (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(glTarget);\n state.unbindTexture();\n };\n this.initTexture = function(texture) {\n if (texture.isCubeTexture) textures.setTextureCube(texture, 0);\n else if (texture.isData3DTexture) textures.setTexture3D(texture, 0);\n else if (texture.isDataArrayTexture || texture.isCompressedArrayTexture) textures.setTexture2DArray(texture, 0);\n else textures.setTexture2D(texture, 0);\n state.unbindTexture();\n };\n this.resetState = function() {\n _currentActiveCubeFace = 0;\n _currentActiveMipmapLevel = 0;\n _currentRenderTarget = null;\n state.reset();\n bindingStates.reset();\n };\n if (typeof __THREE_DEVTOOLS__ !== \"undefined\") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\", {\n detail: this\n }));\n }\n get coordinateSystem() {\n return $d5b33d7c30034067$export$5a0e9190d10875d3;\n }\n get physicallyCorrectLights() {\n console.warn(\"THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.\");\n return !this.useLegacyLights;\n }\n set physicallyCorrectLights(value) {\n console.warn(\"THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.\");\n this.useLegacyLights = !value;\n }\n get outputEncoding() {\n console.warn(\"THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.\");\n return this.outputColorSpace === $d5b33d7c30034067$export$561f394b24edfcaa ? $d5b33d7c30034067$export$f32388edbb32674 : $d5b33d7c30034067$export$7207336e4151a112;\n }\n set outputEncoding(encoding) {\n console.warn(\"THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.\");\n this.outputColorSpace = encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$42429b3acfb233a4;\n }\n get useLegacyLights() {\n console.warn(\"THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.\");\n return this._useLegacyLights;\n }\n set useLegacyLights(value) {\n console.warn(\"THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.\");\n this._useLegacyLights = value;\n }\n}\nclass $d5b33d7c30034067$export$a2f65229194348f9 extends $d5b33d7c30034067$export$f6cc00ef28d7cf97 {\n}\n$d5b33d7c30034067$export$a2f65229194348f9.prototype.isWebGL1Renderer = true;\nclass $d5b33d7c30034067$export$6f1519f023b8d0f6 {\n constructor(color, density = 0.00025){\n this.isFogExp2 = true;\n this.name = \"\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(color);\n this.density = density;\n }\n clone() {\n return new $d5b33d7c30034067$export$6f1519f023b8d0f6(this.color, this.density);\n }\n toJSON() {\n return {\n type: \"FogExp2\",\n color: this.color.getHex(),\n density: this.density\n };\n }\n}\nclass $d5b33d7c30034067$export$3c890837b09508d4 {\n constructor(color, near = 1, far = 1000){\n this.isFog = true;\n this.name = \"\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(color);\n this.near = near;\n this.far = far;\n }\n clone() {\n return new $d5b33d7c30034067$export$3c890837b09508d4(this.color, this.near, this.far);\n }\n toJSON() {\n return {\n type: \"Fog\",\n color: this.color.getHex(),\n near: this.near,\n far: this.far\n };\n }\n}\nclass $d5b33d7c30034067$export$38af1803e3442a7f extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isScene = true;\n this.type = \"Scene\";\n this.background = null;\n this.environment = null;\n this.fog = null;\n this.backgroundBlurriness = 0;\n this.backgroundIntensity = 1;\n this.overrideMaterial = null;\n if (typeof __THREE_DEVTOOLS__ !== \"undefined\") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\", {\n detail: this\n }));\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n if (source.background !== null) this.background = source.background.clone();\n if (source.environment !== null) this.environment = source.environment.clone();\n if (source.fog !== null) this.fog = source.fog.clone();\n this.backgroundBlurriness = source.backgroundBlurriness;\n this.backgroundIntensity = source.backgroundIntensity;\n if (source.overrideMaterial !== null) this.overrideMaterial = source.overrideMaterial.clone();\n this.matrixAutoUpdate = source.matrixAutoUpdate;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n if (this.fog !== null) data.object.fog = this.fog.toJSON();\n if (this.backgroundBlurriness > 0) data.object.backgroundBlurriness = this.backgroundBlurriness;\n if (this.backgroundIntensity !== 1) data.object.backgroundIntensity = this.backgroundIntensity;\n return data;\n }\n}\nclass $d5b33d7c30034067$export$3d5cd879f108f53f {\n constructor(array, stride){\n this.isInterleavedBuffer = true;\n this.array = array;\n this.stride = stride;\n this.count = array !== undefined ? array.length / stride : 0;\n this.usage = $d5b33d7c30034067$export$763e8360f4d7f77d;\n this.updateRange = {\n offset: 0,\n count: -1\n };\n this.version = 0;\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n }\n onUploadCallback() {}\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n setUsage(value) {\n this.usage = value;\n return this;\n }\n copy(source) {\n this.array = new source.array.constructor(source.array);\n this.count = source.count;\n this.stride = source.stride;\n this.usage = source.usage;\n return this;\n }\n copyAt(index1, attribute, index2) {\n index1 *= this.stride;\n index2 *= attribute.stride;\n for(let i = 0, l = this.stride; i < l; i++)this.array[index1 + i] = attribute.array[index2 + i];\n return this;\n }\n set(value, offset = 0) {\n this.array.set(value, offset);\n return this;\n }\n clone(data) {\n if (data.arrayBuffers === undefined) data.arrayBuffers = {};\n if (this.array.buffer._uuid === undefined) this.array.buffer._uuid = $d5b33d7c30034067$var$generateUUID();\n if (data.arrayBuffers[this.array.buffer._uuid] === undefined) data.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer;\n const array = new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);\n const ib = new this.constructor(array, this.stride);\n ib.setUsage(this.usage);\n return ib;\n }\n onUpload(callback) {\n this.onUploadCallback = callback;\n return this;\n }\n toJSON(data) {\n if (data.arrayBuffers === undefined) data.arrayBuffers = {};\n // generate UUID for array buffer if necessary\n if (this.array.buffer._uuid === undefined) this.array.buffer._uuid = $d5b33d7c30034067$var$generateUUID();\n if (data.arrayBuffers[this.array.buffer._uuid] === undefined) data.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer));\n //\n return {\n uuid: this.uuid,\n buffer: this.array.buffer._uuid,\n type: this.array.constructor.name,\n stride: this.stride\n };\n }\n}\nconst $d5b33d7c30034067$var$_vector$5 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$920b6d07334599c7 {\n constructor(interleavedBuffer, itemSize, offset, normalized = false){\n this.isInterleavedBufferAttribute = true;\n this.name = \"\";\n this.data = interleavedBuffer;\n this.itemSize = itemSize;\n this.offset = offset;\n this.normalized = normalized;\n }\n get count() {\n return this.data.count;\n }\n get array() {\n return this.data.array;\n }\n set needsUpdate(value) {\n this.data.needsUpdate = value;\n }\n applyMatrix4(m) {\n for(let i = 0, l = this.data.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$5.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$5.applyMatrix4(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$5.x, $d5b33d7c30034067$var$_vector$5.y, $d5b33d7c30034067$var$_vector$5.z);\n }\n return this;\n }\n applyNormalMatrix(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$5.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$5.applyNormalMatrix(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$5.x, $d5b33d7c30034067$var$_vector$5.y, $d5b33d7c30034067$var$_vector$5.z);\n }\n return this;\n }\n transformDirection(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$5.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$5.transformDirection(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$5.x, $d5b33d7c30034067$var$_vector$5.y, $d5b33d7c30034067$var$_vector$5.z);\n }\n return this;\n }\n setX(index, x) {\n if (this.normalized) x = $d5b33d7c30034067$var$normalize(x, this.array);\n this.data.array[index * this.data.stride + this.offset] = x;\n return this;\n }\n setY(index, y) {\n if (this.normalized) y = $d5b33d7c30034067$var$normalize(y, this.array);\n this.data.array[index * this.data.stride + this.offset + 1] = y;\n return this;\n }\n setZ(index, z) {\n if (this.normalized) z = $d5b33d7c30034067$var$normalize(z, this.array);\n this.data.array[index * this.data.stride + this.offset + 2] = z;\n return this;\n }\n setW(index, w) {\n if (this.normalized) w = $d5b33d7c30034067$var$normalize(w, this.array);\n this.data.array[index * this.data.stride + this.offset + 3] = w;\n return this;\n }\n getX(index) {\n let x = this.data.array[index * this.data.stride + this.offset];\n if (this.normalized) x = $d5b33d7c30034067$var$denormalize(x, this.array);\n return x;\n }\n getY(index) {\n let y = this.data.array[index * this.data.stride + this.offset + 1];\n if (this.normalized) y = $d5b33d7c30034067$var$denormalize(y, this.array);\n return y;\n }\n getZ(index) {\n let z = this.data.array[index * this.data.stride + this.offset + 2];\n if (this.normalized) z = $d5b33d7c30034067$var$denormalize(z, this.array);\n return z;\n }\n getW(index) {\n let w = this.data.array[index * this.data.stride + this.offset + 3];\n if (this.normalized) w = $d5b33d7c30034067$var$denormalize(w, this.array);\n return w;\n }\n setXY(index, x, y) {\n index = index * this.data.stride + this.offset;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n }\n this.data.array[index + 0] = x;\n this.data.array[index + 1] = y;\n return this;\n }\n setXYZ(index, x, y, z) {\n index = index * this.data.stride + this.offset;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n }\n this.data.array[index + 0] = x;\n this.data.array[index + 1] = y;\n this.data.array[index + 2] = z;\n return this;\n }\n setXYZW(index, x, y, z, w) {\n index = index * this.data.stride + this.offset;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n w = $d5b33d7c30034067$var$normalize(w, this.array);\n }\n this.data.array[index + 0] = x;\n this.data.array[index + 1] = y;\n this.data.array[index + 2] = z;\n this.data.array[index + 3] = w;\n return this;\n }\n clone(data) {\n if (data === undefined) {\n console.log(\"THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.\");\n const array = [];\n for(let i = 0; i < this.count; i++){\n const index = i * this.data.stride + this.offset;\n for(let j = 0; j < this.itemSize; j++)array.push(this.data.array[index + j]);\n }\n return new $d5b33d7c30034067$export$8dea267bd6bde117(new this.array.constructor(array), this.itemSize, this.normalized);\n } else {\n if (data.interleavedBuffers === undefined) data.interleavedBuffers = {};\n if (data.interleavedBuffers[this.data.uuid] === undefined) data.interleavedBuffers[this.data.uuid] = this.data.clone(data);\n return new $d5b33d7c30034067$export$920b6d07334599c7(data.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);\n }\n }\n toJSON(data) {\n if (data === undefined) {\n console.log(\"THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.\");\n const array = [];\n for(let i = 0; i < this.count; i++){\n const index = i * this.data.stride + this.offset;\n for(let j = 0; j < this.itemSize; j++)array.push(this.data.array[index + j]);\n }\n // de-interleave data and save it as an ordinary buffer attribute for now\n return {\n itemSize: this.itemSize,\n type: this.array.constructor.name,\n array: array,\n normalized: this.normalized\n };\n } else {\n // save as true interleaved attribute\n if (data.interleavedBuffers === undefined) data.interleavedBuffers = {};\n if (data.interleavedBuffers[this.data.uuid] === undefined) data.interleavedBuffers[this.data.uuid] = this.data.toJSON(data);\n return {\n isInterleavedBufferAttribute: true,\n itemSize: this.itemSize,\n data: this.data.uuid,\n offset: this.offset,\n normalized: this.normalized\n };\n }\n }\n}\nclass $d5b33d7c30034067$export$5ec7dd1c6994bf8e extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isSpriteMaterial = true;\n this.type = \"SpriteMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.alphaMap = null;\n this.rotation = 0;\n this.sizeAttenuation = true;\n this.transparent = true;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.rotation = source.rotation;\n this.sizeAttenuation = source.sizeAttenuation;\n this.fog = source.fog;\n return this;\n }\n}\nlet $d5b33d7c30034067$var$_geometry;\nconst $d5b33d7c30034067$var$_intersectPoint = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_worldScale = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_mvPosition = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_alignedPosition = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_rotatedPosition = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_viewWorldMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_vA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vB = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vC = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_uvA = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvB = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvC = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nclass $d5b33d7c30034067$export$3075603db8e6204c extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(material){\n super();\n this.isSprite = true;\n this.type = \"Sprite\";\n if ($d5b33d7c30034067$var$_geometry === undefined) {\n $d5b33d7c30034067$var$_geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const float32Array = new Float32Array([\n -0.5,\n -0.5,\n 0,\n 0,\n 0,\n 0.5,\n -0.5,\n 0,\n 1,\n 0,\n 0.5,\n 0.5,\n 0,\n 1,\n 1,\n -0.5,\n 0.5,\n 0,\n 0,\n 1\n ]);\n const interleavedBuffer = new $d5b33d7c30034067$export$3d5cd879f108f53f(float32Array, 5);\n $d5b33d7c30034067$var$_geometry.setIndex([\n 0,\n 1,\n 2,\n 0,\n 2,\n 3\n ]);\n $d5b33d7c30034067$var$_geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, 3, 0, false));\n $d5b33d7c30034067$var$_geometry.setAttribute(\"uv\", new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, 2, 3, false));\n }\n this.geometry = $d5b33d7c30034067$var$_geometry;\n this.material = material !== undefined ? material : new $d5b33d7c30034067$export$5ec7dd1c6994bf8e();\n this.center = new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0.5);\n }\n raycast(raycaster, intersects) {\n if (raycaster.camera === null) console.error('THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.');\n $d5b33d7c30034067$var$_worldScale.setFromMatrixScale(this.matrixWorld);\n $d5b33d7c30034067$var$_viewWorldMatrix.copy(raycaster.camera.matrixWorld);\n this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse, this.matrixWorld);\n $d5b33d7c30034067$var$_mvPosition.setFromMatrixPosition(this.modelViewMatrix);\n if (raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false) $d5b33d7c30034067$var$_worldScale.multiplyScalar(-$d5b33d7c30034067$var$_mvPosition.z);\n const rotation = this.material.rotation;\n let sin, cos;\n if (rotation !== 0) {\n cos = Math.cos(rotation);\n sin = Math.sin(rotation);\n }\n const center = this.center;\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vA.set(-0.5, -0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vB.set(0.5, -0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vC.set(0.5, 0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$_uvA.set(0, 0);\n $d5b33d7c30034067$var$_uvB.set(1, 0);\n $d5b33d7c30034067$var$_uvC.set(1, 1);\n // check first triangle\n let intersect = raycaster.ray.intersectTriangle($d5b33d7c30034067$var$_vA, $d5b33d7c30034067$var$_vB, $d5b33d7c30034067$var$_vC, false, $d5b33d7c30034067$var$_intersectPoint);\n if (intersect === null) {\n // check second triangle\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vB.set(-0.5, 0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$_uvB.set(0, 1);\n intersect = raycaster.ray.intersectTriangle($d5b33d7c30034067$var$_vA, $d5b33d7c30034067$var$_vC, $d5b33d7c30034067$var$_vB, false, $d5b33d7c30034067$var$_intersectPoint);\n if (intersect === null) return;\n }\n const distance = raycaster.ray.origin.distanceTo($d5b33d7c30034067$var$_intersectPoint);\n if (distance < raycaster.near || distance > raycaster.far) return;\n intersects.push({\n distance: distance,\n point: $d5b33d7c30034067$var$_intersectPoint.clone(),\n uv: $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectPoint, $d5b33d7c30034067$var$_vA, $d5b33d7c30034067$var$_vB, $d5b33d7c30034067$var$_vC, $d5b33d7c30034067$var$_uvA, $d5b33d7c30034067$var$_uvB, $d5b33d7c30034067$var$_uvC, new $d5b33d7c30034067$export$c977b3e384af9ae1()),\n face: null,\n object: this\n });\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n if (source.center !== undefined) this.center.copy(source.center);\n this.material = source.material;\n return this;\n }\n}\nfunction $d5b33d7c30034067$var$transformVertex(vertexPosition, mvPosition, center, scale, sin, cos) {\n // compute position in camera space\n $d5b33d7c30034067$var$_alignedPosition.subVectors(vertexPosition, center).addScalar(0.5).multiply(scale);\n // to check if rotation is not zero\n if (sin !== undefined) {\n $d5b33d7c30034067$var$_rotatedPosition.x = cos * $d5b33d7c30034067$var$_alignedPosition.x - sin * $d5b33d7c30034067$var$_alignedPosition.y;\n $d5b33d7c30034067$var$_rotatedPosition.y = sin * $d5b33d7c30034067$var$_alignedPosition.x + cos * $d5b33d7c30034067$var$_alignedPosition.y;\n } else $d5b33d7c30034067$var$_rotatedPosition.copy($d5b33d7c30034067$var$_alignedPosition);\n vertexPosition.copy(mvPosition);\n vertexPosition.x += $d5b33d7c30034067$var$_rotatedPosition.x;\n vertexPosition.y += $d5b33d7c30034067$var$_rotatedPosition.y;\n // transform to world space\n vertexPosition.applyMatrix4($d5b33d7c30034067$var$_viewWorldMatrix);\n}\nconst $d5b33d7c30034067$var$_v1$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$112e7237be0c5f30 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this._currentLevel = 0;\n this.type = \"LOD\";\n Object.defineProperties(this, {\n levels: {\n enumerable: true,\n value: []\n },\n isLOD: {\n value: true\n }\n });\n this.autoUpdate = true;\n }\n copy(source) {\n super.copy(source, false);\n const levels = source.levels;\n for(let i = 0, l = levels.length; i < l; i++){\n const level = levels[i];\n this.addLevel(level.object.clone(), level.distance, level.hysteresis);\n }\n this.autoUpdate = source.autoUpdate;\n return this;\n }\n addLevel(object, distance = 0, hysteresis = 0) {\n distance = Math.abs(distance);\n const levels = this.levels;\n let l;\n for(l = 0; l < levels.length; l++){\n if (distance < levels[l].distance) break;\n }\n levels.splice(l, 0, {\n distance: distance,\n hysteresis: hysteresis,\n object: object\n });\n this.add(object);\n return this;\n }\n getCurrentLevel() {\n return this._currentLevel;\n }\n getObjectForDistance(distance) {\n const levels = this.levels;\n if (levels.length > 0) {\n let i, l;\n for(i = 1, l = levels.length; i < l; i++){\n let levelDistance = levels[i].distance;\n if (levels[i].object.visible) levelDistance -= levelDistance * levels[i].hysteresis;\n if (distance < levelDistance) break;\n }\n return levels[i - 1].object;\n }\n return null;\n }\n raycast(raycaster, intersects) {\n const levels = this.levels;\n if (levels.length > 0) {\n $d5b33d7c30034067$var$_v1$2.setFromMatrixPosition(this.matrixWorld);\n const distance = raycaster.ray.origin.distanceTo($d5b33d7c30034067$var$_v1$2);\n this.getObjectForDistance(distance).raycast(raycaster, intersects);\n }\n }\n update(camera) {\n const levels = this.levels;\n if (levels.length > 1) {\n $d5b33d7c30034067$var$_v1$2.setFromMatrixPosition(camera.matrixWorld);\n $d5b33d7c30034067$var$_v2$1.setFromMatrixPosition(this.matrixWorld);\n const distance = $d5b33d7c30034067$var$_v1$2.distanceTo($d5b33d7c30034067$var$_v2$1) / camera.zoom;\n levels[0].object.visible = true;\n let i, l;\n for(i = 1, l = levels.length; i < l; i++){\n let levelDistance = levels[i].distance;\n if (levels[i].object.visible) levelDistance -= levelDistance * levels[i].hysteresis;\n if (distance >= levelDistance) {\n levels[i - 1].object.visible = false;\n levels[i].object.visible = true;\n } else break;\n }\n this._currentLevel = i - 1;\n for(; i < l; i++)levels[i].object.visible = false;\n }\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n if (this.autoUpdate === false) data.object.autoUpdate = false;\n data.object.levels = [];\n const levels = this.levels;\n for(let i = 0, l = levels.length; i < l; i++){\n const level = levels[i];\n data.object.levels.push({\n object: level.object.uuid,\n distance: level.distance,\n hysteresis: level.hysteresis\n });\n }\n return data;\n }\n}\nconst $d5b33d7c30034067$var$_basePosition = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_skinIndex = /*@__PURE__*/ new $d5b33d7c30034067$export$fa7daccca11cdbe3();\nconst $d5b33d7c30034067$var$_skinWeight = /*@__PURE__*/ new $d5b33d7c30034067$export$fa7daccca11cdbe3();\nconst $d5b33d7c30034067$var$_vector3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_matrix4 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_vertex = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_sphere$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_inverseMatrix$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nclass $d5b33d7c30034067$export$b303577035157ecf extends $d5b33d7c30034067$export$e176487c05830cc5 {\n constructor(geometry, material){\n super(geometry, material);\n this.isSkinnedMesh = true;\n this.type = \"SkinnedMesh\";\n this.bindMode = \"attached\";\n this.bindMatrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.bindMatrixInverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.boundingBox = null;\n this.boundingSphere = null;\n }\n computeBoundingBox() {\n const geometry = this.geometry;\n if (this.boundingBox === null) this.boundingBox = new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n this.boundingBox.makeEmpty();\n const positionAttribute = geometry.getAttribute(\"position\");\n for(let i = 0; i < positionAttribute.count; i++){\n $d5b33d7c30034067$var$_vertex.fromBufferAttribute(positionAttribute, i);\n this.applyBoneTransform(i, $d5b33d7c30034067$var$_vertex);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_vertex);\n }\n }\n computeBoundingSphere() {\n const geometry = this.geometry;\n if (this.boundingSphere === null) this.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba();\n this.boundingSphere.makeEmpty();\n const positionAttribute = geometry.getAttribute(\"position\");\n for(let i = 0; i < positionAttribute.count; i++){\n $d5b33d7c30034067$var$_vertex.fromBufferAttribute(positionAttribute, i);\n this.applyBoneTransform(i, $d5b33d7c30034067$var$_vertex);\n this.boundingSphere.expandByPoint($d5b33d7c30034067$var$_vertex);\n }\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.bindMode = source.bindMode;\n this.bindMatrix.copy(source.bindMatrix);\n this.bindMatrixInverse.copy(source.bindMatrixInverse);\n this.skeleton = source.skeleton;\n if (source.boundingBox !== null) this.boundingBox = source.boundingBox.clone();\n if (source.boundingSphere !== null) this.boundingSphere = source.boundingSphere.clone();\n return this;\n }\n raycast(raycaster, intersects) {\n const material = this.material;\n const matrixWorld = this.matrixWorld;\n if (material === undefined) return;\n // test with bounding sphere in world space\n if (this.boundingSphere === null) this.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$3.copy(this.boundingSphere);\n $d5b33d7c30034067$var$_sphere$3.applyMatrix4(matrixWorld);\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere$3) === false) return;\n // convert ray to local space of skinned mesh\n $d5b33d7c30034067$var$_inverseMatrix$2.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray$2.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix$2);\n // test with bounding box in local space\n if (this.boundingBox !== null) {\n if ($d5b33d7c30034067$var$_ray$2.intersectsBox(this.boundingBox) === false) return;\n }\n // test for intersections with geometry\n this._computeIntersections(raycaster, intersects, $d5b33d7c30034067$var$_ray$2);\n }\n getVertexPosition(index, target) {\n super.getVertexPosition(index, target);\n this.applyBoneTransform(index, target);\n return target;\n }\n bind(skeleton, bindMatrix) {\n this.skeleton = skeleton;\n if (bindMatrix === undefined) {\n this.updateMatrixWorld(true);\n this.skeleton.calculateInverses();\n bindMatrix = this.matrixWorld;\n }\n this.bindMatrix.copy(bindMatrix);\n this.bindMatrixInverse.copy(bindMatrix).invert();\n }\n pose() {\n this.skeleton.pose();\n }\n normalizeSkinWeights() {\n const vector = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const skinWeight = this.geometry.attributes.skinWeight;\n for(let i = 0, l = skinWeight.count; i < l; i++){\n vector.fromBufferAttribute(skinWeight, i);\n const scale = 1.0 / vector.manhattanLength();\n if (scale !== Infinity) vector.multiplyScalar(scale);\n else vector.set(1, 0, 0, 0); // do something reasonable\n skinWeight.setXYZW(i, vector.x, vector.y, vector.z, vector.w);\n }\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n if (this.bindMode === \"attached\") this.bindMatrixInverse.copy(this.matrixWorld).invert();\n else if (this.bindMode === \"detached\") this.bindMatrixInverse.copy(this.bindMatrix).invert();\n else console.warn(\"THREE.SkinnedMesh: Unrecognized bindMode: \" + this.bindMode);\n }\n applyBoneTransform(index, vector) {\n const skeleton = this.skeleton;\n const geometry = this.geometry;\n $d5b33d7c30034067$var$_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index);\n $d5b33d7c30034067$var$_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index);\n $d5b33d7c30034067$var$_basePosition.copy(vector).applyMatrix4(this.bindMatrix);\n vector.set(0, 0, 0);\n for(let i = 0; i < 4; i++){\n const weight = $d5b33d7c30034067$var$_skinWeight.getComponent(i);\n if (weight !== 0) {\n const boneIndex = $d5b33d7c30034067$var$_skinIndex.getComponent(i);\n $d5b33d7c30034067$var$_matrix4.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]);\n vector.addScaledVector($d5b33d7c30034067$var$_vector3.copy($d5b33d7c30034067$var$_basePosition).applyMatrix4($d5b33d7c30034067$var$_matrix4), weight);\n }\n }\n return vector.applyMatrix4(this.bindMatrixInverse);\n }\n boneTransform(index, vector) {\n console.warn(\"THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151.\");\n return this.applyBoneTransform(index, vector);\n }\n}\nclass $d5b33d7c30034067$export$b127726e56765aa4 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isBone = true;\n this.type = \"Bone\";\n }\n}\nclass $d5b33d7c30034067$export$b691f601014eabe1 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0, minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0, anisotropy, colorSpace1){\n super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1);\n this.isDataTexture = true;\n this.image = {\n data: data,\n width: width,\n height: height\n };\n this.generateMipmaps = false;\n this.flipY = false;\n this.unpackAlignment = 1;\n }\n}\nconst $d5b33d7c30034067$var$_offsetMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_identityMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nclass $d5b33d7c30034067$export$8f31e4c4a37b8e9c {\n constructor(bones = [], boneInverses = []){\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.bones = bones.slice(0);\n this.boneInverses = boneInverses;\n this.boneMatrices = null;\n this.boneTexture = null;\n this.boneTextureSize = 0;\n this.init();\n }\n init() {\n const bones = this.bones;\n const boneInverses = this.boneInverses;\n this.boneMatrices = new Float32Array(bones.length * 16);\n // calculate inverse bone matrices if necessary\n if (boneInverses.length === 0) this.calculateInverses();\n else // handle special case\n if (bones.length !== boneInverses.length) {\n console.warn(\"THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.\");\n this.boneInverses = [];\n for(let i = 0, il = this.bones.length; i < il; i++)this.boneInverses.push(new $d5b33d7c30034067$export$2ae72fc923e5eb5());\n }\n }\n calculateInverses() {\n this.boneInverses.length = 0;\n for(let i = 0, il = this.bones.length; i < il; i++){\n const inverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n if (this.bones[i]) inverse.copy(this.bones[i].matrixWorld).invert();\n this.boneInverses.push(inverse);\n }\n }\n pose() {\n // recover the bind-time world matrices\n for(let i = 0, il = this.bones.length; i < il; i++){\n const bone = this.bones[i];\n if (bone) bone.matrixWorld.copy(this.boneInverses[i]).invert();\n }\n // compute the local matrices, positions, rotations and scales\n for(let i = 0, il = this.bones.length; i < il; i++){\n const bone = this.bones[i];\n if (bone) {\n if (bone.parent && bone.parent.isBone) {\n bone.matrix.copy(bone.parent.matrixWorld).invert();\n bone.matrix.multiply(bone.matrixWorld);\n } else bone.matrix.copy(bone.matrixWorld);\n bone.matrix.decompose(bone.position, bone.quaternion, bone.scale);\n }\n }\n }\n update() {\n const bones = this.bones;\n const boneInverses = this.boneInverses;\n const boneMatrices = this.boneMatrices;\n const boneTexture = this.boneTexture;\n // flatten bone matrices to array\n for(let i = 0, il = bones.length; i < il; i++){\n // compute the offset between the current and the original transform\n const matrix = bones[i] ? bones[i].matrixWorld : $d5b33d7c30034067$var$_identityMatrix;\n $d5b33d7c30034067$var$_offsetMatrix.multiplyMatrices(matrix, boneInverses[i]);\n $d5b33d7c30034067$var$_offsetMatrix.toArray(boneMatrices, i * 16);\n }\n if (boneTexture !== null) boneTexture.needsUpdate = true;\n }\n clone() {\n return new $d5b33d7c30034067$export$8f31e4c4a37b8e9c(this.bones, this.boneInverses);\n }\n computeBoneTexture() {\n // layout (1 matrix = 4 pixels)\n // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n // with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8)\n // 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16)\n // 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)\n // 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n let size = Math.sqrt(this.bones.length * 4); // 4 pixels needed for 1 matrix\n size = $d5b33d7c30034067$var$ceilPowerOfTwo(size);\n size = Math.max(size, 4);\n const boneMatrices = new Float32Array(size * size * 4); // 4 floats per RGBA pixel\n boneMatrices.set(this.boneMatrices); // copy current values\n const boneTexture = new $d5b33d7c30034067$export$b691f601014eabe1(boneMatrices, size, size, $d5b33d7c30034067$export$3f8bb04b555a363c, $d5b33d7c30034067$export$f6d331659b644596);\n boneTexture.needsUpdate = true;\n this.boneMatrices = boneMatrices;\n this.boneTexture = boneTexture;\n this.boneTextureSize = size;\n return this;\n }\n getBoneByName(name) {\n for(let i = 0, il = this.bones.length; i < il; i++){\n const bone = this.bones[i];\n if (bone.name === name) return bone;\n }\n return undefined;\n }\n dispose() {\n if (this.boneTexture !== null) {\n this.boneTexture.dispose();\n this.boneTexture = null;\n }\n }\n fromJSON(json, bones) {\n this.uuid = json.uuid;\n for(let i = 0, l = json.bones.length; i < l; i++){\n const uuid = json.bones[i];\n let bone = bones[uuid];\n if (bone === undefined) {\n console.warn(\"THREE.Skeleton: No bone found with UUID:\", uuid);\n bone = new $d5b33d7c30034067$export$b127726e56765aa4();\n }\n this.bones.push(bone);\n this.boneInverses.push(new $d5b33d7c30034067$export$2ae72fc923e5eb5().fromArray(json.boneInverses[i]));\n }\n this.init();\n return this;\n }\n toJSON() {\n const data = {\n metadata: {\n version: 4.6,\n type: \"Skeleton\",\n generator: \"Skeleton.toJSON\"\n },\n bones: [],\n boneInverses: []\n };\n data.uuid = this.uuid;\n const bones = this.bones;\n const boneInverses = this.boneInverses;\n for(let i = 0, l = bones.length; i < l; i++){\n const bone = bones[i];\n data.bones.push(bone.uuid);\n const boneInverse = boneInverses[i];\n data.boneInverses.push(boneInverse.toArray());\n }\n return data;\n }\n}\nclass $d5b33d7c30034067$export$32ea87a8b54d744a extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized, meshPerAttribute = 1){\n super(array, itemSize, normalized);\n this.isInstancedBufferAttribute = true;\n this.meshPerAttribute = meshPerAttribute;\n }\n copy(source) {\n super.copy(source);\n this.meshPerAttribute = source.meshPerAttribute;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.meshPerAttribute = this.meshPerAttribute;\n data.isInstancedBufferAttribute = true;\n return data;\n }\n}\nconst $d5b33d7c30034067$var$_instanceLocalMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_instanceWorldMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_instanceIntersects = [];\nconst $d5b33d7c30034067$var$_box3 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_identity = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_mesh = /*@__PURE__*/ new $d5b33d7c30034067$export$e176487c05830cc5();\nconst $d5b33d7c30034067$var$_sphere$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nclass $d5b33d7c30034067$export$f3c979c331175ad7 extends $d5b33d7c30034067$export$e176487c05830cc5 {\n constructor(geometry, material, count){\n super(geometry, material);\n this.isInstancedMesh = true;\n this.instanceMatrix = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(count * 16), 16);\n this.instanceColor = null;\n this.count = count;\n this.boundingBox = null;\n this.boundingSphere = null;\n for(let i = 0; i < count; i++)this.setMatrixAt(i, $d5b33d7c30034067$var$_identity);\n }\n computeBoundingBox() {\n const geometry = this.geometry;\n const count = this.count;\n if (this.boundingBox === null) this.boundingBox = new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n if (geometry.boundingBox === null) geometry.computeBoundingBox();\n this.boundingBox.makeEmpty();\n for(let i = 0; i < count; i++){\n this.getMatrixAt(i, $d5b33d7c30034067$var$_instanceLocalMatrix);\n $d5b33d7c30034067$var$_box3.copy(geometry.boundingBox).applyMatrix4($d5b33d7c30034067$var$_instanceLocalMatrix);\n this.boundingBox.union($d5b33d7c30034067$var$_box3);\n }\n }\n computeBoundingSphere() {\n const geometry = this.geometry;\n const count = this.count;\n if (this.boundingSphere === null) this.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba();\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n this.boundingSphere.makeEmpty();\n for(let i = 0; i < count; i++){\n this.getMatrixAt(i, $d5b33d7c30034067$var$_instanceLocalMatrix);\n $d5b33d7c30034067$var$_sphere$2.copy(geometry.boundingSphere).applyMatrix4($d5b33d7c30034067$var$_instanceLocalMatrix);\n this.boundingSphere.union($d5b33d7c30034067$var$_sphere$2);\n }\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.instanceMatrix.copy(source.instanceMatrix);\n if (source.instanceColor !== null) this.instanceColor = source.instanceColor.clone();\n this.count = source.count;\n if (source.boundingBox !== null) this.boundingBox = source.boundingBox.clone();\n if (source.boundingSphere !== null) this.boundingSphere = source.boundingSphere.clone();\n return this;\n }\n getColorAt(index, color) {\n color.fromArray(this.instanceColor.array, index * 3);\n }\n getMatrixAt(index, matrix) {\n matrix.fromArray(this.instanceMatrix.array, index * 16);\n }\n raycast(raycaster, intersects) {\n const matrixWorld = this.matrixWorld;\n const raycastTimes = this.count;\n $d5b33d7c30034067$var$_mesh.geometry = this.geometry;\n $d5b33d7c30034067$var$_mesh.material = this.material;\n if ($d5b33d7c30034067$var$_mesh.material === undefined) return;\n // test with bounding sphere first\n if (this.boundingSphere === null) this.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$2.copy(this.boundingSphere);\n $d5b33d7c30034067$var$_sphere$2.applyMatrix4(matrixWorld);\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere$2) === false) return;\n // now test each instance\n for(let instanceId = 0; instanceId < raycastTimes; instanceId++){\n // calculate the world matrix for each instance\n this.getMatrixAt(instanceId, $d5b33d7c30034067$var$_instanceLocalMatrix);\n $d5b33d7c30034067$var$_instanceWorldMatrix.multiplyMatrices(matrixWorld, $d5b33d7c30034067$var$_instanceLocalMatrix);\n // the mesh represents this single instance\n $d5b33d7c30034067$var$_mesh.matrixWorld = $d5b33d7c30034067$var$_instanceWorldMatrix;\n $d5b33d7c30034067$var$_mesh.raycast(raycaster, $d5b33d7c30034067$var$_instanceIntersects);\n // process the result of raycast\n for(let i = 0, l = $d5b33d7c30034067$var$_instanceIntersects.length; i < l; i++){\n const intersect = $d5b33d7c30034067$var$_instanceIntersects[i];\n intersect.instanceId = instanceId;\n intersect.object = this;\n intersects.push(intersect);\n }\n $d5b33d7c30034067$var$_instanceIntersects.length = 0;\n }\n }\n setColorAt(index, color) {\n if (this.instanceColor === null) this.instanceColor = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(this.instanceMatrix.count * 3), 3);\n color.toArray(this.instanceColor.array, index * 3);\n }\n setMatrixAt(index, matrix) {\n matrix.toArray(this.instanceMatrix.array, index * 16);\n }\n updateMorphTargets() {}\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n}\nclass $d5b33d7c30034067$export$fbaaa33907730a0c extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isLineBasicMaterial = true;\n this.type = \"LineBasicMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.linewidth = 1;\n this.linecap = \"round\";\n this.linejoin = \"round\";\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.linewidth = source.linewidth;\n this.linecap = source.linecap;\n this.linejoin = source.linejoin;\n this.fog = source.fog;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_start$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_end$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_inverseMatrix$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nconst $d5b33d7c30034067$var$_sphere$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nclass $d5b33d7c30034067$export$17d680238e50603e extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(geometry = new $d5b33d7c30034067$export$b7be63a67df8959(), material = new $d5b33d7c30034067$export$fbaaa33907730a0c()){\n super();\n this.isLine = true;\n this.type = \"Line\";\n this.geometry = geometry;\n this.material = material;\n this.updateMorphTargets();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.material = source.material;\n this.geometry = source.geometry;\n return this;\n }\n computeLineDistances() {\n const geometry = this.geometry;\n // we assume non-indexed geometry\n if (geometry.index === null) {\n const positionAttribute = geometry.attributes.position;\n const lineDistances = [\n 0\n ];\n for(let i = 1, l = positionAttribute.count; i < l; i++){\n $d5b33d7c30034067$var$_start$1.fromBufferAttribute(positionAttribute, i - 1);\n $d5b33d7c30034067$var$_end$1.fromBufferAttribute(positionAttribute, i);\n lineDistances[i] = lineDistances[i - 1];\n lineDistances[i] += $d5b33d7c30034067$var$_start$1.distanceTo($d5b33d7c30034067$var$_end$1);\n }\n geometry.setAttribute(\"lineDistance\", new $d5b33d7c30034067$export$cbe7a62641830ebd(lineDistances, 1));\n } else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");\n return this;\n }\n raycast(raycaster, intersects) {\n const geometry = this.geometry;\n const matrixWorld = this.matrixWorld;\n const threshold = raycaster.params.Line.threshold;\n const drawRange = geometry.drawRange;\n // Checking boundingSphere distance to ray\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$1.copy(geometry.boundingSphere);\n $d5b33d7c30034067$var$_sphere$1.applyMatrix4(matrixWorld);\n $d5b33d7c30034067$var$_sphere$1.radius += threshold;\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere$1) === false) return;\n //\n $d5b33d7c30034067$var$_inverseMatrix$1.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray$1.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix$1);\n const localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n const localThresholdSq = localThreshold * localThreshold;\n const vStart = new $d5b33d7c30034067$export$64b5c384219d3699();\n const vEnd = new $d5b33d7c30034067$export$64b5c384219d3699();\n const interSegment = new $d5b33d7c30034067$export$64b5c384219d3699();\n const interRay = new $d5b33d7c30034067$export$64b5c384219d3699();\n const step = this.isLineSegments ? 2 : 1;\n const index = geometry.index;\n const attributes = geometry.attributes;\n const positionAttribute = attributes.position;\n if (index !== null) {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(index.count, drawRange.start + drawRange.count);\n for(let i = start, l = end - 1; i < l; i += step){\n const a = index.getX(i);\n const b = index.getX(i + 1);\n vStart.fromBufferAttribute(positionAttribute, a);\n vEnd.fromBufferAttribute(positionAttribute, b);\n const distSq = $d5b33d7c30034067$var$_ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n if (distSq > localThresholdSq) continue;\n interRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n const distance = raycaster.ray.origin.distanceTo(interRay);\n if (distance < raycaster.near || distance > raycaster.far) continue;\n intersects.push({\n distance: distance,\n // What do we want? intersection point on the ray or on the segment??\n // point: raycaster.ray.at( distance ),\n point: interSegment.clone().applyMatrix4(this.matrixWorld),\n index: i,\n face: null,\n faceIndex: null,\n object: this\n });\n }\n } else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(positionAttribute.count, drawRange.start + drawRange.count);\n for(let i = start, l = end - 1; i < l; i += step){\n vStart.fromBufferAttribute(positionAttribute, i);\n vEnd.fromBufferAttribute(positionAttribute, i + 1);\n const distSq = $d5b33d7c30034067$var$_ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n if (distSq > localThresholdSq) continue;\n interRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n const distance = raycaster.ray.origin.distanceTo(interRay);\n if (distance < raycaster.near || distance > raycaster.far) continue;\n intersects.push({\n distance: distance,\n // What do we want? intersection point on the ray or on the segment??\n // point: raycaster.ray.at( distance ),\n point: interSegment.clone().applyMatrix4(this.matrixWorld),\n index: i,\n face: null,\n faceIndex: null,\n object: this\n });\n }\n }\n }\n updateMorphTargets() {\n const geometry = this.geometry;\n const morphAttributes = geometry.morphAttributes;\n const keys = Object.keys(morphAttributes);\n if (keys.length > 0) {\n const morphAttribute = morphAttributes[keys[0]];\n if (morphAttribute !== undefined) {\n this.morphTargetInfluences = [];\n this.morphTargetDictionary = {};\n for(let m = 0, ml = morphAttribute.length; m < ml; m++){\n const name = morphAttribute[m].name || String(m);\n this.morphTargetInfluences.push(0);\n this.morphTargetDictionary[name] = m;\n }\n }\n }\n }\n}\nconst $d5b33d7c30034067$var$_start = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_end = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$ff1ed10fedfdd604 extends $d5b33d7c30034067$export$17d680238e50603e {\n constructor(geometry, material){\n super(geometry, material);\n this.isLineSegments = true;\n this.type = \"LineSegments\";\n }\n computeLineDistances() {\n const geometry = this.geometry;\n // we assume non-indexed geometry\n if (geometry.index === null) {\n const positionAttribute = geometry.attributes.position;\n const lineDistances = [];\n for(let i = 0, l = positionAttribute.count; i < l; i += 2){\n $d5b33d7c30034067$var$_start.fromBufferAttribute(positionAttribute, i);\n $d5b33d7c30034067$var$_end.fromBufferAttribute(positionAttribute, i + 1);\n lineDistances[i] = i === 0 ? 0 : lineDistances[i - 1];\n lineDistances[i + 1] = lineDistances[i] + $d5b33d7c30034067$var$_start.distanceTo($d5b33d7c30034067$var$_end);\n }\n geometry.setAttribute(\"lineDistance\", new $d5b33d7c30034067$export$cbe7a62641830ebd(lineDistances, 1));\n } else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");\n return this;\n }\n}\nclass $d5b33d7c30034067$export$f85a24d745e4f17d extends $d5b33d7c30034067$export$17d680238e50603e {\n constructor(geometry, material){\n super(geometry, material);\n this.isLineLoop = true;\n this.type = \"LineLoop\";\n }\n}\nclass $d5b33d7c30034067$export$a178c45366ce5d6b extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isPointsMaterial = true;\n this.type = \"PointsMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.alphaMap = null;\n this.size = 1;\n this.sizeAttenuation = true;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.size = source.size;\n this.sizeAttenuation = source.sizeAttenuation;\n this.fog = source.fog;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_inverseMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nconst $d5b33d7c30034067$var$_sphere = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_position$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$1c787534cb11aa3e extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(geometry = new $d5b33d7c30034067$export$b7be63a67df8959(), material = new $d5b33d7c30034067$export$a178c45366ce5d6b()){\n super();\n this.isPoints = true;\n this.type = \"Points\";\n this.geometry = geometry;\n this.material = material;\n this.updateMorphTargets();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.material = source.material;\n this.geometry = source.geometry;\n return this;\n }\n raycast(raycaster, intersects) {\n const geometry = this.geometry;\n const matrixWorld = this.matrixWorld;\n const threshold = raycaster.params.Points.threshold;\n const drawRange = geometry.drawRange;\n // Checking boundingSphere distance to ray\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere.copy(geometry.boundingSphere);\n $d5b33d7c30034067$var$_sphere.applyMatrix4(matrixWorld);\n $d5b33d7c30034067$var$_sphere.radius += threshold;\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere) === false) return;\n //\n $d5b33d7c30034067$var$_inverseMatrix.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix);\n const localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n const localThresholdSq = localThreshold * localThreshold;\n const index = geometry.index;\n const attributes = geometry.attributes;\n const positionAttribute = attributes.position;\n if (index !== null) {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(index.count, drawRange.start + drawRange.count);\n for(let i = start, il = end; i < il; i++){\n const a = index.getX(i);\n $d5b33d7c30034067$var$_position$2.fromBufferAttribute(positionAttribute, a);\n $d5b33d7c30034067$var$testPoint($d5b33d7c30034067$var$_position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this);\n }\n } else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(positionAttribute.count, drawRange.start + drawRange.count);\n for(let i = start, l = end; i < l; i++){\n $d5b33d7c30034067$var$_position$2.fromBufferAttribute(positionAttribute, i);\n $d5b33d7c30034067$var$testPoint($d5b33d7c30034067$var$_position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this);\n }\n }\n }\n updateMorphTargets() {\n const geometry = this.geometry;\n const morphAttributes = geometry.morphAttributes;\n const keys = Object.keys(morphAttributes);\n if (keys.length > 0) {\n const morphAttribute = morphAttributes[keys[0]];\n if (morphAttribute !== undefined) {\n this.morphTargetInfluences = [];\n this.morphTargetDictionary = {};\n for(let m = 0, ml = morphAttribute.length; m < ml; m++){\n const name = morphAttribute[m].name || String(m);\n this.morphTargetInfluences.push(0);\n this.morphTargetDictionary[name] = m;\n }\n }\n }\n }\n}\nfunction $d5b33d7c30034067$var$testPoint(point, index, localThresholdSq, matrixWorld, raycaster, intersects, object) {\n const rayPointDistanceSq = $d5b33d7c30034067$var$_ray.distanceSqToPoint(point);\n if (rayPointDistanceSq < localThresholdSq) {\n const intersectPoint = new $d5b33d7c30034067$export$64b5c384219d3699();\n $d5b33d7c30034067$var$_ray.closestPointToPoint(point, intersectPoint);\n intersectPoint.applyMatrix4(matrixWorld);\n const distance = raycaster.ray.origin.distanceTo(intersectPoint);\n if (distance < raycaster.near || distance > raycaster.far) return;\n intersects.push({\n distance: distance,\n distanceToRay: Math.sqrt(rayPointDistanceSq),\n point: intersectPoint,\n index: index,\n face: null,\n object: object\n });\n }\n}\nclass $d5b33d7c30034067$export$6e09d1edf8d5a25c extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy){\n super(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n this.isVideoTexture = true;\n this.minFilter = minFilter !== undefined ? minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n this.magFilter = magFilter !== undefined ? magFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n this.generateMipmaps = false;\n const scope = this;\n function updateVideo() {\n scope.needsUpdate = true;\n video.requestVideoFrameCallback(updateVideo);\n }\n if (\"requestVideoFrameCallback\" in video) video.requestVideoFrameCallback(updateVideo);\n }\n clone() {\n return new this.constructor(this.image).copy(this);\n }\n update() {\n const video = this.image;\n const hasVideoFrameCallback = \"requestVideoFrameCallback\" in video;\n if (hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA) this.needsUpdate = true;\n }\n}\nclass $d5b33d7c30034067$export$9270d786f73ce6fe extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(width, height){\n super({\n width: width,\n height: height\n });\n this.isFramebufferTexture = true;\n this.magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.generateMipmaps = false;\n this.needsUpdate = true;\n }\n}\nclass $d5b33d7c30034067$export$3466bac9141a5cc4 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace1){\n super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1);\n this.isCompressedTexture = true;\n this.image = {\n width: width,\n height: height\n };\n this.mipmaps = mipmaps;\n // no flipping for cube textures\n // (also flipping doesn't work for compressed textures )\n this.flipY = false;\n // can't generate mipmaps for compressed textures\n // mips must be embedded in DDS files\n this.generateMipmaps = false;\n }\n}\nclass $d5b33d7c30034067$export$5fe6b8e34b274fcb extends $d5b33d7c30034067$export$3466bac9141a5cc4 {\n constructor(mipmaps, width, height, depth, format, type){\n super(mipmaps, width, height, format, type);\n this.isCompressedArrayTexture = true;\n this.image.depth = depth;\n this.wrapR = $d5b33d7c30034067$export$9d9334239a5a5e06;\n }\n}\nclass $d5b33d7c30034067$export$d80173634de65bff extends $d5b33d7c30034067$export$3466bac9141a5cc4 {\n constructor(images, format, type){\n super(undefined, images[0].width, images[0].height, format, type, $d5b33d7c30034067$export$8759762a6477f2c4);\n this.isCompressedCubeTexture = true;\n this.isCubeTexture = true;\n this.image = images;\n }\n}\nclass $d5b33d7c30034067$export$f7189e49152d1c13 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy){\n super(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n this.isCanvasTexture = true;\n this.needsUpdate = true;\n }\n}\n/**\n * Extensible curve object.\n *\n * Some common of curve methods:\n * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n * .getPoints(), .getSpacedPoints()\n * .getLength()\n * .updateArcLengths()\n *\n * This following curves inherit from THREE.Curve:\n *\n * -- 2D curves --\n * THREE.ArcCurve\n * THREE.CubicBezierCurve\n * THREE.EllipseCurve\n * THREE.LineCurve\n * THREE.QuadraticBezierCurve\n * THREE.SplineCurve\n *\n * -- 3D curves --\n * THREE.CatmullRomCurve3\n * THREE.CubicBezierCurve3\n * THREE.LineCurve3\n * THREE.QuadraticBezierCurve3\n *\n * A series of curves can be represented as a THREE.CurvePath.\n *\n **/ class $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(){\n this.type = \"Curve\";\n this.arcLengthDivisions = 200;\n }\n // Virtual base class method to overwrite and implement in subclasses\n //\t- t [0 .. 1]\n getPoint() {\n console.warn(\"THREE.Curve: .getPoint() not implemented.\");\n return null;\n }\n // Get point at relative position in curve according to arc length\n // - u [0 .. 1]\n getPointAt(u, optionalTarget) {\n const t = this.getUtoTmapping(u);\n return this.getPoint(t, optionalTarget);\n }\n // Get sequence of points using getPoint( t )\n getPoints(divisions = 5) {\n const points = [];\n for(let d = 0; d <= divisions; d++)points.push(this.getPoint(d / divisions));\n return points;\n }\n // Get sequence of points using getPointAt( u )\n getSpacedPoints(divisions = 5) {\n const points = [];\n for(let d = 0; d <= divisions; d++)points.push(this.getPointAt(d / divisions));\n return points;\n }\n // Get total curve arc length\n getLength() {\n const lengths = this.getLengths();\n return lengths[lengths.length - 1];\n }\n // Get list of cumulative segment lengths\n getLengths(divisions = this.arcLengthDivisions) {\n if (this.cacheArcLengths && this.cacheArcLengths.length === divisions + 1 && !this.needsUpdate) return this.cacheArcLengths;\n this.needsUpdate = false;\n const cache = [];\n let current, last = this.getPoint(0);\n let sum = 0;\n cache.push(0);\n for(let p = 1; p <= divisions; p++){\n current = this.getPoint(p / divisions);\n sum += current.distanceTo(last);\n cache.push(sum);\n last = current;\n }\n this.cacheArcLengths = cache;\n return cache; // { sums: cache, sum: sum }; Sum is in the last element.\n }\n updateArcLengths() {\n this.needsUpdate = true;\n this.getLengths();\n }\n // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n getUtoTmapping(u, distance) {\n const arcLengths = this.getLengths();\n let i = 0;\n const il = arcLengths.length;\n let targetArcLength; // The targeted u distance value to get\n if (distance) targetArcLength = distance;\n else targetArcLength = u * arcLengths[il - 1];\n // binary search for the index with largest value smaller than target u distance\n let low = 0, high = il - 1, comparison;\n while(low <= high){\n i = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n comparison = arcLengths[i] - targetArcLength;\n if (comparison < 0) low = i + 1;\n else if (comparison > 0) high = i - 1;\n else {\n high = i;\n break;\n // DONE\n }\n }\n i = high;\n if (arcLengths[i] === targetArcLength) return i / (il - 1);\n // we could get finer grain at lengths, or use simple interpolation between two points\n const lengthBefore = arcLengths[i];\n const lengthAfter = arcLengths[i + 1];\n const segmentLength = lengthAfter - lengthBefore;\n // determine where we are between the 'before' and 'after' points\n const segmentFraction = (targetArcLength - lengthBefore) / segmentLength;\n // add that fractional amount to t\n const t = (i + segmentFraction) / (il - 1);\n return t;\n }\n // Returns a unit vector tangent at t\n // In case any sub curve does not implement its tangent derivation,\n // 2 points a small delta apart will be used to find its gradient\n // which seems to give a reasonable approximation\n getTangent(t, optionalTarget) {\n const delta = 0.0001;\n let t1 = t - delta;\n let t2 = t + delta;\n // Capping in case of danger\n if (t1 < 0) t1 = 0;\n if (t2 > 1) t2 = 1;\n const pt1 = this.getPoint(t1);\n const pt2 = this.getPoint(t2);\n const tangent = optionalTarget || (pt1.isVector2 ? new $d5b33d7c30034067$export$c977b3e384af9ae1() : new $d5b33d7c30034067$export$64b5c384219d3699());\n tangent.copy(pt2).sub(pt1).normalize();\n return tangent;\n }\n getTangentAt(u, optionalTarget) {\n const t = this.getUtoTmapping(u);\n return this.getTangent(t, optionalTarget);\n }\n computeFrenetFrames(segments, closed) {\n // see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const tangents = [];\n const normals = [];\n const binormals = [];\n const vec = new $d5b33d7c30034067$export$64b5c384219d3699();\n const mat = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n // compute the tangent vectors for each segment on the curve\n for(let i = 0; i <= segments; i++){\n const u = i / segments;\n tangents[i] = this.getTangentAt(u, new $d5b33d7c30034067$export$64b5c384219d3699());\n }\n // select an initial normal vector perpendicular to the first tangent vector,\n // and in the direction of the minimum tangent xyz component\n normals[0] = new $d5b33d7c30034067$export$64b5c384219d3699();\n binormals[0] = new $d5b33d7c30034067$export$64b5c384219d3699();\n let min = Number.MAX_VALUE;\n const tx = Math.abs(tangents[0].x);\n const ty = Math.abs(tangents[0].y);\n const tz = Math.abs(tangents[0].z);\n if (tx <= min) {\n min = tx;\n normal.set(1, 0, 0);\n }\n if (ty <= min) {\n min = ty;\n normal.set(0, 1, 0);\n }\n if (tz <= min) normal.set(0, 0, 1);\n vec.crossVectors(tangents[0], normal).normalize();\n normals[0].crossVectors(tangents[0], vec);\n binormals[0].crossVectors(tangents[0], normals[0]);\n // compute the slowly-varying normal and binormal vectors for each segment on the curve\n for(let i = 1; i <= segments; i++){\n normals[i] = normals[i - 1].clone();\n binormals[i] = binormals[i - 1].clone();\n vec.crossVectors(tangents[i - 1], tangents[i]);\n if (vec.length() > Number.EPSILON) {\n vec.normalize();\n const theta = Math.acos($d5b33d7c30034067$var$clamp(tangents[i - 1].dot(tangents[i]), -1, 1)); // clamp for floating pt errors\n normals[i].applyMatrix4(mat.makeRotationAxis(vec, theta));\n }\n binormals[i].crossVectors(tangents[i], normals[i]);\n }\n // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n if (closed === true) {\n let theta = Math.acos($d5b33d7c30034067$var$clamp(normals[0].dot(normals[segments]), -1, 1));\n theta /= segments;\n if (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) theta = -theta;\n for(let i = 1; i <= segments; i++){\n // twist a little...\n normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i], theta * i));\n binormals[i].crossVectors(tangents[i], normals[i]);\n }\n }\n return {\n tangents: tangents,\n normals: normals,\n binormals: binormals\n };\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.arcLengthDivisions = source.arcLengthDivisions;\n return this;\n }\n toJSON() {\n const data = {\n metadata: {\n version: 4.6,\n type: \"Curve\",\n generator: \"Curve.toJSON\"\n }\n };\n data.arcLengthDivisions = this.arcLengthDivisions;\n data.type = this.type;\n return data;\n }\n fromJSON(json) {\n this.arcLengthDivisions = json.arcLengthDivisions;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$3f87a931616cde04 extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0){\n super();\n this.isEllipseCurve = true;\n this.type = \"EllipseCurve\";\n this.aX = aX;\n this.aY = aY;\n this.xRadius = xRadius;\n this.yRadius = yRadius;\n this.aStartAngle = aStartAngle;\n this.aEndAngle = aEndAngle;\n this.aClockwise = aClockwise;\n this.aRotation = aRotation;\n }\n getPoint(t, optionalTarget) {\n const point = optionalTarget || new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const twoPi = Math.PI * 2;\n let deltaAngle = this.aEndAngle - this.aStartAngle;\n const samePoints = Math.abs(deltaAngle) < Number.EPSILON;\n // ensures that deltaAngle is 0 .. 2 PI\n while(deltaAngle < 0)deltaAngle += twoPi;\n while(deltaAngle > twoPi)deltaAngle -= twoPi;\n if (deltaAngle < Number.EPSILON) {\n if (samePoints) deltaAngle = 0;\n else deltaAngle = twoPi;\n }\n if (this.aClockwise === true && !samePoints) {\n if (deltaAngle === twoPi) deltaAngle = -twoPi;\n else deltaAngle = deltaAngle - twoPi;\n }\n const angle = this.aStartAngle + t * deltaAngle;\n let x = this.aX + this.xRadius * Math.cos(angle);\n let y = this.aY + this.yRadius * Math.sin(angle);\n if (this.aRotation !== 0) {\n const cos = Math.cos(this.aRotation);\n const sin = Math.sin(this.aRotation);\n const tx = x - this.aX;\n const ty = y - this.aY;\n // Rotate the point about the center of the ellipse.\n x = tx * cos - ty * sin + this.aX;\n y = tx * sin + ty * cos + this.aY;\n }\n return point.set(x, y);\n }\n copy(source) {\n super.copy(source);\n this.aX = source.aX;\n this.aY = source.aY;\n this.xRadius = source.xRadius;\n this.yRadius = source.yRadius;\n this.aStartAngle = source.aStartAngle;\n this.aEndAngle = source.aEndAngle;\n this.aClockwise = source.aClockwise;\n this.aRotation = source.aRotation;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.aX = this.aX;\n data.aY = this.aY;\n data.xRadius = this.xRadius;\n data.yRadius = this.yRadius;\n data.aStartAngle = this.aStartAngle;\n data.aEndAngle = this.aEndAngle;\n data.aClockwise = this.aClockwise;\n data.aRotation = this.aRotation;\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.aX = json.aX;\n this.aY = json.aY;\n this.xRadius = json.xRadius;\n this.yRadius = json.yRadius;\n this.aStartAngle = json.aStartAngle;\n this.aEndAngle = json.aEndAngle;\n this.aClockwise = json.aClockwise;\n this.aRotation = json.aRotation;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$b1eedc9aab6300e8 extends $d5b33d7c30034067$export$3f87a931616cde04 {\n constructor(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise){\n super(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n this.isArcCurve = true;\n this.type = \"ArcCurve\";\n }\n}\n/**\n * Centripetal CatmullRom Curve - which is useful for avoiding\n * cusps and self-intersections in non-uniform catmull rom curves.\n * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n *\n * curve.type accepts centripetal(default), chordal and catmullrom\n * curve.tension is used for catmullrom which defaults to 0.5\n */ /*\nBased on an optimized c++ solution in\n - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n - http://ideone.com/NoEbVM\n\nThis CubicPoly class could be used for reusing some variables and calculations,\nbut for three.js curve use, it could be possible inlined and flatten into a single function call\nwhich can be placed in CurveUtils.\n*/ function $d5b33d7c30034067$var$CubicPoly() {\n let c0 = 0, c1 = 0, c2 = 0, c3 = 0;\n /*\n\t * Compute coefficients for a cubic polynomial\n\t * p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t * such that\n\t * p(0) = x0, p(1) = x1\n\t * and\n\t * p'(0) = t0, p'(1) = t1.\n\t */ function init(x0, x1, t0, t1) {\n c0 = x0;\n c1 = t0;\n c2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;\n c3 = 2 * x0 - 2 * x1 + t0 + t1;\n }\n return {\n initCatmullRom: function(x0, x1, x2, x3, tension) {\n init(x1, x2, tension * (x2 - x0), tension * (x3 - x1));\n },\n initNonuniformCatmullRom: function(x0, x1, x2, x3, dt0, dt1, dt2) {\n // compute tangents when parameterized in [t1,t2]\n let t1 = (x1 - x0) / dt0 - (x2 - x0) / (dt0 + dt1) + (x2 - x1) / dt1;\n let t2 = (x2 - x1) / dt1 - (x3 - x1) / (dt1 + dt2) + (x3 - x2) / dt2;\n // rescale tangents for parametrization in [0,1]\n t1 *= dt1;\n t2 *= dt1;\n init(x1, x2, t1, t2);\n },\n calc: function(t) {\n const t2 = t * t;\n const t3 = t2 * t;\n return c0 + c1 * t + c2 * t2 + c3 * t3;\n }\n };\n}\n//\nconst $d5b33d7c30034067$var$tmp = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$px = /*@__PURE__*/ new $d5b33d7c30034067$var$CubicPoly();\nconst $d5b33d7c30034067$var$py = /*@__PURE__*/ new $d5b33d7c30034067$var$CubicPoly();\nconst $d5b33d7c30034067$var$pz = /*@__PURE__*/ new $d5b33d7c30034067$var$CubicPoly();\nclass $d5b33d7c30034067$export$b9146b27c24b744c extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(points = [], closed = false, curveType = \"centripetal\", tension = 0.5){\n super();\n this.isCatmullRomCurve3 = true;\n this.type = \"CatmullRomCurve3\";\n this.points = points;\n this.closed = closed;\n this.curveType = curveType;\n this.tension = tension;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n const points = this.points;\n const l = points.length;\n const p = (l - (this.closed ? 0 : 1)) * t;\n let intPoint = Math.floor(p);\n let weight = p - intPoint;\n if (this.closed) intPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l;\n else if (weight === 0 && intPoint === l - 1) {\n intPoint = l - 2;\n weight = 1;\n }\n let p0, p3; // 4 points (p1 & p2 defined below)\n if (this.closed || intPoint > 0) p0 = points[(intPoint - 1) % l];\n else {\n // extrapolate first point\n $d5b33d7c30034067$var$tmp.subVectors(points[0], points[1]).add(points[0]);\n p0 = $d5b33d7c30034067$var$tmp;\n }\n const p1 = points[intPoint % l];\n const p2 = points[(intPoint + 1) % l];\n if (this.closed || intPoint + 2 < l) p3 = points[(intPoint + 2) % l];\n else {\n // extrapolate last point\n $d5b33d7c30034067$var$tmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]);\n p3 = $d5b33d7c30034067$var$tmp;\n }\n if (this.curveType === \"centripetal\" || this.curveType === \"chordal\") {\n // init Centripetal / Chordal Catmull-Rom\n const pow = this.curveType === \"chordal\" ? 0.5 : 0.25;\n let dt0 = Math.pow(p0.distanceToSquared(p1), pow);\n let dt1 = Math.pow(p1.distanceToSquared(p2), pow);\n let dt2 = Math.pow(p2.distanceToSquared(p3), pow);\n // safety check for repeated points\n if (dt1 < 1e-4) dt1 = 1.0;\n if (dt0 < 1e-4) dt0 = dt1;\n if (dt2 < 1e-4) dt2 = dt1;\n $d5b33d7c30034067$var$px.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2);\n $d5b33d7c30034067$var$py.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2);\n $d5b33d7c30034067$var$pz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2);\n } else if (this.curveType === \"catmullrom\") {\n $d5b33d7c30034067$var$px.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension);\n $d5b33d7c30034067$var$py.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension);\n $d5b33d7c30034067$var$pz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension);\n }\n point.set($d5b33d7c30034067$var$px.calc(weight), $d5b33d7c30034067$var$py.calc(weight), $d5b33d7c30034067$var$pz.calc(weight));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.points = [];\n for(let i = 0, l = source.points.length; i < l; i++){\n const point = source.points[i];\n this.points.push(point.clone());\n }\n this.closed = source.closed;\n this.curveType = source.curveType;\n this.tension = source.tension;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.points = [];\n for(let i = 0, l = this.points.length; i < l; i++){\n const point = this.points[i];\n data.points.push(point.toArray());\n }\n data.closed = this.closed;\n data.curveType = this.curveType;\n data.tension = this.tension;\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.points = [];\n for(let i = 0, l = json.points.length; i < l; i++){\n const point = json.points[i];\n this.points.push(new $d5b33d7c30034067$export$64b5c384219d3699().fromArray(point));\n }\n this.closed = json.closed;\n this.curveType = json.curveType;\n this.tension = json.tension;\n return this;\n }\n}\n/**\n * Bezier Curves formulas obtained from\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n */ function $d5b33d7c30034067$var$CatmullRom(t, p0, p1, p2, p3) {\n const v0 = (p2 - p0) * 0.5;\n const v1 = (p3 - p1) * 0.5;\n const t2 = t * t;\n const t3 = t * t2;\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n}\n//\nfunction $d5b33d7c30034067$var$QuadraticBezierP0(t, p) {\n const k = 1 - t;\n return k * k * p;\n}\nfunction $d5b33d7c30034067$var$QuadraticBezierP1(t, p) {\n return 2 * (1 - t) * t * p;\n}\nfunction $d5b33d7c30034067$var$QuadraticBezierP2(t, p) {\n return t * t * p;\n}\nfunction $d5b33d7c30034067$var$QuadraticBezier(t, p0, p1, p2) {\n return $d5b33d7c30034067$var$QuadraticBezierP0(t, p0) + $d5b33d7c30034067$var$QuadraticBezierP1(t, p1) + $d5b33d7c30034067$var$QuadraticBezierP2(t, p2);\n}\n//\nfunction $d5b33d7c30034067$var$CubicBezierP0(t, p) {\n const k = 1 - t;\n return k * k * k * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezierP1(t, p) {\n const k = 1 - t;\n return 3 * k * k * t * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezierP2(t, p) {\n return 3 * (1 - t) * t * t * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezierP3(t, p) {\n return t * t * t * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezier(t, p0, p1, p2, p3) {\n return $d5b33d7c30034067$var$CubicBezierP0(t, p0) + $d5b33d7c30034067$var$CubicBezierP1(t, p1) + $d5b33d7c30034067$var$CubicBezierP2(t, p2) + $d5b33d7c30034067$var$CubicBezierP3(t, p3);\n}\nclass $d5b33d7c30034067$export$e36650d36468bb39 extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v1 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v2 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v3 = new $d5b33d7c30034067$export$c977b3e384af9ae1()){\n super();\n this.isCubicBezierCurve = true;\n this.type = \"CubicBezierCurve\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n this.v3 = v3;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n point.set($d5b33d7c30034067$var$CubicBezier(t, v0.x, v1.x, v2.x, v3.x), $d5b33d7c30034067$var$CubicBezier(t, v0.y, v1.y, v2.y, v3.y));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n this.v3.copy(source.v3);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n data.v3 = this.v3.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n this.v3.fromArray(json.v3);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$13d5f1c9525f246c extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$64b5c384219d3699(), v1 = new $d5b33d7c30034067$export$64b5c384219d3699(), v2 = new $d5b33d7c30034067$export$64b5c384219d3699(), v3 = new $d5b33d7c30034067$export$64b5c384219d3699()){\n super();\n this.isCubicBezierCurve3 = true;\n this.type = \"CubicBezierCurve3\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n this.v3 = v3;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n point.set($d5b33d7c30034067$var$CubicBezier(t, v0.x, v1.x, v2.x, v3.x), $d5b33d7c30034067$var$CubicBezier(t, v0.y, v1.y, v2.y, v3.y), $d5b33d7c30034067$var$CubicBezier(t, v0.z, v1.z, v2.z, v3.z));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n this.v3.copy(source.v3);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n data.v3 = this.v3.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n this.v3.fromArray(json.v3);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$ab2e07e76531a47e extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v1 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v2 = new $d5b33d7c30034067$export$c977b3e384af9ae1()){\n super();\n this.isLineCurve = true;\n this.type = \"LineCurve\";\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n if (t === 1) point.copy(this.v2);\n else {\n point.copy(this.v2).sub(this.v1);\n point.multiplyScalar(t).add(this.v1);\n }\n return point;\n }\n // Line curve is linear, so we can overwrite default getPointAt\n getPointAt(u, optionalTarget) {\n return this.getPoint(u, optionalTarget);\n }\n getTangent(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n return optionalTarget.subVectors(this.v2, this.v1).normalize();\n }\n getTangentAt(u, optionalTarget) {\n return this.getTangent(u, optionalTarget);\n }\n copy(source) {\n super.copy(source);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$1fdfd9d9cf487600 extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v1 = new $d5b33d7c30034067$export$64b5c384219d3699(), v2 = new $d5b33d7c30034067$export$64b5c384219d3699()){\n super();\n this.isLineCurve3 = true;\n this.type = \"LineCurve3\";\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n if (t === 1) point.copy(this.v2);\n else {\n point.copy(this.v2).sub(this.v1);\n point.multiplyScalar(t).add(this.v1);\n }\n return point;\n }\n // Line curve is linear, so we can overwrite default getPointAt\n getPointAt(u, optionalTarget) {\n return this.getPoint(u, optionalTarget);\n }\n getTangent(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n return optionalTarget.subVectors(this.v2, this.v1).normalize();\n }\n getTangentAt(u, optionalTarget) {\n return this.getTangent(u, optionalTarget);\n }\n copy(source) {\n super.copy(source);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$5938c4ee491a43ad extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v1 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v2 = new $d5b33d7c30034067$export$c977b3e384af9ae1()){\n super();\n this.isQuadraticBezierCurve = true;\n this.type = \"QuadraticBezierCurve\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2;\n point.set($d5b33d7c30034067$var$QuadraticBezier(t, v0.x, v1.x, v2.x), $d5b33d7c30034067$var$QuadraticBezier(t, v0.y, v1.y, v2.y));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$bf3f4c7e459f90fc extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$64b5c384219d3699(), v1 = new $d5b33d7c30034067$export$64b5c384219d3699(), v2 = new $d5b33d7c30034067$export$64b5c384219d3699()){\n super();\n this.isQuadraticBezierCurve3 = true;\n this.type = \"QuadraticBezierCurve3\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2;\n point.set($d5b33d7c30034067$var$QuadraticBezier(t, v0.x, v1.x, v2.x), $d5b33d7c30034067$var$QuadraticBezier(t, v0.y, v1.y, v2.y), $d5b33d7c30034067$var$QuadraticBezier(t, v0.z, v1.z, v2.z));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$d3bdd77da77afc1b extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(points = []){\n super();\n this.isSplineCurve = true;\n this.type = \"SplineCurve\";\n this.points = points;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n const points = this.points;\n const p = (points.length - 1) * t;\n const intPoint = Math.floor(p);\n const weight = p - intPoint;\n const p0 = points[intPoint === 0 ? intPoint : intPoint - 1];\n const p1 = points[intPoint];\n const p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];\n const p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];\n point.set($d5b33d7c30034067$var$CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), $d5b33d7c30034067$var$CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.points = [];\n for(let i = 0, l = source.points.length; i < l; i++){\n const point = source.points[i];\n this.points.push(point.clone());\n }\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.points = [];\n for(let i = 0, l = this.points.length; i < l; i++){\n const point = this.points[i];\n data.points.push(point.toArray());\n }\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.points = [];\n for(let i = 0, l = json.points.length; i < l; i++){\n const point = json.points[i];\n this.points.push(new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(point));\n }\n return this;\n }\n}\nvar $d5b33d7c30034067$var$Curves = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n ArcCurve: $d5b33d7c30034067$export$b1eedc9aab6300e8,\n CatmullRomCurve3: $d5b33d7c30034067$export$b9146b27c24b744c,\n CubicBezierCurve: $d5b33d7c30034067$export$e36650d36468bb39,\n CubicBezierCurve3: $d5b33d7c30034067$export$13d5f1c9525f246c,\n EllipseCurve: $d5b33d7c30034067$export$3f87a931616cde04,\n LineCurve: $d5b33d7c30034067$export$ab2e07e76531a47e,\n LineCurve3: $d5b33d7c30034067$export$1fdfd9d9cf487600,\n QuadraticBezierCurve: $d5b33d7c30034067$export$5938c4ee491a43ad,\n QuadraticBezierCurve3: $d5b33d7c30034067$export$bf3f4c7e459f90fc,\n SplineCurve: $d5b33d7c30034067$export$d3bdd77da77afc1b\n});\n/**************************************************************\n *\tCurved Path - a curve path is simply a array of connected\n * curves, but retains the api of a curve\n **************************************************************/ class $d5b33d7c30034067$export$4aaf9b66af1bbf2c extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(){\n super();\n this.type = \"CurvePath\";\n this.curves = [];\n this.autoClose = false; // Automatically closes the path\n }\n add(curve) {\n this.curves.push(curve);\n }\n closePath() {\n // Add a line curve if start and end of lines are not connected\n const startPoint = this.curves[0].getPoint(0);\n const endPoint = this.curves[this.curves.length - 1].getPoint(1);\n if (!startPoint.equals(endPoint)) this.curves.push(new $d5b33d7c30034067$export$ab2e07e76531a47e(endPoint, startPoint));\n }\n // To get accurate point with reference to\n // entire path distance at time t,\n // following has to be done:\n // 1. Length of each sub path have to be known\n // 2. Locate and identify type of curve\n // 3. Get t for the curve\n // 4. Return curve.getPointAt(t')\n getPoint(t, optionalTarget) {\n const d = t * this.getLength();\n const curveLengths = this.getCurveLengths();\n let i = 0;\n // To think about boundaries points.\n while(i < curveLengths.length){\n if (curveLengths[i] >= d) {\n const diff = curveLengths[i] - d;\n const curve = this.curves[i];\n const segmentLength = curve.getLength();\n const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n return curve.getPointAt(u, optionalTarget);\n }\n i++;\n }\n return null;\n // loop where sum != 0, sum > d , sum+1 1 && !points[points.length - 1].equals(points[0])) points.push(points[0]);\n return points;\n }\n copy(source) {\n super.copy(source);\n this.curves = [];\n for(let i = 0, l = source.curves.length; i < l; i++){\n const curve = source.curves[i];\n this.curves.push(curve.clone());\n }\n this.autoClose = source.autoClose;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.autoClose = this.autoClose;\n data.curves = [];\n for(let i = 0, l = this.curves.length; i < l; i++){\n const curve = this.curves[i];\n data.curves.push(curve.toJSON());\n }\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.autoClose = json.autoClose;\n this.curves = [];\n for(let i = 0, l = json.curves.length; i < l; i++){\n const curve = json.curves[i];\n this.curves.push(new $d5b33d7c30034067$var$Curves[curve.type]().fromJSON(curve));\n }\n return this;\n }\n}\nclass $d5b33d7c30034067$export$4b2950bdac9b6ee9 extends $d5b33d7c30034067$export$4aaf9b66af1bbf2c {\n constructor(points){\n super();\n this.type = \"Path\";\n this.currentPoint = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n if (points) this.setFromPoints(points);\n }\n setFromPoints(points) {\n this.moveTo(points[0].x, points[0].y);\n for(let i = 1, l = points.length; i < l; i++)this.lineTo(points[i].x, points[i].y);\n return this;\n }\n moveTo(x, y) {\n this.currentPoint.set(x, y); // TODO consider referencing vectors instead of copying?\n return this;\n }\n lineTo(x, y) {\n const curve = new $d5b33d7c30034067$export$ab2e07e76531a47e(this.currentPoint.clone(), new $d5b33d7c30034067$export$c977b3e384af9ae1(x, y));\n this.curves.push(curve);\n this.currentPoint.set(x, y);\n return this;\n }\n quadraticCurveTo(aCPx, aCPy, aX, aY) {\n const curve = new $d5b33d7c30034067$export$5938c4ee491a43ad(this.currentPoint.clone(), new $d5b33d7c30034067$export$c977b3e384af9ae1(aCPx, aCPy), new $d5b33d7c30034067$export$c977b3e384af9ae1(aX, aY));\n this.curves.push(curve);\n this.currentPoint.set(aX, aY);\n return this;\n }\n bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n const curve = new $d5b33d7c30034067$export$e36650d36468bb39(this.currentPoint.clone(), new $d5b33d7c30034067$export$c977b3e384af9ae1(aCP1x, aCP1y), new $d5b33d7c30034067$export$c977b3e384af9ae1(aCP2x, aCP2y), new $d5b33d7c30034067$export$c977b3e384af9ae1(aX, aY));\n this.curves.push(curve);\n this.currentPoint.set(aX, aY);\n return this;\n }\n splineThru(pts /*Array of Vector*/ ) {\n const npts = [\n this.currentPoint.clone()\n ].concat(pts);\n const curve = new $d5b33d7c30034067$export$d3bdd77da77afc1b(npts);\n this.curves.push(curve);\n this.currentPoint.copy(pts[pts.length - 1]);\n return this;\n }\n arc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n const x0 = this.currentPoint.x;\n const y0 = this.currentPoint.y;\n this.absarc(aX + x0, aY + y0, aRadius, aStartAngle, aEndAngle, aClockwise);\n return this;\n }\n absarc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n this.absellipse(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n return this;\n }\n ellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n const x0 = this.currentPoint.x;\n const y0 = this.currentPoint.y;\n this.absellipse(aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n return this;\n }\n absellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n const curve = new $d5b33d7c30034067$export$3f87a931616cde04(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n if (this.curves.length > 0) {\n // if a previous curve is present, attempt to join\n const firstPoint = curve.getPoint(0);\n if (!firstPoint.equals(this.currentPoint)) this.lineTo(firstPoint.x, firstPoint.y);\n }\n this.curves.push(curve);\n const lastPoint = curve.getPoint(1);\n this.currentPoint.copy(lastPoint);\n return this;\n }\n copy(source) {\n super.copy(source);\n this.currentPoint.copy(source.currentPoint);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.currentPoint = this.currentPoint.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.currentPoint.fromArray(json.currentPoint);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$6d839803fcd1882c extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(points = [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0, -0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0.5)\n ], segments = 12, phiStart = 0, phiLength = Math.PI * 2){\n super();\n this.type = \"LatheGeometry\";\n this.parameters = {\n points: points,\n segments: segments,\n phiStart: phiStart,\n phiLength: phiLength\n };\n segments = Math.floor(segments);\n // clamp phiLength so it's in range of [ 0, 2PI ]\n phiLength = $d5b33d7c30034067$var$clamp(phiLength, 0, Math.PI * 2);\n // buffers\n const indices = [];\n const vertices = [];\n const uvs = [];\n const initNormals = [];\n const normals = [];\n // helper variables\n const inverseSegments = 1.0 / segments;\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const curNormal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const prevNormal = new $d5b33d7c30034067$export$64b5c384219d3699();\n let dx = 0;\n let dy = 0;\n // pre-compute normals for initial \"meridian\"\n for(let j = 0; j <= points.length - 1; j++)switch(j){\n case 0:\n dx = points[j + 1].x - points[j].x;\n dy = points[j + 1].y - points[j].y;\n normal.x = dy * 1.0;\n normal.y = -dx;\n normal.z = dy * 0.0;\n prevNormal.copy(normal);\n normal.normalize();\n initNormals.push(normal.x, normal.y, normal.z);\n break;\n case points.length - 1:\n initNormals.push(prevNormal.x, prevNormal.y, prevNormal.z);\n break;\n default:\n dx = points[j + 1].x - points[j].x;\n dy = points[j + 1].y - points[j].y;\n normal.x = dy * 1.0;\n normal.y = -dx;\n normal.z = dy * 0.0;\n curNormal.copy(normal);\n normal.x += prevNormal.x;\n normal.y += prevNormal.y;\n normal.z += prevNormal.z;\n normal.normalize();\n initNormals.push(normal.x, normal.y, normal.z);\n prevNormal.copy(curNormal);\n }\n // generate vertices, uvs and normals\n for(let i = 0; i <= segments; i++){\n const phi = phiStart + i * inverseSegments * phiLength;\n const sin = Math.sin(phi);\n const cos = Math.cos(phi);\n for(let j = 0; j <= points.length - 1; j++){\n // vertex\n vertex.x = points[j].x * sin;\n vertex.y = points[j].y;\n vertex.z = points[j].x * cos;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // uv\n uv.x = i / segments;\n uv.y = j / (points.length - 1);\n uvs.push(uv.x, uv.y);\n // normal\n const x = initNormals[3 * j + 0] * sin;\n const y = initNormals[3 * j + 1];\n const z = initNormals[3 * j + 0] * cos;\n normals.push(x, y, z);\n }\n }\n // indices\n for(let i = 0; i < segments; i++)for(let j = 0; j < points.length - 1; j++){\n const base = j + i * points.length;\n const a = base;\n const b = base + points.length;\n const c = base + points.length + 1;\n const d = base + 1;\n // faces\n indices.push(a, b, d);\n indices.push(c, d, b);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$6d839803fcd1882c(data.points, data.segments, data.phiStart, data.phiLength);\n }\n}\nclass $d5b33d7c30034067$export$41680e8551036033 extends $d5b33d7c30034067$export$6d839803fcd1882c {\n constructor(radius = 1, length = 1, capSegments = 4, radialSegments = 8){\n const path = new $d5b33d7c30034067$export$4b2950bdac9b6ee9();\n path.absarc(0, -length / 2, radius, Math.PI * 1.5, 0);\n path.absarc(0, length / 2, radius, 0, Math.PI * 0.5);\n super(path.getPoints(capSegments), radialSegments);\n this.type = \"CapsuleGeometry\";\n this.parameters = {\n radius: radius,\n length: length,\n capSegments: capSegments,\n radialSegments: radialSegments\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$41680e8551036033(data.radius, data.length, data.capSegments, data.radialSegments);\n }\n}\nclass $d5b33d7c30034067$export$d5c0e8d607467193 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2){\n super();\n this.type = \"CircleGeometry\";\n this.parameters = {\n radius: radius,\n segments: segments,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n segments = Math.max(3, segments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n // center point\n vertices.push(0, 0, 0);\n normals.push(0, 0, 1);\n uvs.push(0.5, 0.5);\n for(let s = 0, i = 3; s <= segments; s++, i += 3){\n const segment = thetaStart + s / segments * thetaLength;\n // vertex\n vertex.x = radius * Math.cos(segment);\n vertex.y = radius * Math.sin(segment);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normals.push(0, 0, 1);\n // uvs\n uv.x = (vertices[i] / radius + 1) / 2;\n uv.y = (vertices[i + 1] / radius + 1) / 2;\n uvs.push(uv.x, uv.y);\n }\n // indices\n for(let i = 1; i <= segments; i++)indices.push(i, i + 1, 0);\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$d5c0e8d607467193(data.radius, data.segments, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$68f745719dbe5198 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2){\n super();\n this.type = \"CylinderGeometry\";\n this.parameters = {\n radiusTop: radiusTop,\n radiusBottom: radiusBottom,\n height: height,\n radialSegments: radialSegments,\n heightSegments: heightSegments,\n openEnded: openEnded,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n const scope = this;\n radialSegments = Math.floor(radialSegments);\n heightSegments = Math.floor(heightSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n let index = 0;\n const indexArray = [];\n const halfHeight = height / 2;\n let groupStart = 0;\n // generate geometry\n generateTorso();\n if (openEnded === false) {\n if (radiusTop > 0) generateCap(true);\n if (radiusBottom > 0) generateCap(false);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n function generateTorso() {\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n let groupCount = 0;\n // this will be used to calculate the normal\n const slope = (radiusBottom - radiusTop) / height;\n // generate vertices, normals and uvs\n for(let y = 0; y <= heightSegments; y++){\n const indexRow = [];\n const v = y / heightSegments;\n // calculate the radius of the current row\n const radius = v * (radiusBottom - radiusTop) + radiusTop;\n for(let x = 0; x <= radialSegments; x++){\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n // vertex\n vertex.x = radius * sinTheta;\n vertex.y = -v * height + halfHeight;\n vertex.z = radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.set(sinTheta, slope, cosTheta).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u, 1 - v);\n // save index of vertex in respective row\n indexRow.push(index++);\n }\n // now save vertices of the row in our index array\n indexArray.push(indexRow);\n }\n // generate indices\n for(let x = 0; x < radialSegments; x++)for(let y = 0; y < heightSegments; y++){\n // we use the index array to access the correct indices\n const a = indexArray[y][x];\n const b = indexArray[y + 1][x];\n const c = indexArray[y + 1][x + 1];\n const d = indexArray[y][x + 1];\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n // update group counter\n groupCount += 6;\n }\n // add a group to the geometry. this will ensure multi material support\n scope.addGroup(groupStart, groupCount, 0);\n // calculate new start value for groups\n groupStart += groupCount;\n }\n function generateCap(top) {\n // save the index of the first center vertex\n const centerIndexStart = index;\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n let groupCount = 0;\n const radius = top === true ? radiusTop : radiusBottom;\n const sign = top === true ? 1 : -1;\n // first we generate the center vertex data of the cap.\n // because the geometry needs one set of uvs per face,\n // we must generate a center vertex per face/segment\n for(let x = 1; x <= radialSegments; x++){\n // vertex\n vertices.push(0, halfHeight * sign, 0);\n // normal\n normals.push(0, sign, 0);\n // uv\n uvs.push(0.5, 0.5);\n // increase index\n index++;\n }\n // save the index of the last center vertex\n const centerIndexEnd = index;\n // now we generate the surrounding vertices, normals and uvs\n for(let x = 0; x <= radialSegments; x++){\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const cosTheta = Math.cos(theta);\n const sinTheta = Math.sin(theta);\n // vertex\n vertex.x = radius * sinTheta;\n vertex.y = halfHeight * sign;\n vertex.z = radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normals.push(0, sign, 0);\n // uv\n uv.x = cosTheta * 0.5 + 0.5;\n uv.y = sinTheta * 0.5 * sign + 0.5;\n uvs.push(uv.x, uv.y);\n // increase index\n index++;\n }\n // generate indices\n for(let x = 0; x < radialSegments; x++){\n const c = centerIndexStart + x;\n const i = centerIndexEnd + x;\n if (top === true) // face top\n indices.push(i, i + 1, c);\n else // face bottom\n indices.push(i + 1, i, c);\n groupCount += 3;\n }\n // add a group to the geometry. this will ensure multi material support\n scope.addGroup(groupStart, groupCount, top === true ? 1 : 2);\n // calculate new start value for groups\n groupStart += groupCount;\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$68f745719dbe5198(data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$a7a48974f285c9b3 extends $d5b33d7c30034067$export$68f745719dbe5198 {\n constructor(radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2){\n super(0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength);\n this.type = \"ConeGeometry\";\n this.parameters = {\n radius: radius,\n height: height,\n radialSegments: radialSegments,\n heightSegments: heightSegments,\n openEnded: openEnded,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$a7a48974f285c9b3(data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$60e57a7d3f20ff65 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(vertices = [], indices = [], radius = 1, detail = 0){\n super();\n this.type = \"PolyhedronGeometry\";\n this.parameters = {\n vertices: vertices,\n indices: indices,\n radius: radius,\n detail: detail\n };\n // default buffer data\n const vertexBuffer = [];\n const uvBuffer = [];\n // the subdivision creates the vertex buffer data\n subdivide(detail);\n // all vertices should lie on a conceptual sphere with a given radius\n applyRadius(radius);\n // finally, create the uv data\n generateUVs();\n // build non-indexed geometry\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertexBuffer, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertexBuffer.slice(), 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvBuffer, 2));\n if (detail === 0) this.computeVertexNormals(); // flat normals\n else this.normalizeNormals(); // smooth normals\n // helper functions\n function subdivide(detail) {\n const a = new $d5b33d7c30034067$export$64b5c384219d3699();\n const b = new $d5b33d7c30034067$export$64b5c384219d3699();\n const c = new $d5b33d7c30034067$export$64b5c384219d3699();\n // iterate over all faces and apply a subdivision with the given detail value\n for(let i = 0; i < indices.length; i += 3){\n // get the vertices of the face\n getVertexByIndex(indices[i + 0], a);\n getVertexByIndex(indices[i + 1], b);\n getVertexByIndex(indices[i + 2], c);\n // perform subdivision\n subdivideFace(a, b, c, detail);\n }\n }\n function subdivideFace(a, b, c, detail) {\n const cols = detail + 1;\n // we use this multidimensional array as a data structure for creating the subdivision\n const v = [];\n // construct all of the vertices for this subdivision\n for(let i = 0; i <= cols; i++){\n v[i] = [];\n const aj = a.clone().lerp(c, i / cols);\n const bj = b.clone().lerp(c, i / cols);\n const rows = cols - i;\n for(let j = 0; j <= rows; j++)if (j === 0 && i === cols) v[i][j] = aj;\n else v[i][j] = aj.clone().lerp(bj, j / rows);\n }\n // construct all of the faces\n for(let i = 0; i < cols; i++)for(let j = 0; j < 2 * (cols - i) - 1; j++){\n const k = Math.floor(j / 2);\n if (j % 2 === 0) {\n pushVertex(v[i][k + 1]);\n pushVertex(v[i + 1][k]);\n pushVertex(v[i][k]);\n } else {\n pushVertex(v[i][k + 1]);\n pushVertex(v[i + 1][k + 1]);\n pushVertex(v[i + 1][k]);\n }\n }\n }\n function applyRadius(radius) {\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n // iterate over the entire buffer and apply the radius to each vertex\n for(let i = 0; i < vertexBuffer.length; i += 3){\n vertex.x = vertexBuffer[i + 0];\n vertex.y = vertexBuffer[i + 1];\n vertex.z = vertexBuffer[i + 2];\n vertex.normalize().multiplyScalar(radius);\n vertexBuffer[i + 0] = vertex.x;\n vertexBuffer[i + 1] = vertex.y;\n vertexBuffer[i + 2] = vertex.z;\n }\n }\n function generateUVs() {\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n for(let i = 0; i < vertexBuffer.length; i += 3){\n vertex.x = vertexBuffer[i + 0];\n vertex.y = vertexBuffer[i + 1];\n vertex.z = vertexBuffer[i + 2];\n const u = azimuth(vertex) / 2 / Math.PI + 0.5;\n const v = inclination(vertex) / Math.PI + 0.5;\n uvBuffer.push(u, 1 - v);\n }\n correctUVs();\n correctSeam();\n }\n function correctSeam() {\n // handle case when face straddles the seam, see #3269\n for(let i = 0; i < uvBuffer.length; i += 6){\n // uv data of a single face\n const x0 = uvBuffer[i + 0];\n const x1 = uvBuffer[i + 2];\n const x2 = uvBuffer[i + 4];\n const max = Math.max(x0, x1, x2);\n const min = Math.min(x0, x1, x2);\n // 0.9 is somewhat arbitrary\n if (max > 0.9 && min < 0.1) {\n if (x0 < 0.2) uvBuffer[i + 0] += 1;\n if (x1 < 0.2) uvBuffer[i + 2] += 1;\n if (x2 < 0.2) uvBuffer[i + 4] += 1;\n }\n }\n }\n function pushVertex(vertex) {\n vertexBuffer.push(vertex.x, vertex.y, vertex.z);\n }\n function getVertexByIndex(index, vertex) {\n const stride = index * 3;\n vertex.x = vertices[stride + 0];\n vertex.y = vertices[stride + 1];\n vertex.z = vertices[stride + 2];\n }\n function correctUVs() {\n const a = new $d5b33d7c30034067$export$64b5c384219d3699();\n const b = new $d5b33d7c30034067$export$64b5c384219d3699();\n const c = new $d5b33d7c30034067$export$64b5c384219d3699();\n const centroid = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uvA = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const uvB = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const uvC = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n for(let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6){\n a.set(vertexBuffer[i + 0], vertexBuffer[i + 1], vertexBuffer[i + 2]);\n b.set(vertexBuffer[i + 3], vertexBuffer[i + 4], vertexBuffer[i + 5]);\n c.set(vertexBuffer[i + 6], vertexBuffer[i + 7], vertexBuffer[i + 8]);\n uvA.set(uvBuffer[j + 0], uvBuffer[j + 1]);\n uvB.set(uvBuffer[j + 2], uvBuffer[j + 3]);\n uvC.set(uvBuffer[j + 4], uvBuffer[j + 5]);\n centroid.copy(a).add(b).add(c).divideScalar(3);\n const azi = azimuth(centroid);\n correctUV(uvA, j + 0, a, azi);\n correctUV(uvB, j + 2, b, azi);\n correctUV(uvC, j + 4, c, azi);\n }\n }\n function correctUV(uv, stride, vector, azimuth) {\n if (azimuth < 0 && uv.x === 1) uvBuffer[stride] = uv.x - 1;\n if (vector.x === 0 && vector.z === 0) uvBuffer[stride] = azimuth / 2 / Math.PI + 0.5;\n }\n // Angle around the Y axis, counter-clockwise when looking from above.\n function azimuth(vector) {\n return Math.atan2(vector.z, -vector.x);\n }\n // Angle above the XZ plane.\n function inclination(vector) {\n return Math.atan2(-vector.y, Math.sqrt(vector.x * vector.x + vector.z * vector.z));\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$60e57a7d3f20ff65(data.vertices, data.indices, data.radius, data.details);\n }\n}\nclass $d5b33d7c30034067$export$c0babfeb8708fc9c extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const t = (1 + Math.sqrt(5)) / 2;\n const r = 1 / t;\n const vertices = [\n // (±1, ±1, ±1)\n -1,\n -1,\n -1,\n -1,\n -1,\n 1,\n -1,\n 1,\n -1,\n -1,\n 1,\n 1,\n 1,\n -1,\n -1,\n 1,\n -1,\n 1,\n 1,\n 1,\n -1,\n 1,\n 1,\n 1,\n // (0, ±1/φ, ±φ)\n 0,\n -r,\n -t,\n 0,\n -r,\n t,\n 0,\n r,\n -t,\n 0,\n r,\n t,\n // (±1/φ, ±φ, 0)\n -r,\n -t,\n 0,\n -r,\n t,\n 0,\n r,\n -t,\n 0,\n r,\n t,\n 0,\n // (±φ, 0, ±1/φ)\n -t,\n 0,\n -r,\n t,\n 0,\n -r,\n -t,\n 0,\n r,\n t,\n 0,\n r\n ];\n const indices = [\n 3,\n 11,\n 7,\n 3,\n 7,\n 15,\n 3,\n 15,\n 13,\n 7,\n 19,\n 17,\n 7,\n 17,\n 6,\n 7,\n 6,\n 15,\n 17,\n 4,\n 8,\n 17,\n 8,\n 10,\n 17,\n 10,\n 6,\n 8,\n 0,\n 16,\n 8,\n 16,\n 2,\n 8,\n 2,\n 10,\n 0,\n 12,\n 1,\n 0,\n 1,\n 18,\n 0,\n 18,\n 16,\n 6,\n 10,\n 2,\n 6,\n 2,\n 13,\n 6,\n 13,\n 15,\n 2,\n 16,\n 18,\n 2,\n 18,\n 3,\n 2,\n 3,\n 13,\n 18,\n 1,\n 9,\n 18,\n 9,\n 11,\n 18,\n 11,\n 3,\n 4,\n 14,\n 12,\n 4,\n 12,\n 0,\n 4,\n 0,\n 8,\n 11,\n 9,\n 5,\n 11,\n 5,\n 19,\n 11,\n 19,\n 7,\n 19,\n 5,\n 14,\n 19,\n 14,\n 4,\n 19,\n 4,\n 17,\n 1,\n 12,\n 14,\n 1,\n 14,\n 5,\n 1,\n 5,\n 9\n ];\n super(vertices, indices, radius, detail);\n this.type = \"DodecahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$c0babfeb8708fc9c(data.radius, data.detail);\n }\n}\nconst $d5b33d7c30034067$var$_v0 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v1$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normal = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_triangle = /*@__PURE__*/ new $d5b33d7c30034067$export$5a465592bfe74b48();\nclass $d5b33d7c30034067$export$4730b1542707547f extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(geometry = null, thresholdAngle = 1){\n super();\n this.type = \"EdgesGeometry\";\n this.parameters = {\n geometry: geometry,\n thresholdAngle: thresholdAngle\n };\n if (geometry !== null) {\n const precisionPoints = 4;\n const precision = Math.pow(10, precisionPoints);\n const thresholdDot = Math.cos($d5b33d7c30034067$var$DEG2RAD * thresholdAngle);\n const indexAttr = geometry.getIndex();\n const positionAttr = geometry.getAttribute(\"position\");\n const indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n const indexArr = [\n 0,\n 0,\n 0\n ];\n const vertKeys = [\n \"a\",\n \"b\",\n \"c\"\n ];\n const hashes = new Array(3);\n const edgeData = {};\n const vertices = [];\n for(let i = 0; i < indexCount; i += 3){\n if (indexAttr) {\n indexArr[0] = indexAttr.getX(i);\n indexArr[1] = indexAttr.getX(i + 1);\n indexArr[2] = indexAttr.getX(i + 2);\n } else {\n indexArr[0] = i;\n indexArr[1] = i + 1;\n indexArr[2] = i + 2;\n }\n const { a: a, b: b, c: c } = $d5b33d7c30034067$var$_triangle;\n a.fromBufferAttribute(positionAttr, indexArr[0]);\n b.fromBufferAttribute(positionAttr, indexArr[1]);\n c.fromBufferAttribute(positionAttr, indexArr[2]);\n $d5b33d7c30034067$var$_triangle.getNormal($d5b33d7c30034067$var$_normal);\n // create hashes for the edge from the vertices\n hashes[0] = `${Math.round(a.x * precision)},${Math.round(a.y * precision)},${Math.round(a.z * precision)}`;\n hashes[1] = `${Math.round(b.x * precision)},${Math.round(b.y * precision)},${Math.round(b.z * precision)}`;\n hashes[2] = `${Math.round(c.x * precision)},${Math.round(c.y * precision)},${Math.round(c.z * precision)}`;\n // skip degenerate triangles\n if (hashes[0] === hashes[1] || hashes[1] === hashes[2] || hashes[2] === hashes[0]) continue;\n // iterate over every edge\n for(let j = 0; j < 3; j++){\n // get the first and next vertex making up the edge\n const jNext = (j + 1) % 3;\n const vecHash0 = hashes[j];\n const vecHash1 = hashes[jNext];\n const v0 = $d5b33d7c30034067$var$_triangle[vertKeys[j]];\n const v1 = $d5b33d7c30034067$var$_triangle[vertKeys[jNext]];\n const hash = `${vecHash0}_${vecHash1}`;\n const reverseHash = `${vecHash1}_${vecHash0}`;\n if (reverseHash in edgeData && edgeData[reverseHash]) {\n // if we found a sibling edge add it into the vertex array if\n // it meets the angle threshold and delete the edge from the map.\n if ($d5b33d7c30034067$var$_normal.dot(edgeData[reverseHash].normal) <= thresholdDot) {\n vertices.push(v0.x, v0.y, v0.z);\n vertices.push(v1.x, v1.y, v1.z);\n }\n edgeData[reverseHash] = null;\n } else if (!(hash in edgeData)) // if we've already got an edge here then skip adding a new one\n edgeData[hash] = {\n index0: indexArr[j],\n index1: indexArr[jNext],\n normal: $d5b33d7c30034067$var$_normal.clone()\n };\n }\n }\n // iterate over all remaining, unmatched edges and add them to the vertex array\n for(const key in edgeData)if (edgeData[key]) {\n const { index0: index0, index1: index1 } = edgeData[key];\n $d5b33d7c30034067$var$_v0.fromBufferAttribute(positionAttr, index0);\n $d5b33d7c30034067$var$_v1$1.fromBufferAttribute(positionAttr, index1);\n vertices.push($d5b33d7c30034067$var$_v0.x, $d5b33d7c30034067$var$_v0.y, $d5b33d7c30034067$var$_v0.z);\n vertices.push($d5b33d7c30034067$var$_v1$1.x, $d5b33d7c30034067$var$_v1$1.y, $d5b33d7c30034067$var$_v1$1.z);\n }\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$6428a7f2611ef1fa extends $d5b33d7c30034067$export$4b2950bdac9b6ee9 {\n constructor(points){\n super(points);\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.type = \"Shape\";\n this.holes = [];\n }\n getPointsHoles(divisions) {\n const holesPts = [];\n for(let i = 0, l = this.holes.length; i < l; i++)holesPts[i] = this.holes[i].getPoints(divisions);\n return holesPts;\n }\n // get points of shape and holes (keypoints based on segments parameter)\n extractPoints(divisions) {\n return {\n shape: this.getPoints(divisions),\n holes: this.getPointsHoles(divisions)\n };\n }\n copy(source) {\n super.copy(source);\n this.holes = [];\n for(let i = 0, l = source.holes.length; i < l; i++){\n const hole = source.holes[i];\n this.holes.push(hole.clone());\n }\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.uuid = this.uuid;\n data.holes = [];\n for(let i = 0, l = this.holes.length; i < l; i++){\n const hole = this.holes[i];\n data.holes.push(hole.toJSON());\n }\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.uuid = json.uuid;\n this.holes = [];\n for(let i = 0, l = json.holes.length; i < l; i++){\n const hole = json.holes[i];\n this.holes.push(new $d5b33d7c30034067$export$4b2950bdac9b6ee9().fromJSON(hole));\n }\n return this;\n }\n}\n/**\n * Port from https://github.com/mapbox/earcut (v2.2.4)\n */ const $d5b33d7c30034067$var$Earcut = {\n triangulate: function(data, holeIndices, dim = 2) {\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n let outerNode = $d5b33d7c30034067$var$linkedList(data, 0, outerLen, dim, true);\n const triangles = [];\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n let minX, minY, maxX, maxY, x, y, invSize;\n if (hasHoles) outerNode = $d5b33d7c30034067$var$eliminateHoles(data, holeIndices, outerNode, dim);\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n for(let i = dim; i < outerLen; i += dim){\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n $d5b33d7c30034067$var$earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\n return triangles;\n }\n};\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction $d5b33d7c30034067$var$linkedList(data, start, end, dim, clockwise) {\n let i, last;\n if (clockwise === $d5b33d7c30034067$var$signedArea(data, start, end, dim) > 0) for(i = start; i < end; i += dim)last = $d5b33d7c30034067$var$insertNode(i, data[i], data[i + 1], last);\n else for(i = end - dim; i >= start; i -= dim)last = $d5b33d7c30034067$var$insertNode(i, data[i], data[i + 1], last);\n if (last && $d5b33d7c30034067$var$equals(last, last.next)) {\n $d5b33d7c30034067$var$removeNode(last);\n last = last.next;\n }\n return last;\n}\n// eliminate colinear or duplicate points\nfunction $d5b33d7c30034067$var$filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n let p = start, again;\n do {\n again = false;\n if (!p.steiner && ($d5b33d7c30034067$var$equals(p, p.next) || $d5b33d7c30034067$var$area(p.prev, p, p.next) === 0)) {\n $d5b33d7c30034067$var$removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n } else p = p.next;\n }while (again || p !== end);\n return end;\n}\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction $d5b33d7c30034067$var$earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n // interlink polygon nodes in z-order\n if (!pass && invSize) $d5b33d7c30034067$var$indexCurve(ear, minX, minY, invSize);\n let stop = ear, prev, next;\n // iterate through ears, slicing them one by one\n while(ear.prev !== ear.next){\n prev = ear.prev;\n next = ear.next;\n if (invSize ? $d5b33d7c30034067$var$isEarHashed(ear, minX, minY, invSize) : $d5b33d7c30034067$var$isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim | 0);\n triangles.push(ear.i / dim | 0);\n triangles.push(next.i / dim | 0);\n $d5b33d7c30034067$var$removeNode(ear);\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n continue;\n }\n ear = next;\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) $d5b33d7c30034067$var$earcutLinked($d5b33d7c30034067$var$filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n else if (pass === 1) {\n ear = $d5b33d7c30034067$var$cureLocalIntersections($d5b33d7c30034067$var$filterPoints(ear), triangles, dim);\n $d5b33d7c30034067$var$earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) $d5b33d7c30034067$var$splitEarcut(ear, triangles, dim, minX, minY, invSize);\n break;\n }\n }\n}\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction $d5b33d7c30034067$var$isEar(ear) {\n const a = ear.prev, b = ear, c = ear.next;\n if ($d5b33d7c30034067$var$area(a, b, c) >= 0) return false; // reflex, can't be an ear\n // now make sure we don't have other points inside the potential ear\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n // triangle bbox; min & max are calculated like this for speed\n const x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;\n let p = c.next;\n while(p !== a){\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && $d5b33d7c30034067$var$area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n return true;\n}\nfunction $d5b33d7c30034067$var$isEarHashed(ear, minX, minY, invSize) {\n const a = ear.prev, b = ear, c = ear.next;\n if ($d5b33d7c30034067$var$area(a, b, c) >= 0) return false; // reflex, can't be an ear\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n // triangle bbox; min & max are calculated like this for speed\n const x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;\n // z-order range for the current triangle bbox;\n const minZ = $d5b33d7c30034067$var$zOrder(x0, y0, minX, minY, invSize), maxZ = $d5b33d7c30034067$var$zOrder(x1, y1, minX, minY, invSize);\n let p = ear.prevZ, n = ear.nextZ;\n // look for points inside the triangle in both directions\n while(p && p.z >= minZ && n && n.z <= maxZ){\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && $d5b33d7c30034067$var$area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && $d5b33d7c30034067$var$area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n // look for remaining points in decreasing z-order\n while(p && p.z >= minZ){\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && $d5b33d7c30034067$var$area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n // look for remaining points in increasing z-order\n while(n && n.z <= maxZ){\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && $d5b33d7c30034067$var$area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n return true;\n}\n// go through all polygon nodes and cure small local self-intersections\nfunction $d5b33d7c30034067$var$cureLocalIntersections(start, triangles, dim) {\n let p = start;\n do {\n const a = p.prev, b = p.next.next;\n if (!$d5b33d7c30034067$var$equals(a, b) && $d5b33d7c30034067$var$intersects(a, p, p.next, b) && $d5b33d7c30034067$var$locallyInside(a, b) && $d5b33d7c30034067$var$locallyInside(b, a)) {\n triangles.push(a.i / dim | 0);\n triangles.push(p.i / dim | 0);\n triangles.push(b.i / dim | 0);\n // remove two nodes involved\n $d5b33d7c30034067$var$removeNode(p);\n $d5b33d7c30034067$var$removeNode(p.next);\n p = start = b;\n }\n p = p.next;\n }while (p !== start);\n return $d5b33d7c30034067$var$filterPoints(p);\n}\n// try splitting polygon into two and triangulate them independently\nfunction $d5b33d7c30034067$var$splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n let a = start;\n do {\n let b = a.next.next;\n while(b !== a.prev){\n if (a.i !== b.i && $d5b33d7c30034067$var$isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n let c = $d5b33d7c30034067$var$splitPolygon(a, b);\n // filter colinear points around the cuts\n a = $d5b33d7c30034067$var$filterPoints(a, a.next);\n c = $d5b33d7c30034067$var$filterPoints(c, c.next);\n // run earcut on each half\n $d5b33d7c30034067$var$earcutLinked(a, triangles, dim, minX, minY, invSize, 0);\n $d5b33d7c30034067$var$earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\n return;\n }\n b = b.next;\n }\n a = a.next;\n }while (a !== start);\n}\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction $d5b33d7c30034067$var$eliminateHoles(data, holeIndices, outerNode, dim) {\n const queue = [];\n let i, len, start, end, list;\n for(i = 0, len = holeIndices.length; i < len; i++){\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = $d5b33d7c30034067$var$linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push($d5b33d7c30034067$var$getLeftmost(list));\n }\n queue.sort($d5b33d7c30034067$var$compareX);\n // process holes from left to right\n for(i = 0; i < queue.length; i++)outerNode = $d5b33d7c30034067$var$eliminateHole(queue[i], outerNode);\n return outerNode;\n}\nfunction $d5b33d7c30034067$var$compareX(a, b) {\n return a.x - b.x;\n}\n// find a bridge between vertices that connects hole with an outer ring and link it\nfunction $d5b33d7c30034067$var$eliminateHole(hole, outerNode) {\n const bridge = $d5b33d7c30034067$var$findHoleBridge(hole, outerNode);\n if (!bridge) return outerNode;\n const bridgeReverse = $d5b33d7c30034067$var$splitPolygon(bridge, hole);\n // filter collinear points around the cuts\n $d5b33d7c30034067$var$filterPoints(bridgeReverse, bridgeReverse.next);\n return $d5b33d7c30034067$var$filterPoints(bridge, bridge.next);\n}\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction $d5b33d7c30034067$var$findHoleBridge(hole, outerNode) {\n let p = outerNode, qx = -Infinity, m;\n const hx = hole.x, hy = hole.y;\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n }while (p !== outerNode);\n if (!m) return null;\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n const stop = m, mx = m.x, my = m.y;\n let tanMin = Infinity, tan;\n p = m;\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x && $d5b33d7c30034067$var$pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n if ($d5b33d7c30034067$var$locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && $d5b33d7c30034067$var$sectorContainsSector(m, p)))) {\n m = p;\n tanMin = tan;\n }\n }\n p = p.next;\n }while (p !== stop);\n return m;\n}\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction $d5b33d7c30034067$var$sectorContainsSector(m, p) {\n return $d5b33d7c30034067$var$area(m.prev, m, p.prev) < 0 && $d5b33d7c30034067$var$area(p.next, m, m.next) < 0;\n}\n// interlink polygon nodes in z-order\nfunction $d5b33d7c30034067$var$indexCurve(start, minX, minY, invSize) {\n let p = start;\n do {\n if (p.z === 0) p.z = $d5b33d7c30034067$var$zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n }while (p !== start);\n p.prevZ.nextZ = null;\n p.prevZ = null;\n $d5b33d7c30034067$var$sortLinked(p);\n}\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction $d5b33d7c30034067$var$sortLinked(list) {\n let i, p, q, e, tail, numMerges, pSize, qSize, inSize = 1;\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n while(p){\n numMerges++;\n q = p;\n pSize = 0;\n for(i = 0; i < inSize; i++){\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n while(pSize > 0 || qSize > 0 && q){\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n if (tail) tail.nextZ = e;\n else list = e;\n e.prevZ = tail;\n tail = e;\n }\n p = q;\n }\n tail.nextZ = null;\n inSize *= 2;\n }while (numMerges > 1);\n return list;\n}\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction $d5b33d7c30034067$var$zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n x = (x | x << 8) & 0x00FF00FF;\n x = (x | x << 4) & 0x0F0F0F0F;\n x = (x | x << 2) & 0x33333333;\n x = (x | x << 1) & 0x55555555;\n y = (y | y << 8) & 0x00FF00FF;\n y = (y | y << 4) & 0x0F0F0F0F;\n y = (y | y << 2) & 0x33333333;\n y = (y | y << 1) & 0x55555555;\n return x | y << 1;\n}\n// find the leftmost node of a polygon ring\nfunction $d5b33d7c30034067$var$getLeftmost(start) {\n let p = start, leftmost = start;\n do {\n if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;\n p = p.next;\n }while (p !== start);\n return leftmost;\n}\n// check if a point lies within a convex triangle\nfunction $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction $d5b33d7c30034067$var$isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !$d5b33d7c30034067$var$intersectsPolygon(a, b) && // dones't intersect other edges\n ($d5b33d7c30034067$var$locallyInside(a, b) && $d5b33d7c30034067$var$locallyInside(b, a) && $d5b33d7c30034067$var$middleInside(a, b) && // locally visible\n ($d5b33d7c30034067$var$area(a.prev, a, b.prev) || $d5b33d7c30034067$var$area(a, b.prev, b)) || // does not create opposite-facing sectors\n $d5b33d7c30034067$var$equals(a, b) && $d5b33d7c30034067$var$area(a.prev, a, a.next) > 0 && $d5b33d7c30034067$var$area(b.prev, b, b.next) > 0); // special zero-length case\n}\n// signed area of a triangle\nfunction $d5b33d7c30034067$var$area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n// check if two points are equal\nfunction $d5b33d7c30034067$var$equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n// check if two segments intersect\nfunction $d5b33d7c30034067$var$intersects(p1, q1, p2, q2) {\n const o1 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p1, q1, p2));\n const o2 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p1, q1, q2));\n const o3 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p2, q2, p1));\n const o4 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p2, q2, q1));\n if (o1 !== o2 && o3 !== o4) return true; // general case\n if (o1 === 0 && $d5b33d7c30034067$var$onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && $d5b33d7c30034067$var$onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && $d5b33d7c30034067$var$onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && $d5b33d7c30034067$var$onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n return false;\n}\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction $d5b33d7c30034067$var$onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\nfunction $d5b33d7c30034067$var$sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n// check if a polygon diagonal intersects any polygon segments\nfunction $d5b33d7c30034067$var$intersectsPolygon(a, b) {\n let p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && $d5b33d7c30034067$var$intersects(p, p.next, a, b)) return true;\n p = p.next;\n }while (p !== a);\n return false;\n}\n// check if a polygon diagonal is locally inside the polygon\nfunction $d5b33d7c30034067$var$locallyInside(a, b) {\n return $d5b33d7c30034067$var$area(a.prev, a, a.next) < 0 ? $d5b33d7c30034067$var$area(a, b, a.next) >= 0 && $d5b33d7c30034067$var$area(a, a.prev, b) >= 0 : $d5b33d7c30034067$var$area(a, b, a.prev) < 0 || $d5b33d7c30034067$var$area(a, a.next, b) < 0;\n}\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction $d5b33d7c30034067$var$middleInside(a, b) {\n let p = a, inside = false;\n const px = (a.x + b.x) / 2, py = (a.y + b.y) / 2;\n do {\n if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x) inside = !inside;\n p = p.next;\n }while (p !== a);\n return inside;\n}\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction $d5b33d7c30034067$var$splitPolygon(a, b) {\n const a2 = new $d5b33d7c30034067$var$Node(a.i, a.x, a.y), b2 = new $d5b33d7c30034067$var$Node(b.i, b.x, b.y), an = a.next, bp = b.prev;\n a.next = b;\n b.prev = a;\n a2.next = an;\n an.prev = a2;\n b2.next = a2;\n a2.prev = b2;\n bp.next = b2;\n b2.prev = bp;\n return b2;\n}\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction $d5b33d7c30034067$var$insertNode(i, x, y, last) {\n const p = new $d5b33d7c30034067$var$Node(i, x, y);\n if (!last) {\n p.prev = p;\n p.next = p;\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\nfunction $d5b33d7c30034067$var$removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\nfunction $d5b33d7c30034067$var$Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n // vertex coordinates\n this.x = x;\n this.y = y;\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n // z-order curve value\n this.z = 0;\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n // indicates whether this is a steiner point\n this.steiner = false;\n}\nfunction $d5b33d7c30034067$var$signedArea(data, start, end, dim) {\n let sum = 0;\n for(let i = start, j = end - dim; i < end; i += dim){\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\nclass $d5b33d7c30034067$export$96bdf6d9c66d7ba8 {\n // calculate area of the contour polygon\n static area(contour) {\n const n = contour.length;\n let a = 0.0;\n for(let p = n - 1, q = 0; q < n; p = q++)a += contour[p].x * contour[q].y - contour[q].x * contour[p].y;\n return a * 0.5;\n }\n static isClockWise(pts) {\n return $d5b33d7c30034067$export$96bdf6d9c66d7ba8.area(pts) < 0;\n }\n static triangulateShape(contour, holes) {\n const vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n const holeIndices = []; // array of hole indices\n const faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n $d5b33d7c30034067$var$removeDupEndPts(contour);\n $d5b33d7c30034067$var$addContour(vertices, contour);\n //\n let holeIndex = contour.length;\n holes.forEach($d5b33d7c30034067$var$removeDupEndPts);\n for(let i = 0; i < holes.length; i++){\n holeIndices.push(holeIndex);\n holeIndex += holes[i].length;\n $d5b33d7c30034067$var$addContour(vertices, holes[i]);\n }\n //\n const triangles = $d5b33d7c30034067$var$Earcut.triangulate(vertices, holeIndices);\n //\n for(let i = 0; i < triangles.length; i += 3)faces.push(triangles.slice(i, i + 3));\n return faces;\n }\n}\nfunction $d5b33d7c30034067$var$removeDupEndPts(points) {\n const l = points.length;\n if (l > 2 && points[l - 1].equals(points[0])) points.pop();\n}\nfunction $d5b33d7c30034067$var$addContour(vertices, contour) {\n for(let i = 0; i < contour.length; i++){\n vertices.push(contour[i].x);\n vertices.push(contour[i].y);\n }\n}\n/**\n * Creates extruded geometry from a path shape.\n *\n * parameters = {\n *\n * curveSegments: , // number of points on the curves\n * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too\n * depth: , // Depth to extrude the shape\n *\n * bevelEnabled: , // turn on bevel\n * bevelThickness: , // how deep into the original shape bevel goes\n * bevelSize: , // how far from shape outline (including bevelOffset) is bevel\n * bevelOffset: , // how far from shape outline does bevel start\n * bevelSegments: , // number of bevel layers\n *\n * extrudePath: // curve to extrude shape along\n *\n * UVGenerator: // object that provides UV generator functions\n *\n * }\n */ class $d5b33d7c30034067$export$598697a1efa63ca7 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(shapes = new $d5b33d7c30034067$export$6428a7f2611ef1fa([\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(-0.5, 0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(-0.5, -0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, -0.5)\n ]), options = {}){\n super();\n this.type = \"ExtrudeGeometry\";\n this.parameters = {\n shapes: shapes,\n options: options\n };\n shapes = Array.isArray(shapes) ? shapes : [\n shapes\n ];\n const scope = this;\n const verticesArray = [];\n const uvArray = [];\n for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n addShape(shape);\n }\n // build geometry\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(verticesArray, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvArray, 2));\n this.computeVertexNormals();\n // functions\n function addShape(shape) {\n const placeholder = [];\n // options\n const curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n const steps = options.steps !== undefined ? options.steps : 1;\n const depth = options.depth !== undefined ? options.depth : 1;\n let bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n let bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 0.2;\n let bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 0.1;\n let bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n let bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n const extrudePath = options.extrudePath;\n const uvgen = options.UVGenerator !== undefined ? options.UVGenerator : $d5b33d7c30034067$var$WorldUVGenerator;\n //\n let extrudePts, extrudeByPath = false;\n let splineTube, binormal, normal, position2;\n if (extrudePath) {\n extrudePts = extrudePath.getSpacedPoints(steps);\n extrudeByPath = true;\n bevelEnabled = false; // bevels not supported for path extrusion\n // SETUP TNB variables\n // TODO1 - have a .isClosed in spline?\n splineTube = extrudePath.computeFrenetFrames(steps, false);\n // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n binormal = new $d5b33d7c30034067$export$64b5c384219d3699();\n normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n position2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n // Safeguards if bevels are not enabled\n if (!bevelEnabled) {\n bevelSegments = 0;\n bevelThickness = 0;\n bevelSize = 0;\n bevelOffset = 0;\n }\n // Variables initialization\n const shapePoints = shape.extractPoints(curveSegments);\n let vertices = shapePoints.shape;\n const holes = shapePoints.holes;\n const reverse = !$d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(vertices);\n if (reverse) {\n vertices = vertices.reverse();\n // Maybe we should also check if holes are in the opposite direction, just to be safe ...\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n if ($d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(ahole)) holes[h] = ahole.reverse();\n }\n }\n const faces = $d5b33d7c30034067$export$96bdf6d9c66d7ba8.triangulateShape(vertices, holes);\n /* Vertices */ const contour = vertices; // vertices has all points but contour has only points of circumference\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n vertices = vertices.concat(ahole);\n }\n function scalePt2(pt, vec, size) {\n if (!vec) console.error(\"THREE.ExtrudeGeometry: vec does not exist\");\n return pt.clone().addScaledVector(vec, size);\n }\n const vlen = vertices.length, flen = faces.length;\n // Find directions for point movement\n function getBevelVec(inPt, inPrev, inNext) {\n // computes for inPt the corresponding point inPt' on a new contour\n // shifted by 1 unit (length of normalized vector) to the left\n // if we walk along contour clockwise, this new contour is outside the old one\n //\n // inPt' is the intersection of the two lines parallel to the two\n // adjacent edges of inPt at a distance of 1 unit on the left side.\n let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n // good reading for geometry algorithms (here: line-line intersection)\n // http://geomalgorithms.com/a05-_intersect-1.html\n const v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n const v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n const v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y;\n // check for collinear edges\n const collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x;\n if (Math.abs(collinear0) > Number.EPSILON) {\n // not collinear\n // length of vectors for normalizing\n const v_prev_len = Math.sqrt(v_prev_lensq);\n const v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y);\n // shift adjacent points by unit vectors to the left\n const ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len;\n const ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len;\n const ptNextShift_x = inNext.x - v_next_y / v_next_len;\n const ptNextShift_y = inNext.y + v_next_x / v_next_len;\n // scaling factor for v_prev to intersection point\n const sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x);\n // vector from inPt to intersection point\n v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x;\n v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y;\n // Don't normalize!, otherwise sharp corners become ugly\n // but prevent crazy spikes\n const v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;\n if (v_trans_lensq <= 2) return new $d5b33d7c30034067$export$c977b3e384af9ae1(v_trans_x, v_trans_y);\n else shrink_by = Math.sqrt(v_trans_lensq / 2);\n } else {\n // handle special case of collinear edges\n let direction_eq = false; // assumes: opposite\n if (v_prev_x > Number.EPSILON) {\n if (v_next_x > Number.EPSILON) direction_eq = true;\n } else {\n if (v_prev_x < -Number.EPSILON) {\n if (v_next_x < -Number.EPSILON) direction_eq = true;\n } else if (Math.sign(v_prev_y) === Math.sign(v_next_y)) direction_eq = true;\n }\n if (direction_eq) {\n // console.log(\"Warning: lines are a straight sequence\");\n v_trans_x = -v_prev_y;\n v_trans_y = v_prev_x;\n shrink_by = Math.sqrt(v_prev_lensq);\n } else {\n // console.log(\"Warning: lines are a straight spike\");\n v_trans_x = v_prev_x;\n v_trans_y = v_prev_y;\n shrink_by = Math.sqrt(v_prev_lensq / 2);\n }\n }\n return new $d5b33d7c30034067$export$c977b3e384af9ae1(v_trans_x / shrink_by, v_trans_y / shrink_by);\n }\n const contourMovements = [];\n for(let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i++, j++, k++){\n if (j === il) j = 0;\n if (k === il) k = 0;\n // (j)---(i)---(k)\n // console.log('i,j,k', i, j , k)\n contourMovements[i] = getBevelVec(contour[i], contour[j], contour[k]);\n }\n const holesMovements = [];\n let oneHoleMovements, verticesMovements = contourMovements.concat();\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n oneHoleMovements = [];\n for(let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i++, j++, k++){\n if (j === il) j = 0;\n if (k === il) k = 0;\n // (j)---(i)---(k)\n oneHoleMovements[i] = getBevelVec(ahole[i], ahole[j], ahole[k]);\n }\n holesMovements.push(oneHoleMovements);\n verticesMovements = verticesMovements.concat(oneHoleMovements);\n }\n // Loop bevelSegments, 1 for the front, 1 for the back\n for(let b = 0; b < bevelSegments; b++){\n //for ( b = bevelSegments; b > 0; b -- ) {\n const t = b / bevelSegments;\n const z = bevelThickness * Math.cos(t * Math.PI / 2);\n const bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset;\n // contract shape\n for(let i = 0, il = contour.length; i < il; i++){\n const vert = scalePt2(contour[i], contourMovements[i], bs);\n v(vert.x, vert.y, -z);\n }\n // expand holes\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n oneHoleMovements = holesMovements[h];\n for(let i = 0, il = ahole.length; i < il; i++){\n const vert = scalePt2(ahole[i], oneHoleMovements[i], bs);\n v(vert.x, vert.y, -z);\n }\n }\n }\n const bs = bevelSize + bevelOffset;\n // Back facing vertices\n for(let i = 0; i < vlen; i++){\n const vert = bevelEnabled ? scalePt2(vertices[i], verticesMovements[i], bs) : vertices[i];\n if (!extrudeByPath) v(vert.x, vert.y, 0);\n else {\n // v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n normal.copy(splineTube.normals[0]).multiplyScalar(vert.x);\n binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y);\n position2.copy(extrudePts[0]).add(normal).add(binormal);\n v(position2.x, position2.y, position2.z);\n }\n }\n // Add stepped vertices...\n // Including front facing vertices\n for(let s = 1; s <= steps; s++)for(let i = 0; i < vlen; i++){\n const vert = bevelEnabled ? scalePt2(vertices[i], verticesMovements[i], bs) : vertices[i];\n if (!extrudeByPath) v(vert.x, vert.y, depth / steps * s);\n else {\n // v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n normal.copy(splineTube.normals[s]).multiplyScalar(vert.x);\n binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y);\n position2.copy(extrudePts[s]).add(normal).add(binormal);\n v(position2.x, position2.y, position2.z);\n }\n }\n // Add bevel segments planes\n //for ( b = 1; b <= bevelSegments; b ++ ) {\n for(let b = bevelSegments - 1; b >= 0; b--){\n const t = b / bevelSegments;\n const z = bevelThickness * Math.cos(t * Math.PI / 2);\n const bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset;\n // contract shape\n for(let i = 0, il = contour.length; i < il; i++){\n const vert = scalePt2(contour[i], contourMovements[i], bs);\n v(vert.x, vert.y, depth + z);\n }\n // expand holes\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n oneHoleMovements = holesMovements[h];\n for(let i = 0, il = ahole.length; i < il; i++){\n const vert = scalePt2(ahole[i], oneHoleMovements[i], bs);\n if (!extrudeByPath) v(vert.x, vert.y, depth + z);\n else v(vert.x, vert.y + extrudePts[steps - 1].y, extrudePts[steps - 1].x + z);\n }\n }\n }\n /* Faces */ // Top and bottom faces\n buildLidFaces();\n // Sides faces\n buildSideFaces();\n ///// Internal functions\n function buildLidFaces() {\n const start = verticesArray.length / 3;\n if (bevelEnabled) {\n let layer = 0; // steps + 1\n let offset = vlen * layer;\n // Bottom faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[2] + offset, face[1] + offset, face[0] + offset);\n }\n layer = steps + bevelSegments * 2;\n offset = vlen * layer;\n // Top faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[0] + offset, face[1] + offset, face[2] + offset);\n }\n } else {\n // Bottom faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[2], face[1], face[0]);\n }\n // Top faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[0] + vlen * steps, face[1] + vlen * steps, face[2] + vlen * steps);\n }\n }\n scope.addGroup(start, verticesArray.length / 3 - start, 0);\n }\n // Create faces for the z-sides of the shape\n function buildSideFaces() {\n const start = verticesArray.length / 3;\n let layeroffset = 0;\n sidewalls(contour, layeroffset);\n layeroffset += contour.length;\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n sidewalls(ahole, layeroffset);\n //, true\n layeroffset += ahole.length;\n }\n scope.addGroup(start, verticesArray.length / 3 - start, 1);\n }\n function sidewalls(contour, layeroffset) {\n let i = contour.length;\n while(--i >= 0){\n const j = i;\n let k = i - 1;\n if (k < 0) k = contour.length - 1;\n //console.log('b', i,j, i-1, k,vertices.length);\n for(let s = 0, sl = steps + bevelSegments * 2; s < sl; s++){\n const slen1 = vlen * s;\n const slen2 = vlen * (s + 1);\n const a = layeroffset + j + slen1, b = layeroffset + k + slen1, c = layeroffset + k + slen2, d = layeroffset + j + slen2;\n f4(a, b, c, d);\n }\n }\n }\n function v(x, y, z) {\n placeholder.push(x);\n placeholder.push(y);\n placeholder.push(z);\n }\n function f3(a, b, c) {\n addVertex(a);\n addVertex(b);\n addVertex(c);\n const nextIndex = verticesArray.length / 3;\n const uvs = uvgen.generateTopUV(scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n addUV(uvs[0]);\n addUV(uvs[1]);\n addUV(uvs[2]);\n }\n function f4(a, b, c, d) {\n addVertex(a);\n addVertex(b);\n addVertex(d);\n addVertex(b);\n addVertex(c);\n addVertex(d);\n const nextIndex = verticesArray.length / 3;\n const uvs = uvgen.generateSideWallUV(scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n addUV(uvs[0]);\n addUV(uvs[1]);\n addUV(uvs[3]);\n addUV(uvs[1]);\n addUV(uvs[2]);\n addUV(uvs[3]);\n }\n function addVertex(index) {\n verticesArray.push(placeholder[index * 3 + 0]);\n verticesArray.push(placeholder[index * 3 + 1]);\n verticesArray.push(placeholder[index * 3 + 2]);\n }\n function addUV(vector2) {\n uvArray.push(vector2.x);\n uvArray.push(vector2.y);\n }\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n const shapes = this.parameters.shapes;\n const options = this.parameters.options;\n return $d5b33d7c30034067$var$toJSON$1(shapes, options, data);\n }\n static fromJSON(data, shapes) {\n const geometryShapes = [];\n for(let j = 0, jl = data.shapes.length; j < jl; j++){\n const shape = shapes[data.shapes[j]];\n geometryShapes.push(shape);\n }\n const extrudePath = data.options.extrudePath;\n if (extrudePath !== undefined) data.options.extrudePath = new $d5b33d7c30034067$var$Curves[extrudePath.type]().fromJSON(extrudePath);\n return new $d5b33d7c30034067$export$598697a1efa63ca7(geometryShapes, data.options);\n }\n}\nconst $d5b33d7c30034067$var$WorldUVGenerator = {\n generateTopUV: function(geometry, vertices, indexA, indexB, indexC) {\n const a_x = vertices[indexA * 3];\n const a_y = vertices[indexA * 3 + 1];\n const b_x = vertices[indexB * 3];\n const b_y = vertices[indexB * 3 + 1];\n const c_x = vertices[indexC * 3];\n const c_y = vertices[indexC * 3 + 1];\n return [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(a_x, a_y),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(b_x, b_y),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(c_x, c_y)\n ];\n },\n generateSideWallUV: function(geometry, vertices, indexA, indexB, indexC, indexD) {\n const a_x = vertices[indexA * 3];\n const a_y = vertices[indexA * 3 + 1];\n const a_z = vertices[indexA * 3 + 2];\n const b_x = vertices[indexB * 3];\n const b_y = vertices[indexB * 3 + 1];\n const b_z = vertices[indexB * 3 + 2];\n const c_x = vertices[indexC * 3];\n const c_y = vertices[indexC * 3 + 1];\n const c_z = vertices[indexC * 3 + 2];\n const d_x = vertices[indexD * 3];\n const d_y = vertices[indexD * 3 + 1];\n const d_z = vertices[indexD * 3 + 2];\n if (Math.abs(a_y - b_y) < Math.abs(a_x - b_x)) return [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(a_x, 1 - a_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(b_x, 1 - b_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(c_x, 1 - c_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(d_x, 1 - d_z)\n ];\n else return [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(a_y, 1 - a_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(b_y, 1 - b_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(c_y, 1 - c_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(d_y, 1 - d_z)\n ];\n }\n};\nfunction $d5b33d7c30034067$var$toJSON$1(shapes, options, data) {\n data.shapes = [];\n if (Array.isArray(shapes)) for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n data.shapes.push(shape.uuid);\n }\n else data.shapes.push(shapes.uuid);\n data.options = Object.assign({}, options);\n if (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON();\n return data;\n}\nclass $d5b33d7c30034067$export$9567cc828c9535da extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const t = (1 + Math.sqrt(5)) / 2;\n const vertices = [\n -1,\n t,\n 0,\n 1,\n t,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n 0,\n 0,\n -1,\n t,\n 0,\n 1,\n t,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n t,\n 0,\n -1,\n t,\n 0,\n 1,\n -t,\n 0,\n -1,\n -t,\n 0,\n 1\n ];\n const indices = [\n 0,\n 11,\n 5,\n 0,\n 5,\n 1,\n 0,\n 1,\n 7,\n 0,\n 7,\n 10,\n 0,\n 10,\n 11,\n 1,\n 5,\n 9,\n 5,\n 11,\n 4,\n 11,\n 10,\n 2,\n 10,\n 7,\n 6,\n 7,\n 1,\n 8,\n 3,\n 9,\n 4,\n 3,\n 4,\n 2,\n 3,\n 2,\n 6,\n 3,\n 6,\n 8,\n 3,\n 8,\n 9,\n 4,\n 9,\n 5,\n 2,\n 4,\n 11,\n 6,\n 2,\n 10,\n 8,\n 6,\n 7,\n 9,\n 8,\n 1\n ];\n super(vertices, indices, radius, detail);\n this.type = \"IcosahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$9567cc828c9535da(data.radius, data.detail);\n }\n}\nclass $d5b33d7c30034067$export$1954e2b809fe361e extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const vertices = [\n 1,\n 0,\n 0,\n -1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n -1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n -1\n ];\n const indices = [\n 0,\n 2,\n 4,\n 0,\n 4,\n 3,\n 0,\n 3,\n 5,\n 0,\n 5,\n 2,\n 1,\n 2,\n 5,\n 1,\n 5,\n 3,\n 1,\n 3,\n 4,\n 1,\n 4,\n 2\n ];\n super(vertices, indices, radius, detail);\n this.type = \"OctahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$1954e2b809fe361e(data.radius, data.detail);\n }\n}\nclass $d5b33d7c30034067$export$68cb731f50f614af extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2){\n super();\n this.type = \"RingGeometry\";\n this.parameters = {\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n thetaSegments: thetaSegments,\n phiSegments: phiSegments,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n thetaSegments = Math.max(3, thetaSegments);\n phiSegments = Math.max(1, phiSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // some helper variables\n let radius = innerRadius;\n const radiusStep = (outerRadius - innerRadius) / phiSegments;\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n // generate vertices, normals and uvs\n for(let j = 0; j <= phiSegments; j++){\n for(let i = 0; i <= thetaSegments; i++){\n // values are generate from the inside of the ring to the outside\n const segment = thetaStart + i / thetaSegments * thetaLength;\n // vertex\n vertex.x = radius * Math.cos(segment);\n vertex.y = radius * Math.sin(segment);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normals.push(0, 0, 1);\n // uv\n uv.x = (vertex.x / outerRadius + 1) / 2;\n uv.y = (vertex.y / outerRadius + 1) / 2;\n uvs.push(uv.x, uv.y);\n }\n // increase the radius for next row of vertices\n radius += radiusStep;\n }\n // indices\n for(let j = 0; j < phiSegments; j++){\n const thetaSegmentLevel = j * (thetaSegments + 1);\n for(let i = 0; i < thetaSegments; i++){\n const segment = i + thetaSegmentLevel;\n const a = segment;\n const b = segment + thetaSegments + 1;\n const c = segment + thetaSegments + 2;\n const d = segment + 1;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$68cb731f50f614af(data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$57a29a1c803e9065 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(shapes = new $d5b33d7c30034067$export$6428a7f2611ef1fa([\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(-0.5, -0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, -0.5)\n ]), curveSegments = 12){\n super();\n this.type = \"ShapeGeometry\";\n this.parameters = {\n shapes: shapes,\n curveSegments: curveSegments\n };\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n let groupStart = 0;\n let groupCount = 0;\n // allow single and array values for \"shapes\" parameter\n if (Array.isArray(shapes) === false) addShape(shapes);\n else for(let i = 0; i < shapes.length; i++){\n addShape(shapes[i]);\n this.addGroup(groupStart, groupCount, i); // enables MultiMaterial support\n groupStart += groupCount;\n groupCount = 0;\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n // helper functions\n function addShape(shape) {\n const indexOffset = vertices.length / 3;\n const points = shape.extractPoints(curveSegments);\n let shapeVertices = points.shape;\n const shapeHoles = points.holes;\n // check direction of vertices\n if ($d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(shapeVertices) === false) shapeVertices = shapeVertices.reverse();\n for(let i = 0, l = shapeHoles.length; i < l; i++){\n const shapeHole = shapeHoles[i];\n if ($d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(shapeHole) === true) shapeHoles[i] = shapeHole.reverse();\n }\n const faces = $d5b33d7c30034067$export$96bdf6d9c66d7ba8.triangulateShape(shapeVertices, shapeHoles);\n // join vertices of inner and outer paths to a single array\n for(let i = 0, l = shapeHoles.length; i < l; i++){\n const shapeHole = shapeHoles[i];\n shapeVertices = shapeVertices.concat(shapeHole);\n }\n // vertices, normals, uvs\n for(let i = 0, l = shapeVertices.length; i < l; i++){\n const vertex = shapeVertices[i];\n vertices.push(vertex.x, vertex.y, 0);\n normals.push(0, 0, 1);\n uvs.push(vertex.x, vertex.y); // world uvs\n }\n // indices\n for(let i = 0, l = faces.length; i < l; i++){\n const face = faces[i];\n const a = face[0] + indexOffset;\n const b = face[1] + indexOffset;\n const c = face[2] + indexOffset;\n indices.push(a, b, c);\n groupCount += 3;\n }\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n const shapes = this.parameters.shapes;\n return $d5b33d7c30034067$var$toJSON(shapes, data);\n }\n static fromJSON(data, shapes) {\n const geometryShapes = [];\n for(let j = 0, jl = data.shapes.length; j < jl; j++){\n const shape = shapes[data.shapes[j]];\n geometryShapes.push(shape);\n }\n return new $d5b33d7c30034067$export$57a29a1c803e9065(geometryShapes, data.curveSegments);\n }\n}\nfunction $d5b33d7c30034067$var$toJSON(shapes, data) {\n data.shapes = [];\n if (Array.isArray(shapes)) for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n data.shapes.push(shape.uuid);\n }\n else data.shapes.push(shapes.uuid);\n return data;\n}\nclass $d5b33d7c30034067$export$1b417fc3b307a251 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI){\n super();\n this.type = \"SphereGeometry\";\n this.parameters = {\n radius: radius,\n widthSegments: widthSegments,\n heightSegments: heightSegments,\n phiStart: phiStart,\n phiLength: phiLength,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n widthSegments = Math.max(3, Math.floor(widthSegments));\n heightSegments = Math.max(2, Math.floor(heightSegments));\n const thetaEnd = Math.min(thetaStart + thetaLength, Math.PI);\n let index = 0;\n const grid = [];\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // generate vertices, normals and uvs\n for(let iy = 0; iy <= heightSegments; iy++){\n const verticesRow = [];\n const v = iy / heightSegments;\n // special case for the poles\n let uOffset = 0;\n if (iy === 0 && thetaStart === 0) uOffset = 0.5 / widthSegments;\n else if (iy === heightSegments && thetaEnd === Math.PI) uOffset = -0.5 / widthSegments;\n for(let ix = 0; ix <= widthSegments; ix++){\n const u = ix / widthSegments;\n // vertex\n vertex.x = -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n vertex.y = radius * Math.cos(thetaStart + v * thetaLength);\n vertex.z = radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.copy(vertex).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u + uOffset, 1 - v);\n verticesRow.push(index++);\n }\n grid.push(verticesRow);\n }\n // indices\n for(let iy = 0; iy < heightSegments; iy++)for(let ix = 0; ix < widthSegments; ix++){\n const a = grid[iy][ix + 1];\n const b = grid[iy][ix];\n const c = grid[iy + 1][ix];\n const d = grid[iy + 1][ix + 1];\n if (iy !== 0 || thetaStart > 0) indices.push(a, b, d);\n if (iy !== heightSegments - 1 || thetaEnd < Math.PI) indices.push(b, c, d);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$1b417fc3b307a251(data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$fb3f7adc68bd6e02 extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const vertices = [\n 1,\n 1,\n 1,\n -1,\n -1,\n 1,\n -1,\n 1,\n -1,\n 1,\n -1,\n -1\n ];\n const indices = [\n 2,\n 1,\n 0,\n 0,\n 3,\n 2,\n 1,\n 3,\n 0,\n 2,\n 3,\n 1\n ];\n super(vertices, indices, radius, detail);\n this.type = \"TetrahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$fb3f7adc68bd6e02(data.radius, data.detail);\n }\n}\nclass $d5b33d7c30034067$export$a2312a2a1fa56495 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2){\n super();\n this.type = \"TorusGeometry\";\n this.parameters = {\n radius: radius,\n tube: tube,\n radialSegments: radialSegments,\n tubularSegments: tubularSegments,\n arc: arc\n };\n radialSegments = Math.floor(radialSegments);\n tubularSegments = Math.floor(tubularSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n const center = new $d5b33d7c30034067$export$64b5c384219d3699();\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n // generate vertices, normals and uvs\n for(let j = 0; j <= radialSegments; j++)for(let i = 0; i <= tubularSegments; i++){\n const u = i / tubularSegments * arc;\n const v = j / radialSegments * Math.PI * 2;\n // vertex\n vertex.x = (radius + tube * Math.cos(v)) * Math.cos(u);\n vertex.y = (radius + tube * Math.cos(v)) * Math.sin(u);\n vertex.z = tube * Math.sin(v);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n center.x = radius * Math.cos(u);\n center.y = radius * Math.sin(u);\n normal.subVectors(vertex, center).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(i / tubularSegments);\n uvs.push(j / radialSegments);\n }\n // generate indices\n for(let j = 1; j <= radialSegments; j++)for(let i = 1; i <= tubularSegments; i++){\n // indices\n const a = (tubularSegments + 1) * j + i - 1;\n const b = (tubularSegments + 1) * (j - 1) + i - 1;\n const c = (tubularSegments + 1) * (j - 1) + i;\n const d = (tubularSegments + 1) * j + i;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$a2312a2a1fa56495(data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc);\n }\n}\nclass $d5b33d7c30034067$export$77e9bfadfb9ab8c8 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3){\n super();\n this.type = \"TorusKnotGeometry\";\n this.parameters = {\n radius: radius,\n tube: tube,\n tubularSegments: tubularSegments,\n radialSegments: radialSegments,\n p: p,\n q: q\n };\n tubularSegments = Math.floor(tubularSegments);\n radialSegments = Math.floor(radialSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const P1 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const P2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const B = new $d5b33d7c30034067$export$64b5c384219d3699();\n const T = new $d5b33d7c30034067$export$64b5c384219d3699();\n const N = new $d5b33d7c30034067$export$64b5c384219d3699();\n // generate vertices, normals and uvs\n for(let i = 0; i <= tubularSegments; ++i){\n // the radian \"u\" is used to calculate the position on the torus curve of the current tubular segment\n const u = i / tubularSegments * p * Math.PI * 2;\n // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n // these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n calculatePositionOnCurve(u, p, q, radius, P1);\n calculatePositionOnCurve(u + 0.01, p, q, radius, P2);\n // calculate orthonormal basis\n T.subVectors(P2, P1);\n N.addVectors(P2, P1);\n B.crossVectors(T, N);\n N.crossVectors(B, T);\n // normalize B, N. T can be ignored, we don't use it\n B.normalize();\n N.normalize();\n for(let j = 0; j <= radialSegments; ++j){\n // now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n // because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n const v = j / radialSegments * Math.PI * 2;\n const cx = -tube * Math.cos(v);\n const cy = tube * Math.sin(v);\n // now calculate the final vertex position.\n // first we orient the extrusion with our basis vectors, then we add it to the current position on the curve\n vertex.x = P1.x + (cx * N.x + cy * B.x);\n vertex.y = P1.y + (cx * N.y + cy * B.y);\n vertex.z = P1.z + (cx * N.z + cy * B.z);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n normal.subVectors(vertex, P1).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(i / tubularSegments);\n uvs.push(j / radialSegments);\n }\n }\n // generate indices\n for(let j = 1; j <= tubularSegments; j++)for(let i = 1; i <= radialSegments; i++){\n // indices\n const a = (radialSegments + 1) * (j - 1) + (i - 1);\n const b = (radialSegments + 1) * j + (i - 1);\n const c = (radialSegments + 1) * j + i;\n const d = (radialSegments + 1) * (j - 1) + i;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n // this function calculates the current position on the torus curve\n function calculatePositionOnCurve(u, p, q, radius, position) {\n const cu = Math.cos(u);\n const su = Math.sin(u);\n const quOverP = q / p * u;\n const cs = Math.cos(quOverP);\n position.x = radius * (2 + cs) * 0.5 * cu;\n position.y = radius * (2 + cs) * su * 0.5;\n position.z = radius * Math.sin(quOverP) * 0.5;\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$77e9bfadfb9ab8c8(data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q);\n }\n}\nclass $d5b33d7c30034067$export$7897d9d48904490c extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(path = new $d5b33d7c30034067$export$bf3f4c7e459f90fc(new $d5b33d7c30034067$export$64b5c384219d3699(-1, -1, 0), new $d5b33d7c30034067$export$64b5c384219d3699(-1, 1, 0), new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 0)), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false){\n super();\n this.type = \"TubeGeometry\";\n this.parameters = {\n path: path,\n tubularSegments: tubularSegments,\n radius: radius,\n radialSegments: radialSegments,\n closed: closed\n };\n const frames = path.computeFrenetFrames(tubularSegments, closed);\n // expose internals\n this.tangents = frames.tangents;\n this.normals = frames.normals;\n this.binormals = frames.binormals;\n // helper variables\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n let P = new $d5b33d7c30034067$export$64b5c384219d3699();\n // buffer\n const vertices = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n // create buffer data\n generateBufferData();\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n // functions\n function generateBufferData() {\n for(let i = 0; i < tubularSegments; i++)generateSegment(i);\n // if the geometry is not closed, generate the last row of vertices and normals\n // at the regular position on the given path\n //\n // if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n generateSegment(closed === false ? tubularSegments : 0);\n // uvs are generated in a separate function.\n // this makes it easy compute correct values for closed geometries\n generateUVs();\n // finally create faces\n generateIndices();\n }\n function generateSegment(i) {\n // we use getPointAt to sample evenly distributed points from the given path\n P = path.getPointAt(i / tubularSegments, P);\n // retrieve corresponding normal and binormal\n const N = frames.normals[i];\n const B = frames.binormals[i];\n // generate normals and vertices for the current segment\n for(let j = 0; j <= radialSegments; j++){\n const v = j / radialSegments * Math.PI * 2;\n const sin = Math.sin(v);\n const cos = -Math.cos(v);\n // normal\n normal.x = cos * N.x + sin * B.x;\n normal.y = cos * N.y + sin * B.y;\n normal.z = cos * N.z + sin * B.z;\n normal.normalize();\n normals.push(normal.x, normal.y, normal.z);\n // vertex\n vertex.x = P.x + radius * normal.x;\n vertex.y = P.y + radius * normal.y;\n vertex.z = P.z + radius * normal.z;\n vertices.push(vertex.x, vertex.y, vertex.z);\n }\n }\n function generateIndices() {\n for(let j = 1; j <= tubularSegments; j++)for(let i = 1; i <= radialSegments; i++){\n const a = (radialSegments + 1) * (j - 1) + (i - 1);\n const b = (radialSegments + 1) * j + (i - 1);\n const c = (radialSegments + 1) * j + i;\n const d = (radialSegments + 1) * (j - 1) + i;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n }\n function generateUVs() {\n for(let i = 0; i <= tubularSegments; i++)for(let j = 0; j <= radialSegments; j++){\n uv.x = i / tubularSegments;\n uv.y = j / radialSegments;\n uvs.push(uv.x, uv.y);\n }\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.path = this.parameters.path.toJSON();\n return data;\n }\n static fromJSON(data) {\n // This only works for built-in curves (e.g. CatmullRomCurve3).\n // User defined curves or instances of CurvePath will not be deserialized.\n return new $d5b33d7c30034067$export$7897d9d48904490c(new $d5b33d7c30034067$var$Curves[data.path.type]().fromJSON(data.path), data.tubularSegments, data.radius, data.radialSegments, data.closed);\n }\n}\nclass $d5b33d7c30034067$export$4b739da06d24892b extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(geometry = null){\n super();\n this.type = \"WireframeGeometry\";\n this.parameters = {\n geometry: geometry\n };\n if (geometry !== null) {\n // buffer\n const vertices = [];\n const edges = new Set();\n // helper variables\n const start = new $d5b33d7c30034067$export$64b5c384219d3699();\n const end = new $d5b33d7c30034067$export$64b5c384219d3699();\n if (geometry.index !== null) {\n // indexed BufferGeometry\n const position = geometry.attributes.position;\n const indices = geometry.index;\n let groups = geometry.groups;\n if (groups.length === 0) groups = [\n {\n start: 0,\n count: indices.count,\n materialIndex: 0\n }\n ];\n // create a data structure that contains all edges without duplicates\n for(let o = 0, ol = groups.length; o < ol; ++o){\n const group = groups[o];\n const groupStart = group.start;\n const groupCount = group.count;\n for(let i = groupStart, l = groupStart + groupCount; i < l; i += 3)for(let j = 0; j < 3; j++){\n const index1 = indices.getX(i + j);\n const index2 = indices.getX(i + (j + 1) % 3);\n start.fromBufferAttribute(position, index1);\n end.fromBufferAttribute(position, index2);\n if ($d5b33d7c30034067$var$isUniqueEdge(start, end, edges) === true) {\n vertices.push(start.x, start.y, start.z);\n vertices.push(end.x, end.y, end.z);\n }\n }\n }\n } else {\n // non-indexed BufferGeometry\n const position = geometry.attributes.position;\n for(let i = 0, l = position.count / 3; i < l; i++)for(let j = 0; j < 3; j++){\n // three edges per triangle, an edge is represented as (index1, index2)\n // e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n const index1 = 3 * i + j;\n const index2 = 3 * i + (j + 1) % 3;\n start.fromBufferAttribute(position, index1);\n end.fromBufferAttribute(position, index2);\n if ($d5b33d7c30034067$var$isUniqueEdge(start, end, edges) === true) {\n vertices.push(start.x, start.y, start.z);\n vertices.push(end.x, end.y, end.z);\n }\n }\n }\n // build geometry\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n}\nfunction $d5b33d7c30034067$var$isUniqueEdge(start, end, edges) {\n const hash1 = `${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;\n const hash2 = `${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`; // coincident edge\n if (edges.has(hash1) === true || edges.has(hash2) === true) return false;\n else {\n edges.add(hash1);\n edges.add(hash2);\n return true;\n }\n}\nvar $d5b33d7c30034067$var$Geometries = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n BoxGeometry: $d5b33d7c30034067$export$33e43285f7406bd5,\n CapsuleGeometry: $d5b33d7c30034067$export$41680e8551036033,\n CircleGeometry: $d5b33d7c30034067$export$d5c0e8d607467193,\n ConeGeometry: $d5b33d7c30034067$export$a7a48974f285c9b3,\n CylinderGeometry: $d5b33d7c30034067$export$68f745719dbe5198,\n DodecahedronGeometry: $d5b33d7c30034067$export$c0babfeb8708fc9c,\n EdgesGeometry: $d5b33d7c30034067$export$4730b1542707547f,\n ExtrudeGeometry: $d5b33d7c30034067$export$598697a1efa63ca7,\n IcosahedronGeometry: $d5b33d7c30034067$export$9567cc828c9535da,\n LatheGeometry: $d5b33d7c30034067$export$6d839803fcd1882c,\n OctahedronGeometry: $d5b33d7c30034067$export$1954e2b809fe361e,\n PlaneGeometry: $d5b33d7c30034067$export$967d831af31f69ce,\n PolyhedronGeometry: $d5b33d7c30034067$export$60e57a7d3f20ff65,\n RingGeometry: $d5b33d7c30034067$export$68cb731f50f614af,\n ShapeGeometry: $d5b33d7c30034067$export$57a29a1c803e9065,\n SphereGeometry: $d5b33d7c30034067$export$1b417fc3b307a251,\n TetrahedronGeometry: $d5b33d7c30034067$export$fb3f7adc68bd6e02,\n TorusGeometry: $d5b33d7c30034067$export$a2312a2a1fa56495,\n TorusKnotGeometry: $d5b33d7c30034067$export$77e9bfadfb9ab8c8,\n TubeGeometry: $d5b33d7c30034067$export$7897d9d48904490c,\n WireframeGeometry: $d5b33d7c30034067$export$4b739da06d24892b\n});\nclass $d5b33d7c30034067$export$e8564da406055a3 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isShadowMaterial = true;\n this.type = \"ShadowMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.transparent = true;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$21c421a2e1df9d22 extends $d5b33d7c30034067$export$83c7d75d550a8b0d {\n constructor(parameters){\n super(parameters);\n this.isRawShaderMaterial = true;\n this.type = \"RawShaderMaterial\";\n }\n}\nclass $d5b33d7c30034067$export$f2980790215acccd extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshStandardMaterial = true;\n this.defines = {\n \"STANDARD\": \"\"\n };\n this.type = \"MeshStandardMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.roughness = 1.0;\n this.metalness = 0.0;\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.roughnessMap = null;\n this.metalnessMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.envMapIntensity = 1.0;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.defines = {\n \"STANDARD\": \"\"\n };\n this.color.copy(source.color);\n this.roughness = source.roughness;\n this.metalness = source.metalness;\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.roughnessMap = source.roughnessMap;\n this.metalnessMap = source.metalnessMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.envMapIntensity = source.envMapIntensity;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$28d04986c4269c9f extends $d5b33d7c30034067$export$f2980790215acccd {\n constructor(parameters){\n super();\n this.isMeshPhysicalMaterial = true;\n this.defines = {\n \"STANDARD\": \"\",\n \"PHYSICAL\": \"\"\n };\n this.type = \"MeshPhysicalMaterial\";\n this.anisotropyRotation = 0;\n this.anisotropyMap = null;\n this.clearcoatMap = null;\n this.clearcoatRoughness = 0.0;\n this.clearcoatRoughnessMap = null;\n this.clearcoatNormalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.clearcoatNormalMap = null;\n this.ior = 1.5;\n Object.defineProperty(this, \"reflectivity\", {\n get: function() {\n return $d5b33d7c30034067$var$clamp(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);\n },\n set: function(reflectivity) {\n this.ior = (1 + 0.4 * reflectivity) / (1 - 0.4 * reflectivity);\n }\n });\n this.iridescenceMap = null;\n this.iridescenceIOR = 1.3;\n this.iridescenceThicknessRange = [\n 100,\n 400\n ];\n this.iridescenceThicknessMap = null;\n this.sheenColor = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.sheenColorMap = null;\n this.sheenRoughness = 1.0;\n this.sheenRoughnessMap = null;\n this.transmissionMap = null;\n this.thickness = 0;\n this.thicknessMap = null;\n this.attenuationDistance = Infinity;\n this.attenuationColor = new $d5b33d7c30034067$export$892596cec99bc70e(1, 1, 1);\n this.specularIntensity = 1.0;\n this.specularIntensityMap = null;\n this.specularColor = new $d5b33d7c30034067$export$892596cec99bc70e(1, 1, 1);\n this.specularColorMap = null;\n this._anisotropy = 0;\n this._clearcoat = 0;\n this._iridescence = 0;\n this._sheen = 0.0;\n this._transmission = 0;\n this.setValues(parameters);\n }\n get anisotropy() {\n return this._anisotropy;\n }\n set anisotropy(value) {\n if (this._anisotropy > 0 !== value > 0) this.version++;\n this._anisotropy = value;\n }\n get clearcoat() {\n return this._clearcoat;\n }\n set clearcoat(value) {\n if (this._clearcoat > 0 !== value > 0) this.version++;\n this._clearcoat = value;\n }\n get iridescence() {\n return this._iridescence;\n }\n set iridescence(value) {\n if (this._iridescence > 0 !== value > 0) this.version++;\n this._iridescence = value;\n }\n get sheen() {\n return this._sheen;\n }\n set sheen(value) {\n if (this._sheen > 0 !== value > 0) this.version++;\n this._sheen = value;\n }\n get transmission() {\n return this._transmission;\n }\n set transmission(value) {\n if (this._transmission > 0 !== value > 0) this.version++;\n this._transmission = value;\n }\n copy(source) {\n super.copy(source);\n this.defines = {\n \"STANDARD\": \"\",\n \"PHYSICAL\": \"\"\n };\n this.anisotropy = source.anisotropy;\n this.anisotropyRotation = source.anisotropyRotation;\n this.anisotropyMap = source.anisotropyMap;\n this.clearcoat = source.clearcoat;\n this.clearcoatMap = source.clearcoatMap;\n this.clearcoatRoughness = source.clearcoatRoughness;\n this.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n this.clearcoatNormalMap = source.clearcoatNormalMap;\n this.clearcoatNormalScale.copy(source.clearcoatNormalScale);\n this.ior = source.ior;\n this.iridescence = source.iridescence;\n this.iridescenceMap = source.iridescenceMap;\n this.iridescenceIOR = source.iridescenceIOR;\n this.iridescenceThicknessRange = [\n ...source.iridescenceThicknessRange\n ];\n this.iridescenceThicknessMap = source.iridescenceThicknessMap;\n this.sheen = source.sheen;\n this.sheenColor.copy(source.sheenColor);\n this.sheenColorMap = source.sheenColorMap;\n this.sheenRoughness = source.sheenRoughness;\n this.sheenRoughnessMap = source.sheenRoughnessMap;\n this.transmission = source.transmission;\n this.transmissionMap = source.transmissionMap;\n this.thickness = source.thickness;\n this.thicknessMap = source.thicknessMap;\n this.attenuationDistance = source.attenuationDistance;\n this.attenuationColor.copy(source.attenuationColor);\n this.specularIntensity = source.specularIntensity;\n this.specularIntensityMap = source.specularIntensityMap;\n this.specularColor.copy(source.specularColor);\n this.specularColorMap = source.specularColorMap;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$24c72f71cbaf0678 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshPhongMaterial = true;\n this.type = \"MeshPhongMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.specular = new $d5b33d7c30034067$export$892596cec99bc70e(0x111111);\n this.shininess = 30;\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.specularMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.combine = $d5b33d7c30034067$export$e50ac29801f1774d;\n this.reflectivity = 1;\n this.refractionRatio = 0.98;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.specular.copy(source.specular);\n this.shininess = source.shininess;\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.specularMap = source.specularMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.combine = source.combine;\n this.reflectivity = source.reflectivity;\n this.refractionRatio = source.refractionRatio;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$df893cf97e765622 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshToonMaterial = true;\n this.defines = {\n \"TOON\": \"\"\n };\n this.type = \"MeshToonMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.gradientMap = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.alphaMap = null;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.gradientMap = source.gradientMap;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.alphaMap = source.alphaMap;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$bfe8c0a091f41ae7 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshNormalMaterial = true;\n this.type = \"MeshNormalMaterial\";\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.flatShading = false;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.flatShading = source.flatShading;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$5023a9a8114806b8 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshLambertMaterial = true;\n this.type = \"MeshLambertMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.specularMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.combine = $d5b33d7c30034067$export$e50ac29801f1774d;\n this.reflectivity = 1;\n this.refractionRatio = 0.98;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.specularMap = source.specularMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.combine = source.combine;\n this.reflectivity = source.reflectivity;\n this.refractionRatio = source.refractionRatio;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$6f5fef6235ec12ee extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshMatcapMaterial = true;\n this.defines = {\n \"MATCAP\": \"\"\n };\n this.type = \"MeshMatcapMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.matcap = null;\n this.map = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.alphaMap = null;\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.defines = {\n \"MATCAP\": \"\"\n };\n this.color.copy(source.color);\n this.matcap = source.matcap;\n this.map = source.map;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.alphaMap = source.alphaMap;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$327886a3efaeaebe extends $d5b33d7c30034067$export$fbaaa33907730a0c {\n constructor(parameters){\n super();\n this.isLineDashedMaterial = true;\n this.type = \"LineDashedMaterial\";\n this.scale = 1;\n this.dashSize = 3;\n this.gapSize = 1;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.scale = source.scale;\n this.dashSize = source.dashSize;\n this.gapSize = source.gapSize;\n return this;\n }\n}\n// same as Array.prototype.slice, but also works on typed arrays\nfunction $d5b33d7c30034067$var$arraySlice(array, from, to) {\n if ($d5b33d7c30034067$var$isTypedArray(array)) // in ios9 array.subarray(from, undefined) will return empty array\n // but array.subarray(from) or array.subarray(from, len) is correct\n return new array.constructor(array.subarray(from, to !== undefined ? to : array.length));\n return array.slice(from, to);\n}\n// converts an array to a specific type\nfunction $d5b33d7c30034067$var$convertArray(array, type, forceClone) {\n if (!array || // let 'undefined' and 'null' pass\n !forceClone && array.constructor === type) return array;\n if (typeof type.BYTES_PER_ELEMENT === \"number\") return new type(array); // create typed array\n return Array.prototype.slice.call(array); // create Array\n}\nfunction $d5b33d7c30034067$var$isTypedArray(object) {\n return ArrayBuffer.isView(object) && !(object instanceof DataView);\n}\n// returns an array by which times and values can be sorted\nfunction $d5b33d7c30034067$var$getKeyframeOrder(times) {\n function compareTime(i, j) {\n return times[i] - times[j];\n }\n const n = times.length;\n const result = new Array(n);\n for(let i = 0; i !== n; ++i)result[i] = i;\n result.sort(compareTime);\n return result;\n}\n// uses the array previously returned by 'getKeyframeOrder' to sort data\nfunction $d5b33d7c30034067$var$sortedArray(values, stride, order) {\n const nValues = values.length;\n const result = new values.constructor(nValues);\n for(let i = 0, dstOffset = 0; dstOffset !== nValues; ++i){\n const srcOffset = order[i] * stride;\n for(let j = 0; j !== stride; ++j)result[dstOffset++] = values[srcOffset + j];\n }\n return result;\n}\n// function for parsing AOS keyframe formats\nfunction $d5b33d7c30034067$var$flattenJSON(jsonKeys, times, values, valuePropertyName) {\n let i = 1, key = jsonKeys[0];\n while(key !== undefined && key[valuePropertyName] === undefined)key = jsonKeys[i++];\n if (key === undefined) return; // no data\n let value = key[valuePropertyName];\n if (value === undefined) return; // no data\n if (Array.isArray(value)) do {\n value = key[valuePropertyName];\n if (value !== undefined) {\n times.push(key.time);\n values.push.apply(values, value); // push all elements\n }\n key = jsonKeys[i++];\n }while (key !== undefined);\n else if (value.toArray !== undefined) // ...assume THREE.Math-ish\n do {\n value = key[valuePropertyName];\n if (value !== undefined) {\n times.push(key.time);\n value.toArray(values, values.length);\n }\n key = jsonKeys[i++];\n }while (key !== undefined);\n else // otherwise push as-is\n do {\n value = key[valuePropertyName];\n if (value !== undefined) {\n times.push(key.time);\n values.push(value);\n }\n key = jsonKeys[i++];\n }while (key !== undefined);\n}\nfunction $d5b33d7c30034067$var$subclip(sourceClip, name, startFrame, endFrame, fps = 30) {\n const clip = sourceClip.clone();\n clip.name = name;\n const tracks = [];\n for(let i = 0; i < clip.tracks.length; ++i){\n const track = clip.tracks[i];\n const valueSize = track.getValueSize();\n const times = [];\n const values = [];\n for(let j = 0; j < track.times.length; ++j){\n const frame = track.times[j] * fps;\n if (frame < startFrame || frame >= endFrame) continue;\n times.push(track.times[j]);\n for(let k = 0; k < valueSize; ++k)values.push(track.values[j * valueSize + k]);\n }\n if (times.length === 0) continue;\n track.times = $d5b33d7c30034067$var$convertArray(times, track.times.constructor);\n track.values = $d5b33d7c30034067$var$convertArray(values, track.values.constructor);\n tracks.push(track);\n }\n clip.tracks = tracks;\n // find minimum .times value across all tracks in the trimmed clip\n let minStartTime = Infinity;\n for(let i = 0; i < clip.tracks.length; ++i)if (minStartTime > clip.tracks[i].times[0]) minStartTime = clip.tracks[i].times[0];\n // shift all tracks such that clip begins at t=0\n for(let i = 0; i < clip.tracks.length; ++i)clip.tracks[i].shift(-1 * minStartTime);\n clip.resetDuration();\n return clip;\n}\nfunction $d5b33d7c30034067$var$makeClipAdditive(targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30) {\n if (fps <= 0) fps = 30;\n const numTracks = referenceClip.tracks.length;\n const referenceTime = referenceFrame / fps;\n // Make each track's values relative to the values at the reference frame\n for(let i = 0; i < numTracks; ++i){\n const referenceTrack = referenceClip.tracks[i];\n const referenceTrackType = referenceTrack.ValueTypeName;\n // Skip this track if it's non-numeric\n if (referenceTrackType === \"bool\" || referenceTrackType === \"string\") continue;\n // Find the track in the target clip whose name and type matches the reference track\n const targetTrack = targetClip.tracks.find(function(track) {\n return track.name === referenceTrack.name && track.ValueTypeName === referenceTrackType;\n });\n if (targetTrack === undefined) continue;\n let referenceOffset = 0;\n const referenceValueSize = referenceTrack.getValueSize();\n if (referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) referenceOffset = referenceValueSize / 3;\n let targetOffset = 0;\n const targetValueSize = targetTrack.getValueSize();\n if (targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) targetOffset = targetValueSize / 3;\n const lastIndex = referenceTrack.times.length - 1;\n let referenceValue;\n // Find the value to subtract out of the track\n if (referenceTime <= referenceTrack.times[0]) {\n // Reference frame is earlier than the first keyframe, so just use the first keyframe\n const startIndex = referenceOffset;\n const endIndex = referenceValueSize - referenceOffset;\n referenceValue = $d5b33d7c30034067$var$arraySlice(referenceTrack.values, startIndex, endIndex);\n } else if (referenceTime >= referenceTrack.times[lastIndex]) {\n // Reference frame is after the last keyframe, so just use the last keyframe\n const startIndex = lastIndex * referenceValueSize + referenceOffset;\n const endIndex = startIndex + referenceValueSize - referenceOffset;\n referenceValue = $d5b33d7c30034067$var$arraySlice(referenceTrack.values, startIndex, endIndex);\n } else {\n // Interpolate to the reference value\n const interpolant = referenceTrack.createInterpolant();\n const startIndex = referenceOffset;\n const endIndex = referenceValueSize - referenceOffset;\n interpolant.evaluate(referenceTime);\n referenceValue = $d5b33d7c30034067$var$arraySlice(interpolant.resultBuffer, startIndex, endIndex);\n }\n // Conjugate the quaternion\n if (referenceTrackType === \"quaternion\") {\n const referenceQuat = new $d5b33d7c30034067$export$23d6a54f0bbc85a3().fromArray(referenceValue).normalize().conjugate();\n referenceQuat.toArray(referenceValue);\n }\n // Subtract the reference value from all of the track values\n const numTimes = targetTrack.times.length;\n for(let j = 0; j < numTimes; ++j){\n const valueStart = j * targetValueSize + targetOffset;\n if (referenceTrackType === \"quaternion\") // Multiply the conjugate for quaternion track types\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.multiplyQuaternionsFlat(targetTrack.values, valueStart, referenceValue, 0, targetTrack.values, valueStart);\n else {\n const valueEnd = targetValueSize - targetOffset * 2;\n // Subtract each value for all other numeric track types\n for(let k = 0; k < valueEnd; ++k)targetTrack.values[valueStart + k] -= referenceValue[k];\n }\n }\n }\n targetClip.blendMode = $d5b33d7c30034067$export$d875e029ef558d3;\n return targetClip;\n}\nconst $d5b33d7c30034067$export$7ee8caa573e71ad1 = {\n arraySlice: $d5b33d7c30034067$var$arraySlice,\n convertArray: $d5b33d7c30034067$var$convertArray,\n isTypedArray: $d5b33d7c30034067$var$isTypedArray,\n getKeyframeOrder: $d5b33d7c30034067$var$getKeyframeOrder,\n sortedArray: $d5b33d7c30034067$var$sortedArray,\n flattenJSON: $d5b33d7c30034067$var$flattenJSON,\n subclip: $d5b33d7c30034067$var$subclip,\n makeClipAdditive: $d5b33d7c30034067$var$makeClipAdditive\n};\n/**\n * Abstract base class of interpolants over parametric samples.\n *\n * The parameter domain is one dimensional, typically the time or a path\n * along a curve defined by the data.\n *\n * The sample values can have any dimensionality and derived classes may\n * apply special interpretations to the data.\n *\n * This class provides the interval seek in a Template Method, deferring\n * the actual interpolation to derived classes.\n *\n * Time complexity is O(1) for linear access crossing at most two points\n * and O(log N) for random access, where N is the number of positions.\n *\n * References:\n *\n * \t\thttp://www.oodesign.com/template-method-pattern.html\n *\n */ class $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n this.parameterPositions = parameterPositions;\n this._cachedIndex = 0;\n this.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize);\n this.sampleValues = sampleValues;\n this.valueSize = sampleSize;\n this.settings = null;\n this.DefaultSettings_ = {};\n }\n evaluate(t) {\n const pp = this.parameterPositions;\n let i1 = this._cachedIndex, t1 = pp[i1], t0 = pp[i1 - 1];\n validate_interval: {\n seek: {\n let right;\n linear_scan: {\n //- See http://jsperf.com/comparison-to-undefined/3\n //- slower code:\n //-\n //- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n forward_scan: if (!(t < t1)) {\n for(let giveUpAt = i1 + 2;;){\n if (t1 === undefined) {\n if (t < t0) break forward_scan;\n // after end\n i1 = pp.length;\n this._cachedIndex = i1;\n return this.copySampleValue_(i1 - 1);\n }\n if (i1 === giveUpAt) break; // this loop\n t0 = t1;\n t1 = pp[++i1];\n if (t < t1) break seek;\n }\n // prepare binary search on the right side of the index\n right = pp.length;\n break linear_scan;\n }\n //- slower code:\n //-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n if (!(t >= t0)) {\n // looping?\n const t1global = pp[1];\n if (t < t1global) {\n i1 = 2; // + 1, using the scan for the details\n t0 = t1global;\n }\n // linear reverse scan\n for(let giveUpAt = i1 - 2;;){\n if (t0 === undefined) {\n // before start\n this._cachedIndex = 0;\n return this.copySampleValue_(0);\n }\n if (i1 === giveUpAt) break; // this loop\n t1 = t0;\n t0 = pp[--i1 - 1];\n if (t >= t0) break seek;\n }\n // prepare binary search on the left side of the index\n right = i1;\n i1 = 0;\n break linear_scan;\n }\n break validate_interval;\n } // linear scan\n // binary search\n while(i1 < right){\n const mid = i1 + right >>> 1;\n if (t < pp[mid]) right = mid;\n else i1 = mid + 1;\n }\n t1 = pp[i1];\n t0 = pp[i1 - 1];\n // check boundary cases, again\n if (t0 === undefined) {\n this._cachedIndex = 0;\n return this.copySampleValue_(0);\n }\n if (t1 === undefined) {\n i1 = pp.length;\n this._cachedIndex = i1;\n return this.copySampleValue_(i1 - 1);\n }\n } // seek\n this._cachedIndex = i1;\n this.intervalChanged_(i1, t0, t1);\n } // validate_interval\n return this.interpolate_(i1, t0, t, t1);\n }\n getSettings_() {\n return this.settings || this.DefaultSettings_;\n }\n copySampleValue_(index) {\n // copies a sample value to the result buffer\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, offset = index * stride;\n for(let i = 0; i !== stride; ++i)result[i] = values[offset + i];\n return result;\n }\n // Template methods for derived classes:\n interpolate_() {\n throw new Error(\"call to abstract method\");\n // implementations shall return this.resultBuffer\n }\n intervalChanged_() {\n // empty\n }\n}\n/**\n * Fast and simple cubic spline interpolant.\n *\n * It was derived from a Hermitian construction setting the first derivative\n * at each sample position to the linear slope between neighboring positions\n * over their parameter interval.\n */ class $d5b33d7c30034067$export$3646682e7a3959 extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n this._weightPrev = -0;\n this._offsetPrev = -0;\n this._weightNext = -0;\n this._offsetNext = -0;\n this.DefaultSettings_ = {\n endingStart: $d5b33d7c30034067$export$7f795934b84ab523,\n endingEnd: $d5b33d7c30034067$export$7f795934b84ab523\n };\n }\n intervalChanged_(i1, t0, t1) {\n const pp = this.parameterPositions;\n let iPrev = i1 - 2, iNext = i1 + 1, tPrev = pp[iPrev], tNext = pp[iNext];\n if (tPrev === undefined) switch(this.getSettings_().endingStart){\n case $d5b33d7c30034067$export$24a4ccb5099273b5:\n // f'(t0) = 0\n iPrev = i1;\n tPrev = 2 * t0 - t1;\n break;\n case $d5b33d7c30034067$export$8e8c3ecdcd8e1fee:\n // use the other end of the curve\n iPrev = pp.length - 2;\n tPrev = t0 + pp[iPrev] - pp[iPrev + 1];\n break;\n default:\n // f''(t0) = 0 a.k.a. Natural Spline\n iPrev = i1;\n tPrev = t1;\n }\n if (tNext === undefined) switch(this.getSettings_().endingEnd){\n case $d5b33d7c30034067$export$24a4ccb5099273b5:\n // f'(tN) = 0\n iNext = i1;\n tNext = 2 * t1 - t0;\n break;\n case $d5b33d7c30034067$export$8e8c3ecdcd8e1fee:\n // use the other end of the curve\n iNext = 1;\n tNext = t1 + pp[1] - pp[0];\n break;\n default:\n // f''(tN) = 0, a.k.a. Natural Spline\n iNext = i1 - 1;\n tNext = t0;\n }\n const halfDt = (t1 - t0) * 0.5, stride = this.valueSize;\n this._weightPrev = halfDt / (t0 - tPrev);\n this._weightNext = halfDt / (tNext - t1);\n this._offsetPrev = iPrev * stride;\n this._offsetNext = iNext * stride;\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, o1 = i1 * stride, o0 = o1 - stride, oP = this._offsetPrev, oN = this._offsetNext, wP = this._weightPrev, wN = this._weightNext, p = (t - t0) / (t1 - t0), pp = p * p, ppp = pp * p;\n // evaluate polynomials\n const sP = -wP * ppp + 2 * wP * pp - wP * p;\n const s0 = (1 + wP) * ppp + (-1.5 - 2 * wP) * pp + (-0.5 + wP) * p + 1;\n const s1 = (-1 - wN) * ppp + (1.5 + wN) * pp + 0.5 * p;\n const sN = wN * ppp - wN * pp;\n // combine data linearly\n for(let i = 0; i !== stride; ++i)result[i] = sP * values[oP + i] + s0 * values[o0 + i] + s1 * values[o1 + i] + sN * values[oN + i];\n return result;\n }\n}\nclass $d5b33d7c30034067$export$a8e6009059f51e1a extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, offset1 = i1 * stride, offset0 = offset1 - stride, weight1 = (t - t0) / (t1 - t0), weight0 = 1 - weight1;\n for(let i = 0; i !== stride; ++i)result[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1;\n return result;\n }\n}\n/**\n *\n * Interpolant that evaluates to the sample value at the position preceding\n * the parameter.\n */ class $d5b33d7c30034067$export$fb9758ef7ef8d5cc extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n interpolate_(i1 /*, t0, t, t1 */ ) {\n return this.copySampleValue_(i1 - 1);\n }\n}\nclass $d5b33d7c30034067$export$b0e479f45b7006d6 {\n constructor(name, times, values, interpolation){\n if (name === undefined) throw new Error(\"THREE.KeyframeTrack: track name is undefined\");\n if (times === undefined || times.length === 0) throw new Error(\"THREE.KeyframeTrack: no keyframes in track named \" + name);\n this.name = name;\n this.times = $d5b33d7c30034067$var$convertArray(times, this.TimeBufferType);\n this.values = $d5b33d7c30034067$var$convertArray(values, this.ValueBufferType);\n this.setInterpolation(interpolation || this.DefaultInterpolation);\n }\n // Serialization (in static context, because of constructor invocation\n // and automatic invocation of .toJSON):\n static toJSON(track) {\n const trackType = track.constructor;\n let json;\n // derived classes can define a static toJSON method\n if (trackType.toJSON !== this.toJSON) json = trackType.toJSON(track);\n else {\n // by default, we assume the data can be serialized as-is\n json = {\n \"name\": track.name,\n \"times\": $d5b33d7c30034067$var$convertArray(track.times, Array),\n \"values\": $d5b33d7c30034067$var$convertArray(track.values, Array)\n };\n const interpolation = track.getInterpolation();\n if (interpolation !== track.DefaultInterpolation) json.interpolation = interpolation;\n }\n json.type = track.ValueTypeName; // mandatory\n return json;\n }\n InterpolantFactoryMethodDiscrete(result) {\n return new $d5b33d7c30034067$export$fb9758ef7ef8d5cc(this.times, this.values, this.getValueSize(), result);\n }\n InterpolantFactoryMethodLinear(result) {\n return new $d5b33d7c30034067$export$a8e6009059f51e1a(this.times, this.values, this.getValueSize(), result);\n }\n InterpolantFactoryMethodSmooth(result) {\n return new $d5b33d7c30034067$export$3646682e7a3959(this.times, this.values, this.getValueSize(), result);\n }\n setInterpolation(interpolation) {\n let factoryMethod;\n switch(interpolation){\n case $d5b33d7c30034067$export$995b32462a65e855:\n factoryMethod = this.InterpolantFactoryMethodDiscrete;\n break;\n case $d5b33d7c30034067$export$30fac1aace31cf4d:\n factoryMethod = this.InterpolantFactoryMethodLinear;\n break;\n case $d5b33d7c30034067$export$198b11ff4c72bb30:\n factoryMethod = this.InterpolantFactoryMethodSmooth;\n break;\n }\n if (factoryMethod === undefined) {\n const message = \"unsupported interpolation for \" + this.ValueTypeName + \" keyframe track named \" + this.name;\n if (this.createInterpolant === undefined) {\n // fall back to default, unless the default itself is messed up\n if (interpolation !== this.DefaultInterpolation) this.setInterpolation(this.DefaultInterpolation);\n else throw new Error(message); // fatal, in this case\n }\n console.warn(\"THREE.KeyframeTrack:\", message);\n return this;\n }\n this.createInterpolant = factoryMethod;\n return this;\n }\n getInterpolation() {\n switch(this.createInterpolant){\n case this.InterpolantFactoryMethodDiscrete:\n return $d5b33d7c30034067$export$995b32462a65e855;\n case this.InterpolantFactoryMethodLinear:\n return $d5b33d7c30034067$export$30fac1aace31cf4d;\n case this.InterpolantFactoryMethodSmooth:\n return $d5b33d7c30034067$export$198b11ff4c72bb30;\n }\n }\n getValueSize() {\n return this.values.length / this.times.length;\n }\n // move all keyframes either forwards or backwards in time\n shift(timeOffset) {\n if (timeOffset !== 0.0) {\n const times = this.times;\n for(let i = 0, n = times.length; i !== n; ++i)times[i] += timeOffset;\n }\n return this;\n }\n // scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n scale(timeScale) {\n if (timeScale !== 1.0) {\n const times = this.times;\n for(let i = 0, n = times.length; i !== n; ++i)times[i] *= timeScale;\n }\n return this;\n }\n // removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n // IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n trim(startTime, endTime) {\n const times = this.times, nKeys = times.length;\n let from = 0, to = nKeys - 1;\n while(from !== nKeys && times[from] < startTime)++from;\n while(to !== -1 && times[to] > endTime)--to;\n ++to; // inclusive -> exclusive bound\n if (from !== 0 || to !== nKeys) {\n // empty tracks are forbidden, so keep at least one keyframe\n if (from >= to) {\n to = Math.max(to, 1);\n from = to - 1;\n }\n const stride = this.getValueSize();\n this.times = $d5b33d7c30034067$var$arraySlice(times, from, to);\n this.values = $d5b33d7c30034067$var$arraySlice(this.values, from * stride, to * stride);\n }\n return this;\n }\n // ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n validate() {\n let valid = true;\n const valueSize = this.getValueSize();\n if (valueSize - Math.floor(valueSize) !== 0) {\n console.error(\"THREE.KeyframeTrack: Invalid value size in track.\", this);\n valid = false;\n }\n const times = this.times, values = this.values, nKeys = times.length;\n if (nKeys === 0) {\n console.error(\"THREE.KeyframeTrack: Track is empty.\", this);\n valid = false;\n }\n let prevTime = null;\n for(let i = 0; i !== nKeys; i++){\n const currTime = times[i];\n if (typeof currTime === \"number\" && isNaN(currTime)) {\n console.error(\"THREE.KeyframeTrack: Time is not a valid number.\", this, i, currTime);\n valid = false;\n break;\n }\n if (prevTime !== null && prevTime > currTime) {\n console.error(\"THREE.KeyframeTrack: Out of order keys.\", this, i, currTime, prevTime);\n valid = false;\n break;\n }\n prevTime = currTime;\n }\n if (values !== undefined) {\n if ($d5b33d7c30034067$var$isTypedArray(values)) for(let i = 0, n = values.length; i !== n; ++i){\n const value = values[i];\n if (isNaN(value)) {\n console.error(\"THREE.KeyframeTrack: Value is not a valid number.\", this, i, value);\n valid = false;\n break;\n }\n }\n }\n return valid;\n }\n // removes equivalent sequential keys as common in morph target sequences\n // (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n optimize() {\n // times or values may be shared with other tracks, so overwriting is unsafe\n const times = $d5b33d7c30034067$var$arraySlice(this.times), values = $d5b33d7c30034067$var$arraySlice(this.values), stride = this.getValueSize(), smoothInterpolation = this.getInterpolation() === $d5b33d7c30034067$export$198b11ff4c72bb30, lastIndex = times.length - 1;\n let writeIndex = 1;\n for(let i = 1; i < lastIndex; ++i){\n let keep = false;\n const time = times[i];\n const timeNext = times[i + 1];\n // remove adjacent keyframes scheduled at the same time\n if (time !== timeNext && (i !== 1 || time !== times[0])) {\n if (!smoothInterpolation) {\n // remove unnecessary keyframes same as their neighbors\n const offset = i * stride, offsetP = offset - stride, offsetN = offset + stride;\n for(let j = 0; j !== stride; ++j){\n const value = values[offset + j];\n if (value !== values[offsetP + j] || value !== values[offsetN + j]) {\n keep = true;\n break;\n }\n }\n } else keep = true;\n }\n // in-place compaction\n if (keep) {\n if (i !== writeIndex) {\n times[writeIndex] = times[i];\n const readOffset = i * stride, writeOffset = writeIndex * stride;\n for(let j = 0; j !== stride; ++j)values[writeOffset + j] = values[readOffset + j];\n }\n ++writeIndex;\n }\n }\n // flush last keyframe (compaction looks ahead)\n if (lastIndex > 0) {\n times[writeIndex] = times[lastIndex];\n for(let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++j)values[writeOffset + j] = values[readOffset + j];\n ++writeIndex;\n }\n if (writeIndex !== times.length) {\n this.times = $d5b33d7c30034067$var$arraySlice(times, 0, writeIndex);\n this.values = $d5b33d7c30034067$var$arraySlice(values, 0, writeIndex * stride);\n } else {\n this.times = times;\n this.values = values;\n }\n return this;\n }\n clone() {\n const times = $d5b33d7c30034067$var$arraySlice(this.times, 0);\n const values = $d5b33d7c30034067$var$arraySlice(this.values, 0);\n const TypedKeyframeTrack = this.constructor;\n const track = new TypedKeyframeTrack(this.name, times, values);\n // Interpolant argument to constructor is not saved, so copy the factory method directly.\n track.createInterpolant = this.createInterpolant;\n return track;\n }\n}\n$d5b33d7c30034067$export$b0e479f45b7006d6.prototype.TimeBufferType = Float32Array;\n$d5b33d7c30034067$export$b0e479f45b7006d6.prototype.ValueBufferType = Float32Array;\n$d5b33d7c30034067$export$b0e479f45b7006d6.prototype.DefaultInterpolation = $d5b33d7c30034067$export$30fac1aace31cf4d;\n/**\n * A Track of Boolean keyframe values.\n */ class $d5b33d7c30034067$export$d3a344b98cf0b775 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.ValueTypeName = \"bool\";\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.ValueBufferType = Array;\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.DefaultInterpolation = $d5b33d7c30034067$export$995b32462a65e855;\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.InterpolantFactoryMethodLinear = undefined;\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.InterpolantFactoryMethodSmooth = undefined;\n/**\n * A Track of keyframe values that represent color.\n */ class $d5b33d7c30034067$export$83444c5d885347d8 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$83444c5d885347d8.prototype.ValueTypeName = \"color\";\n/**\n * A Track of numeric keyframe values.\n */ class $d5b33d7c30034067$export$d45f0d1a4d9a9314 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$d45f0d1a4d9a9314.prototype.ValueTypeName = \"number\";\n/**\n * Spherical linear unit quaternion interpolant.\n */ class $d5b33d7c30034067$export$2db1cfb7923d931e extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, alpha = (t - t0) / (t1 - t0);\n let offset = i1 * stride;\n for(let end = offset + stride; offset !== end; offset += 4)$d5b33d7c30034067$export$23d6a54f0bbc85a3.slerpFlat(result, 0, values, offset - stride, values, offset, alpha);\n return result;\n }\n}\n/**\n * A Track of quaternion keyframe values.\n */ class $d5b33d7c30034067$export$b8043f12b5aafbd7 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n InterpolantFactoryMethodLinear(result) {\n return new $d5b33d7c30034067$export$2db1cfb7923d931e(this.times, this.values, this.getValueSize(), result);\n }\n}\n$d5b33d7c30034067$export$b8043f12b5aafbd7.prototype.ValueTypeName = \"quaternion\";\n// ValueBufferType is inherited\n$d5b33d7c30034067$export$b8043f12b5aafbd7.prototype.DefaultInterpolation = $d5b33d7c30034067$export$30fac1aace31cf4d;\n$d5b33d7c30034067$export$b8043f12b5aafbd7.prototype.InterpolantFactoryMethodSmooth = undefined;\n/**\n * A Track that interpolates Strings\n */ class $d5b33d7c30034067$export$6ce41d4f3a8df9cd extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.ValueTypeName = \"string\";\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.ValueBufferType = Array;\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.DefaultInterpolation = $d5b33d7c30034067$export$995b32462a65e855;\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.InterpolantFactoryMethodLinear = undefined;\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.InterpolantFactoryMethodSmooth = undefined;\n/**\n * A Track of vectored keyframe values.\n */ class $d5b33d7c30034067$export$5ce2dcb4cc9f2bff extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$5ce2dcb4cc9f2bff.prototype.ValueTypeName = \"vector\";\nclass $d5b33d7c30034067$export$d942c706bf23829c {\n constructor(name, duration = -1, tracks, blendMode = $d5b33d7c30034067$export$bcfbbdcf8de7f8cd){\n this.name = name;\n this.tracks = tracks;\n this.duration = duration;\n this.blendMode = blendMode;\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n // this means it should figure out its duration by scanning the tracks\n if (this.duration < 0) this.resetDuration();\n }\n static parse(json) {\n const tracks = [], jsonTracks = json.tracks, frameTime = 1.0 / (json.fps || 1.0);\n for(let i = 0, n = jsonTracks.length; i !== n; ++i)tracks.push($d5b33d7c30034067$var$parseKeyframeTrack(jsonTracks[i]).scale(frameTime));\n const clip = new this(json.name, json.duration, tracks, json.blendMode);\n clip.uuid = json.uuid;\n return clip;\n }\n static toJSON(clip) {\n const tracks = [], clipTracks = clip.tracks;\n const json = {\n \"name\": clip.name,\n \"duration\": clip.duration,\n \"tracks\": tracks,\n \"uuid\": clip.uuid,\n \"blendMode\": clip.blendMode\n };\n for(let i = 0, n = clipTracks.length; i !== n; ++i)tracks.push($d5b33d7c30034067$export$b0e479f45b7006d6.toJSON(clipTracks[i]));\n return json;\n }\n static CreateFromMorphTargetSequence(name, morphTargetSequence, fps, noLoop) {\n const numMorphTargets = morphTargetSequence.length;\n const tracks = [];\n for(let i = 0; i < numMorphTargets; i++){\n let times = [];\n let values = [];\n times.push((i + numMorphTargets - 1) % numMorphTargets, i, (i + 1) % numMorphTargets);\n values.push(0, 1, 0);\n const order = $d5b33d7c30034067$var$getKeyframeOrder(times);\n times = $d5b33d7c30034067$var$sortedArray(times, 1, order);\n values = $d5b33d7c30034067$var$sortedArray(values, 1, order);\n // if there is a key at the first frame, duplicate it as the\n // last frame as well for perfect loop.\n if (!noLoop && times[0] === 0) {\n times.push(numMorphTargets);\n values.push(values[0]);\n }\n tracks.push(new $d5b33d7c30034067$export$d45f0d1a4d9a9314(\".morphTargetInfluences[\" + morphTargetSequence[i].name + \"]\", times, values).scale(1.0 / fps));\n }\n return new this(name, -1, tracks);\n }\n static findByName(objectOrClipArray, name) {\n let clipArray = objectOrClipArray;\n if (!Array.isArray(objectOrClipArray)) {\n const o = objectOrClipArray;\n clipArray = o.geometry && o.geometry.animations || o.animations;\n }\n for(let i = 0; i < clipArray.length; i++){\n if (clipArray[i].name === name) return clipArray[i];\n }\n return null;\n }\n static CreateClipsFromMorphTargetSequences(morphTargets, fps, noLoop) {\n const animationToMorphTargets = {};\n // tested with https://regex101.com/ on trick sequences\n // such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n const pattern = /^([\\w-]*?)([\\d]+)$/;\n // sort morph target names into animation groups based\n // patterns like Walk_001, Walk_002, Run_001, Run_002\n for(let i = 0, il = morphTargets.length; i < il; i++){\n const morphTarget = morphTargets[i];\n const parts = morphTarget.name.match(pattern);\n if (parts && parts.length > 1) {\n const name = parts[1];\n let animationMorphTargets = animationToMorphTargets[name];\n if (!animationMorphTargets) animationToMorphTargets[name] = animationMorphTargets = [];\n animationMorphTargets.push(morphTarget);\n }\n }\n const clips = [];\n for(const name in animationToMorphTargets)clips.push(this.CreateFromMorphTargetSequence(name, animationToMorphTargets[name], fps, noLoop));\n return clips;\n }\n // parse the animation.hierarchy format\n static parseAnimation(animation, bones) {\n if (!animation) {\n console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\");\n return null;\n }\n const addNonemptyTrack = function(trackType, trackName, animationKeys, propertyName, destTracks) {\n // only return track if there are actually keys.\n if (animationKeys.length !== 0) {\n const times = [];\n const values = [];\n $d5b33d7c30034067$var$flattenJSON(animationKeys, times, values, propertyName);\n // empty keys are filtered out, so check again\n if (times.length !== 0) destTracks.push(new trackType(trackName, times, values));\n }\n };\n const tracks = [];\n const clipName = animation.name || \"default\";\n const fps = animation.fps || 30;\n const blendMode = animation.blendMode;\n // automatic length determination in AnimationClip.\n let duration = animation.length || -1;\n const hierarchyTracks = animation.hierarchy || [];\n for(let h = 0; h < hierarchyTracks.length; h++){\n const animationKeys = hierarchyTracks[h].keys;\n // skip empty tracks\n if (!animationKeys || animationKeys.length === 0) continue;\n // process morph targets\n if (animationKeys[0].morphTargets) {\n // figure out all morph targets used in this track\n const morphTargetNames = {};\n let k;\n for(k = 0; k < animationKeys.length; k++){\n if (animationKeys[k].morphTargets) for(let m = 0; m < animationKeys[k].morphTargets.length; m++)morphTargetNames[animationKeys[k].morphTargets[m]] = -1;\n }\n // create a track for each morph target with all zero\n // morphTargetInfluences except for the keys in which\n // the morphTarget is named.\n for(const morphTargetName in morphTargetNames){\n const times = [];\n const values = [];\n for(let m = 0; m !== animationKeys[k].morphTargets.length; ++m){\n const animationKey = animationKeys[k];\n times.push(animationKey.time);\n values.push(animationKey.morphTarget === morphTargetName ? 1 : 0);\n }\n tracks.push(new $d5b33d7c30034067$export$d45f0d1a4d9a9314(\".morphTargetInfluence[\" + morphTargetName + \"]\", times, values));\n }\n duration = morphTargetNames.length * fps;\n } else {\n // ...assume skeletal animation\n const boneName = \".bones[\" + bones[h].name + \"]\";\n addNonemptyTrack($d5b33d7c30034067$export$5ce2dcb4cc9f2bff, boneName + \".position\", animationKeys, \"pos\", tracks);\n addNonemptyTrack($d5b33d7c30034067$export$b8043f12b5aafbd7, boneName + \".quaternion\", animationKeys, \"rot\", tracks);\n addNonemptyTrack($d5b33d7c30034067$export$5ce2dcb4cc9f2bff, boneName + \".scale\", animationKeys, \"scl\", tracks);\n }\n }\n if (tracks.length === 0) return null;\n const clip = new this(clipName, duration, tracks, blendMode);\n return clip;\n }\n resetDuration() {\n const tracks = this.tracks;\n let duration = 0;\n for(let i = 0, n = tracks.length; i !== n; ++i){\n const track = this.tracks[i];\n duration = Math.max(duration, track.times[track.times.length - 1]);\n }\n this.duration = duration;\n return this;\n }\n trim() {\n for(let i = 0; i < this.tracks.length; i++)this.tracks[i].trim(0, this.duration);\n return this;\n }\n validate() {\n let valid = true;\n for(let i = 0; i < this.tracks.length; i++)valid = valid && this.tracks[i].validate();\n return valid;\n }\n optimize() {\n for(let i = 0; i < this.tracks.length; i++)this.tracks[i].optimize();\n return this;\n }\n clone() {\n const tracks = [];\n for(let i = 0; i < this.tracks.length; i++)tracks.push(this.tracks[i].clone());\n return new this.constructor(this.name, this.duration, tracks, this.blendMode);\n }\n toJSON() {\n return this.constructor.toJSON(this);\n }\n}\nfunction $d5b33d7c30034067$var$getTrackTypeForValueTypeName(typeName) {\n switch(typeName.toLowerCase()){\n case \"scalar\":\n case \"double\":\n case \"float\":\n case \"number\":\n case \"integer\":\n return $d5b33d7c30034067$export$d45f0d1a4d9a9314;\n case \"vector\":\n case \"vector2\":\n case \"vector3\":\n case \"vector4\":\n return $d5b33d7c30034067$export$5ce2dcb4cc9f2bff;\n case \"color\":\n return $d5b33d7c30034067$export$83444c5d885347d8;\n case \"quaternion\":\n return $d5b33d7c30034067$export$b8043f12b5aafbd7;\n case \"bool\":\n case \"boolean\":\n return $d5b33d7c30034067$export$d3a344b98cf0b775;\n case \"string\":\n return $d5b33d7c30034067$export$6ce41d4f3a8df9cd;\n }\n throw new Error(\"THREE.KeyframeTrack: Unsupported typeName: \" + typeName);\n}\nfunction $d5b33d7c30034067$var$parseKeyframeTrack(json) {\n if (json.type === undefined) throw new Error(\"THREE.KeyframeTrack: track type undefined, can not parse\");\n const trackType = $d5b33d7c30034067$var$getTrackTypeForValueTypeName(json.type);\n if (json.times === undefined) {\n const times = [], values = [];\n $d5b33d7c30034067$var$flattenJSON(json.keys, times, values, \"value\");\n json.times = times;\n json.values = values;\n }\n // derived classes can define a static parse method\n if (trackType.parse !== undefined) return trackType.parse(json);\n else // by default, we assume a constructor compatible with the base\n return new trackType(json.name, json.times, json.values, json.interpolation);\n}\nconst $d5b33d7c30034067$export$94affb487e701bf2 = {\n enabled: false,\n files: {},\n add: function(key, file) {\n if (this.enabled === false) return;\n // console.log( 'THREE.Cache', 'Adding key:', key );\n this.files[key] = file;\n },\n get: function(key) {\n if (this.enabled === false) return;\n // console.log( 'THREE.Cache', 'Checking key:', key );\n return this.files[key];\n },\n remove: function(key) {\n delete this.files[key];\n },\n clear: function() {\n this.files = {};\n }\n};\nclass $d5b33d7c30034067$export$99cc795e99919eed {\n constructor(onLoad, onProgress, onError){\n const scope = this;\n let isLoading = false;\n let itemsLoaded = 0;\n let itemsTotal = 0;\n let urlModifier = undefined;\n const handlers = [];\n // Refer to #5689 for the reason why we don't set .onStart\n // in the constructor\n this.onStart = undefined;\n this.onLoad = onLoad;\n this.onProgress = onProgress;\n this.onError = onError;\n this.itemStart = function(url) {\n itemsTotal++;\n if (isLoading === false) {\n if (scope.onStart !== undefined) scope.onStart(url, itemsLoaded, itemsTotal);\n }\n isLoading = true;\n };\n this.itemEnd = function(url) {\n itemsLoaded++;\n if (scope.onProgress !== undefined) scope.onProgress(url, itemsLoaded, itemsTotal);\n if (itemsLoaded === itemsTotal) {\n isLoading = false;\n if (scope.onLoad !== undefined) scope.onLoad();\n }\n };\n this.itemError = function(url) {\n if (scope.onError !== undefined) scope.onError(url);\n };\n this.resolveURL = function(url) {\n if (urlModifier) return urlModifier(url);\n return url;\n };\n this.setURLModifier = function(transform) {\n urlModifier = transform;\n return this;\n };\n this.addHandler = function(regex, loader) {\n handlers.push(regex, loader);\n return this;\n };\n this.removeHandler = function(regex) {\n const index = handlers.indexOf(regex);\n if (index !== -1) handlers.splice(index, 2);\n return this;\n };\n this.getHandler = function(file) {\n for(let i = 0, l = handlers.length; i < l; i += 2){\n const regex = handlers[i];\n const loader = handlers[i + 1];\n if (regex.global) regex.lastIndex = 0; // see #17920\n if (regex.test(file)) return loader;\n }\n return null;\n };\n }\n}\nconst $d5b33d7c30034067$export$b033c3f9a95c6a16 = /*@__PURE__*/ new $d5b33d7c30034067$export$99cc795e99919eed();\nclass $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n this.manager = manager !== undefined ? manager : $d5b33d7c30034067$export$b033c3f9a95c6a16;\n this.crossOrigin = \"anonymous\";\n this.withCredentials = false;\n this.path = \"\";\n this.resourcePath = \"\";\n this.requestHeader = {};\n }\n load() {}\n loadAsync(url, onProgress) {\n const scope = this;\n return new Promise(function(resolve, reject) {\n scope.load(url, resolve, onProgress, reject);\n });\n }\n parse() {}\n setCrossOrigin(crossOrigin) {\n this.crossOrigin = crossOrigin;\n return this;\n }\n setWithCredentials(value) {\n this.withCredentials = value;\n return this;\n }\n setPath(path) {\n this.path = path;\n return this;\n }\n setResourcePath(resourcePath) {\n this.resourcePath = resourcePath;\n return this;\n }\n setRequestHeader(requestHeader) {\n this.requestHeader = requestHeader;\n return this;\n }\n}\n$d5b33d7c30034067$export$3b0d6d7590275603.DEFAULT_MATERIAL_NAME = \"__DEFAULT\";\nconst $d5b33d7c30034067$var$loading = {};\nclass $d5b33d7c30034067$var$HttpError extends Error {\n constructor(message, response){\n super(message);\n this.response = response;\n }\n}\nclass $d5b33d7c30034067$export$98435a25b5cf7b2b extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n if (url === undefined) url = \"\";\n if (this.path !== undefined) url = this.path + url;\n url = this.manager.resolveURL(url);\n const cached = $d5b33d7c30034067$export$94affb487e701bf2.get(url);\n if (cached !== undefined) {\n this.manager.itemStart(url);\n setTimeout(()=>{\n if (onLoad) onLoad(cached);\n this.manager.itemEnd(url);\n }, 0);\n return cached;\n }\n // Check if request is duplicate\n if ($d5b33d7c30034067$var$loading[url] !== undefined) {\n $d5b33d7c30034067$var$loading[url].push({\n onLoad: onLoad,\n onProgress: onProgress,\n onError: onError\n });\n return;\n }\n // Initialise array for duplicate requests\n $d5b33d7c30034067$var$loading[url] = [];\n $d5b33d7c30034067$var$loading[url].push({\n onLoad: onLoad,\n onProgress: onProgress,\n onError: onError\n });\n // create request\n const req = new Request(url, {\n headers: new Headers(this.requestHeader),\n credentials: this.withCredentials ? \"include\" : \"same-origin\"\n });\n // record states ( avoid data race )\n const mimeType = this.mimeType;\n const responseType = this.responseType;\n // start the fetch\n fetch(req).then((response)=>{\n if (response.status === 200 || response.status === 0) {\n // Some browsers return HTTP Status 0 when using non-http protocol\n // e.g. 'file://' or 'data://'. Handle as success.\n if (response.status === 0) console.warn(\"THREE.FileLoader: HTTP Status 0 received.\");\n // Workaround: Checking if response.body === undefined for Alipay browser #23548\n if (typeof ReadableStream === \"undefined\" || response.body === undefined || response.body.getReader === undefined) return response;\n const callbacks = $d5b33d7c30034067$var$loading[url];\n const reader = response.body.getReader();\n // Nginx needs X-File-Size check\n // https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content\n const contentLength = response.headers.get(\"Content-Length\") || response.headers.get(\"X-File-Size\");\n const total = contentLength ? parseInt(contentLength) : 0;\n const lengthComputable = total !== 0;\n let loaded = 0;\n // periodically read data into the new stream tracking while download progress\n const stream = new ReadableStream({\n start (controller) {\n readData();\n function readData() {\n reader.read().then(({ done: done, value: value })=>{\n if (done) controller.close();\n else {\n loaded += value.byteLength;\n const event = new ProgressEvent(\"progress\", {\n lengthComputable: lengthComputable,\n loaded: loaded,\n total: total\n });\n for(let i = 0, il = callbacks.length; i < il; i++){\n const callback = callbacks[i];\n if (callback.onProgress) callback.onProgress(event);\n }\n controller.enqueue(value);\n readData();\n }\n });\n }\n }\n });\n return new Response(stream);\n } else throw new $d5b33d7c30034067$var$HttpError(`fetch for \"${response.url}\" responded with ${response.status}: ${response.statusText}`, response);\n }).then((response)=>{\n switch(responseType){\n case \"arraybuffer\":\n return response.arrayBuffer();\n case \"blob\":\n return response.blob();\n case \"document\":\n return response.text().then((text)=>{\n const parser = new DOMParser();\n return parser.parseFromString(text, mimeType);\n });\n case \"json\":\n return response.json();\n default:\n if (mimeType === undefined) return response.text();\n else {\n // sniff encoding\n const re = /charset=\"?([^;\"\\s]*)\"?/i;\n const exec = re.exec(mimeType);\n const label = exec && exec[1] ? exec[1].toLowerCase() : undefined;\n const decoder = new TextDecoder(label);\n return response.arrayBuffer().then((ab)=>decoder.decode(ab));\n }\n }\n }).then((data)=>{\n // Add to cache only on HTTP success, so that we do not cache\n // error response bodies as proper responses to requests.\n $d5b33d7c30034067$export$94affb487e701bf2.add(url, data);\n const callbacks = $d5b33d7c30034067$var$loading[url];\n delete $d5b33d7c30034067$var$loading[url];\n for(let i = 0, il = callbacks.length; i < il; i++){\n const callback = callbacks[i];\n if (callback.onLoad) callback.onLoad(data);\n }\n }).catch((err)=>{\n // Abort errors and other errors are handled the same\n const callbacks = $d5b33d7c30034067$var$loading[url];\n if (callbacks === undefined) {\n // When onLoad was called and url was deleted in `loading`\n this.manager.itemError(url);\n throw err;\n }\n delete $d5b33d7c30034067$var$loading[url];\n for(let i = 0, il = callbacks.length; i < il; i++){\n const callback = callbacks[i];\n if (callback.onError) callback.onError(err);\n }\n this.manager.itemError(url);\n }).finally(()=>{\n this.manager.itemEnd(url);\n });\n this.manager.itemStart(url);\n }\n setResponseType(value) {\n this.responseType = value;\n return this;\n }\n setMimeType(value) {\n this.mimeType = value;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$29711c7e14f61db extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(text) {\n try {\n onLoad(scope.parse(JSON.parse(text)));\n } catch (e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }, onProgress, onError);\n }\n parse(json) {\n const animations = [];\n for(let i = 0; i < json.length; i++){\n const clip = $d5b33d7c30034067$export$d942c706bf23829c.parse(json[i]);\n animations.push(clip);\n }\n return animations;\n }\n}\n/**\n * Abstract Base class to block based textures loader (dds, pvr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */ class $d5b33d7c30034067$export$bd73ce947a280350 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const images = [];\n const texture = new $d5b33d7c30034067$export$3466bac9141a5cc4();\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setResponseType(\"arraybuffer\");\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(scope.withCredentials);\n let loaded = 0;\n function loadTexture(i) {\n loader.load(url[i], function(buffer) {\n const texDatas = scope.parse(buffer, true);\n images[i] = {\n width: texDatas.width,\n height: texDatas.height,\n format: texDatas.format,\n mipmaps: texDatas.mipmaps\n };\n loaded += 1;\n if (loaded === 6) {\n if (texDatas.mipmapCount === 1) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.image = images;\n texture.format = texDatas.format;\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture);\n }\n }, onProgress, onError);\n }\n if (Array.isArray(url)) for(let i = 0, il = url.length; i < il; ++i)loadTexture(i);\n else // compressed cubemap texture stored in a single DDS file\n loader.load(url, function(buffer) {\n const texDatas = scope.parse(buffer, true);\n if (texDatas.isCubemap) {\n const faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n for(let f = 0; f < faces; f++){\n images[f] = {\n mipmaps: []\n };\n for(let i = 0; i < texDatas.mipmapCount; i++){\n images[f].mipmaps.push(texDatas.mipmaps[f * texDatas.mipmapCount + i]);\n images[f].format = texDatas.format;\n images[f].width = texDatas.width;\n images[f].height = texDatas.height;\n }\n }\n texture.image = images;\n } else {\n texture.image.width = texDatas.width;\n texture.image.height = texDatas.height;\n texture.mipmaps = texDatas.mipmaps;\n }\n if (texDatas.mipmapCount === 1) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.format = texDatas.format;\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture);\n }, onProgress, onError);\n return texture;\n }\n}\nclass $d5b33d7c30034067$export$8905ce1c7a2464a1 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n if (this.path !== undefined) url = this.path + url;\n url = this.manager.resolveURL(url);\n const scope = this;\n const cached = $d5b33d7c30034067$export$94affb487e701bf2.get(url);\n if (cached !== undefined) {\n scope.manager.itemStart(url);\n setTimeout(function() {\n if (onLoad) onLoad(cached);\n scope.manager.itemEnd(url);\n }, 0);\n return cached;\n }\n const image = $d5b33d7c30034067$var$createElementNS(\"img\");\n function onImageLoad() {\n removeEventListeners();\n $d5b33d7c30034067$export$94affb487e701bf2.add(url, this);\n if (onLoad) onLoad(this);\n scope.manager.itemEnd(url);\n }\n function onImageError(event) {\n removeEventListeners();\n if (onError) onError(event);\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n }\n function removeEventListeners() {\n image.removeEventListener(\"load\", onImageLoad, false);\n image.removeEventListener(\"error\", onImageError, false);\n }\n image.addEventListener(\"load\", onImageLoad, false);\n image.addEventListener(\"error\", onImageError, false);\n if (url.slice(0, 5) !== \"data:\") {\n if (this.crossOrigin !== undefined) image.crossOrigin = this.crossOrigin;\n }\n scope.manager.itemStart(url);\n image.src = url;\n return image;\n }\n}\nclass $d5b33d7c30034067$export$2ec114afc2cf6308 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(urls, onLoad, onProgress, onError) {\n const texture = new $d5b33d7c30034067$export$ee2e5a18258a4049();\n texture.colorSpace = $d5b33d7c30034067$export$561f394b24edfcaa;\n const loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(this.manager);\n loader.setCrossOrigin(this.crossOrigin);\n loader.setPath(this.path);\n let loaded = 0;\n function loadTexture(i) {\n loader.load(urls[i], function(image) {\n texture.images[i] = image;\n loaded++;\n if (loaded === 6) {\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture);\n }\n }, undefined, onError);\n }\n for(let i = 0; i < urls.length; ++i)loadTexture(i);\n return texture;\n }\n}\n/**\n * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */ class $d5b33d7c30034067$export$792d8a18f2c55855 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const texture = new $d5b33d7c30034067$export$b691f601014eabe1();\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setResponseType(\"arraybuffer\");\n loader.setRequestHeader(this.requestHeader);\n loader.setPath(this.path);\n loader.setWithCredentials(scope.withCredentials);\n loader.load(url, function(buffer) {\n let texData;\n try {\n texData = scope.parse(buffer);\n } catch (error) {\n if (onError !== undefined) onError(error);\n else {\n console.error(error);\n return;\n }\n }\n if (!texData) return onError(); // TODO: Remove this when all loaders properly throw errors\n if (texData.image !== undefined) texture.image = texData.image;\n else if (texData.data !== undefined) {\n texture.image.width = texData.width;\n texture.image.height = texData.height;\n texture.image.data = texData.data;\n }\n texture.wrapS = texData.wrapS !== undefined ? texData.wrapS : $d5b33d7c30034067$export$9d9334239a5a5e06;\n texture.wrapT = texData.wrapT !== undefined ? texData.wrapT : $d5b33d7c30034067$export$9d9334239a5a5e06;\n texture.magFilter = texData.magFilter !== undefined ? texData.magFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.minFilter = texData.minFilter !== undefined ? texData.minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n if (texData.colorSpace !== undefined) texture.colorSpace = texData.colorSpace;\n else if (texData.encoding !== undefined) texture.encoding = texData.encoding;\n if (texData.flipY !== undefined) texture.flipY = texData.flipY;\n if (texData.format !== undefined) texture.format = texData.format;\n if (texData.type !== undefined) texture.type = texData.type;\n if (texData.mipmaps !== undefined) {\n texture.mipmaps = texData.mipmaps;\n texture.minFilter = $d5b33d7c30034067$export$5d8599b6a933fb1b; // presumably...\n }\n if (texData.mipmapCount === 1) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n if (texData.generateMipmaps !== undefined) texture.generateMipmaps = texData.generateMipmaps;\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture, texData);\n }, onProgress, onError);\n return texture;\n }\n}\nclass $d5b33d7c30034067$export$fd1bfc71f64c538c extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const texture = new $d5b33d7c30034067$export$5431306cf43de24a();\n const loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(this.manager);\n loader.setCrossOrigin(this.crossOrigin);\n loader.setPath(this.path);\n loader.load(url, function(image) {\n texture.image = image;\n texture.needsUpdate = true;\n if (onLoad !== undefined) onLoad(texture);\n }, onProgress, onError);\n return texture;\n }\n}\nclass $d5b33d7c30034067$export$6ecadb6ed240d696 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(color, intensity = 1){\n super();\n this.isLight = true;\n this.type = \"Light\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(color);\n this.intensity = intensity;\n }\n dispose() {\n // Empty here in base class; some subclasses override.\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.color.copy(source.color);\n this.intensity = source.intensity;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.color = this.color.getHex();\n data.object.intensity = this.intensity;\n if (this.groundColor !== undefined) data.object.groundColor = this.groundColor.getHex();\n if (this.distance !== undefined) data.object.distance = this.distance;\n if (this.angle !== undefined) data.object.angle = this.angle;\n if (this.decay !== undefined) data.object.decay = this.decay;\n if (this.penumbra !== undefined) data.object.penumbra = this.penumbra;\n if (this.shadow !== undefined) data.object.shadow = this.shadow.toJSON();\n return data;\n }\n}\nclass $d5b33d7c30034067$export$8d474f55edbb9624 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(skyColor, groundColor, intensity){\n super(skyColor, intensity);\n this.isHemisphereLight = true;\n this.type = \"HemisphereLight\";\n this.position.copy($d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP);\n this.updateMatrix();\n this.groundColor = new $d5b33d7c30034067$export$892596cec99bc70e(groundColor);\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.groundColor.copy(source.groundColor);\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_projScreenMatrix$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_lightPositionWorld$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_lookTarget$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$var$LightShadow {\n constructor(camera){\n this.camera = camera;\n this.bias = 0;\n this.normalBias = 0;\n this.radius = 1;\n this.blurSamples = 8;\n this.mapSize = new $d5b33d7c30034067$export$c977b3e384af9ae1(512, 512);\n this.map = null;\n this.mapPass = null;\n this.matrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.autoUpdate = true;\n this.needsUpdate = false;\n this._frustum = new $d5b33d7c30034067$export$35efe6f4c85463d2();\n this._frameExtents = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this._viewportCount = 1;\n this._viewports = [\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, 1, 1)\n ];\n }\n getViewportCount() {\n return this._viewportCount;\n }\n getFrustum() {\n return this._frustum;\n }\n updateMatrices(light) {\n const shadowCamera = this.camera;\n const shadowMatrix = this.matrix;\n $d5b33d7c30034067$var$_lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld);\n shadowCamera.position.copy($d5b33d7c30034067$var$_lightPositionWorld$1);\n $d5b33d7c30034067$var$_lookTarget$1.setFromMatrixPosition(light.target.matrixWorld);\n shadowCamera.lookAt($d5b33d7c30034067$var$_lookTarget$1);\n shadowCamera.updateMatrixWorld();\n $d5b33d7c30034067$var$_projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse);\n this._frustum.setFromProjectionMatrix($d5b33d7c30034067$var$_projScreenMatrix$1);\n shadowMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0);\n shadowMatrix.multiply($d5b33d7c30034067$var$_projScreenMatrix$1);\n }\n getViewport(viewportIndex) {\n return this._viewports[viewportIndex];\n }\n getFrameExtents() {\n return this._frameExtents;\n }\n dispose() {\n if (this.map) this.map.dispose();\n if (this.mapPass) this.mapPass.dispose();\n }\n copy(source) {\n this.camera = source.camera.clone();\n this.bias = source.bias;\n this.radius = source.radius;\n this.mapSize.copy(source.mapSize);\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n toJSON() {\n const object = {};\n if (this.bias !== 0) object.bias = this.bias;\n if (this.normalBias !== 0) object.normalBias = this.normalBias;\n if (this.radius !== 1) object.radius = this.radius;\n if (this.mapSize.x !== 512 || this.mapSize.y !== 512) object.mapSize = this.mapSize.toArray();\n object.camera = this.camera.toJSON(false).object;\n delete object.camera.matrix;\n return object;\n }\n}\nclass $d5b33d7c30034067$var$SpotLightShadow extends $d5b33d7c30034067$var$LightShadow {\n constructor(){\n super(new $d5b33d7c30034067$export$74e4ae24825f68d7(50, 1, 0.5, 500));\n this.isSpotLightShadow = true;\n this.focus = 1;\n }\n updateMatrices(light) {\n const camera = this.camera;\n const fov = $d5b33d7c30034067$var$RAD2DEG * 2 * light.angle * this.focus;\n const aspect = this.mapSize.width / this.mapSize.height;\n const far = light.distance || camera.far;\n if (fov !== camera.fov || aspect !== camera.aspect || far !== camera.far) {\n camera.fov = fov;\n camera.aspect = aspect;\n camera.far = far;\n camera.updateProjectionMatrix();\n }\n super.updateMatrices(light);\n }\n copy(source) {\n super.copy(source);\n this.focus = source.focus;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$81495cbb73897362 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2){\n super(color, intensity);\n this.isSpotLight = true;\n this.type = \"SpotLight\";\n this.position.copy($d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP);\n this.updateMatrix();\n this.target = new $d5b33d7c30034067$export$e4dd07dff30cc924();\n this.distance = distance;\n this.angle = angle;\n this.penumbra = penumbra;\n this.decay = decay;\n this.map = null;\n this.shadow = new $d5b33d7c30034067$var$SpotLightShadow();\n }\n get power() {\n // compute the light's luminous power (in lumens) from its intensity (in candela)\n // by convention for a spotlight, luminous power (lm) = π * luminous intensity (cd)\n return this.intensity * Math.PI;\n }\n set power(power) {\n // set the light's intensity (in candela) from the desired luminous power (in lumens)\n this.intensity = power / Math.PI;\n }\n dispose() {\n this.shadow.dispose();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.distance = source.distance;\n this.angle = source.angle;\n this.penumbra = source.penumbra;\n this.decay = source.decay;\n this.target = source.target.clone();\n this.shadow = source.shadow.clone();\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_projScreenMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_lightPositionWorld = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_lookTarget = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$var$PointLightShadow extends $d5b33d7c30034067$var$LightShadow {\n constructor(){\n super(new $d5b33d7c30034067$export$74e4ae24825f68d7(90, 1, 0.5, 500));\n this.isPointLightShadow = true;\n this._frameExtents = new $d5b33d7c30034067$export$c977b3e384af9ae1(4, 2);\n this._viewportCount = 6;\n this._viewports = [\n // These viewports map a cube-map onto a 2D texture with the\n // following orientation:\n //\n // xzXZ\n // y Y\n //\n // X - Positive x direction\n // x - Negative x direction\n // Y - Positive y direction\n // y - Negative y direction\n // Z - Positive z direction\n // z - Negative z direction\n // positive X\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(2, 1, 1, 1),\n // negative X\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 1, 1, 1),\n // positive Z\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(3, 1, 1, 1),\n // negative Z\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(1, 1, 1, 1),\n // positive Y\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(3, 0, 1, 1),\n // negative Y\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(1, 0, 1, 1)\n ];\n this._cubeDirections = [\n new $d5b33d7c30034067$export$64b5c384219d3699(1, 0, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(-1, 0, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, -1),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, -1, 0)\n ];\n this._cubeUps = [\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, -1)\n ];\n }\n updateMatrices(light, viewportIndex = 0) {\n const camera = this.camera;\n const shadowMatrix = this.matrix;\n const far = light.distance || camera.far;\n if (far !== camera.far) {\n camera.far = far;\n camera.updateProjectionMatrix();\n }\n $d5b33d7c30034067$var$_lightPositionWorld.setFromMatrixPosition(light.matrixWorld);\n camera.position.copy($d5b33d7c30034067$var$_lightPositionWorld);\n $d5b33d7c30034067$var$_lookTarget.copy(camera.position);\n $d5b33d7c30034067$var$_lookTarget.add(this._cubeDirections[viewportIndex]);\n camera.up.copy(this._cubeUps[viewportIndex]);\n camera.lookAt($d5b33d7c30034067$var$_lookTarget);\n camera.updateMatrixWorld();\n shadowMatrix.makeTranslation(-$d5b33d7c30034067$var$_lightPositionWorld.x, -$d5b33d7c30034067$var$_lightPositionWorld.y, -$d5b33d7c30034067$var$_lightPositionWorld.z);\n $d5b33d7c30034067$var$_projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n this._frustum.setFromProjectionMatrix($d5b33d7c30034067$var$_projScreenMatrix);\n }\n}\nclass $d5b33d7c30034067$export$4c9c1cb3f0b6f455 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity, distance = 0, decay = 2){\n super(color, intensity);\n this.isPointLight = true;\n this.type = \"PointLight\";\n this.distance = distance;\n this.decay = decay;\n this.shadow = new $d5b33d7c30034067$var$PointLightShadow();\n }\n get power() {\n // compute the light's luminous power (in lumens) from its intensity (in candela)\n // for an isotropic light source, luminous power (lm) = 4 π luminous intensity (cd)\n return this.intensity * 4 * Math.PI;\n }\n set power(power) {\n // set the light's intensity (in candela) from the desired luminous power (in lumens)\n this.intensity = power / (4 * Math.PI);\n }\n dispose() {\n this.shadow.dispose();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.distance = source.distance;\n this.decay = source.decay;\n this.shadow = source.shadow.clone();\n return this;\n }\n}\nclass $d5b33d7c30034067$var$DirectionalLightShadow extends $d5b33d7c30034067$var$LightShadow {\n constructor(){\n super(new $d5b33d7c30034067$export$9ebf355ee4ed261b(-5, 5, 5, -5, 0.5, 500));\n this.isDirectionalLightShadow = true;\n }\n}\nclass $d5b33d7c30034067$export$3fea33cc9972c868 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity){\n super(color, intensity);\n this.isDirectionalLight = true;\n this.type = \"DirectionalLight\";\n this.position.copy($d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP);\n this.updateMatrix();\n this.target = new $d5b33d7c30034067$export$e4dd07dff30cc924();\n this.shadow = new $d5b33d7c30034067$var$DirectionalLightShadow();\n }\n dispose() {\n this.shadow.dispose();\n }\n copy(source) {\n super.copy(source);\n this.target = source.target.clone();\n this.shadow = source.shadow.clone();\n return this;\n }\n}\nclass $d5b33d7c30034067$export$af279bfef9ec2c96 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity){\n super(color, intensity);\n this.isAmbientLight = true;\n this.type = \"AmbientLight\";\n }\n}\nclass $d5b33d7c30034067$export$61db2d908bbd2429 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity, width = 10, height = 10){\n super(color, intensity);\n this.isRectAreaLight = true;\n this.type = \"RectAreaLight\";\n this.width = width;\n this.height = height;\n }\n get power() {\n // compute the light's luminous power (in lumens) from its intensity (in nits)\n return this.intensity * this.width * this.height * Math.PI;\n }\n set power(power) {\n // set the light's intensity (in nits) from the desired luminous power (in lumens)\n this.intensity = power / (this.width * this.height * Math.PI);\n }\n copy(source) {\n super.copy(source);\n this.width = source.width;\n this.height = source.height;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.width = this.width;\n data.object.height = this.height;\n return data;\n }\n}\n/**\n * Primary reference:\n * https://graphics.stanford.edu/papers/envmap/envmap.pdf\n *\n * Secondary reference:\n * https://www.ppsloan.org/publications/StupidSH36.pdf\n */ // 3-band SH defined by 9 coefficients\nclass $d5b33d7c30034067$export$ba61ce607e1f405a {\n constructor(){\n this.isSphericalHarmonics3 = true;\n this.coefficients = [];\n for(let i = 0; i < 9; i++)this.coefficients.push(new $d5b33d7c30034067$export$64b5c384219d3699());\n }\n set(coefficients) {\n for(let i = 0; i < 9; i++)this.coefficients[i].copy(coefficients[i]);\n return this;\n }\n zero() {\n for(let i = 0; i < 9; i++)this.coefficients[i].set(0, 0, 0);\n return this;\n }\n // get the radiance in the direction of the normal\n // target is a Vector3\n getAt(normal, target) {\n // normal is assumed to be unit length\n const x = normal.x, y = normal.y, z = normal.z;\n const coeff = this.coefficients;\n // band 0\n target.copy(coeff[0]).multiplyScalar(0.282095);\n // band 1\n target.addScaledVector(coeff[1], 0.488603 * y);\n target.addScaledVector(coeff[2], 0.488603 * z);\n target.addScaledVector(coeff[3], 0.488603 * x);\n // band 2\n target.addScaledVector(coeff[4], 1.092548 * (x * y));\n target.addScaledVector(coeff[5], 1.092548 * (y * z));\n target.addScaledVector(coeff[6], 0.315392 * (3.0 * z * z - 1.0));\n target.addScaledVector(coeff[7], 1.092548 * (x * z));\n target.addScaledVector(coeff[8], 0.546274 * (x * x - y * y));\n return target;\n }\n // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n // target is a Vector3\n // https://graphics.stanford.edu/papers/envmap/envmap.pdf\n getIrradianceAt(normal, target) {\n // normal is assumed to be unit length\n const x = normal.x, y = normal.y, z = normal.z;\n const coeff = this.coefficients;\n // band 0\n target.copy(coeff[0]).multiplyScalar(0.886227); // π * 0.282095\n // band 1\n target.addScaledVector(coeff[1], 1.023328 * y); // ( 2 * π / 3 ) * 0.488603\n target.addScaledVector(coeff[2], 1.023328 * z);\n target.addScaledVector(coeff[3], 1.023328 * x);\n // band 2\n target.addScaledVector(coeff[4], 0.858086 * x * y); // ( π / 4 ) * 1.092548\n target.addScaledVector(coeff[5], 0.858086 * y * z);\n target.addScaledVector(coeff[6], 0.743125 * z * z - 0.247708); // ( π / 4 ) * 0.315392 * 3\n target.addScaledVector(coeff[7], 0.858086 * x * z);\n target.addScaledVector(coeff[8], 0.429043 * (x * x - y * y)); // ( π / 4 ) * 0.546274\n return target;\n }\n add(sh) {\n for(let i = 0; i < 9; i++)this.coefficients[i].add(sh.coefficients[i]);\n return this;\n }\n addScaledSH(sh, s) {\n for(let i = 0; i < 9; i++)this.coefficients[i].addScaledVector(sh.coefficients[i], s);\n return this;\n }\n scale(s) {\n for(let i = 0; i < 9; i++)this.coefficients[i].multiplyScalar(s);\n return this;\n }\n lerp(sh, alpha) {\n for(let i = 0; i < 9; i++)this.coefficients[i].lerp(sh.coefficients[i], alpha);\n return this;\n }\n equals(sh) {\n for(let i = 0; i < 9; i++){\n if (!this.coefficients[i].equals(sh.coefficients[i])) return false;\n }\n return true;\n }\n copy(sh) {\n return this.set(sh.coefficients);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n fromArray(array, offset = 0) {\n const coefficients = this.coefficients;\n for(let i = 0; i < 9; i++)coefficients[i].fromArray(array, offset + i * 3);\n return this;\n }\n toArray(array = [], offset = 0) {\n const coefficients = this.coefficients;\n for(let i = 0; i < 9; i++)coefficients[i].toArray(array, offset + i * 3);\n return array;\n }\n // evaluate the basis functions\n // shBasis is an Array[ 9 ]\n static getBasisAt(normal, shBasis) {\n // normal is assumed to be unit length\n const x = normal.x, y = normal.y, z = normal.z;\n // band 0\n shBasis[0] = 0.282095;\n // band 1\n shBasis[1] = 0.488603 * y;\n shBasis[2] = 0.488603 * z;\n shBasis[3] = 0.488603 * x;\n // band 2\n shBasis[4] = 1.092548 * x * y;\n shBasis[5] = 1.092548 * y * z;\n shBasis[6] = 0.315392 * (3 * z * z - 1);\n shBasis[7] = 1.092548 * x * z;\n shBasis[8] = 0.546274 * (x * x - y * y);\n }\n}\nclass $d5b33d7c30034067$export$e7ef036e309b38d2 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(sh = new $d5b33d7c30034067$export$ba61ce607e1f405a(), intensity = 1){\n super(undefined, intensity);\n this.isLightProbe = true;\n this.sh = sh;\n }\n copy(source) {\n super.copy(source);\n this.sh.copy(source.sh);\n return this;\n }\n fromJSON(json) {\n this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n this.sh.fromArray(json.sh);\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.sh = this.sh.toArray();\n return data;\n }\n}\nclass $d5b33d7c30034067$export$3bd6d323353dcf96 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n this.textures = {};\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(scope.manager);\n loader.setPath(scope.path);\n loader.setRequestHeader(scope.requestHeader);\n loader.setWithCredentials(scope.withCredentials);\n loader.load(url, function(text) {\n try {\n onLoad(scope.parse(JSON.parse(text)));\n } catch (e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }, onProgress, onError);\n }\n parse(json) {\n const textures = this.textures;\n function getTexture(name) {\n if (textures[name] === undefined) console.warn(\"THREE.MaterialLoader: Undefined texture\", name);\n return textures[name];\n }\n const material = $d5b33d7c30034067$export$3bd6d323353dcf96.createMaterialFromType(json.type);\n if (json.uuid !== undefined) material.uuid = json.uuid;\n if (json.name !== undefined) material.name = json.name;\n if (json.color !== undefined && material.color !== undefined) material.color.setHex(json.color);\n if (json.roughness !== undefined) material.roughness = json.roughness;\n if (json.metalness !== undefined) material.metalness = json.metalness;\n if (json.sheen !== undefined) material.sheen = json.sheen;\n if (json.sheenColor !== undefined) material.sheenColor = new $d5b33d7c30034067$export$892596cec99bc70e().setHex(json.sheenColor);\n if (json.sheenRoughness !== undefined) material.sheenRoughness = json.sheenRoughness;\n if (json.emissive !== undefined && material.emissive !== undefined) material.emissive.setHex(json.emissive);\n if (json.specular !== undefined && material.specular !== undefined) material.specular.setHex(json.specular);\n if (json.specularIntensity !== undefined) material.specularIntensity = json.specularIntensity;\n if (json.specularColor !== undefined && material.specularColor !== undefined) material.specularColor.setHex(json.specularColor);\n if (json.shininess !== undefined) material.shininess = json.shininess;\n if (json.clearcoat !== undefined) material.clearcoat = json.clearcoat;\n if (json.clearcoatRoughness !== undefined) material.clearcoatRoughness = json.clearcoatRoughness;\n if (json.iridescence !== undefined) material.iridescence = json.iridescence;\n if (json.iridescenceIOR !== undefined) material.iridescenceIOR = json.iridescenceIOR;\n if (json.iridescenceThicknessRange !== undefined) material.iridescenceThicknessRange = json.iridescenceThicknessRange;\n if (json.transmission !== undefined) material.transmission = json.transmission;\n if (json.thickness !== undefined) material.thickness = json.thickness;\n if (json.attenuationDistance !== undefined) material.attenuationDistance = json.attenuationDistance;\n if (json.attenuationColor !== undefined && material.attenuationColor !== undefined) material.attenuationColor.setHex(json.attenuationColor);\n if (json.anisotropy !== undefined) material.anisotropy = json.anisotropy;\n if (json.anisotropyRotation !== undefined) material.anisotropyRotation = json.anisotropyRotation;\n if (json.fog !== undefined) material.fog = json.fog;\n if (json.flatShading !== undefined) material.flatShading = json.flatShading;\n if (json.blending !== undefined) material.blending = json.blending;\n if (json.combine !== undefined) material.combine = json.combine;\n if (json.side !== undefined) material.side = json.side;\n if (json.shadowSide !== undefined) material.shadowSide = json.shadowSide;\n if (json.opacity !== undefined) material.opacity = json.opacity;\n if (json.transparent !== undefined) material.transparent = json.transparent;\n if (json.alphaTest !== undefined) material.alphaTest = json.alphaTest;\n if (json.alphaHash !== undefined) material.alphaHash = json.alphaHash;\n if (json.depthTest !== undefined) material.depthTest = json.depthTest;\n if (json.depthWrite !== undefined) material.depthWrite = json.depthWrite;\n if (json.colorWrite !== undefined) material.colorWrite = json.colorWrite;\n if (json.stencilWrite !== undefined) material.stencilWrite = json.stencilWrite;\n if (json.stencilWriteMask !== undefined) material.stencilWriteMask = json.stencilWriteMask;\n if (json.stencilFunc !== undefined) material.stencilFunc = json.stencilFunc;\n if (json.stencilRef !== undefined) material.stencilRef = json.stencilRef;\n if (json.stencilFuncMask !== undefined) material.stencilFuncMask = json.stencilFuncMask;\n if (json.stencilFail !== undefined) material.stencilFail = json.stencilFail;\n if (json.stencilZFail !== undefined) material.stencilZFail = json.stencilZFail;\n if (json.stencilZPass !== undefined) material.stencilZPass = json.stencilZPass;\n if (json.wireframe !== undefined) material.wireframe = json.wireframe;\n if (json.wireframeLinewidth !== undefined) material.wireframeLinewidth = json.wireframeLinewidth;\n if (json.wireframeLinecap !== undefined) material.wireframeLinecap = json.wireframeLinecap;\n if (json.wireframeLinejoin !== undefined) material.wireframeLinejoin = json.wireframeLinejoin;\n if (json.rotation !== undefined) material.rotation = json.rotation;\n if (json.linewidth !== 1) material.linewidth = json.linewidth;\n if (json.dashSize !== undefined) material.dashSize = json.dashSize;\n if (json.gapSize !== undefined) material.gapSize = json.gapSize;\n if (json.scale !== undefined) material.scale = json.scale;\n if (json.polygonOffset !== undefined) material.polygonOffset = json.polygonOffset;\n if (json.polygonOffsetFactor !== undefined) material.polygonOffsetFactor = json.polygonOffsetFactor;\n if (json.polygonOffsetUnits !== undefined) material.polygonOffsetUnits = json.polygonOffsetUnits;\n if (json.dithering !== undefined) material.dithering = json.dithering;\n if (json.alphaToCoverage !== undefined) material.alphaToCoverage = json.alphaToCoverage;\n if (json.premultipliedAlpha !== undefined) material.premultipliedAlpha = json.premultipliedAlpha;\n if (json.forceSinglePass !== undefined) material.forceSinglePass = json.forceSinglePass;\n if (json.visible !== undefined) material.visible = json.visible;\n if (json.toneMapped !== undefined) material.toneMapped = json.toneMapped;\n if (json.userData !== undefined) material.userData = json.userData;\n if (json.vertexColors !== undefined) {\n if (typeof json.vertexColors === \"number\") material.vertexColors = json.vertexColors > 0 ? true : false;\n else material.vertexColors = json.vertexColors;\n }\n // Shader Material\n if (json.uniforms !== undefined) for(const name in json.uniforms){\n const uniform = json.uniforms[name];\n material.uniforms[name] = {};\n switch(uniform.type){\n case \"t\":\n material.uniforms[name].value = getTexture(uniform.value);\n break;\n case \"c\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$892596cec99bc70e().setHex(uniform.value);\n break;\n case \"v2\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(uniform.value);\n break;\n case \"v3\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$64b5c384219d3699().fromArray(uniform.value);\n break;\n case \"v4\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$fa7daccca11cdbe3().fromArray(uniform.value);\n break;\n case \"m3\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$8ff26dafa08918().fromArray(uniform.value);\n break;\n case \"m4\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$2ae72fc923e5eb5().fromArray(uniform.value);\n break;\n default:\n material.uniforms[name].value = uniform.value;\n }\n }\n if (json.defines !== undefined) material.defines = json.defines;\n if (json.vertexShader !== undefined) material.vertexShader = json.vertexShader;\n if (json.fragmentShader !== undefined) material.fragmentShader = json.fragmentShader;\n if (json.glslVersion !== undefined) material.glslVersion = json.glslVersion;\n if (json.extensions !== undefined) for(const key in json.extensions)material.extensions[key] = json.extensions[key];\n if (json.lights !== undefined) material.lights = json.lights;\n if (json.clipping !== undefined) material.clipping = json.clipping;\n // for PointsMaterial\n if (json.size !== undefined) material.size = json.size;\n if (json.sizeAttenuation !== undefined) material.sizeAttenuation = json.sizeAttenuation;\n // maps\n if (json.map !== undefined) material.map = getTexture(json.map);\n if (json.matcap !== undefined) material.matcap = getTexture(json.matcap);\n if (json.alphaMap !== undefined) material.alphaMap = getTexture(json.alphaMap);\n if (json.bumpMap !== undefined) material.bumpMap = getTexture(json.bumpMap);\n if (json.bumpScale !== undefined) material.bumpScale = json.bumpScale;\n if (json.normalMap !== undefined) material.normalMap = getTexture(json.normalMap);\n if (json.normalMapType !== undefined) material.normalMapType = json.normalMapType;\n if (json.normalScale !== undefined) {\n let normalScale = json.normalScale;\n if (Array.isArray(normalScale) === false) // Blender exporter used to export a scalar. See #7459\n normalScale = [\n normalScale,\n normalScale\n ];\n material.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(normalScale);\n }\n if (json.displacementMap !== undefined) material.displacementMap = getTexture(json.displacementMap);\n if (json.displacementScale !== undefined) material.displacementScale = json.displacementScale;\n if (json.displacementBias !== undefined) material.displacementBias = json.displacementBias;\n if (json.roughnessMap !== undefined) material.roughnessMap = getTexture(json.roughnessMap);\n if (json.metalnessMap !== undefined) material.metalnessMap = getTexture(json.metalnessMap);\n if (json.emissiveMap !== undefined) material.emissiveMap = getTexture(json.emissiveMap);\n if (json.emissiveIntensity !== undefined) material.emissiveIntensity = json.emissiveIntensity;\n if (json.specularMap !== undefined) material.specularMap = getTexture(json.specularMap);\n if (json.specularIntensityMap !== undefined) material.specularIntensityMap = getTexture(json.specularIntensityMap);\n if (json.specularColorMap !== undefined) material.specularColorMap = getTexture(json.specularColorMap);\n if (json.envMap !== undefined) material.envMap = getTexture(json.envMap);\n if (json.envMapIntensity !== undefined) material.envMapIntensity = json.envMapIntensity;\n if (json.reflectivity !== undefined) material.reflectivity = json.reflectivity;\n if (json.refractionRatio !== undefined) material.refractionRatio = json.refractionRatio;\n if (json.lightMap !== undefined) material.lightMap = getTexture(json.lightMap);\n if (json.lightMapIntensity !== undefined) material.lightMapIntensity = json.lightMapIntensity;\n if (json.aoMap !== undefined) material.aoMap = getTexture(json.aoMap);\n if (json.aoMapIntensity !== undefined) material.aoMapIntensity = json.aoMapIntensity;\n if (json.gradientMap !== undefined) material.gradientMap = getTexture(json.gradientMap);\n if (json.clearcoatMap !== undefined) material.clearcoatMap = getTexture(json.clearcoatMap);\n if (json.clearcoatRoughnessMap !== undefined) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap);\n if (json.clearcoatNormalMap !== undefined) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap);\n if (json.clearcoatNormalScale !== undefined) material.clearcoatNormalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(json.clearcoatNormalScale);\n if (json.iridescenceMap !== undefined) material.iridescenceMap = getTexture(json.iridescenceMap);\n if (json.iridescenceThicknessMap !== undefined) material.iridescenceThicknessMap = getTexture(json.iridescenceThicknessMap);\n if (json.transmissionMap !== undefined) material.transmissionMap = getTexture(json.transmissionMap);\n if (json.thicknessMap !== undefined) material.thicknessMap = getTexture(json.thicknessMap);\n if (json.anisotropyMap !== undefined) material.anisotropyMap = getTexture(json.anisotropyMap);\n if (json.sheenColorMap !== undefined) material.sheenColorMap = getTexture(json.sheenColorMap);\n if (json.sheenRoughnessMap !== undefined) material.sheenRoughnessMap = getTexture(json.sheenRoughnessMap);\n return material;\n }\n setTextures(value) {\n this.textures = value;\n return this;\n }\n static createMaterialFromType(type) {\n const materialLib = {\n ShadowMaterial: $d5b33d7c30034067$export$e8564da406055a3,\n SpriteMaterial: $d5b33d7c30034067$export$5ec7dd1c6994bf8e,\n RawShaderMaterial: $d5b33d7c30034067$export$21c421a2e1df9d22,\n ShaderMaterial: $d5b33d7c30034067$export$83c7d75d550a8b0d,\n PointsMaterial: $d5b33d7c30034067$export$a178c45366ce5d6b,\n MeshPhysicalMaterial: $d5b33d7c30034067$export$28d04986c4269c9f,\n MeshStandardMaterial: $d5b33d7c30034067$export$f2980790215acccd,\n MeshPhongMaterial: $d5b33d7c30034067$export$24c72f71cbaf0678,\n MeshToonMaterial: $d5b33d7c30034067$export$df893cf97e765622,\n MeshNormalMaterial: $d5b33d7c30034067$export$bfe8c0a091f41ae7,\n MeshLambertMaterial: $d5b33d7c30034067$export$5023a9a8114806b8,\n MeshDepthMaterial: $d5b33d7c30034067$export$2698c22ec13825db,\n MeshDistanceMaterial: $d5b33d7c30034067$export$33e187ed002f2a19,\n MeshBasicMaterial: $d5b33d7c30034067$export$55cbcc9b622fe1f5,\n MeshMatcapMaterial: $d5b33d7c30034067$export$6f5fef6235ec12ee,\n LineDashedMaterial: $d5b33d7c30034067$export$327886a3efaeaebe,\n LineBasicMaterial: $d5b33d7c30034067$export$fbaaa33907730a0c,\n Material: $d5b33d7c30034067$export$a2d8b23205c25948\n };\n return new materialLib[type]();\n }\n}\nclass $d5b33d7c30034067$export$b5d2dc08d867e41a {\n static decodeText(array) {\n if (typeof TextDecoder !== \"undefined\") return new TextDecoder().decode(array);\n // Avoid the String.fromCharCode.apply(null, array) shortcut, which\n // throws a \"maximum call stack size exceeded\" error for large arrays.\n let s = \"\";\n for(let i = 0, il = array.length; i < il; i++)// Implicitly assumes little-endian.\n s += String.fromCharCode(array[i]);\n try {\n // merges multi-byte utf-8 characters.\n return decodeURIComponent(escape(s));\n } catch (e) {\n return s;\n }\n }\n static extractUrlBase(url) {\n const index = url.lastIndexOf(\"/\");\n if (index === -1) return \"./\";\n return url.slice(0, index + 1);\n }\n static resolveURL(url, path) {\n // Invalid URL\n if (typeof url !== \"string\" || url === \"\") return \"\";\n // Host Relative URL\n if (/^https?:\\/\\//i.test(path) && /^\\//.test(url)) path = path.replace(/(^https?:\\/\\/[^\\/]+).*/i, \"$1\");\n // Absolute URL http://,https://,//\n if (/^(https?:)?\\/\\//i.test(url)) return url;\n // Data URI\n if (/^data:.*,.*$/i.test(url)) return url;\n // Blob URL\n if (/^blob:.*$/i.test(url)) return url;\n // Relative URL\n return path + url;\n }\n}\nclass $d5b33d7c30034067$export$231f009cbe414146 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(){\n super();\n this.isInstancedBufferGeometry = true;\n this.type = \"InstancedBufferGeometry\";\n this.instanceCount = Infinity;\n }\n copy(source) {\n super.copy(source);\n this.instanceCount = source.instanceCount;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.instanceCount = this.instanceCount;\n data.isInstancedBufferGeometry = true;\n return data;\n }\n}\nclass $d5b33d7c30034067$export$dc275bb96327833a extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(scope.manager);\n loader.setPath(scope.path);\n loader.setRequestHeader(scope.requestHeader);\n loader.setWithCredentials(scope.withCredentials);\n loader.load(url, function(text) {\n try {\n onLoad(scope.parse(JSON.parse(text)));\n } catch (e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }, onProgress, onError);\n }\n parse(json) {\n const interleavedBufferMap = {};\n const arrayBufferMap = {};\n function getInterleavedBuffer(json, uuid) {\n if (interleavedBufferMap[uuid] !== undefined) return interleavedBufferMap[uuid];\n const interleavedBuffers = json.interleavedBuffers;\n const interleavedBuffer = interleavedBuffers[uuid];\n const buffer = getArrayBuffer(json, interleavedBuffer.buffer);\n const array = $d5b33d7c30034067$var$getTypedArray(interleavedBuffer.type, buffer);\n const ib = new $d5b33d7c30034067$export$3d5cd879f108f53f(array, interleavedBuffer.stride);\n ib.uuid = interleavedBuffer.uuid;\n interleavedBufferMap[uuid] = ib;\n return ib;\n }\n function getArrayBuffer(json, uuid) {\n if (arrayBufferMap[uuid] !== undefined) return arrayBufferMap[uuid];\n const arrayBuffers = json.arrayBuffers;\n const arrayBuffer = arrayBuffers[uuid];\n const ab = new Uint32Array(arrayBuffer).buffer;\n arrayBufferMap[uuid] = ab;\n return ab;\n }\n const geometry = json.isInstancedBufferGeometry ? new $d5b33d7c30034067$export$231f009cbe414146() : new $d5b33d7c30034067$export$b7be63a67df8959();\n const index = json.data.index;\n if (index !== undefined) {\n const typedArray = $d5b33d7c30034067$var$getTypedArray(index.type, index.array);\n geometry.setIndex(new $d5b33d7c30034067$export$8dea267bd6bde117(typedArray, 1));\n }\n const attributes = json.data.attributes;\n for(const key in attributes){\n const attribute = attributes[key];\n let bufferAttribute;\n if (attribute.isInterleavedBufferAttribute) {\n const interleavedBuffer = getInterleavedBuffer(json.data, attribute.data);\n bufferAttribute = new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized);\n } else {\n const typedArray = $d5b33d7c30034067$var$getTypedArray(attribute.type, attribute.array);\n const bufferAttributeConstr = attribute.isInstancedBufferAttribute ? $d5b33d7c30034067$export$32ea87a8b54d744a : $d5b33d7c30034067$export$8dea267bd6bde117;\n bufferAttribute = new bufferAttributeConstr(typedArray, attribute.itemSize, attribute.normalized);\n }\n if (attribute.name !== undefined) bufferAttribute.name = attribute.name;\n if (attribute.usage !== undefined) bufferAttribute.setUsage(attribute.usage);\n if (attribute.updateRange !== undefined) {\n bufferAttribute.updateRange.offset = attribute.updateRange.offset;\n bufferAttribute.updateRange.count = attribute.updateRange.count;\n }\n geometry.setAttribute(key, bufferAttribute);\n }\n const morphAttributes = json.data.morphAttributes;\n if (morphAttributes) for(const key in morphAttributes){\n const attributeArray = morphAttributes[key];\n const array = [];\n for(let i = 0, il = attributeArray.length; i < il; i++){\n const attribute = attributeArray[i];\n let bufferAttribute;\n if (attribute.isInterleavedBufferAttribute) {\n const interleavedBuffer = getInterleavedBuffer(json.data, attribute.data);\n bufferAttribute = new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized);\n } else {\n const typedArray = $d5b33d7c30034067$var$getTypedArray(attribute.type, attribute.array);\n bufferAttribute = new $d5b33d7c30034067$export$8dea267bd6bde117(typedArray, attribute.itemSize, attribute.normalized);\n }\n if (attribute.name !== undefined) bufferAttribute.name = attribute.name;\n array.push(bufferAttribute);\n }\n geometry.morphAttributes[key] = array;\n }\n const morphTargetsRelative = json.data.morphTargetsRelative;\n if (morphTargetsRelative) geometry.morphTargetsRelative = true;\n const groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n if (groups !== undefined) for(let i = 0, n = groups.length; i !== n; ++i){\n const group = groups[i];\n geometry.addGroup(group.start, group.count, group.materialIndex);\n }\n const boundingSphere = json.data.boundingSphere;\n if (boundingSphere !== undefined) {\n const center = new $d5b33d7c30034067$export$64b5c384219d3699();\n if (boundingSphere.center !== undefined) center.fromArray(boundingSphere.center);\n geometry.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba(center, boundingSphere.radius);\n }\n if (json.name) geometry.name = json.name;\n if (json.userData) geometry.userData = json.userData;\n return geometry;\n }\n}\nclass $d5b33d7c30034067$export$40110c8505c5ad19 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const path = this.path === \"\" ? $d5b33d7c30034067$export$b5d2dc08d867e41a.extractUrlBase(url) : this.path;\n this.resourcePath = this.resourcePath || path;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(text) {\n let json = null;\n try {\n json = JSON.parse(text);\n } catch (error) {\n if (onError !== undefined) onError(error);\n console.error(\"THREE:ObjectLoader: Can't parse \" + url + \".\", error.message);\n return;\n }\n const metadata = json.metadata;\n if (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === \"geometry\") {\n if (onError !== undefined) onError(new Error(\"THREE.ObjectLoader: Can't load \" + url));\n console.error(\"THREE.ObjectLoader: Can't load \" + url);\n return;\n }\n scope.parse(json, onLoad);\n }, onProgress, onError);\n }\n async loadAsync(url, onProgress) {\n const scope = this;\n const path = this.path === \"\" ? $d5b33d7c30034067$export$b5d2dc08d867e41a.extractUrlBase(url) : this.path;\n this.resourcePath = this.resourcePath || path;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n const text = await loader.loadAsync(url, onProgress);\n const json = JSON.parse(text);\n const metadata = json.metadata;\n if (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === \"geometry\") throw new Error(\"THREE.ObjectLoader: Can't load \" + url);\n return await scope.parseAsync(json);\n }\n parse(json, onLoad) {\n const animations = this.parseAnimations(json.animations);\n const shapes = this.parseShapes(json.shapes);\n const geometries = this.parseGeometries(json.geometries, shapes);\n const images = this.parseImages(json.images, function() {\n if (onLoad !== undefined) onLoad(object);\n });\n const textures = this.parseTextures(json.textures, images);\n const materials = this.parseMaterials(json.materials, textures);\n const object = this.parseObject(json.object, geometries, materials, textures, animations);\n const skeletons = this.parseSkeletons(json.skeletons, object);\n this.bindSkeletons(object, skeletons);\n //\n if (onLoad !== undefined) {\n let hasImages = false;\n for(const uuid in images)if (images[uuid].data instanceof HTMLImageElement) {\n hasImages = true;\n break;\n }\n if (hasImages === false) onLoad(object);\n }\n return object;\n }\n async parseAsync(json) {\n const animations = this.parseAnimations(json.animations);\n const shapes = this.parseShapes(json.shapes);\n const geometries = this.parseGeometries(json.geometries, shapes);\n const images = await this.parseImagesAsync(json.images);\n const textures = this.parseTextures(json.textures, images);\n const materials = this.parseMaterials(json.materials, textures);\n const object = this.parseObject(json.object, geometries, materials, textures, animations);\n const skeletons = this.parseSkeletons(json.skeletons, object);\n this.bindSkeletons(object, skeletons);\n return object;\n }\n parseShapes(json) {\n const shapes = {};\n if (json !== undefined) for(let i = 0, l = json.length; i < l; i++){\n const shape = new $d5b33d7c30034067$export$6428a7f2611ef1fa().fromJSON(json[i]);\n shapes[shape.uuid] = shape;\n }\n return shapes;\n }\n parseSkeletons(json, object) {\n const skeletons = {};\n const bones = {};\n // generate bone lookup table\n object.traverse(function(child) {\n if (child.isBone) bones[child.uuid] = child;\n });\n // create skeletons\n if (json !== undefined) for(let i = 0, l = json.length; i < l; i++){\n const skeleton = new $d5b33d7c30034067$export$8f31e4c4a37b8e9c().fromJSON(json[i], bones);\n skeletons[skeleton.uuid] = skeleton;\n }\n return skeletons;\n }\n parseGeometries(json, shapes) {\n const geometries = {};\n if (json !== undefined) {\n const bufferGeometryLoader = new $d5b33d7c30034067$export$dc275bb96327833a();\n for(let i = 0, l = json.length; i < l; i++){\n let geometry;\n const data = json[i];\n switch(data.type){\n case \"BufferGeometry\":\n case \"InstancedBufferGeometry\":\n geometry = bufferGeometryLoader.parse(data);\n break;\n default:\n if (data.type in $d5b33d7c30034067$var$Geometries) geometry = $d5b33d7c30034067$var$Geometries[data.type].fromJSON(data, shapes);\n else console.warn(`THREE.ObjectLoader: Unsupported geometry type \"${data.type}\"`);\n }\n geometry.uuid = data.uuid;\n if (data.name !== undefined) geometry.name = data.name;\n if (data.userData !== undefined) geometry.userData = data.userData;\n geometries[data.uuid] = geometry;\n }\n }\n return geometries;\n }\n parseMaterials(json, textures) {\n const cache = {}; // MultiMaterial\n const materials = {};\n if (json !== undefined) {\n const loader = new $d5b33d7c30034067$export$3bd6d323353dcf96();\n loader.setTextures(textures);\n for(let i = 0, l = json.length; i < l; i++){\n const data = json[i];\n if (cache[data.uuid] === undefined) cache[data.uuid] = loader.parse(data);\n materials[data.uuid] = cache[data.uuid];\n }\n }\n return materials;\n }\n parseAnimations(json) {\n const animations = {};\n if (json !== undefined) for(let i = 0; i < json.length; i++){\n const data = json[i];\n const clip = $d5b33d7c30034067$export$d942c706bf23829c.parse(data);\n animations[clip.uuid] = clip;\n }\n return animations;\n }\n parseImages(json, onLoad) {\n const scope = this;\n const images = {};\n let loader;\n function loadImage(url) {\n scope.manager.itemStart(url);\n return loader.load(url, function() {\n scope.manager.itemEnd(url);\n }, undefined, function() {\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n });\n }\n function deserializeImage(image) {\n if (typeof image === \"string\") {\n const url = image;\n const path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(url) ? url : scope.resourcePath + url;\n return loadImage(path);\n } else {\n if (image.data) return {\n data: $d5b33d7c30034067$var$getTypedArray(image.type, image.data),\n width: image.width,\n height: image.height\n };\n else return null;\n }\n }\n if (json !== undefined && json.length > 0) {\n const manager = new $d5b33d7c30034067$export$99cc795e99919eed(onLoad);\n loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(manager);\n loader.setCrossOrigin(this.crossOrigin);\n for(let i = 0, il = json.length; i < il; i++){\n const image = json[i];\n const url = image.url;\n if (Array.isArray(url)) {\n // load array of images e.g CubeTexture\n const imageArray = [];\n for(let j = 0, jl = url.length; j < jl; j++){\n const currentUrl = url[j];\n const deserializedImage = deserializeImage(currentUrl);\n if (deserializedImage !== null) {\n if (deserializedImage instanceof HTMLImageElement) imageArray.push(deserializedImage);\n else // special case: handle array of data textures for cube textures\n imageArray.push(new $d5b33d7c30034067$export$b691f601014eabe1(deserializedImage.data, deserializedImage.width, deserializedImage.height));\n }\n }\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(imageArray);\n } else {\n // load single image\n const deserializedImage = deserializeImage(image.url);\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(deserializedImage);\n }\n }\n }\n return images;\n }\n async parseImagesAsync(json) {\n const scope = this;\n const images = {};\n let loader;\n async function deserializeImage(image) {\n if (typeof image === \"string\") {\n const url = image;\n const path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(url) ? url : scope.resourcePath + url;\n return await loader.loadAsync(path);\n } else {\n if (image.data) return {\n data: $d5b33d7c30034067$var$getTypedArray(image.type, image.data),\n width: image.width,\n height: image.height\n };\n else return null;\n }\n }\n if (json !== undefined && json.length > 0) {\n loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(this.manager);\n loader.setCrossOrigin(this.crossOrigin);\n for(let i = 0, il = json.length; i < il; i++){\n const image = json[i];\n const url = image.url;\n if (Array.isArray(url)) {\n // load array of images e.g CubeTexture\n const imageArray = [];\n for(let j = 0, jl = url.length; j < jl; j++){\n const currentUrl = url[j];\n const deserializedImage = await deserializeImage(currentUrl);\n if (deserializedImage !== null) {\n if (deserializedImage instanceof HTMLImageElement) imageArray.push(deserializedImage);\n else // special case: handle array of data textures for cube textures\n imageArray.push(new $d5b33d7c30034067$export$b691f601014eabe1(deserializedImage.data, deserializedImage.width, deserializedImage.height));\n }\n }\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(imageArray);\n } else {\n // load single image\n const deserializedImage = await deserializeImage(image.url);\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(deserializedImage);\n }\n }\n }\n return images;\n }\n parseTextures(json, images) {\n function parseConstant(value, type) {\n if (typeof value === \"number\") return value;\n console.warn(\"THREE.ObjectLoader.parseTexture: Constant should be in numeric form.\", value);\n return type[value];\n }\n const textures = {};\n if (json !== undefined) for(let i = 0, l = json.length; i < l; i++){\n const data = json[i];\n if (data.image === undefined) console.warn('THREE.ObjectLoader: No \"image\" specified for', data.uuid);\n if (images[data.image] === undefined) console.warn(\"THREE.ObjectLoader: Undefined image\", data.image);\n const source = images[data.image];\n const image = source.data;\n let texture;\n if (Array.isArray(image)) {\n texture = new $d5b33d7c30034067$export$ee2e5a18258a4049();\n if (image.length === 6) texture.needsUpdate = true;\n } else {\n if (image && image.data) texture = new $d5b33d7c30034067$export$b691f601014eabe1();\n else texture = new $d5b33d7c30034067$export$5431306cf43de24a();\n if (image) texture.needsUpdate = true; // textures can have undefined image data\n }\n texture.source = source;\n texture.uuid = data.uuid;\n if (data.name !== undefined) texture.name = data.name;\n if (data.mapping !== undefined) texture.mapping = parseConstant(data.mapping, $d5b33d7c30034067$var$TEXTURE_MAPPING);\n if (data.channel !== undefined) texture.channel = data.channel;\n if (data.offset !== undefined) texture.offset.fromArray(data.offset);\n if (data.repeat !== undefined) texture.repeat.fromArray(data.repeat);\n if (data.center !== undefined) texture.center.fromArray(data.center);\n if (data.rotation !== undefined) texture.rotation = data.rotation;\n if (data.wrap !== undefined) {\n texture.wrapS = parseConstant(data.wrap[0], $d5b33d7c30034067$var$TEXTURE_WRAPPING);\n texture.wrapT = parseConstant(data.wrap[1], $d5b33d7c30034067$var$TEXTURE_WRAPPING);\n }\n if (data.format !== undefined) texture.format = data.format;\n if (data.internalFormat !== undefined) texture.internalFormat = data.internalFormat;\n if (data.type !== undefined) texture.type = data.type;\n if (data.colorSpace !== undefined) texture.colorSpace = data.colorSpace;\n if (data.encoding !== undefined) texture.encoding = data.encoding; // @deprecated, r152\n if (data.minFilter !== undefined) texture.minFilter = parseConstant(data.minFilter, $d5b33d7c30034067$var$TEXTURE_FILTER);\n if (data.magFilter !== undefined) texture.magFilter = parseConstant(data.magFilter, $d5b33d7c30034067$var$TEXTURE_FILTER);\n if (data.anisotropy !== undefined) texture.anisotropy = data.anisotropy;\n if (data.flipY !== undefined) texture.flipY = data.flipY;\n if (data.generateMipmaps !== undefined) texture.generateMipmaps = data.generateMipmaps;\n if (data.premultiplyAlpha !== undefined) texture.premultiplyAlpha = data.premultiplyAlpha;\n if (data.unpackAlignment !== undefined) texture.unpackAlignment = data.unpackAlignment;\n if (data.compareFunction !== undefined) texture.compareFunction = data.compareFunction;\n if (data.userData !== undefined) texture.userData = data.userData;\n textures[data.uuid] = texture;\n }\n return textures;\n }\n parseObject(data, geometries, materials, textures, animations) {\n let object;\n function getGeometry(name) {\n if (geometries[name] === undefined) console.warn(\"THREE.ObjectLoader: Undefined geometry\", name);\n return geometries[name];\n }\n function getMaterial(name) {\n if (name === undefined) return undefined;\n if (Array.isArray(name)) {\n const array = [];\n for(let i = 0, l = name.length; i < l; i++){\n const uuid = name[i];\n if (materials[uuid] === undefined) console.warn(\"THREE.ObjectLoader: Undefined material\", uuid);\n array.push(materials[uuid]);\n }\n return array;\n }\n if (materials[name] === undefined) console.warn(\"THREE.ObjectLoader: Undefined material\", name);\n return materials[name];\n }\n function getTexture(uuid) {\n if (textures[uuid] === undefined) console.warn(\"THREE.ObjectLoader: Undefined texture\", uuid);\n return textures[uuid];\n }\n let geometry, material;\n switch(data.type){\n case \"Scene\":\n object = new $d5b33d7c30034067$export$38af1803e3442a7f();\n if (data.background !== undefined) {\n if (Number.isInteger(data.background)) object.background = new $d5b33d7c30034067$export$892596cec99bc70e(data.background);\n else object.background = getTexture(data.background);\n }\n if (data.environment !== undefined) object.environment = getTexture(data.environment);\n if (data.fog !== undefined) {\n if (data.fog.type === \"Fog\") object.fog = new $d5b33d7c30034067$export$3c890837b09508d4(data.fog.color, data.fog.near, data.fog.far);\n else if (data.fog.type === \"FogExp2\") object.fog = new $d5b33d7c30034067$export$6f1519f023b8d0f6(data.fog.color, data.fog.density);\n }\n if (data.backgroundBlurriness !== undefined) object.backgroundBlurriness = data.backgroundBlurriness;\n if (data.backgroundIntensity !== undefined) object.backgroundIntensity = data.backgroundIntensity;\n break;\n case \"PerspectiveCamera\":\n object = new $d5b33d7c30034067$export$74e4ae24825f68d7(data.fov, data.aspect, data.near, data.far);\n if (data.focus !== undefined) object.focus = data.focus;\n if (data.zoom !== undefined) object.zoom = data.zoom;\n if (data.filmGauge !== undefined) object.filmGauge = data.filmGauge;\n if (data.filmOffset !== undefined) object.filmOffset = data.filmOffset;\n if (data.view !== undefined) object.view = Object.assign({}, data.view);\n break;\n case \"OrthographicCamera\":\n object = new $d5b33d7c30034067$export$9ebf355ee4ed261b(data.left, data.right, data.top, data.bottom, data.near, data.far);\n if (data.zoom !== undefined) object.zoom = data.zoom;\n if (data.view !== undefined) object.view = Object.assign({}, data.view);\n break;\n case \"AmbientLight\":\n object = new $d5b33d7c30034067$export$af279bfef9ec2c96(data.color, data.intensity);\n break;\n case \"DirectionalLight\":\n object = new $d5b33d7c30034067$export$3fea33cc9972c868(data.color, data.intensity);\n break;\n case \"PointLight\":\n object = new $d5b33d7c30034067$export$4c9c1cb3f0b6f455(data.color, data.intensity, data.distance, data.decay);\n break;\n case \"RectAreaLight\":\n object = new $d5b33d7c30034067$export$61db2d908bbd2429(data.color, data.intensity, data.width, data.height);\n break;\n case \"SpotLight\":\n object = new $d5b33d7c30034067$export$81495cbb73897362(data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay);\n break;\n case \"HemisphereLight\":\n object = new $d5b33d7c30034067$export$8d474f55edbb9624(data.color, data.groundColor, data.intensity);\n break;\n case \"LightProbe\":\n object = new $d5b33d7c30034067$export$e7ef036e309b38d2().fromJSON(data);\n break;\n case \"SkinnedMesh\":\n geometry = getGeometry(data.geometry);\n material = getMaterial(data.material);\n object = new $d5b33d7c30034067$export$b303577035157ecf(geometry, material);\n if (data.bindMode !== undefined) object.bindMode = data.bindMode;\n if (data.bindMatrix !== undefined) object.bindMatrix.fromArray(data.bindMatrix);\n if (data.skeleton !== undefined) object.skeleton = data.skeleton;\n break;\n case \"Mesh\":\n geometry = getGeometry(data.geometry);\n material = getMaterial(data.material);\n object = new $d5b33d7c30034067$export$e176487c05830cc5(geometry, material);\n break;\n case \"InstancedMesh\":\n geometry = getGeometry(data.geometry);\n material = getMaterial(data.material);\n const count = data.count;\n const instanceMatrix = data.instanceMatrix;\n const instanceColor = data.instanceColor;\n object = new $d5b33d7c30034067$export$f3c979c331175ad7(geometry, material, count);\n object.instanceMatrix = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(instanceMatrix.array), 16);\n if (instanceColor !== undefined) object.instanceColor = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(instanceColor.array), instanceColor.itemSize);\n break;\n case \"LOD\":\n object = new $d5b33d7c30034067$export$112e7237be0c5f30();\n break;\n case \"Line\":\n object = new $d5b33d7c30034067$export$17d680238e50603e(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"LineLoop\":\n object = new $d5b33d7c30034067$export$f85a24d745e4f17d(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"LineSegments\":\n object = new $d5b33d7c30034067$export$ff1ed10fedfdd604(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"PointCloud\":\n case \"Points\":\n object = new $d5b33d7c30034067$export$1c787534cb11aa3e(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"Sprite\":\n object = new $d5b33d7c30034067$export$3075603db8e6204c(getMaterial(data.material));\n break;\n case \"Group\":\n object = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n break;\n case \"Bone\":\n object = new $d5b33d7c30034067$export$b127726e56765aa4();\n break;\n default:\n object = new $d5b33d7c30034067$export$e4dd07dff30cc924();\n }\n object.uuid = data.uuid;\n if (data.name !== undefined) object.name = data.name;\n if (data.matrix !== undefined) {\n object.matrix.fromArray(data.matrix);\n if (data.matrixAutoUpdate !== undefined) object.matrixAutoUpdate = data.matrixAutoUpdate;\n if (object.matrixAutoUpdate) object.matrix.decompose(object.position, object.quaternion, object.scale);\n } else {\n if (data.position !== undefined) object.position.fromArray(data.position);\n if (data.rotation !== undefined) object.rotation.fromArray(data.rotation);\n if (data.quaternion !== undefined) object.quaternion.fromArray(data.quaternion);\n if (data.scale !== undefined) object.scale.fromArray(data.scale);\n }\n if (data.up !== undefined) object.up.fromArray(data.up);\n if (data.castShadow !== undefined) object.castShadow = data.castShadow;\n if (data.receiveShadow !== undefined) object.receiveShadow = data.receiveShadow;\n if (data.shadow) {\n if (data.shadow.bias !== undefined) object.shadow.bias = data.shadow.bias;\n if (data.shadow.normalBias !== undefined) object.shadow.normalBias = data.shadow.normalBias;\n if (data.shadow.radius !== undefined) object.shadow.radius = data.shadow.radius;\n if (data.shadow.mapSize !== undefined) object.shadow.mapSize.fromArray(data.shadow.mapSize);\n if (data.shadow.camera !== undefined) object.shadow.camera = this.parseObject(data.shadow.camera);\n }\n if (data.visible !== undefined) object.visible = data.visible;\n if (data.frustumCulled !== undefined) object.frustumCulled = data.frustumCulled;\n if (data.renderOrder !== undefined) object.renderOrder = data.renderOrder;\n if (data.userData !== undefined) object.userData = data.userData;\n if (data.layers !== undefined) object.layers.mask = data.layers;\n if (data.children !== undefined) {\n const children = data.children;\n for(let i = 0; i < children.length; i++)object.add(this.parseObject(children[i], geometries, materials, textures, animations));\n }\n if (data.animations !== undefined) {\n const objectAnimations = data.animations;\n for(let i = 0; i < objectAnimations.length; i++){\n const uuid = objectAnimations[i];\n object.animations.push(animations[uuid]);\n }\n }\n if (data.type === \"LOD\") {\n if (data.autoUpdate !== undefined) object.autoUpdate = data.autoUpdate;\n const levels = data.levels;\n for(let l = 0; l < levels.length; l++){\n const level = levels[l];\n const child = object.getObjectByProperty(\"uuid\", level.object);\n if (child !== undefined) object.addLevel(child, level.distance, level.hysteresis);\n }\n }\n return object;\n }\n bindSkeletons(object, skeletons) {\n if (Object.keys(skeletons).length === 0) return;\n object.traverse(function(child) {\n if (child.isSkinnedMesh === true && child.skeleton !== undefined) {\n const skeleton = skeletons[child.skeleton];\n if (skeleton === undefined) console.warn(\"THREE.ObjectLoader: No skeleton found with UUID:\", child.skeleton);\n else child.bind(skeleton, child.bindMatrix);\n }\n });\n }\n}\nconst $d5b33d7c30034067$var$TEXTURE_MAPPING = {\n UVMapping: $d5b33d7c30034067$export$1beec6768cbb3d2d,\n CubeReflectionMapping: $d5b33d7c30034067$export$8759762a6477f2c4,\n CubeRefractionMapping: $d5b33d7c30034067$export$dc59f8aed047f61d,\n EquirectangularReflectionMapping: $d5b33d7c30034067$export$d64030b316d3b087,\n EquirectangularRefractionMapping: $d5b33d7c30034067$export$ee99d97d46898098,\n CubeUVReflectionMapping: $d5b33d7c30034067$export$dbf3e70ff37af79\n};\nconst $d5b33d7c30034067$var$TEXTURE_WRAPPING = {\n RepeatWrapping: $d5b33d7c30034067$export$533346c8e8dac0f5,\n ClampToEdgeWrapping: $d5b33d7c30034067$export$9d9334239a5a5e06,\n MirroredRepeatWrapping: $d5b33d7c30034067$export$c7e7c00b14f51a4f\n};\nconst $d5b33d7c30034067$var$TEXTURE_FILTER = {\n NearestFilter: $d5b33d7c30034067$export$727aa5ec3fe39bf0,\n NearestMipmapNearestFilter: $d5b33d7c30034067$export$d129e38cf6feaa8c,\n NearestMipmapLinearFilter: $d5b33d7c30034067$export$d2327c1afe5bfdf2,\n LinearFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n LinearMipmapNearestFilter: $d5b33d7c30034067$export$19a719f377145a13,\n LinearMipmapLinearFilter: $d5b33d7c30034067$export$5d8599b6a933fb1b\n};\nclass $d5b33d7c30034067$export$52286b55c4a9b51f extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n this.isImageBitmapLoader = true;\n if (typeof createImageBitmap === \"undefined\") console.warn(\"THREE.ImageBitmapLoader: createImageBitmap() not supported.\");\n if (typeof fetch === \"undefined\") console.warn(\"THREE.ImageBitmapLoader: fetch() not supported.\");\n this.options = {\n premultiplyAlpha: \"none\"\n };\n }\n setOptions(options) {\n this.options = options;\n return this;\n }\n load(url, onLoad, onProgress, onError) {\n if (url === undefined) url = \"\";\n if (this.path !== undefined) url = this.path + url;\n url = this.manager.resolveURL(url);\n const scope = this;\n const cached = $d5b33d7c30034067$export$94affb487e701bf2.get(url);\n if (cached !== undefined) {\n scope.manager.itemStart(url);\n setTimeout(function() {\n if (onLoad) onLoad(cached);\n scope.manager.itemEnd(url);\n }, 0);\n return cached;\n }\n const fetchOptions = {};\n fetchOptions.credentials = this.crossOrigin === \"anonymous\" ? \"same-origin\" : \"include\";\n fetchOptions.headers = this.requestHeader;\n fetch(url, fetchOptions).then(function(res) {\n return res.blob();\n }).then(function(blob) {\n return createImageBitmap(blob, Object.assign(scope.options, {\n colorSpaceConversion: \"none\"\n }));\n }).then(function(imageBitmap) {\n $d5b33d7c30034067$export$94affb487e701bf2.add(url, imageBitmap);\n if (onLoad) onLoad(imageBitmap);\n scope.manager.itemEnd(url);\n }).catch(function(e) {\n if (onError) onError(e);\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n });\n scope.manager.itemStart(url);\n }\n}\nlet $d5b33d7c30034067$var$_context;\nclass $d5b33d7c30034067$export$fcbc63750ec2a81f {\n static getContext() {\n if ($d5b33d7c30034067$var$_context === undefined) $d5b33d7c30034067$var$_context = new (window.AudioContext || window.webkitAudioContext)();\n return $d5b33d7c30034067$var$_context;\n }\n static setContext(value) {\n $d5b33d7c30034067$var$_context = value;\n }\n}\nclass $d5b33d7c30034067$export$d8d5fccfbf47714e extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setResponseType(\"arraybuffer\");\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(buffer) {\n try {\n // Create a copy of the buffer. The `decodeAudioData` method\n // detaches the buffer when complete, preventing reuse.\n const bufferCopy = buffer.slice(0);\n const context = $d5b33d7c30034067$export$fcbc63750ec2a81f.getContext();\n context.decodeAudioData(bufferCopy, function(audioBuffer) {\n onLoad(audioBuffer);\n }, handleError);\n } catch (e) {\n handleError(e);\n }\n }, onProgress, onError);\n function handleError(e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }\n}\nclass $d5b33d7c30034067$export$2f22dadc8bc42820 extends $d5b33d7c30034067$export$e7ef036e309b38d2 {\n constructor(skyColor, groundColor, intensity = 1){\n super(undefined, intensity);\n this.isHemisphereLightProbe = true;\n const color1 = new $d5b33d7c30034067$export$892596cec99bc70e().set(skyColor);\n const color2 = new $d5b33d7c30034067$export$892596cec99bc70e().set(groundColor);\n const sky = new $d5b33d7c30034067$export$64b5c384219d3699(color1.r, color1.g, color1.b);\n const ground = new $d5b33d7c30034067$export$64b5c384219d3699(color2.r, color2.g, color2.b);\n // without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );\n const c0 = Math.sqrt(Math.PI);\n const c1 = c0 * Math.sqrt(0.75);\n this.sh.coefficients[0].copy(sky).add(ground).multiplyScalar(c0);\n this.sh.coefficients[1].copy(sky).sub(ground).multiplyScalar(c1);\n }\n}\nclass $d5b33d7c30034067$export$afe310a21c86023d extends $d5b33d7c30034067$export$e7ef036e309b38d2 {\n constructor(color, intensity = 1){\n super(undefined, intensity);\n this.isAmbientLightProbe = true;\n const color1 = new $d5b33d7c30034067$export$892596cec99bc70e().set(color);\n // without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );\n this.sh.coefficients[0].set(color1.r, color1.g, color1.b).multiplyScalar(2 * Math.sqrt(Math.PI));\n }\n}\nconst $d5b33d7c30034067$var$_eyeRight = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_eyeLeft = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_projectionMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nclass $d5b33d7c30034067$export$bc7f73a1065bee0c {\n constructor(){\n this.type = \"StereoCamera\";\n this.aspect = 1;\n this.eyeSep = 0.064;\n this.cameraL = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n this.cameraL.layers.enable(1);\n this.cameraL.matrixAutoUpdate = false;\n this.cameraR = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n this.cameraR.layers.enable(2);\n this.cameraR.matrixAutoUpdate = false;\n this._cache = {\n focus: null,\n fov: null,\n aspect: null,\n near: null,\n far: null,\n zoom: null,\n eyeSep: null\n };\n }\n update(camera) {\n const cache = this._cache;\n const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n if (needsUpdate) {\n cache.focus = camera.focus;\n cache.fov = camera.fov;\n cache.aspect = camera.aspect * this.aspect;\n cache.near = camera.near;\n cache.far = camera.far;\n cache.zoom = camera.zoom;\n cache.eyeSep = this.eyeSep;\n // Off-axis stereoscopic effect based on\n // http://paulbourke.net/stereographics/stereorender/\n $d5b33d7c30034067$var$_projectionMatrix.copy(camera.projectionMatrix);\n const eyeSepHalf = cache.eyeSep / 2;\n const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n const ymax = cache.near * Math.tan($d5b33d7c30034067$var$DEG2RAD * cache.fov * 0.5) / cache.zoom;\n let xmin, xmax;\n // translate xOffset\n $d5b33d7c30034067$var$_eyeLeft.elements[12] = -eyeSepHalf;\n $d5b33d7c30034067$var$_eyeRight.elements[12] = eyeSepHalf;\n // for left eye\n xmin = -ymax * cache.aspect + eyeSepOnProjection;\n xmax = ymax * cache.aspect + eyeSepOnProjection;\n $d5b33d7c30034067$var$_projectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n $d5b33d7c30034067$var$_projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n this.cameraL.projectionMatrix.copy($d5b33d7c30034067$var$_projectionMatrix);\n // for right eye\n xmin = -ymax * cache.aspect - eyeSepOnProjection;\n xmax = ymax * cache.aspect - eyeSepOnProjection;\n $d5b33d7c30034067$var$_projectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n $d5b33d7c30034067$var$_projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n this.cameraR.projectionMatrix.copy($d5b33d7c30034067$var$_projectionMatrix);\n }\n this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply($d5b33d7c30034067$var$_eyeLeft);\n this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply($d5b33d7c30034067$var$_eyeRight);\n }\n}\nclass $d5b33d7c30034067$export$9735c82c4bae3302 {\n constructor(autoStart = true){\n this.autoStart = autoStart;\n this.startTime = 0;\n this.oldTime = 0;\n this.elapsedTime = 0;\n this.running = false;\n }\n start() {\n this.startTime = $d5b33d7c30034067$var$now();\n this.oldTime = this.startTime;\n this.elapsedTime = 0;\n this.running = true;\n }\n stop() {\n this.getElapsedTime();\n this.running = false;\n this.autoStart = false;\n }\n getElapsedTime() {\n this.getDelta();\n return this.elapsedTime;\n }\n getDelta() {\n let diff = 0;\n if (this.autoStart && !this.running) {\n this.start();\n return 0;\n }\n if (this.running) {\n const newTime = $d5b33d7c30034067$var$now();\n diff = (newTime - this.oldTime) / 1000;\n this.oldTime = newTime;\n this.elapsedTime += diff;\n }\n return diff;\n }\n}\nfunction $d5b33d7c30034067$var$now() {\n return (typeof performance === \"undefined\" ? Date : performance).now(); // see #10732\n}\nconst $d5b33d7c30034067$var$_position$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_scale$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_orientation$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$8a1b810c6fde8951 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.type = \"AudioListener\";\n this.context = $d5b33d7c30034067$export$fcbc63750ec2a81f.getContext();\n this.gain = this.context.createGain();\n this.gain.connect(this.context.destination);\n this.filter = null;\n this.timeDelta = 0;\n // private\n this._clock = new $d5b33d7c30034067$export$9735c82c4bae3302();\n }\n getInput() {\n return this.gain;\n }\n removeFilter() {\n if (this.filter !== null) {\n this.gain.disconnect(this.filter);\n this.filter.disconnect(this.context.destination);\n this.gain.connect(this.context.destination);\n this.filter = null;\n }\n return this;\n }\n getFilter() {\n return this.filter;\n }\n setFilter(value) {\n if (this.filter !== null) {\n this.gain.disconnect(this.filter);\n this.filter.disconnect(this.context.destination);\n } else this.gain.disconnect(this.context.destination);\n this.filter = value;\n this.gain.connect(this.filter);\n this.filter.connect(this.context.destination);\n return this;\n }\n getMasterVolume() {\n return this.gain.gain.value;\n }\n setMasterVolume(value) {\n this.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n return this;\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n const listener = this.context.listener;\n const up = this.up;\n this.timeDelta = this._clock.getDelta();\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position$1, $d5b33d7c30034067$var$_quaternion$1, $d5b33d7c30034067$var$_scale$1);\n $d5b33d7c30034067$var$_orientation$1.set(0, 0, -1).applyQuaternion($d5b33d7c30034067$var$_quaternion$1);\n if (listener.positionX) {\n // code path for Chrome (see #14393)\n const endTime = this.context.currentTime + this.timeDelta;\n listener.positionX.linearRampToValueAtTime($d5b33d7c30034067$var$_position$1.x, endTime);\n listener.positionY.linearRampToValueAtTime($d5b33d7c30034067$var$_position$1.y, endTime);\n listener.positionZ.linearRampToValueAtTime($d5b33d7c30034067$var$_position$1.z, endTime);\n listener.forwardX.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation$1.x, endTime);\n listener.forwardY.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation$1.y, endTime);\n listener.forwardZ.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation$1.z, endTime);\n listener.upX.linearRampToValueAtTime(up.x, endTime);\n listener.upY.linearRampToValueAtTime(up.y, endTime);\n listener.upZ.linearRampToValueAtTime(up.z, endTime);\n } else {\n listener.setPosition($d5b33d7c30034067$var$_position$1.x, $d5b33d7c30034067$var$_position$1.y, $d5b33d7c30034067$var$_position$1.z);\n listener.setOrientation($d5b33d7c30034067$var$_orientation$1.x, $d5b33d7c30034067$var$_orientation$1.y, $d5b33d7c30034067$var$_orientation$1.z, up.x, up.y, up.z);\n }\n }\n}\nclass $d5b33d7c30034067$export$153755f98d9861de extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(listener){\n super();\n this.type = \"Audio\";\n this.listener = listener;\n this.context = listener.context;\n this.gain = this.context.createGain();\n this.gain.connect(listener.getInput());\n this.autoplay = false;\n this.buffer = null;\n this.detune = 0;\n this.loop = false;\n this.loopStart = 0;\n this.loopEnd = 0;\n this.offset = 0;\n this.duration = undefined;\n this.playbackRate = 1;\n this.isPlaying = false;\n this.hasPlaybackControl = true;\n this.source = null;\n this.sourceType = \"empty\";\n this._startedAt = 0;\n this._progress = 0;\n this._connected = false;\n this.filters = [];\n }\n getOutput() {\n return this.gain;\n }\n setNodeSource(audioNode) {\n this.hasPlaybackControl = false;\n this.sourceType = \"audioNode\";\n this.source = audioNode;\n this.connect();\n return this;\n }\n setMediaElementSource(mediaElement) {\n this.hasPlaybackControl = false;\n this.sourceType = \"mediaNode\";\n this.source = this.context.createMediaElementSource(mediaElement);\n this.connect();\n return this;\n }\n setMediaStreamSource(mediaStream) {\n this.hasPlaybackControl = false;\n this.sourceType = \"mediaStreamNode\";\n this.source = this.context.createMediaStreamSource(mediaStream);\n this.connect();\n return this;\n }\n setBuffer(audioBuffer) {\n this.buffer = audioBuffer;\n this.sourceType = \"buffer\";\n if (this.autoplay) this.play();\n return this;\n }\n play(delay = 0) {\n if (this.isPlaying === true) {\n console.warn(\"THREE.Audio: Audio is already playing.\");\n return;\n }\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this._startedAt = this.context.currentTime + delay;\n const source = this.context.createBufferSource();\n source.buffer = this.buffer;\n source.loop = this.loop;\n source.loopStart = this.loopStart;\n source.loopEnd = this.loopEnd;\n source.onended = this.onEnded.bind(this);\n source.start(this._startedAt, this._progress + this.offset, this.duration);\n this.isPlaying = true;\n this.source = source;\n this.setDetune(this.detune);\n this.setPlaybackRate(this.playbackRate);\n return this.connect();\n }\n pause() {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n if (this.isPlaying === true) {\n // update current progress\n this._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate;\n if (this.loop === true) // ensure _progress does not exceed duration with looped audios\n this._progress = this._progress % (this.duration || this.buffer.duration);\n this.source.stop();\n this.source.onended = null;\n this.isPlaying = false;\n }\n return this;\n }\n stop() {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this._progress = 0;\n if (this.source !== null) {\n this.source.stop();\n this.source.onended = null;\n }\n this.isPlaying = false;\n return this;\n }\n connect() {\n if (this.filters.length > 0) {\n this.source.connect(this.filters[0]);\n for(let i = 1, l = this.filters.length; i < l; i++)this.filters[i - 1].connect(this.filters[i]);\n this.filters[this.filters.length - 1].connect(this.getOutput());\n } else this.source.connect(this.getOutput());\n this._connected = true;\n return this;\n }\n disconnect() {\n if (this.filters.length > 0) {\n this.source.disconnect(this.filters[0]);\n for(let i = 1, l = this.filters.length; i < l; i++)this.filters[i - 1].disconnect(this.filters[i]);\n this.filters[this.filters.length - 1].disconnect(this.getOutput());\n } else this.source.disconnect(this.getOutput());\n this._connected = false;\n return this;\n }\n getFilters() {\n return this.filters;\n }\n setFilters(value) {\n if (!value) value = [];\n if (this._connected === true) {\n this.disconnect();\n this.filters = value.slice();\n this.connect();\n } else this.filters = value.slice();\n return this;\n }\n setDetune(value) {\n this.detune = value;\n if (this.source.detune === undefined) return; // only set detune when available\n if (this.isPlaying === true) this.source.detune.setTargetAtTime(this.detune, this.context.currentTime, 0.01);\n return this;\n }\n getDetune() {\n return this.detune;\n }\n getFilter() {\n return this.getFilters()[0];\n }\n setFilter(filter) {\n return this.setFilters(filter ? [\n filter\n ] : []);\n }\n setPlaybackRate(value) {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this.playbackRate = value;\n if (this.isPlaying === true) this.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, 0.01);\n return this;\n }\n getPlaybackRate() {\n return this.playbackRate;\n }\n onEnded() {\n this.isPlaying = false;\n }\n getLoop() {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return false;\n }\n return this.loop;\n }\n setLoop(value) {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this.loop = value;\n if (this.isPlaying === true) this.source.loop = this.loop;\n return this;\n }\n setLoopStart(value) {\n this.loopStart = value;\n return this;\n }\n setLoopEnd(value) {\n this.loopEnd = value;\n return this;\n }\n getVolume() {\n return this.gain.gain.value;\n }\n setVolume(value) {\n this.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_position = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_scale = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_orientation = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$4b3e397ef1832507 extends $d5b33d7c30034067$export$153755f98d9861de {\n constructor(listener){\n super(listener);\n this.panner = this.context.createPanner();\n this.panner.panningModel = \"HRTF\";\n this.panner.connect(this.gain);\n }\n connect() {\n super.connect();\n this.panner.connect(this.gain);\n }\n disconnect() {\n super.disconnect();\n this.panner.disconnect(this.gain);\n }\n getOutput() {\n return this.panner;\n }\n getRefDistance() {\n return this.panner.refDistance;\n }\n setRefDistance(value) {\n this.panner.refDistance = value;\n return this;\n }\n getRolloffFactor() {\n return this.panner.rolloffFactor;\n }\n setRolloffFactor(value) {\n this.panner.rolloffFactor = value;\n return this;\n }\n getDistanceModel() {\n return this.panner.distanceModel;\n }\n setDistanceModel(value) {\n this.panner.distanceModel = value;\n return this;\n }\n getMaxDistance() {\n return this.panner.maxDistance;\n }\n setMaxDistance(value) {\n this.panner.maxDistance = value;\n return this;\n }\n setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) {\n this.panner.coneInnerAngle = coneInnerAngle;\n this.panner.coneOuterAngle = coneOuterAngle;\n this.panner.coneOuterGain = coneOuterGain;\n return this;\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n if (this.hasPlaybackControl === true && this.isPlaying === false) return;\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position, $d5b33d7c30034067$var$_quaternion, $d5b33d7c30034067$var$_scale);\n $d5b33d7c30034067$var$_orientation.set(0, 0, 1).applyQuaternion($d5b33d7c30034067$var$_quaternion);\n const panner = this.panner;\n if (panner.positionX) {\n // code path for Chrome and Firefox (see #14393)\n const endTime = this.context.currentTime + this.listener.timeDelta;\n panner.positionX.linearRampToValueAtTime($d5b33d7c30034067$var$_position.x, endTime);\n panner.positionY.linearRampToValueAtTime($d5b33d7c30034067$var$_position.y, endTime);\n panner.positionZ.linearRampToValueAtTime($d5b33d7c30034067$var$_position.z, endTime);\n panner.orientationX.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation.x, endTime);\n panner.orientationY.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation.y, endTime);\n panner.orientationZ.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation.z, endTime);\n } else {\n panner.setPosition($d5b33d7c30034067$var$_position.x, $d5b33d7c30034067$var$_position.y, $d5b33d7c30034067$var$_position.z);\n panner.setOrientation($d5b33d7c30034067$var$_orientation.x, $d5b33d7c30034067$var$_orientation.y, $d5b33d7c30034067$var$_orientation.z);\n }\n }\n}\nclass $d5b33d7c30034067$export$d47da1ef3d382827 {\n constructor(audio, fftSize = 2048){\n this.analyser = audio.context.createAnalyser();\n this.analyser.fftSize = fftSize;\n this.data = new Uint8Array(this.analyser.frequencyBinCount);\n audio.getOutput().connect(this.analyser);\n }\n getFrequencyData() {\n this.analyser.getByteFrequencyData(this.data);\n return this.data;\n }\n getAverageFrequency() {\n let value = 0;\n const data = this.getFrequencyData();\n for(let i = 0; i < data.length; i++)value += data[i];\n return value / data.length;\n }\n}\nclass $d5b33d7c30034067$export$dfe0af1ca1acb78a {\n constructor(binding, typeName, valueSize){\n this.binding = binding;\n this.valueSize = valueSize;\n let mixFunction, mixFunctionAdditive, setIdentity;\n // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n //\n // interpolators can use .buffer as their .result\n // the data then goes to 'incoming'\n //\n // 'accu0' and 'accu1' are used frame-interleaved for\n // the cumulative result and are compared to detect\n // changes\n //\n // 'orig' stores the original state of the property\n //\n // 'add' is used for additive cumulative results\n //\n // 'work' is optional and is only present for quaternion types. It is used\n // to store intermediate quaternion multiplication results\n switch(typeName){\n case \"quaternion\":\n mixFunction = this._slerp;\n mixFunctionAdditive = this._slerpAdditive;\n setIdentity = this._setAdditiveIdentityQuaternion;\n this.buffer = new Float64Array(valueSize * 6);\n this._workIndex = 5;\n break;\n case \"string\":\n case \"bool\":\n mixFunction = this._select;\n // Use the regular mix function and for additive on these types,\n // additive is not relevant for non-numeric types\n mixFunctionAdditive = this._select;\n setIdentity = this._setAdditiveIdentityOther;\n this.buffer = new Array(valueSize * 5);\n break;\n default:\n mixFunction = this._lerp;\n mixFunctionAdditive = this._lerpAdditive;\n setIdentity = this._setAdditiveIdentityNumeric;\n this.buffer = new Float64Array(valueSize * 5);\n }\n this._mixBufferRegion = mixFunction;\n this._mixBufferRegionAdditive = mixFunctionAdditive;\n this._setIdentity = setIdentity;\n this._origIndex = 3;\n this._addIndex = 4;\n this.cumulativeWeight = 0;\n this.cumulativeWeightAdditive = 0;\n this.useCount = 0;\n this.referenceCount = 0;\n }\n // accumulate data in the 'incoming' region into 'accu'\n accumulate(accuIndex, weight) {\n // note: happily accumulating nothing when weight = 0, the caller knows\n // the weight and shouldn't have made the call in the first place\n const buffer = this.buffer, stride = this.valueSize, offset = accuIndex * stride + stride;\n let currentWeight = this.cumulativeWeight;\n if (currentWeight === 0) {\n // accuN := incoming * weight\n for(let i = 0; i !== stride; ++i)buffer[offset + i] = buffer[i];\n currentWeight = weight;\n } else {\n // accuN := accuN + incoming * weight\n currentWeight += weight;\n const mix = weight / currentWeight;\n this._mixBufferRegion(buffer, offset, 0, mix, stride);\n }\n this.cumulativeWeight = currentWeight;\n }\n // accumulate data in the 'incoming' region into 'add'\n accumulateAdditive(weight) {\n const buffer = this.buffer, stride = this.valueSize, offset = stride * this._addIndex;\n if (this.cumulativeWeightAdditive === 0) // add = identity\n this._setIdentity();\n // add := add + incoming * weight\n this._mixBufferRegionAdditive(buffer, offset, 0, weight, stride);\n this.cumulativeWeightAdditive += weight;\n }\n // apply the state of 'accu' to the binding when accus differ\n apply(accuIndex) {\n const stride = this.valueSize, buffer = this.buffer, offset = accuIndex * stride + stride, weight = this.cumulativeWeight, weightAdditive = this.cumulativeWeightAdditive, binding = this.binding;\n this.cumulativeWeight = 0;\n this.cumulativeWeightAdditive = 0;\n if (weight < 1) {\n // accuN := accuN + original * ( 1 - cumulativeWeight )\n const originalValueOffset = stride * this._origIndex;\n this._mixBufferRegion(buffer, offset, originalValueOffset, 1 - weight, stride);\n }\n if (weightAdditive > 0) // accuN := accuN + additive accuN\n this._mixBufferRegionAdditive(buffer, offset, this._addIndex * stride, 1, stride);\n for(let i = stride, e = stride + stride; i !== e; ++i)if (buffer[i] !== buffer[i + stride]) {\n // value has changed -> update scene graph\n binding.setValue(buffer, offset);\n break;\n }\n }\n // remember the state of the bound property and copy it to both accus\n saveOriginalState() {\n const binding = this.binding;\n const buffer = this.buffer, stride = this.valueSize, originalValueOffset = stride * this._origIndex;\n binding.getValue(buffer, originalValueOffset);\n // accu[0..1] := orig -- initially detect changes against the original\n for(let i = stride, e = originalValueOffset; i !== e; ++i)buffer[i] = buffer[originalValueOffset + i % stride];\n // Add to identity for additive\n this._setIdentity();\n this.cumulativeWeight = 0;\n this.cumulativeWeightAdditive = 0;\n }\n // apply the state previously taken via 'saveOriginalState' to the binding\n restoreOriginalState() {\n const originalValueOffset = this.valueSize * 3;\n this.binding.setValue(this.buffer, originalValueOffset);\n }\n _setAdditiveIdentityNumeric() {\n const startIndex = this._addIndex * this.valueSize;\n const endIndex = startIndex + this.valueSize;\n for(let i = startIndex; i < endIndex; i++)this.buffer[i] = 0;\n }\n _setAdditiveIdentityQuaternion() {\n this._setAdditiveIdentityNumeric();\n this.buffer[this._addIndex * this.valueSize + 3] = 1;\n }\n _setAdditiveIdentityOther() {\n const startIndex = this._origIndex * this.valueSize;\n const targetIndex = this._addIndex * this.valueSize;\n for(let i = 0; i < this.valueSize; i++)this.buffer[targetIndex + i] = this.buffer[startIndex + i];\n }\n // mix functions\n _select(buffer, dstOffset, srcOffset, t, stride) {\n if (t >= 0.5) for(let i = 0; i !== stride; ++i)buffer[dstOffset + i] = buffer[srcOffset + i];\n }\n _slerp(buffer, dstOffset, srcOffset, t) {\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t);\n }\n _slerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n const workOffset = this._workIndex * stride;\n // Store result in intermediate buffer offset\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.multiplyQuaternionsFlat(buffer, workOffset, buffer, dstOffset, buffer, srcOffset);\n // Slerp to the intermediate result\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t);\n }\n _lerp(buffer, dstOffset, srcOffset, t, stride) {\n const s = 1 - t;\n for(let i = 0; i !== stride; ++i){\n const j = dstOffset + i;\n buffer[j] = buffer[j] * s + buffer[srcOffset + i] * t;\n }\n }\n _lerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n for(let i = 0; i !== stride; ++i){\n const j = dstOffset + i;\n buffer[j] = buffer[j] + buffer[srcOffset + i] * t;\n }\n }\n}\n// Characters [].:/ are reserved for track binding syntax.\nconst $d5b33d7c30034067$var$_RESERVED_CHARS_RE = \"\\\\[\\\\]\\\\.:\\\\/\";\nconst $d5b33d7c30034067$var$_reservedRe = new RegExp(\"[\" + $d5b33d7c30034067$var$_RESERVED_CHARS_RE + \"]\", \"g\");\n// Attempts to allow node names from any language. ES5's `\\w` regexp matches\n// only latin characters, and the unicode \\p{L} is not yet supported. So\n// instead, we exclude reserved characters and match everything else.\nconst $d5b33d7c30034067$var$_wordChar = \"[^\" + $d5b33d7c30034067$var$_RESERVED_CHARS_RE + \"]\";\nconst $d5b33d7c30034067$var$_wordCharOrDot = \"[^\" + $d5b33d7c30034067$var$_RESERVED_CHARS_RE.replace(\"\\\\.\", \"\") + \"]\";\n// Parent directories, delimited by '/' or ':'. Currently unused, but must\n// be matched to parse the rest of the track name.\nconst $d5b33d7c30034067$var$_directoryRe = /*@__PURE__*/ /((?:WC+[\\/:])*)/.source.replace(\"WC\", $d5b33d7c30034067$var$_wordChar);\n// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\nconst $d5b33d7c30034067$var$_nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace(\"WCOD\", $d5b33d7c30034067$var$_wordCharOrDot);\n// Object on target node, and accessor. May not contain reserved\n// characters. Accessor may contain any character except closing bracket.\nconst $d5b33d7c30034067$var$_objectRe = /*@__PURE__*/ /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace(\"WC\", $d5b33d7c30034067$var$_wordChar);\n// Property and accessor. May not contain reserved characters. Accessor may\n// contain any non-bracket characters.\nconst $d5b33d7c30034067$var$_propertyRe = /*@__PURE__*/ /\\.(WC+)(?:\\[(.+)\\])?/.source.replace(\"WC\", $d5b33d7c30034067$var$_wordChar);\nconst $d5b33d7c30034067$var$_trackRe = new RegExp(\"^\" + $d5b33d7c30034067$var$_directoryRe + $d5b33d7c30034067$var$_nodeRe + $d5b33d7c30034067$var$_objectRe + $d5b33d7c30034067$var$_propertyRe + \"$\");\nconst $d5b33d7c30034067$var$_supportedObjectNames = [\n \"material\",\n \"materials\",\n \"bones\",\n \"map\"\n];\nclass $d5b33d7c30034067$var$Composite {\n constructor(targetGroup, path, optionalParsedPath){\n const parsedPath = optionalParsedPath || $d5b33d7c30034067$export$7bf70fcf9f891893.parseTrackName(path);\n this._targetGroup = targetGroup;\n this._bindings = targetGroup.subscribe_(path, parsedPath);\n }\n getValue(array, offset) {\n this.bind(); // bind all binding\n const firstValidIndex = this._targetGroup.nCachedObjects_, binding = this._bindings[firstValidIndex];\n // and only call .getValue on the first\n if (binding !== undefined) binding.getValue(array, offset);\n }\n setValue(array, offset) {\n const bindings = this._bindings;\n for(let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i)bindings[i].setValue(array, offset);\n }\n bind() {\n const bindings = this._bindings;\n for(let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i)bindings[i].bind();\n }\n unbind() {\n const bindings = this._bindings;\n for(let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i)bindings[i].unbind();\n }\n}\n// Note: This class uses a State pattern on a per-method basis:\n// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n// prototype version of these methods with one that represents\n// the bound state. When the property is not found, the methods\n// become no-ops.\nclass $d5b33d7c30034067$export$7bf70fcf9f891893 {\n constructor(rootNode, path, parsedPath){\n this.path = path;\n this.parsedPath = parsedPath || $d5b33d7c30034067$export$7bf70fcf9f891893.parseTrackName(path);\n this.node = $d5b33d7c30034067$export$7bf70fcf9f891893.findNode(rootNode, this.parsedPath.nodeName);\n this.rootNode = rootNode;\n // initial state of these methods that calls 'bind'\n this.getValue = this._getValue_unbound;\n this.setValue = this._setValue_unbound;\n }\n static create(root, path, parsedPath) {\n if (!(root && root.isAnimationObjectGroup)) return new $d5b33d7c30034067$export$7bf70fcf9f891893(root, path, parsedPath);\n else return new $d5b33d7c30034067$export$7bf70fcf9f891893.Composite(root, path, parsedPath);\n }\n /**\n\t * Replaces spaces with underscores and removes unsupported characters from\n\t * node names, to ensure compatibility with parseTrackName().\n\t *\n\t * @param {string} name Node name to be sanitized.\n\t * @return {string}\n\t */ static sanitizeNodeName(name) {\n return name.replace(/\\s/g, \"_\").replace($d5b33d7c30034067$var$_reservedRe, \"\");\n }\n static parseTrackName(trackName) {\n const matches = $d5b33d7c30034067$var$_trackRe.exec(trackName);\n if (matches === null) throw new Error(\"PropertyBinding: Cannot parse trackName: \" + trackName);\n const results = {\n // directoryName: matches[ 1 ], // (tschw) currently unused\n nodeName: matches[2],\n objectName: matches[3],\n objectIndex: matches[4],\n propertyName: matches[5],\n propertyIndex: matches[6]\n };\n const lastDot = results.nodeName && results.nodeName.lastIndexOf(\".\");\n if (lastDot !== undefined && lastDot !== -1) {\n const objectName = results.nodeName.substring(lastDot + 1);\n // Object names must be checked against an allowlist. Otherwise, there\n // is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n // 'bar' could be the objectName, or part of a nodeName (which can\n // include '.' characters).\n if ($d5b33d7c30034067$var$_supportedObjectNames.indexOf(objectName) !== -1) {\n results.nodeName = results.nodeName.substring(0, lastDot);\n results.objectName = objectName;\n }\n }\n if (results.propertyName === null || results.propertyName.length === 0) throw new Error(\"PropertyBinding: can not parse propertyName from trackName: \" + trackName);\n return results;\n }\n static findNode(root, nodeName) {\n if (nodeName === undefined || nodeName === \"\" || nodeName === \".\" || nodeName === -1 || nodeName === root.name || nodeName === root.uuid) return root;\n // search into skeleton bones.\n if (root.skeleton) {\n const bone = root.skeleton.getBoneByName(nodeName);\n if (bone !== undefined) return bone;\n }\n // search into node subtree.\n if (root.children) {\n const searchNodeSubtree = function(children) {\n for(let i = 0; i < children.length; i++){\n const childNode = children[i];\n if (childNode.name === nodeName || childNode.uuid === nodeName) return childNode;\n const result = searchNodeSubtree(childNode.children);\n if (result) return result;\n }\n return null;\n };\n const subTreeNode = searchNodeSubtree(root.children);\n if (subTreeNode) return subTreeNode;\n }\n return null;\n }\n // these are used to \"bind\" a nonexistent property\n _getValue_unavailable() {}\n _setValue_unavailable() {}\n // Getters\n _getValue_direct(buffer, offset) {\n buffer[offset] = this.targetObject[this.propertyName];\n }\n _getValue_array(buffer, offset) {\n const source = this.resolvedProperty;\n for(let i = 0, n = source.length; i !== n; ++i)buffer[offset++] = source[i];\n }\n _getValue_arrayElement(buffer, offset) {\n buffer[offset] = this.resolvedProperty[this.propertyIndex];\n }\n _getValue_toArray(buffer, offset) {\n this.resolvedProperty.toArray(buffer, offset);\n }\n // Direct\n _setValue_direct(buffer, offset) {\n this.targetObject[this.propertyName] = buffer[offset];\n }\n _setValue_direct_setNeedsUpdate(buffer, offset) {\n this.targetObject[this.propertyName] = buffer[offset];\n this.targetObject.needsUpdate = true;\n }\n _setValue_direct_setMatrixWorldNeedsUpdate(buffer, offset) {\n this.targetObject[this.propertyName] = buffer[offset];\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n // EntireArray\n _setValue_array(buffer, offset) {\n const dest = this.resolvedProperty;\n for(let i = 0, n = dest.length; i !== n; ++i)dest[i] = buffer[offset++];\n }\n _setValue_array_setNeedsUpdate(buffer, offset) {\n const dest = this.resolvedProperty;\n for(let i = 0, n = dest.length; i !== n; ++i)dest[i] = buffer[offset++];\n this.targetObject.needsUpdate = true;\n }\n _setValue_array_setMatrixWorldNeedsUpdate(buffer, offset) {\n const dest = this.resolvedProperty;\n for(let i = 0, n = dest.length; i !== n; ++i)dest[i] = buffer[offset++];\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n // ArrayElement\n _setValue_arrayElement(buffer, offset) {\n this.resolvedProperty[this.propertyIndex] = buffer[offset];\n }\n _setValue_arrayElement_setNeedsUpdate(buffer, offset) {\n this.resolvedProperty[this.propertyIndex] = buffer[offset];\n this.targetObject.needsUpdate = true;\n }\n _setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer, offset) {\n this.resolvedProperty[this.propertyIndex] = buffer[offset];\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n // HasToFromArray\n _setValue_fromArray(buffer, offset) {\n this.resolvedProperty.fromArray(buffer, offset);\n }\n _setValue_fromArray_setNeedsUpdate(buffer, offset) {\n this.resolvedProperty.fromArray(buffer, offset);\n this.targetObject.needsUpdate = true;\n }\n _setValue_fromArray_setMatrixWorldNeedsUpdate(buffer, offset) {\n this.resolvedProperty.fromArray(buffer, offset);\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n _getValue_unbound(targetArray, offset) {\n this.bind();\n this.getValue(targetArray, offset);\n }\n _setValue_unbound(sourceArray, offset) {\n this.bind();\n this.setValue(sourceArray, offset);\n }\n // create getter / setter pair for a property in the scene graph\n bind() {\n let targetObject = this.node;\n const parsedPath = this.parsedPath;\n const objectName = parsedPath.objectName;\n const propertyName = parsedPath.propertyName;\n let propertyIndex = parsedPath.propertyIndex;\n if (!targetObject) {\n targetObject = $d5b33d7c30034067$export$7bf70fcf9f891893.findNode(this.rootNode, parsedPath.nodeName);\n this.node = targetObject;\n }\n // set fail state so we can just 'return' on error\n this.getValue = this._getValue_unavailable;\n this.setValue = this._setValue_unavailable;\n // ensure there is a value node\n if (!targetObject) {\n console.warn(\"THREE.PropertyBinding: No target node found for track: \" + this.path + \".\");\n return;\n }\n if (objectName) {\n let objectIndex = parsedPath.objectIndex;\n // special cases were we need to reach deeper into the hierarchy to get the face materials....\n switch(objectName){\n case \"materials\":\n if (!targetObject.material) {\n console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\", this);\n return;\n }\n if (!targetObject.material.materials) {\n console.error(\"THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.\", this);\n return;\n }\n targetObject = targetObject.material.materials;\n break;\n case \"bones\":\n if (!targetObject.skeleton) {\n console.error(\"THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.\", this);\n return;\n }\n // potential future optimization: skip this if propertyIndex is already an integer\n // and convert the integer string to a true integer.\n targetObject = targetObject.skeleton.bones;\n // support resolving morphTarget names into indices.\n for(let i = 0; i < targetObject.length; i++)if (targetObject[i].name === objectIndex) {\n objectIndex = i;\n break;\n }\n break;\n case \"map\":\n if (\"map\" in targetObject) {\n targetObject = targetObject.map;\n break;\n }\n if (!targetObject.material) {\n console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\", this);\n return;\n }\n if (!targetObject.material.map) {\n console.error(\"THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.\", this);\n return;\n }\n targetObject = targetObject.material.map;\n break;\n default:\n if (targetObject[objectName] === undefined) {\n console.error(\"THREE.PropertyBinding: Can not bind to objectName of node undefined.\", this);\n return;\n }\n targetObject = targetObject[objectName];\n }\n if (objectIndex !== undefined) {\n if (targetObject[objectIndex] === undefined) {\n console.error(\"THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.\", this, targetObject);\n return;\n }\n targetObject = targetObject[objectIndex];\n }\n }\n // resolve property\n const nodeProperty = targetObject[propertyName];\n if (nodeProperty === undefined) {\n const nodeName = parsedPath.nodeName;\n console.error(\"THREE.PropertyBinding: Trying to update property for track: \" + nodeName + \".\" + propertyName + \" but it wasn't found.\", targetObject);\n return;\n }\n // determine versioning scheme\n let versioning = this.Versioning.None;\n this.targetObject = targetObject;\n if (targetObject.needsUpdate !== undefined) versioning = this.Versioning.NeedsUpdate;\n else if (targetObject.matrixWorldNeedsUpdate !== undefined) versioning = this.Versioning.MatrixWorldNeedsUpdate;\n // determine how the property gets bound\n let bindingType = this.BindingType.Direct;\n if (propertyIndex !== undefined) {\n // access a sub element of the property array (only primitives are supported right now)\n if (propertyName === \"morphTargetInfluences\") {\n // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n // support resolving morphTarget names into indices.\n if (!targetObject.geometry) {\n console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.\", this);\n return;\n }\n if (!targetObject.geometry.morphAttributes) {\n console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.\", this);\n return;\n }\n if (targetObject.morphTargetDictionary[propertyIndex] !== undefined) propertyIndex = targetObject.morphTargetDictionary[propertyIndex];\n }\n bindingType = this.BindingType.ArrayElement;\n this.resolvedProperty = nodeProperty;\n this.propertyIndex = propertyIndex;\n } else if (nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined) {\n // must use copy for Object3D.Euler/Quaternion\n bindingType = this.BindingType.HasFromToArray;\n this.resolvedProperty = nodeProperty;\n } else if (Array.isArray(nodeProperty)) {\n bindingType = this.BindingType.EntireArray;\n this.resolvedProperty = nodeProperty;\n } else this.propertyName = propertyName;\n // select getter / setter\n this.getValue = this.GetterByBindingType[bindingType];\n this.setValue = this.SetterByBindingTypeAndVersioning[bindingType][versioning];\n }\n unbind() {\n this.node = null;\n // back to the prototype version of getValue / setValue\n // note: avoiding to mutate the shape of 'this' via 'delete'\n this.getValue = this._getValue_unbound;\n this.setValue = this._setValue_unbound;\n }\n}\n$d5b33d7c30034067$export$7bf70fcf9f891893.Composite = $d5b33d7c30034067$var$Composite;\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.BindingType = {\n Direct: 0,\n EntireArray: 1,\n ArrayElement: 2,\n HasFromToArray: 3\n};\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.Versioning = {\n None: 0,\n NeedsUpdate: 1,\n MatrixWorldNeedsUpdate: 2\n};\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.GetterByBindingType = [\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_direct,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_array,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_arrayElement,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_toArray\n];\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.SetterByBindingTypeAndVersioning = [\n [\n // Direct\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_direct,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_direct_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_direct_setMatrixWorldNeedsUpdate\n ],\n [\n // EntireArray\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_array,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_array_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_array_setMatrixWorldNeedsUpdate\n ],\n [\n // ArrayElement\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_arrayElement,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_arrayElement_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate\n ],\n [\n // HasToFromArray\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_fromArray,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_fromArray_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate\n ]\n];\n/**\n *\n * A group of objects that receives a shared animation state.\n *\n * Usage:\n *\n * - Add objects you would otherwise pass as 'root' to the\n * constructor or the .clipAction method of AnimationMixer.\n *\n * - Instead pass this object as 'root'.\n *\n * - You can also add and remove objects later when the mixer\n * is running.\n *\n * Note:\n *\n * Objects of this class appear as one object to the mixer,\n * so cache control of the individual objects must be done\n * on the group.\n *\n * Limitation:\n *\n * - The animated properties must be compatible among the\n * all objects in the group.\n *\n * - A single property can either be controlled through a\n * target group or directly, but not both.\n */ class $d5b33d7c30034067$export$30619c2afd3f34db {\n constructor(){\n this.isAnimationObjectGroup = true;\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n // cached objects followed by the active ones\n this._objects = Array.prototype.slice.call(arguments);\n this.nCachedObjects_ = 0; // threshold\n // note: read by PropertyBinding.Composite\n const indices = {};\n this._indicesByUUID = indices; // for bookkeeping\n for(let i = 0, n = arguments.length; i !== n; ++i)indices[arguments[i].uuid] = i;\n this._paths = []; // inside: string\n this._parsedPaths = []; // inside: { we don't care, here }\n this._bindings = []; // inside: Array< PropertyBinding >\n this._bindingsIndicesByPath = {}; // inside: indices in these arrays\n const scope = this;\n this.stats = {\n objects: {\n get total () {\n return scope._objects.length;\n },\n get inUse () {\n return this.total - scope.nCachedObjects_;\n }\n },\n get bindingsPerObject () {\n return scope._bindings.length;\n }\n };\n }\n add() {\n const objects = this._objects, indicesByUUID = this._indicesByUUID, paths = this._paths, parsedPaths = this._parsedPaths, bindings = this._bindings, nBindings = bindings.length;\n let knownObject = undefined, nObjects = objects.length, nCachedObjects = this.nCachedObjects_;\n for(let i = 0, n = arguments.length; i !== n; ++i){\n const object = arguments[i], uuid = object.uuid;\n let index = indicesByUUID[uuid];\n if (index === undefined) {\n // unknown object -> add it to the ACTIVE region\n index = nObjects++;\n indicesByUUID[uuid] = index;\n objects.push(object);\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j)bindings[j].push(new $d5b33d7c30034067$export$7bf70fcf9f891893(object, paths[j], parsedPaths[j]));\n } else if (index < nCachedObjects) {\n knownObject = objects[index];\n // move existing object to the ACTIVE region\n const firstActiveIndex = --nCachedObjects, lastCachedObject = objects[firstActiveIndex];\n indicesByUUID[lastCachedObject.uuid] = index;\n objects[index] = lastCachedObject;\n indicesByUUID[uuid] = firstActiveIndex;\n objects[firstActiveIndex] = object;\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j], lastCached = bindingsForPath[firstActiveIndex];\n let binding = bindingsForPath[index];\n bindingsForPath[index] = lastCached;\n if (binding === undefined) // since we do not bother to create new bindings\n // for objects that are cached, the binding may\n // or may not exist\n binding = new $d5b33d7c30034067$export$7bf70fcf9f891893(object, paths[j], parsedPaths[j]);\n bindingsForPath[firstActiveIndex] = binding;\n }\n } else if (objects[index] !== knownObject) console.error(\"THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.\");\n // else the object is already where we want it to be\n } // for arguments\n this.nCachedObjects_ = nCachedObjects;\n }\n remove() {\n const objects = this._objects, indicesByUUID = this._indicesByUUID, bindings = this._bindings, nBindings = bindings.length;\n let nCachedObjects = this.nCachedObjects_;\n for(let i = 0, n = arguments.length; i !== n; ++i){\n const object = arguments[i], uuid = object.uuid, index = indicesByUUID[uuid];\n if (index !== undefined && index >= nCachedObjects) {\n // move existing object into the CACHED region\n const lastCachedIndex = nCachedObjects++, firstActiveObject = objects[lastCachedIndex];\n indicesByUUID[firstActiveObject.uuid] = index;\n objects[index] = firstActiveObject;\n indicesByUUID[uuid] = lastCachedIndex;\n objects[lastCachedIndex] = object;\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j], firstActive = bindingsForPath[lastCachedIndex], binding = bindingsForPath[index];\n bindingsForPath[index] = firstActive;\n bindingsForPath[lastCachedIndex] = binding;\n }\n }\n } // for arguments\n this.nCachedObjects_ = nCachedObjects;\n }\n // remove & forget\n uncache() {\n const objects = this._objects, indicesByUUID = this._indicesByUUID, bindings = this._bindings, nBindings = bindings.length;\n let nCachedObjects = this.nCachedObjects_, nObjects = objects.length;\n for(let i = 0, n = arguments.length; i !== n; ++i){\n const object = arguments[i], uuid = object.uuid, index = indicesByUUID[uuid];\n if (index !== undefined) {\n delete indicesByUUID[uuid];\n if (index < nCachedObjects) {\n // object is cached, shrink the CACHED region\n const firstActiveIndex = --nCachedObjects, lastCachedObject = objects[firstActiveIndex], lastIndex = --nObjects, lastObject = objects[lastIndex];\n // last cached object takes this object's place\n indicesByUUID[lastCachedObject.uuid] = index;\n objects[index] = lastCachedObject;\n // last object goes to the activated slot and pop\n indicesByUUID[lastObject.uuid] = firstActiveIndex;\n objects[firstActiveIndex] = lastObject;\n objects.pop();\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j], lastCached = bindingsForPath[firstActiveIndex], last = bindingsForPath[lastIndex];\n bindingsForPath[index] = lastCached;\n bindingsForPath[firstActiveIndex] = last;\n bindingsForPath.pop();\n }\n } else {\n // object is active, just swap with the last and pop\n const lastIndex = --nObjects, lastObject = objects[lastIndex];\n if (lastIndex > 0) indicesByUUID[lastObject.uuid] = index;\n objects[index] = lastObject;\n objects.pop();\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j];\n bindingsForPath[index] = bindingsForPath[lastIndex];\n bindingsForPath.pop();\n }\n } // cached or active\n } // if object is known\n } // for arguments\n this.nCachedObjects_ = nCachedObjects;\n }\n // Internal interface used by befriended PropertyBinding.Composite:\n subscribe_(path, parsedPath) {\n // returns an array of bindings for the given path that is changed\n // according to the contained objects in the group\n const indicesByPath = this._bindingsIndicesByPath;\n let index = indicesByPath[path];\n const bindings = this._bindings;\n if (index !== undefined) return bindings[index];\n const paths = this._paths, parsedPaths = this._parsedPaths, objects = this._objects, nObjects = objects.length, nCachedObjects = this.nCachedObjects_, bindingsForPath = new Array(nObjects);\n index = bindings.length;\n indicesByPath[path] = index;\n paths.push(path);\n parsedPaths.push(parsedPath);\n bindings.push(bindingsForPath);\n for(let i = nCachedObjects, n = objects.length; i !== n; ++i){\n const object = objects[i];\n bindingsForPath[i] = new $d5b33d7c30034067$export$7bf70fcf9f891893(object, path, parsedPath);\n }\n return bindingsForPath;\n }\n unsubscribe_(path) {\n // tells the group to forget about a property path and no longer\n // update the array previously obtained with 'subscribe_'\n const indicesByPath = this._bindingsIndicesByPath, index = indicesByPath[path];\n if (index !== undefined) {\n const paths = this._paths, parsedPaths = this._parsedPaths, bindings = this._bindings, lastBindingsIndex = bindings.length - 1, lastBindings = bindings[lastBindingsIndex], lastBindingsPath = path[lastBindingsIndex];\n indicesByPath[lastBindingsPath] = index;\n bindings[index] = lastBindings;\n bindings.pop();\n parsedPaths[index] = parsedPaths[lastBindingsIndex];\n parsedPaths.pop();\n paths[index] = paths[lastBindingsIndex];\n paths.pop();\n }\n }\n}\nclass $d5b33d7c30034067$export$6946940a69e799e {\n constructor(mixer, clip, localRoot = null, blendMode = clip.blendMode){\n this._mixer = mixer;\n this._clip = clip;\n this._localRoot = localRoot;\n this.blendMode = blendMode;\n const tracks = clip.tracks, nTracks = tracks.length, interpolants = new Array(nTracks);\n const interpolantSettings = {\n endingStart: $d5b33d7c30034067$export$7f795934b84ab523,\n endingEnd: $d5b33d7c30034067$export$7f795934b84ab523\n };\n for(let i = 0; i !== nTracks; ++i){\n const interpolant = tracks[i].createInterpolant(null);\n interpolants[i] = interpolant;\n interpolant.settings = interpolantSettings;\n }\n this._interpolantSettings = interpolantSettings;\n this._interpolants = interpolants; // bound by the mixer\n // inside: PropertyMixer (managed by the mixer)\n this._propertyBindings = new Array(nTracks);\n this._cacheIndex = null; // for the memory manager\n this._byClipCacheIndex = null; // for the memory manager\n this._timeScaleInterpolant = null;\n this._weightInterpolant = null;\n this.loop = $d5b33d7c30034067$export$dfaf4422ce096e29;\n this._loopCount = -1;\n // global mixer time when the action is to be started\n // it's set back to 'null' upon start of the action\n this._startTime = null;\n // scaled local time of the action\n // gets clamped or wrapped to 0..clip.duration according to loop\n this.time = 0;\n this.timeScale = 1;\n this._effectiveTimeScale = 1;\n this.weight = 1;\n this._effectiveWeight = 1;\n this.repetitions = Infinity; // no. of repetitions when looping\n this.paused = false; // true -> zero effective time scale\n this.enabled = true; // false -> zero effective weight\n this.clampWhenFinished = false; // keep feeding the last frame?\n this.zeroSlopeAtStart = true; // for smooth interpolation w/o separate\n this.zeroSlopeAtEnd = true; // clips for start, loop and end\n }\n // State & Scheduling\n play() {\n this._mixer._activateAction(this);\n return this;\n }\n stop() {\n this._mixer._deactivateAction(this);\n return this.reset();\n }\n reset() {\n this.paused = false;\n this.enabled = true;\n this.time = 0; // restart clip\n this._loopCount = -1; // forget previous loops\n this._startTime = null; // forget scheduling\n return this.stopFading().stopWarping();\n }\n isRunning() {\n return this.enabled && !this.paused && this.timeScale !== 0 && this._startTime === null && this._mixer._isActiveAction(this);\n }\n // return true when play has been called\n isScheduled() {\n return this._mixer._isActiveAction(this);\n }\n startAt(time) {\n this._startTime = time;\n return this;\n }\n setLoop(mode, repetitions) {\n this.loop = mode;\n this.repetitions = repetitions;\n return this;\n }\n // Weight\n // set the weight stopping any scheduled fading\n // although .enabled = false yields an effective weight of zero, this\n // method does *not* change .enabled, because it would be confusing\n setEffectiveWeight(weight) {\n this.weight = weight;\n // note: same logic as when updated at runtime\n this._effectiveWeight = this.enabled ? weight : 0;\n return this.stopFading();\n }\n // return the weight considering fading and .enabled\n getEffectiveWeight() {\n return this._effectiveWeight;\n }\n fadeIn(duration) {\n return this._scheduleFading(duration, 0, 1);\n }\n fadeOut(duration) {\n return this._scheduleFading(duration, 1, 0);\n }\n crossFadeFrom(fadeOutAction, duration, warp) {\n fadeOutAction.fadeOut(duration);\n this.fadeIn(duration);\n if (warp) {\n const fadeInDuration = this._clip.duration, fadeOutDuration = fadeOutAction._clip.duration, startEndRatio = fadeOutDuration / fadeInDuration, endStartRatio = fadeInDuration / fadeOutDuration;\n fadeOutAction.warp(1.0, startEndRatio, duration);\n this.warp(endStartRatio, 1.0, duration);\n }\n return this;\n }\n crossFadeTo(fadeInAction, duration, warp) {\n return fadeInAction.crossFadeFrom(this, duration, warp);\n }\n stopFading() {\n const weightInterpolant = this._weightInterpolant;\n if (weightInterpolant !== null) {\n this._weightInterpolant = null;\n this._mixer._takeBackControlInterpolant(weightInterpolant);\n }\n return this;\n }\n // Time Scale Control\n // set the time scale stopping any scheduled warping\n // although .paused = true yields an effective time scale of zero, this\n // method does *not* change .paused, because it would be confusing\n setEffectiveTimeScale(timeScale) {\n this.timeScale = timeScale;\n this._effectiveTimeScale = this.paused ? 0 : timeScale;\n return this.stopWarping();\n }\n // return the time scale considering warping and .paused\n getEffectiveTimeScale() {\n return this._effectiveTimeScale;\n }\n setDuration(duration) {\n this.timeScale = this._clip.duration / duration;\n return this.stopWarping();\n }\n syncWith(action) {\n this.time = action.time;\n this.timeScale = action.timeScale;\n return this.stopWarping();\n }\n halt(duration) {\n return this.warp(this._effectiveTimeScale, 0, duration);\n }\n warp(startTimeScale, endTimeScale, duration) {\n const mixer = this._mixer, now = mixer.time, timeScale = this.timeScale;\n let interpolant = this._timeScaleInterpolant;\n if (interpolant === null) {\n interpolant = mixer._lendControlInterpolant();\n this._timeScaleInterpolant = interpolant;\n }\n const times = interpolant.parameterPositions, values = interpolant.sampleValues;\n times[0] = now;\n times[1] = now + duration;\n values[0] = startTimeScale / timeScale;\n values[1] = endTimeScale / timeScale;\n return this;\n }\n stopWarping() {\n const timeScaleInterpolant = this._timeScaleInterpolant;\n if (timeScaleInterpolant !== null) {\n this._timeScaleInterpolant = null;\n this._mixer._takeBackControlInterpolant(timeScaleInterpolant);\n }\n return this;\n }\n // Object Accessors\n getMixer() {\n return this._mixer;\n }\n getClip() {\n return this._clip;\n }\n getRoot() {\n return this._localRoot || this._mixer._root;\n }\n // Interna\n _update(time, deltaTime, timeDirection, accuIndex) {\n // called by the mixer\n if (!this.enabled) {\n // call ._updateWeight() to update ._effectiveWeight\n this._updateWeight(time);\n return;\n }\n const startTime = this._startTime;\n if (startTime !== null) {\n // check for scheduled start of action\n const timeRunning = (time - startTime) * timeDirection;\n if (timeRunning < 0 || timeDirection === 0) deltaTime = 0;\n else {\n this._startTime = null; // unschedule\n deltaTime = timeDirection * timeRunning;\n }\n }\n // apply time scale and advance time\n deltaTime *= this._updateTimeScale(time);\n const clipTime = this._updateTime(deltaTime);\n // note: _updateTime may disable the action resulting in\n // an effective weight of 0\n const weight = this._updateWeight(time);\n if (weight > 0) {\n const interpolants = this._interpolants;\n const propertyMixers = this._propertyBindings;\n switch(this.blendMode){\n case $d5b33d7c30034067$export$d875e029ef558d3:\n for(let j = 0, m = interpolants.length; j !== m; ++j){\n interpolants[j].evaluate(clipTime);\n propertyMixers[j].accumulateAdditive(weight);\n }\n break;\n case $d5b33d7c30034067$export$bcfbbdcf8de7f8cd:\n default:\n for(let j = 0, m = interpolants.length; j !== m; ++j){\n interpolants[j].evaluate(clipTime);\n propertyMixers[j].accumulate(accuIndex, weight);\n }\n }\n }\n }\n _updateWeight(time) {\n let weight = 0;\n if (this.enabled) {\n weight = this.weight;\n const interpolant = this._weightInterpolant;\n if (interpolant !== null) {\n const interpolantValue = interpolant.evaluate(time)[0];\n weight *= interpolantValue;\n if (time > interpolant.parameterPositions[1]) {\n this.stopFading();\n if (interpolantValue === 0) // faded out, disable\n this.enabled = false;\n }\n }\n }\n this._effectiveWeight = weight;\n return weight;\n }\n _updateTimeScale(time) {\n let timeScale = 0;\n if (!this.paused) {\n timeScale = this.timeScale;\n const interpolant = this._timeScaleInterpolant;\n if (interpolant !== null) {\n const interpolantValue = interpolant.evaluate(time)[0];\n timeScale *= interpolantValue;\n if (time > interpolant.parameterPositions[1]) {\n this.stopWarping();\n if (timeScale === 0) // motion has halted, pause\n this.paused = true;\n else // warp done - apply final time scale\n this.timeScale = timeScale;\n }\n }\n }\n this._effectiveTimeScale = timeScale;\n return timeScale;\n }\n _updateTime(deltaTime) {\n const duration = this._clip.duration;\n const loop = this.loop;\n let time = this.time + deltaTime;\n let loopCount = this._loopCount;\n const pingPong = loop === $d5b33d7c30034067$export$f8f6f2041b78e210;\n if (deltaTime === 0) {\n if (loopCount === -1) return time;\n return pingPong && (loopCount & 1) === 1 ? duration - time : time;\n }\n if (loop === $d5b33d7c30034067$export$d62fdc9d1b1cccad) {\n if (loopCount === -1) {\n // just started\n this._loopCount = 0;\n this._setEndings(true, true, false);\n }\n handle_stop: {\n if (time >= duration) time = duration;\n else if (time < 0) time = 0;\n else {\n this.time = time;\n break handle_stop;\n }\n if (this.clampWhenFinished) this.paused = true;\n else this.enabled = false;\n this.time = time;\n this._mixer.dispatchEvent({\n type: \"finished\",\n action: this,\n direction: deltaTime < 0 ? -1 : 1\n });\n }\n } else {\n if (loopCount === -1) {\n // just started\n if (deltaTime >= 0) {\n loopCount = 0;\n this._setEndings(true, this.repetitions === 0, pingPong);\n } else // when looping in reverse direction, the initial\n // transition through zero counts as a repetition,\n // so leave loopCount at -1\n this._setEndings(this.repetitions === 0, true, pingPong);\n }\n if (time >= duration || time < 0) {\n // wrap around\n const loopDelta = Math.floor(time / duration); // signed\n time -= duration * loopDelta;\n loopCount += Math.abs(loopDelta);\n const pending = this.repetitions - loopCount;\n if (pending <= 0) {\n // have to stop (switch state, clamp time, fire event)\n if (this.clampWhenFinished) this.paused = true;\n else this.enabled = false;\n time = deltaTime > 0 ? duration : 0;\n this.time = time;\n this._mixer.dispatchEvent({\n type: \"finished\",\n action: this,\n direction: deltaTime > 0 ? 1 : -1\n });\n } else {\n // keep running\n if (pending === 1) {\n // entering the last round\n const atStart = deltaTime < 0;\n this._setEndings(atStart, !atStart, pingPong);\n } else this._setEndings(false, false, pingPong);\n this._loopCount = loopCount;\n this.time = time;\n this._mixer.dispatchEvent({\n type: \"loop\",\n action: this,\n loopDelta: loopDelta\n });\n }\n } else this.time = time;\n if (pingPong && (loopCount & 1) === 1) // invert time for the \"pong round\"\n return duration - time;\n }\n return time;\n }\n _setEndings(atStart, atEnd, pingPong) {\n const settings = this._interpolantSettings;\n if (pingPong) {\n settings.endingStart = $d5b33d7c30034067$export$24a4ccb5099273b5;\n settings.endingEnd = $d5b33d7c30034067$export$24a4ccb5099273b5;\n } else {\n // assuming for LoopOnce atStart == atEnd == true\n if (atStart) settings.endingStart = this.zeroSlopeAtStart ? $d5b33d7c30034067$export$24a4ccb5099273b5 : $d5b33d7c30034067$export$7f795934b84ab523;\n else settings.endingStart = $d5b33d7c30034067$export$8e8c3ecdcd8e1fee;\n if (atEnd) settings.endingEnd = this.zeroSlopeAtEnd ? $d5b33d7c30034067$export$24a4ccb5099273b5 : $d5b33d7c30034067$export$7f795934b84ab523;\n else settings.endingEnd = $d5b33d7c30034067$export$8e8c3ecdcd8e1fee;\n }\n }\n _scheduleFading(duration, weightNow, weightThen) {\n const mixer = this._mixer, now = mixer.time;\n let interpolant = this._weightInterpolant;\n if (interpolant === null) {\n interpolant = mixer._lendControlInterpolant();\n this._weightInterpolant = interpolant;\n }\n const times = interpolant.parameterPositions, values = interpolant.sampleValues;\n times[0] = now;\n values[0] = weightNow;\n times[1] = now + duration;\n values[1] = weightThen;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_controlInterpolantsResultBuffer = new Float32Array(1);\nclass $d5b33d7c30034067$export$fbd77e5aefaa0102 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(root){\n super();\n this._root = root;\n this._initMemoryManager();\n this._accuIndex = 0;\n this.time = 0;\n this.timeScale = 1.0;\n }\n _bindAction(action, prototypeAction) {\n const root = action._localRoot || this._root, tracks = action._clip.tracks, nTracks = tracks.length, bindings = action._propertyBindings, interpolants = action._interpolants, rootUuid = root.uuid, bindingsByRoot = this._bindingsByRootAndName;\n let bindingsByName = bindingsByRoot[rootUuid];\n if (bindingsByName === undefined) {\n bindingsByName = {};\n bindingsByRoot[rootUuid] = bindingsByName;\n }\n for(let i = 0; i !== nTracks; ++i){\n const track = tracks[i], trackName = track.name;\n let binding = bindingsByName[trackName];\n if (binding !== undefined) {\n ++binding.referenceCount;\n bindings[i] = binding;\n } else {\n binding = bindings[i];\n if (binding !== undefined) {\n // existing binding, make sure the cache knows\n if (binding._cacheIndex === null) {\n ++binding.referenceCount;\n this._addInactiveBinding(binding, rootUuid, trackName);\n }\n continue;\n }\n const path = prototypeAction && prototypeAction._propertyBindings[i].binding.parsedPath;\n binding = new $d5b33d7c30034067$export$dfe0af1ca1acb78a($d5b33d7c30034067$export$7bf70fcf9f891893.create(root, trackName, path), track.ValueTypeName, track.getValueSize());\n ++binding.referenceCount;\n this._addInactiveBinding(binding, rootUuid, trackName);\n bindings[i] = binding;\n }\n interpolants[i].resultBuffer = binding.buffer;\n }\n }\n _activateAction(action) {\n if (!this._isActiveAction(action)) {\n if (action._cacheIndex === null) {\n // this action has been forgotten by the cache, but the user\n // appears to be still using it -> rebind\n const rootUuid = (action._localRoot || this._root).uuid, clipUuid = action._clip.uuid, actionsForClip = this._actionsByClip[clipUuid];\n this._bindAction(action, actionsForClip && actionsForClip.knownActions[0]);\n this._addInactiveAction(action, clipUuid, rootUuid);\n }\n const bindings = action._propertyBindings;\n // increment reference counts / sort out state\n for(let i = 0, n = bindings.length; i !== n; ++i){\n const binding = bindings[i];\n if (binding.useCount++ === 0) {\n this._lendBinding(binding);\n binding.saveOriginalState();\n }\n }\n this._lendAction(action);\n }\n }\n _deactivateAction(action) {\n if (this._isActiveAction(action)) {\n const bindings = action._propertyBindings;\n // decrement reference counts / sort out state\n for(let i = 0, n = bindings.length; i !== n; ++i){\n const binding = bindings[i];\n if (--binding.useCount === 0) {\n binding.restoreOriginalState();\n this._takeBackBinding(binding);\n }\n }\n this._takeBackAction(action);\n }\n }\n // Memory manager\n _initMemoryManager() {\n this._actions = []; // 'nActiveActions' followed by inactive ones\n this._nActiveActions = 0;\n this._actionsByClip = {};\n // inside:\n // {\n // \tknownActions: Array< AnimationAction > - used as prototypes\n // \tactionByRoot: AnimationAction - lookup\n // }\n this._bindings = []; // 'nActiveBindings' followed by inactive ones\n this._nActiveBindings = 0;\n this._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n this._controlInterpolants = []; // same game as above\n this._nActiveControlInterpolants = 0;\n const scope = this;\n this.stats = {\n actions: {\n get total () {\n return scope._actions.length;\n },\n get inUse () {\n return scope._nActiveActions;\n }\n },\n bindings: {\n get total () {\n return scope._bindings.length;\n },\n get inUse () {\n return scope._nActiveBindings;\n }\n },\n controlInterpolants: {\n get total () {\n return scope._controlInterpolants.length;\n },\n get inUse () {\n return scope._nActiveControlInterpolants;\n }\n }\n };\n }\n // Memory management for AnimationAction objects\n _isActiveAction(action) {\n const index = action._cacheIndex;\n return index !== null && index < this._nActiveActions;\n }\n _addInactiveAction(action, clipUuid, rootUuid) {\n const actions = this._actions, actionsByClip = this._actionsByClip;\n let actionsForClip = actionsByClip[clipUuid];\n if (actionsForClip === undefined) {\n actionsForClip = {\n knownActions: [\n action\n ],\n actionByRoot: {}\n };\n action._byClipCacheIndex = 0;\n actionsByClip[clipUuid] = actionsForClip;\n } else {\n const knownActions = actionsForClip.knownActions;\n action._byClipCacheIndex = knownActions.length;\n knownActions.push(action);\n }\n action._cacheIndex = actions.length;\n actions.push(action);\n actionsForClip.actionByRoot[rootUuid] = action;\n }\n _removeInactiveAction(action) {\n const actions = this._actions, lastInactiveAction = actions[actions.length - 1], cacheIndex = action._cacheIndex;\n lastInactiveAction._cacheIndex = cacheIndex;\n actions[cacheIndex] = lastInactiveAction;\n actions.pop();\n action._cacheIndex = null;\n const clipUuid = action._clip.uuid, actionsByClip = this._actionsByClip, actionsForClip = actionsByClip[clipUuid], knownActionsForClip = actionsForClip.knownActions, lastKnownAction = knownActionsForClip[knownActionsForClip.length - 1], byClipCacheIndex = action._byClipCacheIndex;\n lastKnownAction._byClipCacheIndex = byClipCacheIndex;\n knownActionsForClip[byClipCacheIndex] = lastKnownAction;\n knownActionsForClip.pop();\n action._byClipCacheIndex = null;\n const actionByRoot = actionsForClip.actionByRoot, rootUuid = (action._localRoot || this._root).uuid;\n delete actionByRoot[rootUuid];\n if (knownActionsForClip.length === 0) delete actionsByClip[clipUuid];\n this._removeInactiveBindingsForAction(action);\n }\n _removeInactiveBindingsForAction(action) {\n const bindings = action._propertyBindings;\n for(let i = 0, n = bindings.length; i !== n; ++i){\n const binding = bindings[i];\n if (--binding.referenceCount === 0) this._removeInactiveBinding(binding);\n }\n }\n _lendAction(action) {\n // [ active actions | inactive actions ]\n // [ active actions >| inactive actions ]\n // s a\n // <-swap->\n // a s\n const actions = this._actions, prevIndex = action._cacheIndex, lastActiveIndex = this._nActiveActions++, firstInactiveAction = actions[lastActiveIndex];\n action._cacheIndex = lastActiveIndex;\n actions[lastActiveIndex] = action;\n firstInactiveAction._cacheIndex = prevIndex;\n actions[prevIndex] = firstInactiveAction;\n }\n _takeBackAction(action) {\n // [ active actions | inactive actions ]\n // [ active actions |< inactive actions ]\n // a s\n // <-swap->\n // s a\n const actions = this._actions, prevIndex = action._cacheIndex, firstInactiveIndex = --this._nActiveActions, lastActiveAction = actions[firstInactiveIndex];\n action._cacheIndex = firstInactiveIndex;\n actions[firstInactiveIndex] = action;\n lastActiveAction._cacheIndex = prevIndex;\n actions[prevIndex] = lastActiveAction;\n }\n // Memory management for PropertyMixer objects\n _addInactiveBinding(binding, rootUuid, trackName) {\n const bindingsByRoot = this._bindingsByRootAndName, bindings = this._bindings;\n let bindingByName = bindingsByRoot[rootUuid];\n if (bindingByName === undefined) {\n bindingByName = {};\n bindingsByRoot[rootUuid] = bindingByName;\n }\n bindingByName[trackName] = binding;\n binding._cacheIndex = bindings.length;\n bindings.push(binding);\n }\n _removeInactiveBinding(binding) {\n const bindings = this._bindings, propBinding = binding.binding, rootUuid = propBinding.rootNode.uuid, trackName = propBinding.path, bindingsByRoot = this._bindingsByRootAndName, bindingByName = bindingsByRoot[rootUuid], lastInactiveBinding = bindings[bindings.length - 1], cacheIndex = binding._cacheIndex;\n lastInactiveBinding._cacheIndex = cacheIndex;\n bindings[cacheIndex] = lastInactiveBinding;\n bindings.pop();\n delete bindingByName[trackName];\n if (Object.keys(bindingByName).length === 0) delete bindingsByRoot[rootUuid];\n }\n _lendBinding(binding) {\n const bindings = this._bindings, prevIndex = binding._cacheIndex, lastActiveIndex = this._nActiveBindings++, firstInactiveBinding = bindings[lastActiveIndex];\n binding._cacheIndex = lastActiveIndex;\n bindings[lastActiveIndex] = binding;\n firstInactiveBinding._cacheIndex = prevIndex;\n bindings[prevIndex] = firstInactiveBinding;\n }\n _takeBackBinding(binding) {\n const bindings = this._bindings, prevIndex = binding._cacheIndex, firstInactiveIndex = --this._nActiveBindings, lastActiveBinding = bindings[firstInactiveIndex];\n binding._cacheIndex = firstInactiveIndex;\n bindings[firstInactiveIndex] = binding;\n lastActiveBinding._cacheIndex = prevIndex;\n bindings[prevIndex] = lastActiveBinding;\n }\n // Memory management of Interpolants for weight and time scale\n _lendControlInterpolant() {\n const interpolants = this._controlInterpolants, lastActiveIndex = this._nActiveControlInterpolants++;\n let interpolant = interpolants[lastActiveIndex];\n if (interpolant === undefined) {\n interpolant = new $d5b33d7c30034067$export$a8e6009059f51e1a(new Float32Array(2), new Float32Array(2), 1, $d5b33d7c30034067$var$_controlInterpolantsResultBuffer);\n interpolant.__cacheIndex = lastActiveIndex;\n interpolants[lastActiveIndex] = interpolant;\n }\n return interpolant;\n }\n _takeBackControlInterpolant(interpolant) {\n const interpolants = this._controlInterpolants, prevIndex = interpolant.__cacheIndex, firstInactiveIndex = --this._nActiveControlInterpolants, lastActiveInterpolant = interpolants[firstInactiveIndex];\n interpolant.__cacheIndex = firstInactiveIndex;\n interpolants[firstInactiveIndex] = interpolant;\n lastActiveInterpolant.__cacheIndex = prevIndex;\n interpolants[prevIndex] = lastActiveInterpolant;\n }\n // return an action for a clip optionally using a custom root target\n // object (this method allocates a lot of dynamic memory in case a\n // previously unknown clip/root combination is specified)\n clipAction(clip, optionalRoot, blendMode) {\n const root = optionalRoot || this._root, rootUuid = root.uuid;\n let clipObject = typeof clip === \"string\" ? $d5b33d7c30034067$export$d942c706bf23829c.findByName(root, clip) : clip;\n const clipUuid = clipObject !== null ? clipObject.uuid : clip;\n const actionsForClip = this._actionsByClip[clipUuid];\n let prototypeAction = null;\n if (blendMode === undefined) {\n if (clipObject !== null) blendMode = clipObject.blendMode;\n else blendMode = $d5b33d7c30034067$export$bcfbbdcf8de7f8cd;\n }\n if (actionsForClip !== undefined) {\n const existingAction = actionsForClip.actionByRoot[rootUuid];\n if (existingAction !== undefined && existingAction.blendMode === blendMode) return existingAction;\n // we know the clip, so we don't have to parse all\n // the bindings again but can just copy\n prototypeAction = actionsForClip.knownActions[0];\n // also, take the clip from the prototype action\n if (clipObject === null) clipObject = prototypeAction._clip;\n }\n // clip must be known when specified via string\n if (clipObject === null) return null;\n // allocate all resources required to run it\n const newAction = new $d5b33d7c30034067$export$6946940a69e799e(this, clipObject, optionalRoot, blendMode);\n this._bindAction(newAction, prototypeAction);\n // and make the action known to the memory manager\n this._addInactiveAction(newAction, clipUuid, rootUuid);\n return newAction;\n }\n // get an existing action\n existingAction(clip, optionalRoot) {\n const root = optionalRoot || this._root, rootUuid = root.uuid, clipObject = typeof clip === \"string\" ? $d5b33d7c30034067$export$d942c706bf23829c.findByName(root, clip) : clip, clipUuid = clipObject ? clipObject.uuid : clip, actionsForClip = this._actionsByClip[clipUuid];\n if (actionsForClip !== undefined) return actionsForClip.actionByRoot[rootUuid] || null;\n return null;\n }\n // deactivates all previously scheduled actions\n stopAllAction() {\n const actions = this._actions, nActions = this._nActiveActions;\n for(let i = nActions - 1; i >= 0; --i)actions[i].stop();\n return this;\n }\n // advance the time and update apply the animation\n update(deltaTime) {\n deltaTime *= this.timeScale;\n const actions = this._actions, nActions = this._nActiveActions, time = this.time += deltaTime, timeDirection = Math.sign(deltaTime), accuIndex = this._accuIndex ^= 1;\n // run active actions\n for(let i = 0; i !== nActions; ++i){\n const action = actions[i];\n action._update(time, deltaTime, timeDirection, accuIndex);\n }\n // update scene graph\n const bindings = this._bindings, nBindings = this._nActiveBindings;\n for(let i = 0; i !== nBindings; ++i)bindings[i].apply(accuIndex);\n return this;\n }\n // Allows you to seek to a specific time in an animation.\n setTime(timeInSeconds) {\n this.time = 0; // Zero out time attribute for AnimationMixer object;\n for(let i = 0; i < this._actions.length; i++)this._actions[i].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n return this.update(timeInSeconds); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n }\n // return this mixer's root target object\n getRoot() {\n return this._root;\n }\n // free all resources specific to a particular clip\n uncacheClip(clip) {\n const actions = this._actions, clipUuid = clip.uuid, actionsByClip = this._actionsByClip, actionsForClip = actionsByClip[clipUuid];\n if (actionsForClip !== undefined) {\n // note: just calling _removeInactiveAction would mess up the\n // iteration state and also require updating the state we can\n // just throw away\n const actionsToRemove = actionsForClip.knownActions;\n for(let i = 0, n = actionsToRemove.length; i !== n; ++i){\n const action = actionsToRemove[i];\n this._deactivateAction(action);\n const cacheIndex = action._cacheIndex, lastInactiveAction = actions[actions.length - 1];\n action._cacheIndex = null;\n action._byClipCacheIndex = null;\n lastInactiveAction._cacheIndex = cacheIndex;\n actions[cacheIndex] = lastInactiveAction;\n actions.pop();\n this._removeInactiveBindingsForAction(action);\n }\n delete actionsByClip[clipUuid];\n }\n }\n // free all resources specific to a particular root target object\n uncacheRoot(root) {\n const rootUuid = root.uuid, actionsByClip = this._actionsByClip;\n for(const clipUuid in actionsByClip){\n const actionByRoot = actionsByClip[clipUuid].actionByRoot, action = actionByRoot[rootUuid];\n if (action !== undefined) {\n this._deactivateAction(action);\n this._removeInactiveAction(action);\n }\n }\n const bindingsByRoot = this._bindingsByRootAndName, bindingByName = bindingsByRoot[rootUuid];\n if (bindingByName !== undefined) for(const trackName in bindingByName){\n const binding = bindingByName[trackName];\n binding.restoreOriginalState();\n this._removeInactiveBinding(binding);\n }\n }\n // remove a targeted clip from the cache\n uncacheAction(clip, optionalRoot) {\n const action = this.existingAction(clip, optionalRoot);\n if (action !== null) {\n this._deactivateAction(action);\n this._removeInactiveAction(action);\n }\n }\n}\nclass $d5b33d7c30034067$export$2947cebfe91c02f8 {\n constructor(value){\n this.value = value;\n }\n clone() {\n return new $d5b33d7c30034067$export$2947cebfe91c02f8(this.value.clone === undefined ? this.value : this.value.clone());\n }\n}\nlet $d5b33d7c30034067$var$id = 0;\nclass $d5b33d7c30034067$export$c412d5ffe1f79209 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isUniformsGroup = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$id++\n });\n this.name = \"\";\n this.usage = $d5b33d7c30034067$export$763e8360f4d7f77d;\n this.uniforms = [];\n }\n add(uniform) {\n this.uniforms.push(uniform);\n return this;\n }\n remove(uniform) {\n const index = this.uniforms.indexOf(uniform);\n if (index !== -1) this.uniforms.splice(index, 1);\n return this;\n }\n setName(name) {\n this.name = name;\n return this;\n }\n setUsage(value) {\n this.usage = value;\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n return this;\n }\n copy(source) {\n this.name = source.name;\n this.usage = source.usage;\n const uniformsSource = source.uniforms;\n this.uniforms.length = 0;\n for(let i = 0, l = uniformsSource.length; i < l; i++)this.uniforms.push(uniformsSource[i].clone());\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nclass $d5b33d7c30034067$export$25ec0e1af1389358 extends $d5b33d7c30034067$export$3d5cd879f108f53f {\n constructor(array, stride, meshPerAttribute = 1){\n super(array, stride);\n this.isInstancedInterleavedBuffer = true;\n this.meshPerAttribute = meshPerAttribute;\n }\n copy(source) {\n super.copy(source);\n this.meshPerAttribute = source.meshPerAttribute;\n return this;\n }\n clone(data) {\n const ib = super.clone(data);\n ib.meshPerAttribute = this.meshPerAttribute;\n return ib;\n }\n toJSON(data) {\n const json = super.toJSON(data);\n json.isInstancedInterleavedBuffer = true;\n json.meshPerAttribute = this.meshPerAttribute;\n return json;\n }\n}\nclass $d5b33d7c30034067$export$6b7339ae8dbddf73 {\n constructor(buffer, type, itemSize, elementSize, count){\n this.isGLBufferAttribute = true;\n this.name = \"\";\n this.buffer = buffer;\n this.type = type;\n this.itemSize = itemSize;\n this.elementSize = elementSize;\n this.count = count;\n this.version = 0;\n }\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n setBuffer(buffer) {\n this.buffer = buffer;\n return this;\n }\n setType(type, elementSize) {\n this.type = type;\n this.elementSize = elementSize;\n return this;\n }\n setItemSize(itemSize) {\n this.itemSize = itemSize;\n return this;\n }\n setCount(count) {\n this.count = count;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$8b7aaceff00bd2f {\n constructor(origin, direction, near = 0, far = Infinity){\n this.ray = new $d5b33d7c30034067$export$a186db52eed6d40e(origin, direction);\n // direction is assumed to be normalized (for accurate distance calculations)\n this.near = near;\n this.far = far;\n this.camera = null;\n this.layers = new $d5b33d7c30034067$export$89312ce47c0ca777();\n this.params = {\n Mesh: {},\n Line: {\n threshold: 1\n },\n LOD: {},\n Points: {\n threshold: 1\n },\n Sprite: {}\n };\n }\n set(origin, direction) {\n // direction is assumed to be normalized (for accurate distance calculations)\n this.ray.set(origin, direction);\n }\n setFromCamera(coords, camera) {\n if (camera.isPerspectiveCamera) {\n this.ray.origin.setFromMatrixPosition(camera.matrixWorld);\n this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();\n this.camera = camera;\n } else if (camera.isOrthographicCamera) {\n this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera\n this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);\n this.camera = camera;\n } else console.error(\"THREE.Raycaster: Unsupported camera type: \" + camera.type);\n }\n intersectObject(object, recursive = true, intersects = []) {\n $d5b33d7c30034067$var$intersectObject(object, this, intersects, recursive);\n intersects.sort($d5b33d7c30034067$var$ascSort);\n return intersects;\n }\n intersectObjects(objects, recursive = true, intersects = []) {\n for(let i = 0, l = objects.length; i < l; i++)$d5b33d7c30034067$var$intersectObject(objects[i], this, intersects, recursive);\n intersects.sort($d5b33d7c30034067$var$ascSort);\n return intersects;\n }\n}\nfunction $d5b33d7c30034067$var$ascSort(a, b) {\n return a.distance - b.distance;\n}\nfunction $d5b33d7c30034067$var$intersectObject(object, raycaster, intersects, recursive) {\n if (object.layers.test(raycaster.layers)) object.raycast(raycaster, intersects);\n if (recursive === true) {\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)$d5b33d7c30034067$var$intersectObject(children[i], raycaster, intersects, true);\n }\n}\n/**\n * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n *\n * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n * The azimuthal angle (theta) is measured from the positive z-axis.\n */ class $d5b33d7c30034067$export$d712cd887b4a00f7 {\n constructor(radius = 1, phi = 0, theta = 0){\n this.radius = radius;\n this.phi = phi; // polar angle\n this.theta = theta; // azimuthal angle\n return this;\n }\n set(radius, phi, theta) {\n this.radius = radius;\n this.phi = phi;\n this.theta = theta;\n return this;\n }\n copy(other) {\n this.radius = other.radius;\n this.phi = other.phi;\n this.theta = other.theta;\n return this;\n }\n // restrict phi to be between EPS and PI-EPS\n makeSafe() {\n const EPS = 0.000001;\n this.phi = Math.max(EPS, Math.min(Math.PI - EPS, this.phi));\n return this;\n }\n setFromVector3(v) {\n return this.setFromCartesianCoords(v.x, v.y, v.z);\n }\n setFromCartesianCoords(x, y, z) {\n this.radius = Math.sqrt(x * x + y * y + z * z);\n if (this.radius === 0) {\n this.theta = 0;\n this.phi = 0;\n } else {\n this.theta = Math.atan2(x, z);\n this.phi = Math.acos($d5b33d7c30034067$var$clamp(y / this.radius, -1, 1));\n }\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\n/**\n * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n */ class $d5b33d7c30034067$export$287165bb2177f4fd {\n constructor(radius = 1, theta = 0, y = 0){\n this.radius = radius; // distance from the origin to a point in the x-z plane\n this.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n this.y = y; // height above the x-z plane\n return this;\n }\n set(radius, theta, y) {\n this.radius = radius;\n this.theta = theta;\n this.y = y;\n return this;\n }\n copy(other) {\n this.radius = other.radius;\n this.theta = other.theta;\n this.y = other.y;\n return this;\n }\n setFromVector3(v) {\n return this.setFromCartesianCoords(v.x, v.y, v.z);\n }\n setFromCartesianCoords(x, y, z) {\n this.radius = Math.sqrt(x * x + z * z);\n this.theta = Math.atan2(x, z);\n this.y = y;\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_vector$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nclass $d5b33d7c30034067$export$60f553fa130f08b0 {\n constructor(min = new $d5b33d7c30034067$export$c977b3e384af9ae1(Infinity, Infinity), max = new $d5b33d7c30034067$export$c977b3e384af9ae1(-Infinity, -Infinity)){\n this.isBox2 = true;\n this.min = min;\n this.max = max;\n }\n set(min, max) {\n this.min.copy(min);\n this.max.copy(max);\n return this;\n }\n setFromPoints(points) {\n this.makeEmpty();\n for(let i = 0, il = points.length; i < il; i++)this.expandByPoint(points[i]);\n return this;\n }\n setFromCenterAndSize(center, size) {\n const halfSize = $d5b33d7c30034067$var$_vector$4.copy(size).multiplyScalar(0.5);\n this.min.copy(center).sub(halfSize);\n this.max.copy(center).add(halfSize);\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(box) {\n this.min.copy(box.min);\n this.max.copy(box.max);\n return this;\n }\n makeEmpty() {\n this.min.x = this.min.y = Infinity;\n this.max.x = this.max.y = -Infinity;\n return this;\n }\n isEmpty() {\n // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n return this.max.x < this.min.x || this.max.y < this.min.y;\n }\n getCenter(target) {\n return this.isEmpty() ? target.set(0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n }\n getSize(target) {\n return this.isEmpty() ? target.set(0, 0) : target.subVectors(this.max, this.min);\n }\n expandByPoint(point) {\n this.min.min(point);\n this.max.max(point);\n return this;\n }\n expandByVector(vector) {\n this.min.sub(vector);\n this.max.add(vector);\n return this;\n }\n expandByScalar(scalar) {\n this.min.addScalar(-scalar);\n this.max.addScalar(scalar);\n return this;\n }\n containsPoint(point) {\n return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y ? false : true;\n }\n containsBox(box) {\n return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y;\n }\n getParameter(point, target) {\n // This can potentially have a divide by zero if the box\n // has a size dimension of 0.\n return target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y));\n }\n intersectsBox(box) {\n // using 4 splitting planes to rule out intersections\n return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n }\n clampPoint(point, target) {\n return target.copy(point).clamp(this.min, this.max);\n }\n distanceToPoint(point) {\n return this.clampPoint(point, $d5b33d7c30034067$var$_vector$4).distanceTo(point);\n }\n intersect(box) {\n this.min.max(box.min);\n this.max.min(box.max);\n if (this.isEmpty()) this.makeEmpty();\n return this;\n }\n union(box) {\n this.min.min(box.min);\n this.max.max(box.max);\n return this;\n }\n translate(offset) {\n this.min.add(offset);\n this.max.add(offset);\n return this;\n }\n equals(box) {\n return box.min.equals(this.min) && box.max.equals(this.max);\n }\n}\nconst $d5b33d7c30034067$var$_startP = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_startEnd = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$e0ba6359f1954fd3 {\n constructor(start = new $d5b33d7c30034067$export$64b5c384219d3699(), end = new $d5b33d7c30034067$export$64b5c384219d3699()){\n this.start = start;\n this.end = end;\n }\n set(start, end) {\n this.start.copy(start);\n this.end.copy(end);\n return this;\n }\n copy(line) {\n this.start.copy(line.start);\n this.end.copy(line.end);\n return this;\n }\n getCenter(target) {\n return target.addVectors(this.start, this.end).multiplyScalar(0.5);\n }\n delta(target) {\n return target.subVectors(this.end, this.start);\n }\n distanceSq() {\n return this.start.distanceToSquared(this.end);\n }\n distance() {\n return this.start.distanceTo(this.end);\n }\n at(t, target) {\n return this.delta(target).multiplyScalar(t).add(this.start);\n }\n closestPointToPointParameter(point, clampToLine) {\n $d5b33d7c30034067$var$_startP.subVectors(point, this.start);\n $d5b33d7c30034067$var$_startEnd.subVectors(this.end, this.start);\n const startEnd2 = $d5b33d7c30034067$var$_startEnd.dot($d5b33d7c30034067$var$_startEnd);\n const startEnd_startP = $d5b33d7c30034067$var$_startEnd.dot($d5b33d7c30034067$var$_startP);\n let t = startEnd_startP / startEnd2;\n if (clampToLine) t = $d5b33d7c30034067$var$clamp(t, 0, 1);\n return t;\n }\n closestPointToPoint(point, clampToLine, target) {\n const t = this.closestPointToPointParameter(point, clampToLine);\n return this.delta(target).multiplyScalar(t).add(this.start);\n }\n applyMatrix4(matrix) {\n this.start.applyMatrix4(matrix);\n this.end.applyMatrix4(matrix);\n return this;\n }\n equals(line) {\n return line.start.equals(this.start) && line.end.equals(this.end);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_vector$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$4b14638ffdd81e68 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(light, color){\n super();\n this.light = light;\n this.matrix = light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.color = color;\n this.type = \"SpotLightHelper\";\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const positions = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 1,\n 0,\n 0,\n 0,\n -1,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n -1,\n 1\n ];\n for(let i = 0, j = 1, l = 32; i < l; i++, j++){\n const p1 = i / l * Math.PI * 2;\n const p2 = j / l * Math.PI * 2;\n positions.push(Math.cos(p1), Math.sin(p1), 1, Math.cos(p2), Math.sin(p2), 1);\n }\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n fog: false,\n toneMapped: false\n });\n this.cone = new $d5b33d7c30034067$export$ff1ed10fedfdd604(geometry, material);\n this.add(this.cone);\n this.update();\n }\n dispose() {\n this.cone.geometry.dispose();\n this.cone.material.dispose();\n }\n update() {\n this.light.updateWorldMatrix(true, false);\n this.light.target.updateWorldMatrix(true, false);\n const coneLength = this.light.distance ? this.light.distance : 1000;\n const coneWidth = coneLength * Math.tan(this.light.angle);\n this.cone.scale.set(coneWidth, coneWidth, coneLength);\n $d5b33d7c30034067$var$_vector$3.setFromMatrixPosition(this.light.target.matrixWorld);\n this.cone.lookAt($d5b33d7c30034067$var$_vector$3);\n if (this.color !== undefined) this.cone.material.color.set(this.color);\n else this.cone.material.color.copy(this.light.color);\n }\n}\nconst $d5b33d7c30034067$var$_vector$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_boneMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_matrixWorldInv = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nclass $d5b33d7c30034067$export$5277df3c9e732259 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(object){\n const bones = $d5b33d7c30034067$var$getBoneList(object);\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const vertices = [];\n const colors = [];\n const color1 = new $d5b33d7c30034067$export$892596cec99bc70e(0, 0, 1);\n const color2 = new $d5b33d7c30034067$export$892596cec99bc70e(0, 1, 0);\n for(let i = 0; i < bones.length; i++){\n const bone = bones[i];\n if (bone.parent && bone.parent.isBone) {\n vertices.push(0, 0, 0);\n vertices.push(0, 0, 0);\n colors.push(color1.r, color1.g, color1.b);\n colors.push(color2.r, color2.g, color2.b);\n }\n }\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n depthTest: false,\n depthWrite: false,\n toneMapped: false,\n transparent: true\n });\n super(geometry, material);\n this.isSkeletonHelper = true;\n this.type = \"SkeletonHelper\";\n this.root = object;\n this.bones = bones;\n this.matrix = object.matrixWorld;\n this.matrixAutoUpdate = false;\n }\n updateMatrixWorld(force) {\n const bones = this.bones;\n const geometry = this.geometry;\n const position = geometry.getAttribute(\"position\");\n $d5b33d7c30034067$var$_matrixWorldInv.copy(this.root.matrixWorld).invert();\n for(let i = 0, j = 0; i < bones.length; i++){\n const bone = bones[i];\n if (bone.parent && bone.parent.isBone) {\n $d5b33d7c30034067$var$_boneMatrix.multiplyMatrices($d5b33d7c30034067$var$_matrixWorldInv, bone.matrixWorld);\n $d5b33d7c30034067$var$_vector$2.setFromMatrixPosition($d5b33d7c30034067$var$_boneMatrix);\n position.setXYZ(j, $d5b33d7c30034067$var$_vector$2.x, $d5b33d7c30034067$var$_vector$2.y, $d5b33d7c30034067$var$_vector$2.z);\n $d5b33d7c30034067$var$_boneMatrix.multiplyMatrices($d5b33d7c30034067$var$_matrixWorldInv, bone.parent.matrixWorld);\n $d5b33d7c30034067$var$_vector$2.setFromMatrixPosition($d5b33d7c30034067$var$_boneMatrix);\n position.setXYZ(j + 1, $d5b33d7c30034067$var$_vector$2.x, $d5b33d7c30034067$var$_vector$2.y, $d5b33d7c30034067$var$_vector$2.z);\n j += 2;\n }\n }\n geometry.getAttribute(\"position\").needsUpdate = true;\n super.updateMatrixWorld(force);\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nfunction $d5b33d7c30034067$var$getBoneList(object) {\n const boneList = [];\n if (object.isBone === true) boneList.push(object);\n for(let i = 0; i < object.children.length; i++)boneList.push.apply(boneList, $d5b33d7c30034067$var$getBoneList(object.children[i]));\n return boneList;\n}\nclass $d5b33d7c30034067$export$9a9291685b9e4023 extends $d5b33d7c30034067$export$e176487c05830cc5 {\n constructor(light, sphereSize, color){\n const geometry = new $d5b33d7c30034067$export$1b417fc3b307a251(sphereSize, 4, 2);\n const material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n wireframe: true,\n fog: false,\n toneMapped: false\n });\n super(geometry, material);\n this.light = light;\n this.color = color;\n this.type = \"PointLightHelper\";\n this.matrix = this.light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.update();\n /*\n\t// TODO: delete this comment?\n\tconst distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );\n\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\n\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\n\tconst d = light.distance;\n\n\tif ( d === 0.0 ) {\n\n\t\tthis.lightDistance.visible = false;\n\n\t} else {\n\n\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t}\n\n\tthis.add( this.lightDistance );\n\t*/ }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n update() {\n this.light.updateWorldMatrix(true, false);\n if (this.color !== undefined) this.material.color.set(this.color);\n else this.material.color.copy(this.light.color);\n /*\n\t\tconst d = this.light.distance;\n\n\t\tif ( d === 0.0 ) {\n\n\t\t\tthis.lightDistance.visible = false;\n\n\t\t} else {\n\n\t\t\tthis.lightDistance.visible = true;\n\t\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t\t}\n\t\t*/ }\n}\nconst $d5b33d7c30034067$var$_vector$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_color1 = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\nconst $d5b33d7c30034067$var$_color2 = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\nclass $d5b33d7c30034067$export$8dca15f13f4f8172 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(light, size, color){\n super();\n this.light = light;\n this.matrix = light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.color = color;\n this.type = \"HemisphereLightHelper\";\n const geometry = new $d5b33d7c30034067$export$1954e2b809fe361e(size);\n geometry.rotateY(Math.PI * 0.5);\n this.material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n wireframe: true,\n fog: false,\n toneMapped: false\n });\n if (this.color === undefined) this.material.vertexColors = true;\n const position = geometry.getAttribute(\"position\");\n const colors = new Float32Array(position.count * 3);\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$8dea267bd6bde117(colors, 3));\n this.add(new $d5b33d7c30034067$export$e176487c05830cc5(geometry, this.material));\n this.update();\n }\n dispose() {\n this.children[0].geometry.dispose();\n this.children[0].material.dispose();\n }\n update() {\n const mesh = this.children[0];\n if (this.color !== undefined) this.material.color.set(this.color);\n else {\n const colors = mesh.geometry.getAttribute(\"color\");\n $d5b33d7c30034067$var$_color1.copy(this.light.color);\n $d5b33d7c30034067$var$_color2.copy(this.light.groundColor);\n for(let i = 0, l = colors.count; i < l; i++){\n const color = i < l / 2 ? $d5b33d7c30034067$var$_color1 : $d5b33d7c30034067$var$_color2;\n colors.setXYZ(i, color.r, color.g, color.b);\n }\n colors.needsUpdate = true;\n }\n this.light.updateWorldMatrix(true, false);\n mesh.lookAt($d5b33d7c30034067$var$_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate());\n }\n}\nclass $d5b33d7c30034067$export$3875d39926561055 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888){\n color1 = new $d5b33d7c30034067$export$892596cec99bc70e(color1);\n color2 = new $d5b33d7c30034067$export$892596cec99bc70e(color2);\n const center = divisions / 2;\n const step = size / divisions;\n const halfSize = size / 2;\n const vertices = [], colors = [];\n for(let i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step){\n vertices.push(-halfSize, 0, k, halfSize, 0, k);\n vertices.push(k, 0, -halfSize, k, 0, halfSize);\n const color = i === center ? color1 : color2;\n color.toArray(colors, j);\n j += 3;\n color.toArray(colors, j);\n j += 3;\n color.toArray(colors, j);\n j += 3;\n color.toArray(colors, j);\n j += 3;\n }\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n toneMapped: false\n });\n super(geometry, material);\n this.type = \"GridHelper\";\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$361430a10f533cd3 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888){\n color1 = new $d5b33d7c30034067$export$892596cec99bc70e(color1);\n color2 = new $d5b33d7c30034067$export$892596cec99bc70e(color2);\n const vertices = [];\n const colors = [];\n // create the sectors\n if (sectors > 1) for(let i = 0; i < sectors; i++){\n const v = i / sectors * (Math.PI * 2);\n const x = Math.sin(v) * radius;\n const z = Math.cos(v) * radius;\n vertices.push(0, 0, 0);\n vertices.push(x, 0, z);\n const color = i & 1 ? color1 : color2;\n colors.push(color.r, color.g, color.b);\n colors.push(color.r, color.g, color.b);\n }\n // create the rings\n for(let i = 0; i < rings; i++){\n const color = i & 1 ? color1 : color2;\n const r = radius - radius / rings * i;\n for(let j = 0; j < divisions; j++){\n // first vertex\n let v = j / divisions * (Math.PI * 2);\n let x = Math.sin(v) * r;\n let z = Math.cos(v) * r;\n vertices.push(x, 0, z);\n colors.push(color.r, color.g, color.b);\n // second vertex\n v = (j + 1) / divisions * (Math.PI * 2);\n x = Math.sin(v) * r;\n z = Math.cos(v) * r;\n vertices.push(x, 0, z);\n colors.push(color.r, color.g, color.b);\n }\n }\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n toneMapped: false\n });\n super(geometry, material);\n this.type = \"PolarGridHelper\";\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nconst $d5b33d7c30034067$var$_v1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$f8e434dc14203e7d extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(light, size, color){\n super();\n this.light = light;\n this.matrix = light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.color = color;\n this.type = \"DirectionalLightHelper\";\n if (size === undefined) size = 1;\n let geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd([\n -size,\n size,\n 0,\n size,\n size,\n 0,\n size,\n -size,\n 0,\n -size,\n -size,\n 0,\n -size,\n size,\n 0\n ], 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n fog: false,\n toneMapped: false\n });\n this.lightPlane = new $d5b33d7c30034067$export$17d680238e50603e(geometry, material);\n this.add(this.lightPlane);\n geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd([\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ], 3));\n this.targetLine = new $d5b33d7c30034067$export$17d680238e50603e(geometry, material);\n this.add(this.targetLine);\n this.update();\n }\n dispose() {\n this.lightPlane.geometry.dispose();\n this.lightPlane.material.dispose();\n this.targetLine.geometry.dispose();\n this.targetLine.material.dispose();\n }\n update() {\n this.light.updateWorldMatrix(true, false);\n this.light.target.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_v1.setFromMatrixPosition(this.light.matrixWorld);\n $d5b33d7c30034067$var$_v2.setFromMatrixPosition(this.light.target.matrixWorld);\n $d5b33d7c30034067$var$_v3.subVectors($d5b33d7c30034067$var$_v2, $d5b33d7c30034067$var$_v1);\n this.lightPlane.lookAt($d5b33d7c30034067$var$_v2);\n if (this.color !== undefined) {\n this.lightPlane.material.color.set(this.color);\n this.targetLine.material.color.set(this.color);\n } else {\n this.lightPlane.material.color.copy(this.light.color);\n this.targetLine.material.color.copy(this.light.color);\n }\n this.targetLine.lookAt($d5b33d7c30034067$var$_v2);\n this.targetLine.scale.z = $d5b33d7c30034067$var$_v3.length();\n }\n}\nconst $d5b33d7c30034067$var$_vector = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_camera = /*@__PURE__*/ new $d5b33d7c30034067$export$79f141de891a5fed();\n/**\n *\t- shows frustum, line of sight and up of the camera\n *\t- suitable for fast updates\n * \t- based on frustum visualization in lightgl.js shadowmap example\n *\t\thttps://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html\n */ class $d5b33d7c30034067$export$ed8e93f853cd795 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(camera){\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: 0xffffff,\n vertexColors: true,\n toneMapped: false\n });\n const vertices = [];\n const colors = [];\n const pointMap = {};\n // near\n addLine(\"n1\", \"n2\");\n addLine(\"n2\", \"n4\");\n addLine(\"n4\", \"n3\");\n addLine(\"n3\", \"n1\");\n // far\n addLine(\"f1\", \"f2\");\n addLine(\"f2\", \"f4\");\n addLine(\"f4\", \"f3\");\n addLine(\"f3\", \"f1\");\n // sides\n addLine(\"n1\", \"f1\");\n addLine(\"n2\", \"f2\");\n addLine(\"n3\", \"f3\");\n addLine(\"n4\", \"f4\");\n // cone\n addLine(\"p\", \"n1\");\n addLine(\"p\", \"n2\");\n addLine(\"p\", \"n3\");\n addLine(\"p\", \"n4\");\n // up\n addLine(\"u1\", \"u2\");\n addLine(\"u2\", \"u3\");\n addLine(\"u3\", \"u1\");\n // target\n addLine(\"c\", \"t\");\n addLine(\"p\", \"c\");\n // cross\n addLine(\"cn1\", \"cn2\");\n addLine(\"cn3\", \"cn4\");\n addLine(\"cf1\", \"cf2\");\n addLine(\"cf3\", \"cf4\");\n function addLine(a, b) {\n addPoint(a);\n addPoint(b);\n }\n function addPoint(id) {\n vertices.push(0, 0, 0);\n colors.push(0, 0, 0);\n if (pointMap[id] === undefined) pointMap[id] = [];\n pointMap[id].push(vertices.length / 3 - 1);\n }\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n super(geometry, material);\n this.type = \"CameraHelper\";\n this.camera = camera;\n if (this.camera.updateProjectionMatrix) this.camera.updateProjectionMatrix();\n this.matrix = camera.matrixWorld;\n this.matrixAutoUpdate = false;\n this.pointMap = pointMap;\n this.update();\n // colors\n const colorFrustum = new $d5b33d7c30034067$export$892596cec99bc70e(0xffaa00);\n const colorCone = new $d5b33d7c30034067$export$892596cec99bc70e(0xff0000);\n const colorUp = new $d5b33d7c30034067$export$892596cec99bc70e(0x00aaff);\n const colorTarget = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n const colorCross = new $d5b33d7c30034067$export$892596cec99bc70e(0x333333);\n this.setColors(colorFrustum, colorCone, colorUp, colorTarget, colorCross);\n }\n setColors(frustum, cone, up, target, cross) {\n const geometry = this.geometry;\n const colorAttribute = geometry.getAttribute(\"color\");\n // near\n colorAttribute.setXYZ(0, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(1, frustum.r, frustum.g, frustum.b); // n1, n2\n colorAttribute.setXYZ(2, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(3, frustum.r, frustum.g, frustum.b); // n2, n4\n colorAttribute.setXYZ(4, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(5, frustum.r, frustum.g, frustum.b); // n4, n3\n colorAttribute.setXYZ(6, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(7, frustum.r, frustum.g, frustum.b); // n3, n1\n // far\n colorAttribute.setXYZ(8, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(9, frustum.r, frustum.g, frustum.b); // f1, f2\n colorAttribute.setXYZ(10, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(11, frustum.r, frustum.g, frustum.b); // f2, f4\n colorAttribute.setXYZ(12, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(13, frustum.r, frustum.g, frustum.b); // f4, f3\n colorAttribute.setXYZ(14, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(15, frustum.r, frustum.g, frustum.b); // f3, f1\n // sides\n colorAttribute.setXYZ(16, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(17, frustum.r, frustum.g, frustum.b); // n1, f1\n colorAttribute.setXYZ(18, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(19, frustum.r, frustum.g, frustum.b); // n2, f2\n colorAttribute.setXYZ(20, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(21, frustum.r, frustum.g, frustum.b); // n3, f3\n colorAttribute.setXYZ(22, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(23, frustum.r, frustum.g, frustum.b); // n4, f4\n // cone\n colorAttribute.setXYZ(24, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(25, cone.r, cone.g, cone.b); // p, n1\n colorAttribute.setXYZ(26, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(27, cone.r, cone.g, cone.b); // p, n2\n colorAttribute.setXYZ(28, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(29, cone.r, cone.g, cone.b); // p, n3\n colorAttribute.setXYZ(30, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(31, cone.r, cone.g, cone.b); // p, n4\n // up\n colorAttribute.setXYZ(32, up.r, up.g, up.b);\n colorAttribute.setXYZ(33, up.r, up.g, up.b); // u1, u2\n colorAttribute.setXYZ(34, up.r, up.g, up.b);\n colorAttribute.setXYZ(35, up.r, up.g, up.b); // u2, u3\n colorAttribute.setXYZ(36, up.r, up.g, up.b);\n colorAttribute.setXYZ(37, up.r, up.g, up.b); // u3, u1\n // target\n colorAttribute.setXYZ(38, target.r, target.g, target.b);\n colorAttribute.setXYZ(39, target.r, target.g, target.b); // c, t\n colorAttribute.setXYZ(40, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(41, cross.r, cross.g, cross.b); // p, c\n // cross\n colorAttribute.setXYZ(42, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(43, cross.r, cross.g, cross.b); // cn1, cn2\n colorAttribute.setXYZ(44, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(45, cross.r, cross.g, cross.b); // cn3, cn4\n colorAttribute.setXYZ(46, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(47, cross.r, cross.g, cross.b); // cf1, cf2\n colorAttribute.setXYZ(48, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(49, cross.r, cross.g, cross.b); // cf3, cf4\n colorAttribute.needsUpdate = true;\n }\n update() {\n const geometry = this.geometry;\n const pointMap = this.pointMap;\n const w = 1, h = 1;\n // we need just camera projection matrix inverse\n // world matrix must be identity\n $d5b33d7c30034067$var$_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);\n // center / target\n $d5b33d7c30034067$var$setPoint(\"c\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, 0, -1);\n $d5b33d7c30034067$var$setPoint(\"t\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, 0, 1);\n // near\n $d5b33d7c30034067$var$setPoint(\"n1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, -h, -1);\n $d5b33d7c30034067$var$setPoint(\"n2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, -h, -1);\n $d5b33d7c30034067$var$setPoint(\"n3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, h, -1);\n $d5b33d7c30034067$var$setPoint(\"n4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, h, -1);\n // far\n $d5b33d7c30034067$var$setPoint(\"f1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, -h, 1);\n $d5b33d7c30034067$var$setPoint(\"f2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, -h, 1);\n $d5b33d7c30034067$var$setPoint(\"f3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, h, 1);\n $d5b33d7c30034067$var$setPoint(\"f4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, h, 1);\n // up\n $d5b33d7c30034067$var$setPoint(\"u1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w * 0.7, h * 1.1, -1);\n $d5b33d7c30034067$var$setPoint(\"u2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w * 0.7, h * 1.1, -1);\n $d5b33d7c30034067$var$setPoint(\"u3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, h * 2, -1);\n // cross\n $d5b33d7c30034067$var$setPoint(\"cf1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, 0, 1);\n $d5b33d7c30034067$var$setPoint(\"cf2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, 0, 1);\n $d5b33d7c30034067$var$setPoint(\"cf3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, -h, 1);\n $d5b33d7c30034067$var$setPoint(\"cf4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, h, 1);\n $d5b33d7c30034067$var$setPoint(\"cn1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, 0, -1);\n $d5b33d7c30034067$var$setPoint(\"cn2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, 0, -1);\n $d5b33d7c30034067$var$setPoint(\"cn3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, -h, -1);\n $d5b33d7c30034067$var$setPoint(\"cn4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, h, -1);\n geometry.getAttribute(\"position\").needsUpdate = true;\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nfunction $d5b33d7c30034067$var$setPoint(point, pointMap, geometry, camera, x, y, z) {\n $d5b33d7c30034067$var$_vector.set(x, y, z).unproject(camera);\n const points = pointMap[point];\n if (points !== undefined) {\n const position = geometry.getAttribute(\"position\");\n for(let i = 0, l = points.length; i < l; i++)position.setXYZ(points[i], $d5b33d7c30034067$var$_vector.x, $d5b33d7c30034067$var$_vector.y, $d5b33d7c30034067$var$_vector.z);\n }\n}\nconst $d5b33d7c30034067$var$_box = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nclass $d5b33d7c30034067$export$38a664cc862a6a9d extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(object, color = 0xffff00){\n const indices = new Uint16Array([\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 0,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 4,\n 0,\n 4,\n 1,\n 5,\n 2,\n 6,\n 3,\n 7\n ]);\n const positions = new Float32Array(24);\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setIndex(new $d5b33d7c30034067$export$8dea267bd6bde117(indices, 1));\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117(positions, 3));\n super(geometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.object = object;\n this.type = \"BoxHelper\";\n this.matrixAutoUpdate = false;\n this.update();\n }\n update(object) {\n if (object !== undefined) console.warn(\"THREE.BoxHelper: .update() has no longer arguments.\");\n if (this.object !== undefined) $d5b33d7c30034067$var$_box.setFromObject(this.object);\n if ($d5b33d7c30034067$var$_box.isEmpty()) return;\n const min = $d5b33d7c30034067$var$_box.min;\n const max = $d5b33d7c30034067$var$_box.max;\n /*\n\t\t\t5____4\n\t\t1/___0/|\n\t\t| 6__|_7\n\t\t2/___3/\n\n\t\t0: max.x, max.y, max.z\n\t\t1: min.x, max.y, max.z\n\t\t2: min.x, min.y, max.z\n\t\t3: max.x, min.y, max.z\n\t\t4: max.x, max.y, min.z\n\t\t5: min.x, max.y, min.z\n\t\t6: min.x, min.y, min.z\n\t\t7: max.x, min.y, min.z\n\t\t*/ const position = this.geometry.attributes.position;\n const array = position.array;\n array[0] = max.x;\n array[1] = max.y;\n array[2] = max.z;\n array[3] = min.x;\n array[4] = max.y;\n array[5] = max.z;\n array[6] = min.x;\n array[7] = min.y;\n array[8] = max.z;\n array[9] = max.x;\n array[10] = min.y;\n array[11] = max.z;\n array[12] = max.x;\n array[13] = max.y;\n array[14] = min.z;\n array[15] = min.x;\n array[16] = max.y;\n array[17] = min.z;\n array[18] = min.x;\n array[19] = min.y;\n array[20] = min.z;\n array[21] = max.x;\n array[22] = min.y;\n array[23] = min.z;\n position.needsUpdate = true;\n this.geometry.computeBoundingSphere();\n }\n setFromObject(object) {\n this.object = object;\n this.update();\n return this;\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.object = source.object;\n return this;\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$ce39f4bb96c9a290 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(box, color = 0xffff00){\n const indices = new Uint16Array([\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 0,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 4,\n 0,\n 4,\n 1,\n 5,\n 2,\n 6,\n 3,\n 7\n ]);\n const positions = [\n 1,\n 1,\n 1,\n -1,\n 1,\n 1,\n -1,\n -1,\n 1,\n 1,\n -1,\n 1,\n 1,\n 1,\n -1,\n -1,\n 1,\n -1,\n -1,\n -1,\n -1,\n 1,\n -1,\n -1\n ];\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setIndex(new $d5b33d7c30034067$export$8dea267bd6bde117(indices, 1));\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions, 3));\n super(geometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.box = box;\n this.type = \"Box3Helper\";\n this.geometry.computeBoundingSphere();\n }\n updateMatrixWorld(force) {\n const box = this.box;\n if (box.isEmpty()) return;\n box.getCenter(this.position);\n box.getSize(this.scale);\n this.scale.multiplyScalar(0.5);\n super.updateMatrixWorld(force);\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$a34fe8156c66e5d7 extends $d5b33d7c30034067$export$17d680238e50603e {\n constructor(plane, size = 1, hex = 0xffff00){\n const color = hex;\n const positions = [\n 1,\n -1,\n 0,\n -1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n 1,\n 0,\n -1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n -1,\n 0,\n 1,\n 1,\n 0\n ];\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions, 3));\n geometry.computeBoundingSphere();\n super(geometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.type = \"PlaneHelper\";\n this.plane = plane;\n this.size = size;\n const positions2 = [\n 1,\n 1,\n 0,\n -1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n -1,\n 0\n ];\n const geometry2 = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry2.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions2, 3));\n geometry2.computeBoundingSphere();\n this.add(new $d5b33d7c30034067$export$e176487c05830cc5(geometry2, new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: color,\n opacity: 0.2,\n transparent: true,\n depthWrite: false,\n toneMapped: false\n })));\n }\n updateMatrixWorld(force) {\n this.position.set(0, 0, 0);\n this.scale.set(0.5 * this.size, 0.5 * this.size, 1);\n this.lookAt(this.plane.normal);\n this.translateZ(-this.plane.constant);\n super.updateMatrixWorld(force);\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n this.children[0].geometry.dispose();\n this.children[0].material.dispose();\n }\n}\nconst $d5b33d7c30034067$var$_axis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nlet $d5b33d7c30034067$var$_lineGeometry, $d5b33d7c30034067$var$_coneGeometry;\nclass $d5b33d7c30034067$export$a3008e7bd8d2cbe7 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n // dir is assumed to be normalized\n constructor(dir = new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1), origin = new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 0), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2){\n super();\n this.type = \"ArrowHelper\";\n if ($d5b33d7c30034067$var$_lineGeometry === undefined) {\n $d5b33d7c30034067$var$_lineGeometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n $d5b33d7c30034067$var$_lineGeometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd([\n 0,\n 0,\n 0,\n 0,\n 1,\n 0\n ], 3));\n $d5b33d7c30034067$var$_coneGeometry = new $d5b33d7c30034067$export$68f745719dbe5198(0, 0.5, 1, 5, 1);\n $d5b33d7c30034067$var$_coneGeometry.translate(0, -0.5, 0);\n }\n this.position.copy(origin);\n this.line = new $d5b33d7c30034067$export$17d680238e50603e($d5b33d7c30034067$var$_lineGeometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.line.matrixAutoUpdate = false;\n this.add(this.line);\n this.cone = new $d5b33d7c30034067$export$e176487c05830cc5($d5b33d7c30034067$var$_coneGeometry, new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: color,\n toneMapped: false\n }));\n this.cone.matrixAutoUpdate = false;\n this.add(this.cone);\n this.setDirection(dir);\n this.setLength(length, headLength, headWidth);\n }\n setDirection(dir) {\n // dir is assumed to be normalized\n if (dir.y > 0.99999) this.quaternion.set(0, 0, 0, 1);\n else if (dir.y < -0.99999) this.quaternion.set(1, 0, 0, 0);\n else {\n $d5b33d7c30034067$var$_axis.set(dir.z, 0, -dir.x).normalize();\n const radians = Math.acos(dir.y);\n this.quaternion.setFromAxisAngle($d5b33d7c30034067$var$_axis, radians);\n }\n }\n setLength(length, headLength = length * 0.2, headWidth = headLength * 0.2) {\n this.line.scale.set(1, Math.max(0.0001, length - headLength), 1); // see #17458\n this.line.updateMatrix();\n this.cone.scale.set(headWidth, headLength, headWidth);\n this.cone.position.y = length;\n this.cone.updateMatrix();\n }\n setColor(color) {\n this.line.material.color.set(color);\n this.cone.material.color.set(color);\n }\n copy(source) {\n super.copy(source, false);\n this.line.copy(source.line);\n this.cone.copy(source.cone);\n return this;\n }\n dispose() {\n this.line.geometry.dispose();\n this.line.material.dispose();\n this.cone.geometry.dispose();\n this.cone.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$6c8303f35b8578fd extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(size = 1){\n const vertices = [\n 0,\n 0,\n 0,\n size,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n size,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n size\n ];\n const colors = [\n 1,\n 0,\n 0,\n 1,\n 0.6,\n 0,\n 0,\n 1,\n 0,\n 0.6,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0.6,\n 1\n ];\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n toneMapped: false\n });\n super(geometry, material);\n this.type = \"AxesHelper\";\n }\n setColors(xAxisColor, yAxisColor, zAxisColor) {\n const color = new $d5b33d7c30034067$export$892596cec99bc70e();\n const array = this.geometry.attributes.color.array;\n color.set(xAxisColor);\n color.toArray(array, 0);\n color.toArray(array, 3);\n color.set(yAxisColor);\n color.toArray(array, 6);\n color.toArray(array, 9);\n color.set(zAxisColor);\n color.toArray(array, 12);\n color.toArray(array, 15);\n this.geometry.attributes.color.needsUpdate = true;\n return this;\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$148534a3c727230b {\n constructor(){\n this.type = \"ShapePath\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e();\n this.subPaths = [];\n this.currentPath = null;\n }\n moveTo(x, y) {\n this.currentPath = new $d5b33d7c30034067$export$4b2950bdac9b6ee9();\n this.subPaths.push(this.currentPath);\n this.currentPath.moveTo(x, y);\n return this;\n }\n lineTo(x, y) {\n this.currentPath.lineTo(x, y);\n return this;\n }\n quadraticCurveTo(aCPx, aCPy, aX, aY) {\n this.currentPath.quadraticCurveTo(aCPx, aCPy, aX, aY);\n return this;\n }\n bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n this.currentPath.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY);\n return this;\n }\n splineThru(pts) {\n this.currentPath.splineThru(pts);\n return this;\n }\n toShapes(isCCW) {\n function toShapesNoHoles(inSubpaths) {\n const shapes = [];\n for(let i = 0, l = inSubpaths.length; i < l; i++){\n const tmpPath = inSubpaths[i];\n const tmpShape = new $d5b33d7c30034067$export$6428a7f2611ef1fa();\n tmpShape.curves = tmpPath.curves;\n shapes.push(tmpShape);\n }\n return shapes;\n }\n function isPointInsidePolygon(inPt, inPolygon) {\n const polyLen = inPolygon.length;\n // inPt on polygon contour => immediate success or\n // toggling of inside/outside at every single! intersection point of an edge\n // with the horizontal line through inPt, left of inPt\n // not counting lowerY endpoints of edges and whole edges on that line\n let inside = false;\n for(let p = polyLen - 1, q = 0; q < polyLen; p = q++){\n let edgeLowPt = inPolygon[p];\n let edgeHighPt = inPolygon[q];\n let edgeDx = edgeHighPt.x - edgeLowPt.x;\n let edgeDy = edgeHighPt.y - edgeLowPt.y;\n if (Math.abs(edgeDy) > Number.EPSILON) {\n // not parallel\n if (edgeDy < 0) {\n edgeLowPt = inPolygon[q];\n edgeDx = -edgeDx;\n edgeHighPt = inPolygon[p];\n edgeDy = -edgeDy;\n }\n if (inPt.y < edgeLowPt.y || inPt.y > edgeHighPt.y) continue;\n if (inPt.y === edgeLowPt.y) {\n if (inPt.x === edgeLowPt.x) return true; // inPt is on contour ?\n // continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n } else {\n const perpEdge = edgeDy * (inPt.x - edgeLowPt.x) - edgeDx * (inPt.y - edgeLowPt.y);\n if (perpEdge === 0) return true; // inPt is on contour ?\n if (perpEdge < 0) continue;\n inside = !inside; // true intersection left of inPt\n }\n } else {\n // parallel or collinear\n if (inPt.y !== edgeLowPt.y) continue; // parallel\n // edge lies on the same horizontal line as inPt\n if (edgeHighPt.x <= inPt.x && inPt.x <= edgeLowPt.x || edgeLowPt.x <= inPt.x && inPt.x <= edgeHighPt.x) return true; // inPt: Point on contour !\n // continue;\n }\n }\n return inside;\n }\n const isClockWise = $d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise;\n const subPaths = this.subPaths;\n if (subPaths.length === 0) return [];\n let solid, tmpPath, tmpShape;\n const shapes = [];\n if (subPaths.length === 1) {\n tmpPath = subPaths[0];\n tmpShape = new $d5b33d7c30034067$export$6428a7f2611ef1fa();\n tmpShape.curves = tmpPath.curves;\n shapes.push(tmpShape);\n return shapes;\n }\n let holesFirst = !isClockWise(subPaths[0].getPoints());\n holesFirst = isCCW ? !holesFirst : holesFirst;\n // console.log(\"Holes first\", holesFirst);\n const betterShapeHoles = [];\n const newShapes = [];\n let newShapeHoles = [];\n let mainIdx = 0;\n let tmpPoints;\n newShapes[mainIdx] = undefined;\n newShapeHoles[mainIdx] = [];\n for(let i = 0, l = subPaths.length; i < l; i++){\n tmpPath = subPaths[i];\n tmpPoints = tmpPath.getPoints();\n solid = isClockWise(tmpPoints);\n solid = isCCW ? !solid : solid;\n if (solid) {\n if (!holesFirst && newShapes[mainIdx]) mainIdx++;\n newShapes[mainIdx] = {\n s: new $d5b33d7c30034067$export$6428a7f2611ef1fa(),\n p: tmpPoints\n };\n newShapes[mainIdx].s.curves = tmpPath.curves;\n if (holesFirst) mainIdx++;\n newShapeHoles[mainIdx] = [];\n //console.log('cw', i);\n } else newShapeHoles[mainIdx].push({\n h: tmpPath,\n p: tmpPoints[0]\n });\n }\n // only Holes? -> probably all Shapes with wrong orientation\n if (!newShapes[0]) return toShapesNoHoles(subPaths);\n if (newShapes.length > 1) {\n let ambiguous = false;\n let toChange = 0;\n for(let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++)betterShapeHoles[sIdx] = [];\n for(let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++){\n const sho = newShapeHoles[sIdx];\n for(let hIdx = 0; hIdx < sho.length; hIdx++){\n const ho = sho[hIdx];\n let hole_unassigned = true;\n for(let s2Idx = 0; s2Idx < newShapes.length; s2Idx++)if (isPointInsidePolygon(ho.p, newShapes[s2Idx].p)) {\n if (sIdx !== s2Idx) toChange++;\n if (hole_unassigned) {\n hole_unassigned = false;\n betterShapeHoles[s2Idx].push(ho);\n } else ambiguous = true;\n }\n if (hole_unassigned) betterShapeHoles[sIdx].push(ho);\n }\n }\n if (toChange > 0 && ambiguous === false) newShapeHoles = betterShapeHoles;\n }\n let tmpHoles;\n for(let i = 0, il = newShapes.length; i < il; i++){\n tmpShape = newShapes[i].s;\n shapes.push(tmpShape);\n tmpHoles = newShapeHoles[i];\n for(let j = 0, jl = tmpHoles.length; j < jl; j++)tmpShape.holes.push(tmpHoles[j].h);\n }\n //console.log(\"shape\", shapes);\n return shapes;\n }\n}\nif (typeof __THREE_DEVTOOLS__ !== \"undefined\") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"register\", {\n detail: {\n revision: $d5b33d7c30034067$export$3545e07a80636437\n }\n}));\nif (typeof window !== \"undefined\") {\n if (window.__THREE__) console.warn(\"WARNING: Multiple instances of Three.js being imported.\");\n else window.__THREE__ = $d5b33d7c30034067$export$3545e07a80636437;\n}\n\n\nclass $a4e30d08b53515ba$var$WebGL {\n static isWebGLAvailable() {\n try {\n const canvas = document.createElement(\"canvas\");\n return !!(window.WebGLRenderingContext && (canvas.getContext(\"webgl\") || canvas.getContext(\"experimental-webgl\")));\n } catch (e) {\n return false;\n }\n }\n static isWebGL2Available() {\n try {\n const canvas = document.createElement(\"canvas\");\n return !!(window.WebGL2RenderingContext && canvas.getContext(\"webgl2\"));\n } catch (e) {\n return false;\n }\n }\n static getWebGLErrorMessage() {\n return this.getErrorMessage(1);\n }\n static getWebGL2ErrorMessage() {\n return this.getErrorMessage(2);\n }\n static getErrorMessage(version) {\n const names = {\n 1: \"WebGL\",\n 2: \"WebGL 2\"\n };\n const contexts = {\n 1: window.WebGLRenderingContext,\n 2: window.WebGL2RenderingContext\n };\n let message = 'Your $0 does not seem to support $1';\n const element = document.createElement(\"div\");\n element.id = \"webglmessage\";\n element.style.fontFamily = \"monospace\";\n element.style.fontSize = \"13px\";\n element.style.fontWeight = \"normal\";\n element.style.textAlign = \"center\";\n element.style.background = \"#fff\";\n element.style.color = \"#000\";\n element.style.padding = \"1.5em\";\n element.style.width = \"400px\";\n element.style.margin = \"5em auto 0\";\n if (contexts[version]) message = message.replace(\"$0\", \"graphics card\");\n else message = message.replace(\"$0\", \"browser\");\n message = message.replace(\"$1\", names[version]);\n element.innerHTML = message;\n return element;\n }\n}\nvar $a4e30d08b53515ba$export$2e2bcd8739ae039 = $a4e30d08b53515ba$var$WebGL;\n\n\ngsap.registerPlugin(ScrollTrigger);\nconst $efd3ba4ec2608b1d$var$scene = new $d5b33d7c30034067$export$38af1803e3442a7f();\n$efd3ba4ec2608b1d$var$scene.background = new $d5b33d7c30034067$export$892596cec99bc70e(0x252a36);\nconst $efd3ba4ec2608b1d$var$camera = new $d5b33d7c30034067$export$74e4ae24825f68d7(75, window.innerWidth / window.innerHeight, 0.1, 1000);\nconst $efd3ba4ec2608b1d$var$renderer = new $d5b33d7c30034067$export$f6cc00ef28d7cf97({\n antialias: true\n});\n$efd3ba4ec2608b1d$var$renderer.setSize(window.innerWidth, window.innerHeight);\ndocument.body.appendChild($efd3ba4ec2608b1d$var$renderer.domElement);\nconst $efd3ba4ec2608b1d$var$geometry = new $d5b33d7c30034067$export$9567cc828c9535da(6, 2);\nconst $efd3ba4ec2608b1d$var$material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: 0xffffff,\n wireframe: true\n});\n//morado\nconst $efd3ba4ec2608b1d$var$geometry2 = new $d5b33d7c30034067$export$9567cc828c9535da(6, 2);\nconst $efd3ba4ec2608b1d$var$material2 = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: 0xffffff,\n wireframe: true\n});\n//verde\nconst $efd3ba4ec2608b1d$var$geometry3 = new $d5b33d7c30034067$export$9567cc828c9535da(6, 2);\nconst $efd3ba4ec2608b1d$var$material3 = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: 0xffffff,\n wireframe: true\n});\nconst $efd3ba4ec2608b1d$var$mesh = new $d5b33d7c30034067$export$e176487c05830cc5($efd3ba4ec2608b1d$var$geometry, $efd3ba4ec2608b1d$var$material);\n$efd3ba4ec2608b1d$var$mesh.position.z = -4;\n$efd3ba4ec2608b1d$var$mesh.position.x = 5;\n$efd3ba4ec2608b1d$var$mesh.position.y = 3;\n$efd3ba4ec2608b1d$var$mesh.rotation.x = Math.PI * 0.3;\nconst $efd3ba4ec2608b1d$var$mesh2 = new $d5b33d7c30034067$export$e176487c05830cc5($efd3ba4ec2608b1d$var$geometry2, $efd3ba4ec2608b1d$var$material2);\n$efd3ba4ec2608b1d$var$mesh2.position.z = 12;\n$efd3ba4ec2608b1d$var$mesh2.position.x = -2;\n$efd3ba4ec2608b1d$var$mesh2.position.y = 4;\n$efd3ba4ec2608b1d$var$mesh2.rotation.x = Math.PI * 0.3;\nconst $efd3ba4ec2608b1d$var$mesh3 = new $d5b33d7c30034067$export$e176487c05830cc5($efd3ba4ec2608b1d$var$geometry3, $efd3ba4ec2608b1d$var$material3);\n$efd3ba4ec2608b1d$var$mesh3.position.z = 15;\n$efd3ba4ec2608b1d$var$mesh3.position.x = 20;\n$efd3ba4ec2608b1d$var$mesh3.position.y = 0;\n$efd3ba4ec2608b1d$var$mesh3.rotation.x = Math.PI * 0.3;\n$efd3ba4ec2608b1d$var$scene.add($efd3ba4ec2608b1d$var$mesh, $efd3ba4ec2608b1d$var$mesh2, $efd3ba4ec2608b1d$var$mesh3);\n/*\r\nconst mesh2 = new THREE.Mesh( geometry, material );\r\n mesh2.position.z = 4;\r\n mesh2.position.x = -3;\r\n mesh2.position.y = -15;\r\n mesh2.rotation.x = Math.PI * 0.3;\r\n\r\n\r\nscene.add( mesh2 );\r\n*/ window.addEventListener(\"resize\", $efd3ba4ec2608b1d$var$onWindowResize, false);\nfunction $efd3ba4ec2608b1d$var$onWindowResize() {\n $efd3ba4ec2608b1d$var$camera.aspect = window.innerWidth / window.innerHeight;\n $efd3ba4ec2608b1d$var$camera.updateProjectionMatrix();\n $efd3ba4ec2608b1d$var$renderer.setSize(window.innerWidth, window.innerHeight);\n render();\n}\n/*\r\nconst textureLoader = new THREE.TextureLoader\r\nconst starTexture = textureLoader.load(\"1numerofondonegro.png\")\r\n\r\nconst starVertices = []\r\nfor (let i = 0; i < 1000; i++){\r\n const x = (Math.random() - 0.5) * 100;\r\n const y = (Math.random() - 0.5) * 100;\r\n const z = -Math.random() - 0.5 * 100;\r\n starVertices.push(x, y, z);\r\n}\r\n\r\nstarGeometry.setAttribute('position', new THREE.Float32BufferAttribute(starVertices, 3))\r\n\r\nconst stars = new THREE.Points(starGeometry, starMaterial, starTexture)\r\nscene.add(stars)\r\n*/ /*\r\n//FONDO DE UNOS\r\n\r\nconst particlesGeometry = new THREE.BufferGeometry();\r\nconst particlesCount = 5000;\r\n\r\nconst vertices = new Float32Array(particlesCount);\r\nfor (let i = 0; i < 1000; i++) {\r\n vertices[i] = (Math.random() -0.6) * 70;\r\n const x = (Math.random() +1) * 1000\r\n const y = (Math.random() -1) * 1000\r\n const z = 20\r\n}\r\n\r\nparticlesGeometry.setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(vertices, 3)\r\n)\r\n*/ const $efd3ba4ec2608b1d$var$getRandomParticelPos = (particleCount)=>{\n const arr = new Float32Array(particleCount * 700);\n for(let i = 0; i < particleCount; i++){\n arr[i] = (Math.random() - 0.6) * 70;\n const x = (Math.random() + 1) * 1000;\n const y = (Math.random() - 1) * 1000;\n const z = 0;\n }\n return arr;\n};\nconst $efd3ba4ec2608b1d$var$geometrys = [\n new $d5b33d7c30034067$export$b7be63a67df8959(),\n new $d5b33d7c30034067$export$b7be63a67df8959()\n];\n$efd3ba4ec2608b1d$var$geometrys[0].setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117($efd3ba4ec2608b1d$var$getRandomParticelPos(1000), 3));\n$efd3ba4ec2608b1d$var$geometrys[1].setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117($efd3ba4ec2608b1d$var$getRandomParticelPos(1000), 3));\nconst $efd3ba4ec2608b1d$var$loader = new $d5b33d7c30034067$export$fd1bfc71f64c538c();\n// material\nconst $efd3ba4ec2608b1d$var$materials = [\n new $d5b33d7c30034067$export$a178c45366ce5d6b({\n size: 0.25,\n map: $efd3ba4ec2608b1d$var$loader.load(\"/images/uno.png\"),\n transparent: true\n }),\n new $d5b33d7c30034067$export$a178c45366ce5d6b({\n size: 0.25,\n map: $efd3ba4ec2608b1d$var$loader.load(\"/images/cero.png\"),\n transparent: true\n })\n];\nconst $efd3ba4ec2608b1d$var$starsT1 = new $d5b33d7c30034067$export$1c787534cb11aa3e($efd3ba4ec2608b1d$var$geometrys[0], $efd3ba4ec2608b1d$var$materials[0]);\nconst $efd3ba4ec2608b1d$var$starsT2 = new $d5b33d7c30034067$export$1c787534cb11aa3e($efd3ba4ec2608b1d$var$geometrys[1], $efd3ba4ec2608b1d$var$materials[1]);\n$efd3ba4ec2608b1d$var$scene.add($efd3ba4ec2608b1d$var$starsT1);\n$efd3ba4ec2608b1d$var$scene.add($efd3ba4ec2608b1d$var$starsT2);\n/*\r\n//FONDO DE UNOS\r\n\r\nconst particlesGeometry = new THREE.BufferGeometry();\r\nconst particlesCount = 5000;\r\n\r\nconst vertices = new Float32Array(particlesCount);\r\nfor (let i = 0; i < 1000; i++) {\r\n vertices[i] = (Math.random() -0.6) * 70;\r\n const x = (Math.random() +1) * 1000\r\n const y = (Math.random() -1) * 1000\r\n const z = 20\r\n}\r\n\r\nparticlesGeometry.setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(vertices, 3)\r\n)\r\n\r\n//const loader = new THREE.TextureLoader();\r\n\r\nconst material1 = new THREE.MeshBasicMaterial({\r\n map: loader.load('uno.png'),\r\n });\r\n\r\nconst stars = new THREE.Points(particlesGeometry, material1);\r\n\r\n//FONDO DE CEROS\r\nconst particlesGeometry1 = new THREE.BufferGeometry();\r\nconst particlesCount1 = 5000;\r\n\r\nconst vertices1 = new Float32Array(particlesCount1);\r\nfor (let e = 0; e < 1000; e++) {\r\n vertices1[e] = (Math.random() -0.6) * 70;\r\n //const x = (Math.random() +1) * 1000\r\n //const y = (Math.random() -1) * 1000\r\n //const z = 20\r\n}\r\n\r\nparticlesGeometry1.setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(vertices1, 4)\r\n)\r\n\r\nconst loader2 = new THREE.TextureLoader();\r\n\r\nconst material0 = new THREE.MeshBasicMaterial({\r\n map: loader2.load('uno.png'),\r\n });\r\n\r\n\r\nconst stars0 = new THREE.Points(particlesGeometry1, material0);\r\nscene.add(stars, stars0)\r\n\r\n\r\n/*\r\nconst starGeometry = new THREE.BufferGeometry()\r\nconst starMaterial = new THREE.PointsMaterial({\r\n color: 0xFFFFFF\r\n})\r\n\r\nconst starVertices = []\r\n for (let i = 0; i < 10000; i++) {\r\n const x = (Math.random() - 0.5) * 5000\r\n const y = (Math.random() - 0.5) * 5000\r\n const z = -Math.random() * 2000\r\n starVertices.push(x, y, z)\r\n }\r\n\r\nconsole.log(starVertices)\r\nstarGeometry.setAttribute('position', \r\n new THREE.Float32BufferAttribute(\r\n starVertices, 3)\r\n )\r\n\r\nconst stars = new THREE.Points(starGeometry, starMaterial)\r\nscene.add(stars)\r\n*/ $efd3ba4ec2608b1d$var$camera.position.z = 0;\n$efd3ba4ec2608b1d$var$camera.position.y = 0;\n$efd3ba4ec2608b1d$var$camera.position.x = 0;\nconst $efd3ba4ec2608b1d$var$loadingManager = new $d5b33d7c30034067$export$99cc795e99919eed();\n//loadingManager.onStart = function(url, item, total) {\n// console.log(`Started Loading: ${url}`);\n//}\nconst $efd3ba4ec2608b1d$var$progressBar = document.getElementById(\"progress-bar\");\n$efd3ba4ec2608b1d$var$loadingManager.onProgress = function(url, loaded, total) {\n $efd3ba4ec2608b1d$var$progressBar.value = loaded / total * 100;\n};\nconst $efd3ba4ec2608b1d$var$progressBarContainer = document.querySelector(\"progress-bar-container\");\n$efd3ba4ec2608b1d$var$loadingManager.onLoad = function() {\n $efd3ba4ec2608b1d$var$progressBarContainer.style.display = \"none\";\n};\n$efd3ba4ec2608b1d$var$loadingManager.onError = function(url) {\n console.log(`Got a problem loading: ${url}`);\n};\nfunction $efd3ba4ec2608b1d$var$scalePercent(start, end) {\n return (scrollPercent - start) / (end - start);\n}\nfunction $efd3ba4ec2608b1d$var$moveCamera() {\n const t = document.body.getBoundingClientRect().top;\n $efd3ba4ec2608b1d$var$mesh.rotation.x += 0.003;\n $efd3ba4ec2608b1d$var$mesh2.rotation.x += 0.003;\n $efd3ba4ec2608b1d$var$mesh3.rotation.x += 0.003;\n $efd3ba4ec2608b1d$var$camera.rotation.x = t * 0.0018;\n $efd3ba4ec2608b1d$var$camera.rotation.y = t * 0.00175;\n $efd3ba4ec2608b1d$var$camera.position.x = t * -0.004;\n $efd3ba4ec2608b1d$var$camera.rotation.z = t * -0.0004;\n $efd3ba4ec2608b1d$var$camera.position.z = t * -0.002;\n/*if (camera.position.z >= 8){\r\n camera.position.z = t * 0.01\r\n } else {\r\n camera.rotation.x = t * 0.0018;\r\n camera.rotation.y = t * 0.00175;\r\n camera.position.x = t * -0.004;\r\n camera.rotation.z = t * -0.0004;\r\n camera.position.z = t * -0.002;\r\n }\r\n*/ //camera.rotation.x = t * 0.01;\n//camera.rotation.y = t * 0.01;\n//camera.rotation.z = t * 0.01;\n//camera.position.z = t * -0.01;\n/*\r\n camera.rotation.y = t * +0.003;\r\n camera.position.z = t * +0.003;\r\n if (camera.rotation.y >= -3){\r\n camera.rotation.y = t * 0.003\r\n } else {\r\n camera.position.z = t * -0.004\r\n camera.rotation.y = t * 0.003\r\n camera.position.x = t * -10\r\n if (camera.rotation.y >= -5){\r\n //camera.rotation.y = t * 0.009\r\n //camera.rotation.x = t * -0.0001\r\n camera.rotation.z = t * -0.0009\r\n camera.rotation.y = t * 0.005\r\n camera.position.z = t * -0.009\r\n if(camera.position.z >= -1){\r\n camera.position.z = t * -0.0001\r\n }\r\n }\r\n \r\n\r\n }\r\n */ //camera.position.y = t *\n//camera.rotation.x = t * 1\n//if(camera.rotation.y = 0.0001){\n// camera.rotation.y = t * +0.01\n//}\n}\n//const axesHelper = new THREE.AxesHelper( 5 );\n//scene.add( axesHelper );\ndocument.body.onscroll = $efd3ba4ec2608b1d$var$moveCamera;\n//ANIMACIÓN\nfunction $efd3ba4ec2608b1d$var$animate() {\n requestAnimationFrame($efd3ba4ec2608b1d$var$animate);\n $efd3ba4ec2608b1d$var$renderer.render($efd3ba4ec2608b1d$var$scene, $efd3ba4ec2608b1d$var$camera);\n $efd3ba4ec2608b1d$var$mesh.rotation.y += 0.0001;\n if ($efd3ba4ec2608b1d$var$mesh.rotation.y >= 0.000000001) $efd3ba4ec2608b1d$var$mesh.rotation.y += 0;\n if ($efd3ba4ec2608b1d$var$camera.position.z >= 1) $efd3ba4ec2608b1d$var$mesh.rotation.y += 0.003;\n $efd3ba4ec2608b1d$var$mesh2.rotation.y += 0.0001;\n if ($efd3ba4ec2608b1d$var$mesh2.rotation.y >= 0.000000001) $efd3ba4ec2608b1d$var$mesh2.rotation.y += 0;\n if ($efd3ba4ec2608b1d$var$camera.position.z >= 1) $efd3ba4ec2608b1d$var$mesh2.rotation.y += 0.003;\n $efd3ba4ec2608b1d$var$mesh3.rotation.y += 0.0001;\n if ($efd3ba4ec2608b1d$var$mesh3.rotation.y >= 0.000000001) $efd3ba4ec2608b1d$var$mesh3.rotation.y += 0;\n if ($efd3ba4ec2608b1d$var$camera.position.z >= 1) $efd3ba4ec2608b1d$var$mesh3.rotation.y += 0.003;\n}\n//WEBGL FUNCIONA/WARNING\nif ((0, $a4e30d08b53515ba$export$2e2bcd8739ae039).isWebGLAvailable()) // Initiate function or other initializations here\n$efd3ba4ec2608b1d$var$animate();\nelse {\n const warning = (0, $a4e30d08b53515ba$export$2e2bcd8739ae039).getWebGLErrorMessage();\n document.getElementById(\"container\").appendChild(warning);\n}\n\n\n//# sourceMappingURL=index.c4e12884.js.map\n","import * as THREE from \"three\";\r\nimport WebGL from \"three/examples/jsm/capabilities/WebGL.js\";\r\ngsap.registerPlugin(ScrollTrigger);\r\n\r\nconst scene = new THREE.Scene();\r\nscene.background = new THREE.Color(0x252a36);\r\nconst camera = new THREE.PerspectiveCamera(\r\n 75,\r\n window.innerWidth / window.innerHeight,\r\n 0.1,\r\n 1000\r\n);\r\n\r\nconst renderer = new THREE.WebGLRenderer({ antialias: true });\r\nrenderer.setSize(window.innerWidth, window.innerHeight);\r\ndocument.body.appendChild(renderer.domElement);\r\n\r\nconst geometry = new THREE.IcosahedronGeometry(6, 2);\r\nconst material = new THREE.MeshBasicMaterial({\r\n color: 0xffffff,\r\n wireframe: true,\r\n});\r\n\r\n//morado\r\nconst geometry2 = new THREE.IcosahedronGeometry(6, 2);\r\nconst material2 = new THREE.MeshBasicMaterial({\r\n color: 0xffffff,\r\n wireframe: true,\r\n});\r\n\r\n//verde\r\nconst geometry3 = new THREE.IcosahedronGeometry(6, 2);\r\nconst material3 = new THREE.MeshBasicMaterial({\r\n color: 0xffffff,\r\n wireframe: true,\r\n});\r\n\r\nconst mesh = new THREE.Mesh(geometry, material);\r\nmesh.position.z = -4;\r\nmesh.position.x = 5;\r\nmesh.position.y = 3;\r\nmesh.rotation.x = Math.PI * 0.3;\r\n\r\nconst mesh2 = new THREE.Mesh(geometry2, material2);\r\nmesh2.position.z = 12;\r\nmesh2.position.x = -2;\r\nmesh2.position.y = 4;\r\nmesh2.rotation.x = Math.PI * 0.3;\r\n\r\nconst mesh3 = new THREE.Mesh(geometry3, material3);\r\nmesh3.position.z = 15;\r\nmesh3.position.x = 20;\r\nmesh3.position.y = 0;\r\nmesh3.rotation.x = Math.PI * 0.3;\r\n\r\nscene.add(mesh, mesh2, mesh3);\r\n\r\n/*\r\nconst mesh2 = new THREE.Mesh( geometry, material );\r\n mesh2.position.z = 4;\r\n mesh2.position.x = -3;\r\n mesh2.position.y = -15;\r\n mesh2.rotation.x = Math.PI * 0.3;\r\n\r\n\r\nscene.add( mesh2 );\r\n*/\r\n\r\nwindow.addEventListener(\"resize\", onWindowResize, false);\r\nfunction onWindowResize() {\r\n camera.aspect = window.innerWidth / window.innerHeight;\r\n camera.updateProjectionMatrix();\r\n renderer.setSize(window.innerWidth, window.innerHeight);\r\n render();\r\n}\r\n\r\n/*\r\nconst textureLoader = new THREE.TextureLoader\r\nconst starTexture = textureLoader.load(\"1numerofondonegro.png\")\r\n\r\nconst starVertices = []\r\nfor (let i = 0; i < 1000; i++){\r\n const x = (Math.random() - 0.5) * 100;\r\n const y = (Math.random() - 0.5) * 100;\r\n const z = -Math.random() - 0.5 * 100;\r\n starVertices.push(x, y, z);\r\n}\r\n\r\nstarGeometry.setAttribute('position', new THREE.Float32BufferAttribute(starVertices, 3))\r\n\r\nconst stars = new THREE.Points(starGeometry, starMaterial, starTexture)\r\nscene.add(stars)\r\n*/\r\n\r\n/*\r\n//FONDO DE UNOS\r\n\r\nconst particlesGeometry = new THREE.BufferGeometry();\r\nconst particlesCount = 5000;\r\n\r\nconst vertices = new Float32Array(particlesCount);\r\nfor (let i = 0; i < 1000; i++) {\r\n vertices[i] = (Math.random() -0.6) * 70;\r\n const x = (Math.random() +1) * 1000\r\n const y = (Math.random() -1) * 1000\r\n const z = 20\r\n}\r\n\r\nparticlesGeometry.setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(vertices, 3)\r\n)\r\n*/\r\nconst getRandomParticelPos = (particleCount) => {\r\n const arr = new Float32Array(particleCount * 700);\r\n for (let i = 0; i < particleCount; i++) {\r\n arr[i] = (Math.random() - 0.6) * 70;\r\n const x = (Math.random() + 1) * 1000;\r\n const y = (Math.random() - 1) * 1000;\r\n const z = 0;\r\n }\r\n return arr;\r\n};\r\n\r\nconst geometrys = [new THREE.BufferGeometry(), new THREE.BufferGeometry()];\r\n\r\ngeometrys[0].setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(getRandomParticelPos(1000), 3)\r\n);\r\ngeometrys[1].setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(getRandomParticelPos(1000), 3)\r\n);\r\n\r\nconst loader = new THREE.TextureLoader();\r\n\r\n// material\r\nconst materials = [\r\n new THREE.PointsMaterial({\r\n size: 0.25,\r\n map: loader.load(\"/images/uno.png\"),\r\n transparent: true,\r\n // color: \"#ff0000\"\r\n }),\r\n new THREE.PointsMaterial({\r\n size: 0.25,\r\n map: loader.load(\"/images/cero.png\"),\r\n transparent: true,\r\n // color: \"#0000ff\"\r\n }),\r\n];\r\n\r\nconst starsT1 = new THREE.Points(geometrys[0], materials[0]);\r\nconst starsT2 = new THREE.Points(geometrys[1], materials[1]);\r\nscene.add(starsT1);\r\nscene.add(starsT2);\r\n\r\n/*\r\n//FONDO DE UNOS\r\n\r\nconst particlesGeometry = new THREE.BufferGeometry();\r\nconst particlesCount = 5000;\r\n\r\nconst vertices = new Float32Array(particlesCount);\r\nfor (let i = 0; i < 1000; i++) {\r\n vertices[i] = (Math.random() -0.6) * 70;\r\n const x = (Math.random() +1) * 1000\r\n const y = (Math.random() -1) * 1000\r\n const z = 20\r\n}\r\n\r\nparticlesGeometry.setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(vertices, 3)\r\n)\r\n\r\n//const loader = new THREE.TextureLoader();\r\n\r\nconst material1 = new THREE.MeshBasicMaterial({\r\n map: loader.load('uno.png'),\r\n });\r\n\r\nconst stars = new THREE.Points(particlesGeometry, material1);\r\n\r\n//FONDO DE CEROS\r\nconst particlesGeometry1 = new THREE.BufferGeometry();\r\nconst particlesCount1 = 5000;\r\n\r\nconst vertices1 = new Float32Array(particlesCount1);\r\nfor (let e = 0; e < 1000; e++) {\r\n vertices1[e] = (Math.random() -0.6) * 70;\r\n //const x = (Math.random() +1) * 1000\r\n //const y = (Math.random() -1) * 1000\r\n //const z = 20\r\n}\r\n\r\nparticlesGeometry1.setAttribute(\r\n \"position\",\r\n new THREE.BufferAttribute(vertices1, 4)\r\n)\r\n\r\nconst loader2 = new THREE.TextureLoader();\r\n\r\nconst material0 = new THREE.MeshBasicMaterial({\r\n map: loader2.load('uno.png'),\r\n });\r\n\r\n\r\nconst stars0 = new THREE.Points(particlesGeometry1, material0);\r\nscene.add(stars, stars0)\r\n\r\n\r\n/*\r\nconst starGeometry = new THREE.BufferGeometry()\r\nconst starMaterial = new THREE.PointsMaterial({\r\n color: 0xFFFFFF\r\n})\r\n\r\nconst starVertices = []\r\n for (let i = 0; i < 10000; i++) {\r\n const x = (Math.random() - 0.5) * 5000\r\n const y = (Math.random() - 0.5) * 5000\r\n const z = -Math.random() * 2000\r\n starVertices.push(x, y, z)\r\n }\r\n\r\nconsole.log(starVertices)\r\nstarGeometry.setAttribute('position', \r\n new THREE.Float32BufferAttribute(\r\n starVertices, 3)\r\n )\r\n\r\nconst stars = new THREE.Points(starGeometry, starMaterial)\r\nscene.add(stars)\r\n*/\r\n\r\ncamera.position.z = 0;\r\ncamera.position.y = 0;\r\ncamera.position.x = 0;\r\n\r\nconst loadingManager = new THREE.LoadingManager();\r\n\r\n//loadingManager.onStart = function(url, item, total) {\r\n// console.log(`Started Loading: ${url}`);\r\n//}\r\n\r\nconst progressBar = document.getElementById(\"progress-bar\");\r\n\r\nloadingManager.onProgress = function (url, loaded, total) {\r\n progressBar.value = (loaded / total) * 100;\r\n};\r\n\r\nconst progressBarContainer = document.querySelector(\"progress-bar-container\");\r\n\r\nloadingManager.onLoad = function () {\r\n progressBarContainer.style.display = \"none\";\r\n};\r\n\r\nloadingManager.onError = function (url) {\r\n console.log(`Got a problem loading: ${url}`);\r\n};\r\n\r\nfunction scalePercent(start, end) {\r\n return (scrollPercent - start) / (end - start);\r\n}\r\n\r\nfunction moveCamera() {\r\n const t = document.body.getBoundingClientRect().top;\r\n mesh.rotation.x += 0.003;\r\n mesh2.rotation.x += 0.003;\r\n mesh3.rotation.x += 0.003;\r\n\r\n camera.rotation.x = t * 0.0018;\r\n camera.rotation.y = t * 0.00175;\r\n camera.position.x = t * -0.004;\r\n camera.rotation.z = t * -0.0004;\r\n camera.position.z = t * -0.002;\r\n /*if (camera.position.z >= 8){\r\n camera.position.z = t * 0.01\r\n } else {\r\n camera.rotation.x = t * 0.0018;\r\n camera.rotation.y = t * 0.00175;\r\n camera.position.x = t * -0.004;\r\n camera.rotation.z = t * -0.0004;\r\n camera.position.z = t * -0.002;\r\n }\r\n*/\r\n\r\n //camera.rotation.x = t * 0.01;\r\n //camera.rotation.y = t * 0.01;\r\n //camera.rotation.z = t * 0.01;\r\n\r\n //camera.position.z = t * -0.01;\r\n\r\n /*\r\n camera.rotation.y = t * +0.003;\r\n camera.position.z = t * +0.003;\r\n if (camera.rotation.y >= -3){\r\n camera.rotation.y = t * 0.003\r\n } else {\r\n camera.position.z = t * -0.004\r\n camera.rotation.y = t * 0.003\r\n camera.position.x = t * -10\r\n if (camera.rotation.y >= -5){\r\n //camera.rotation.y = t * 0.009\r\n //camera.rotation.x = t * -0.0001\r\n camera.rotation.z = t * -0.0009\r\n camera.rotation.y = t * 0.005\r\n camera.position.z = t * -0.009\r\n if(camera.position.z >= -1){\r\n camera.position.z = t * -0.0001\r\n }\r\n }\r\n \r\n\r\n }\r\n */\r\n //camera.position.y = t *\r\n //camera.rotation.x = t * 1\r\n //if(camera.rotation.y = 0.0001){\r\n // camera.rotation.y = t * +0.01\r\n //}\r\n}\r\n\r\n//const axesHelper = new THREE.AxesHelper( 5 );\r\n//scene.add( axesHelper );\r\n\r\ndocument.body.onscroll = moveCamera;\r\n\r\n//ANIMACIÓN\r\nfunction animate() {\r\n requestAnimationFrame(animate);\r\n renderer.render(scene, camera);\r\n mesh.rotation.y += 0.0001;\r\n if (mesh.rotation.y >= 0.000000001) {\r\n mesh.rotation.y += 0;\r\n }\r\n if (camera.position.z >= 1) {\r\n mesh.rotation.y += 0.003;\r\n }\r\n mesh2.rotation.y += 0.0001;\r\n if (mesh2.rotation.y >= 0.000000001) {\r\n mesh2.rotation.y += 0;\r\n }\r\n if (camera.position.z >= 1) {\r\n mesh2.rotation.y += 0.003;\r\n }\r\n mesh3.rotation.y += 0.0001;\r\n if (mesh3.rotation.y >= 0.000000001) {\r\n mesh3.rotation.y += 0;\r\n }\r\n if (camera.position.z >= 1) {\r\n mesh3.rotation.y += 0.003;\r\n }\r\n}\r\n\r\n//WEBGL FUNCIONA/WARNING\r\nif (WebGL.isWebGLAvailable()) {\r\n // Initiate function or other initializations here\r\n animate();\r\n} else {\r\n const warning = WebGL.getWebGLErrorMessage();\r\n document.getElementById(\"container\").appendChild(warning);\r\n}\r\n","/**\n * @license\n * Copyright 2010-2023 Three.js Authors\n * SPDX-License-Identifier: MIT\n */\nconst REVISION = '155';\n\nconst MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };\nconst TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };\nconst CullFaceNone = 0;\nconst CullFaceBack = 1;\nconst CullFaceFront = 2;\nconst CullFaceFrontBack = 3;\nconst BasicShadowMap = 0;\nconst PCFShadowMap = 1;\nconst PCFSoftShadowMap = 2;\nconst VSMShadowMap = 3;\nconst FrontSide = 0;\nconst BackSide = 1;\nconst DoubleSide = 2;\nconst TwoPassDoubleSide = 2; // r149\nconst NoBlending = 0;\nconst NormalBlending = 1;\nconst AdditiveBlending = 2;\nconst SubtractiveBlending = 3;\nconst MultiplyBlending = 4;\nconst CustomBlending = 5;\nconst AddEquation = 100;\nconst SubtractEquation = 101;\nconst ReverseSubtractEquation = 102;\nconst MinEquation = 103;\nconst MaxEquation = 104;\nconst ZeroFactor = 200;\nconst OneFactor = 201;\nconst SrcColorFactor = 202;\nconst OneMinusSrcColorFactor = 203;\nconst SrcAlphaFactor = 204;\nconst OneMinusSrcAlphaFactor = 205;\nconst DstAlphaFactor = 206;\nconst OneMinusDstAlphaFactor = 207;\nconst DstColorFactor = 208;\nconst OneMinusDstColorFactor = 209;\nconst SrcAlphaSaturateFactor = 210;\nconst NeverDepth = 0;\nconst AlwaysDepth = 1;\nconst LessDepth = 2;\nconst LessEqualDepth = 3;\nconst EqualDepth = 4;\nconst GreaterEqualDepth = 5;\nconst GreaterDepth = 6;\nconst NotEqualDepth = 7;\nconst MultiplyOperation = 0;\nconst MixOperation = 1;\nconst AddOperation = 2;\nconst NoToneMapping = 0;\nconst LinearToneMapping = 1;\nconst ReinhardToneMapping = 2;\nconst CineonToneMapping = 3;\nconst ACESFilmicToneMapping = 4;\nconst CustomToneMapping = 5;\n\nconst UVMapping = 300;\nconst CubeReflectionMapping = 301;\nconst CubeRefractionMapping = 302;\nconst EquirectangularReflectionMapping = 303;\nconst EquirectangularRefractionMapping = 304;\nconst CubeUVReflectionMapping = 306;\nconst RepeatWrapping = 1000;\nconst ClampToEdgeWrapping = 1001;\nconst MirroredRepeatWrapping = 1002;\nconst NearestFilter = 1003;\nconst NearestMipmapNearestFilter = 1004;\nconst NearestMipMapNearestFilter = 1004;\nconst NearestMipmapLinearFilter = 1005;\nconst NearestMipMapLinearFilter = 1005;\nconst LinearFilter = 1006;\nconst LinearMipmapNearestFilter = 1007;\nconst LinearMipMapNearestFilter = 1007;\nconst LinearMipmapLinearFilter = 1008;\nconst LinearMipMapLinearFilter = 1008;\nconst UnsignedByteType = 1009;\nconst ByteType = 1010;\nconst ShortType = 1011;\nconst UnsignedShortType = 1012;\nconst IntType = 1013;\nconst UnsignedIntType = 1014;\nconst FloatType = 1015;\nconst HalfFloatType = 1016;\nconst UnsignedShort4444Type = 1017;\nconst UnsignedShort5551Type = 1018;\nconst UnsignedInt248Type = 1020;\nconst AlphaFormat = 1021;\nconst RGBAFormat = 1023;\nconst LuminanceFormat = 1024;\nconst LuminanceAlphaFormat = 1025;\nconst DepthFormat = 1026;\nconst DepthStencilFormat = 1027;\nconst RedFormat = 1028;\nconst RedIntegerFormat = 1029;\nconst RGFormat = 1030;\nconst RGIntegerFormat = 1031;\nconst RGBAIntegerFormat = 1033;\n\nconst RGB_S3TC_DXT1_Format = 33776;\nconst RGBA_S3TC_DXT1_Format = 33777;\nconst RGBA_S3TC_DXT3_Format = 33778;\nconst RGBA_S3TC_DXT5_Format = 33779;\nconst RGB_PVRTC_4BPPV1_Format = 35840;\nconst RGB_PVRTC_2BPPV1_Format = 35841;\nconst RGBA_PVRTC_4BPPV1_Format = 35842;\nconst RGBA_PVRTC_2BPPV1_Format = 35843;\nconst RGB_ETC1_Format = 36196;\nconst RGB_ETC2_Format = 37492;\nconst RGBA_ETC2_EAC_Format = 37496;\nconst RGBA_ASTC_4x4_Format = 37808;\nconst RGBA_ASTC_5x4_Format = 37809;\nconst RGBA_ASTC_5x5_Format = 37810;\nconst RGBA_ASTC_6x5_Format = 37811;\nconst RGBA_ASTC_6x6_Format = 37812;\nconst RGBA_ASTC_8x5_Format = 37813;\nconst RGBA_ASTC_8x6_Format = 37814;\nconst RGBA_ASTC_8x8_Format = 37815;\nconst RGBA_ASTC_10x5_Format = 37816;\nconst RGBA_ASTC_10x6_Format = 37817;\nconst RGBA_ASTC_10x8_Format = 37818;\nconst RGBA_ASTC_10x10_Format = 37819;\nconst RGBA_ASTC_12x10_Format = 37820;\nconst RGBA_ASTC_12x12_Format = 37821;\nconst RGBA_BPTC_Format = 36492;\nconst RED_RGTC1_Format = 36283;\nconst SIGNED_RED_RGTC1_Format = 36284;\nconst RED_GREEN_RGTC2_Format = 36285;\nconst SIGNED_RED_GREEN_RGTC2_Format = 36286;\nconst LoopOnce = 2200;\nconst LoopRepeat = 2201;\nconst LoopPingPong = 2202;\nconst InterpolateDiscrete = 2300;\nconst InterpolateLinear = 2301;\nconst InterpolateSmooth = 2302;\nconst ZeroCurvatureEnding = 2400;\nconst ZeroSlopeEnding = 2401;\nconst WrapAroundEnding = 2402;\nconst NormalAnimationBlendMode = 2500;\nconst AdditiveAnimationBlendMode = 2501;\nconst TrianglesDrawMode = 0;\nconst TriangleStripDrawMode = 1;\nconst TriangleFanDrawMode = 2;\n/** @deprecated Use LinearSRGBColorSpace or NoColorSpace in three.js r152+. */\nconst LinearEncoding = 3000;\n/** @deprecated Use SRGBColorSpace in three.js r152+. */\nconst sRGBEncoding = 3001;\nconst BasicDepthPacking = 3200;\nconst RGBADepthPacking = 3201;\nconst TangentSpaceNormalMap = 0;\nconst ObjectSpaceNormalMap = 1;\n\n// Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available.\nconst NoColorSpace = '';\nconst SRGBColorSpace = 'srgb';\nconst LinearSRGBColorSpace = 'srgb-linear';\nconst DisplayP3ColorSpace = 'display-p3';\n\nconst ZeroStencilOp = 0;\nconst KeepStencilOp = 7680;\nconst ReplaceStencilOp = 7681;\nconst IncrementStencilOp = 7682;\nconst DecrementStencilOp = 7683;\nconst IncrementWrapStencilOp = 34055;\nconst DecrementWrapStencilOp = 34056;\nconst InvertStencilOp = 5386;\n\nconst NeverStencilFunc = 512;\nconst LessStencilFunc = 513;\nconst EqualStencilFunc = 514;\nconst LessEqualStencilFunc = 515;\nconst GreaterStencilFunc = 516;\nconst NotEqualStencilFunc = 517;\nconst GreaterEqualStencilFunc = 518;\nconst AlwaysStencilFunc = 519;\n\nconst NeverCompare = 512;\nconst LessCompare = 513;\nconst EqualCompare = 514;\nconst LessEqualCompare = 515;\nconst GreaterCompare = 516;\nconst NotEqualCompare = 517;\nconst GreaterEqualCompare = 518;\nconst AlwaysCompare = 519;\n\nconst StaticDrawUsage = 35044;\nconst DynamicDrawUsage = 35048;\nconst StreamDrawUsage = 35040;\nconst StaticReadUsage = 35045;\nconst DynamicReadUsage = 35049;\nconst StreamReadUsage = 35041;\nconst StaticCopyUsage = 35046;\nconst DynamicCopyUsage = 35050;\nconst StreamCopyUsage = 35042;\n\nconst GLSL1 = '100';\nconst GLSL3 = '300 es';\n\nconst _SRGBAFormat = 1035; // fallback for WebGL 1\n\nconst WebGLCoordinateSystem = 2000;\nconst WebGPUCoordinateSystem = 2001;\n\n/**\n * https://github.com/mrdoob/eventdispatcher.js/\n */\n\nclass EventDispatcher {\n\n\taddEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) this._listeners = {};\n\n\t\tconst listeners = this._listeners;\n\n\t\tif ( listeners[ type ] === undefined ) {\n\n\t\t\tlisteners[ type ] = [];\n\n\t\t}\n\n\t\tif ( listeners[ type ].indexOf( listener ) === - 1 ) {\n\n\t\t\tlisteners[ type ].push( listener );\n\n\t\t}\n\n\t}\n\n\thasEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return false;\n\n\t\tconst listeners = this._listeners;\n\n\t\treturn listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;\n\n\t}\n\n\tremoveEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tconst index = listenerArray.indexOf( listener );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\tlistenerArray.splice( index, 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ event.type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tevent.target = this;\n\n\t\t\t// Make a copy, in case listeners are removed while iterating.\n\t\t\tconst array = listenerArray.slice( 0 );\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tarray[ i ].call( this, event );\n\n\t\t\t}\n\n\t\t\tevent.target = null;\n\n\t\t}\n\n\t}\n\n}\n\nconst _lut = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '0a', '0b', '0c', '0d', '0e', '0f', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '1a', '1b', '1c', '1d', '1e', '1f', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '2a', '2b', '2c', '2d', '2e', '2f', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '3a', '3b', '3c', '3d', '3e', '3f', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '4a', '4b', '4c', '4d', '4e', '4f', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5a', '5b', '5c', '5d', '5e', '5f', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '6a', '6b', '6c', '6d', '6e', '6f', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '7a', '7b', '7c', '7d', '7e', '7f', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '8a', '8b', '8c', '8d', '8e', '8f', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '9a', '9b', '9c', '9d', '9e', '9f', 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'aa', 'ab', 'ac', 'ad', 'ae', 'af', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'ba', 'bb', 'bc', 'bd', 'be', 'bf', 'c0', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'ca', 'cb', 'cc', 'cd', 'ce', 'cf', 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'da', 'db', 'dc', 'dd', 'de', 'df', 'e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6', 'e7', 'e8', 'e9', 'ea', 'eb', 'ec', 'ed', 'ee', 'ef', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'fa', 'fb', 'fc', 'fd', 'fe', 'ff' ];\n\nlet _seed = 1234567;\n\n\nconst DEG2RAD = Math.PI / 180;\nconst RAD2DEG = 180 / Math.PI;\n\n// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\nfunction generateUUID() {\n\n\tconst d0 = Math.random() * 0xffffffff | 0;\n\tconst d1 = Math.random() * 0xffffffff | 0;\n\tconst d2 = Math.random() * 0xffffffff | 0;\n\tconst d3 = Math.random() * 0xffffffff | 0;\n\tconst uuid = _lut[ d0 & 0xff ] + _lut[ d0 >> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] +\n\t\t\t_lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ];\n\n\t// .toLowerCase() here flattens concatenated strings to save heap memory space.\n\treturn uuid.toLowerCase();\n\n}\n\nfunction clamp( value, min, max ) {\n\n\treturn Math.max( min, Math.min( max, value ) );\n\n}\n\n// compute euclidean modulo of m % n\n// https://en.wikipedia.org/wiki/Modulo_operation\nfunction euclideanModulo( n, m ) {\n\n\treturn ( ( n % m ) + m ) % m;\n\n}\n\n// Linear mapping from range to range \nfunction mapLinear( x, a1, a2, b1, b2 ) {\n\n\treturn b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );\n\n}\n\n// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/\nfunction inverseLerp( x, y, value ) {\n\n\tif ( x !== y ) {\n\n\t\treturn ( value - x ) / ( y - x );\n\n\t} else {\n\n\t\treturn 0;\n\n\t}\n\n}\n\n// https://en.wikipedia.org/wiki/Linear_interpolation\nfunction lerp( x, y, t ) {\n\n\treturn ( 1 - t ) * x + t * y;\n\n}\n\n// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\nfunction damp( x, y, lambda, dt ) {\n\n\treturn lerp( x, y, 1 - Math.exp( - lambda * dt ) );\n\n}\n\n// https://www.desmos.com/calculator/vcsjnyz7x4\nfunction pingpong( x, length = 1 ) {\n\n\treturn length - Math.abs( euclideanModulo( x, length * 2 ) - length );\n\n}\n\n// http://en.wikipedia.org/wiki/Smoothstep\nfunction smoothstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * ( 3 - 2 * x );\n\n}\n\nfunction smootherstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * x * ( x * ( x * 6 - 15 ) + 10 );\n\n}\n\n// Random integer from interval\nfunction randInt( low, high ) {\n\n\treturn low + Math.floor( Math.random() * ( high - low + 1 ) );\n\n}\n\n// Random float from interval\nfunction randFloat( low, high ) {\n\n\treturn low + Math.random() * ( high - low );\n\n}\n\n// Random float from <-range/2, range/2> interval\nfunction randFloatSpread( range ) {\n\n\treturn range * ( 0.5 - Math.random() );\n\n}\n\n// Deterministic pseudo-random float in the interval [ 0, 1 ]\nfunction seededRandom( s ) {\n\n\tif ( s !== undefined ) _seed = s;\n\n\t// Mulberry32 generator\n\n\tlet t = _seed += 0x6D2B79F5;\n\n\tt = Math.imul( t ^ t >>> 15, t | 1 );\n\n\tt ^= t + Math.imul( t ^ t >>> 7, t | 61 );\n\n\treturn ( ( t ^ t >>> 14 ) >>> 0 ) / 4294967296;\n\n}\n\nfunction degToRad( degrees ) {\n\n\treturn degrees * DEG2RAD;\n\n}\n\nfunction radToDeg( radians ) {\n\n\treturn radians * RAD2DEG;\n\n}\n\nfunction isPowerOfTwo( value ) {\n\n\treturn ( value & ( value - 1 ) ) === 0 && value !== 0;\n\n}\n\nfunction ceilPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction floorPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction setQuaternionFromProperEuler( q, a, b, c, order ) {\n\n\t// Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n\n\t// rotations are applied to the axes in the order specified by 'order'\n\t// rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n\t// angles are in radians\n\n\tconst cos = Math.cos;\n\tconst sin = Math.sin;\n\n\tconst c2 = cos( b / 2 );\n\tconst s2 = sin( b / 2 );\n\n\tconst c13 = cos( ( a + c ) / 2 );\n\tconst s13 = sin( ( a + c ) / 2 );\n\n\tconst c1_3 = cos( ( a - c ) / 2 );\n\tconst s1_3 = sin( ( a - c ) / 2 );\n\n\tconst c3_1 = cos( ( c - a ) / 2 );\n\tconst s3_1 = sin( ( c - a ) / 2 );\n\n\tswitch ( order ) {\n\n\t\tcase 'XYX':\n\t\t\tq.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YZY':\n\t\t\tq.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZXZ':\n\t\t\tq.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'XZX':\n\t\t\tq.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YXY':\n\t\t\tq.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZYZ':\n\t\t\tq.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );\n\n\t}\n\n}\n\nfunction denormalize( value, array ) {\n\n\tswitch ( array.constructor ) {\n\n\t\tcase Float32Array:\n\n\t\t\treturn value;\n\n\t\tcase Uint32Array:\n\n\t\t\treturn value / 4294967295.0;\n\n\t\tcase Uint16Array:\n\n\t\t\treturn value / 65535.0;\n\n\t\tcase Uint8Array:\n\n\t\t\treturn value / 255.0;\n\n\t\tcase Int32Array:\n\n\t\t\treturn Math.max( value / 2147483647.0, - 1.0 );\n\n\t\tcase Int16Array:\n\n\t\t\treturn Math.max( value / 32767.0, - 1.0 );\n\n\t\tcase Int8Array:\n\n\t\t\treturn Math.max( value / 127.0, - 1.0 );\n\n\t\tdefault:\n\n\t\t\tthrow new Error( 'Invalid component type.' );\n\n\t}\n\n}\n\nfunction normalize( value, array ) {\n\n\tswitch ( array.constructor ) {\n\n\t\tcase Float32Array:\n\n\t\t\treturn value;\n\n\t\tcase Uint32Array:\n\n\t\t\treturn Math.round( value * 4294967295.0 );\n\n\t\tcase Uint16Array:\n\n\t\t\treturn Math.round( value * 65535.0 );\n\n\t\tcase Uint8Array:\n\n\t\t\treturn Math.round( value * 255.0 );\n\n\t\tcase Int32Array:\n\n\t\t\treturn Math.round( value * 2147483647.0 );\n\n\t\tcase Int16Array:\n\n\t\t\treturn Math.round( value * 32767.0 );\n\n\t\tcase Int8Array:\n\n\t\t\treturn Math.round( value * 127.0 );\n\n\t\tdefault:\n\n\t\t\tthrow new Error( 'Invalid component type.' );\n\n\t}\n\n}\n\nconst MathUtils = {\n\tDEG2RAD: DEG2RAD,\n\tRAD2DEG: RAD2DEG,\n\tgenerateUUID: generateUUID,\n\tclamp: clamp,\n\teuclideanModulo: euclideanModulo,\n\tmapLinear: mapLinear,\n\tinverseLerp: inverseLerp,\n\tlerp: lerp,\n\tdamp: damp,\n\tpingpong: pingpong,\n\tsmoothstep: smoothstep,\n\tsmootherstep: smootherstep,\n\trandInt: randInt,\n\trandFloat: randFloat,\n\trandFloatSpread: randFloatSpread,\n\tseededRandom: seededRandom,\n\tdegToRad: degToRad,\n\tradToDeg: radToDeg,\n\tisPowerOfTwo: isPowerOfTwo,\n\tceilPowerOfTwo: ceilPowerOfTwo,\n\tfloorPowerOfTwo: floorPowerOfTwo,\n\tsetQuaternionFromProperEuler: setQuaternionFromProperEuler,\n\tnormalize: normalize,\n\tdenormalize: denormalize\n};\n\nclass Vector2 {\n\n\tconstructor( x = 0, y = 0 ) {\n\n\t\tVector2.prototype.isVector2 = true;\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.x;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.x = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.y;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.y = value;\n\n\t}\n\n\tset( x, y ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v ) {\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v ) {\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ];\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ];\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y;\n\n\t}\n\n\tcross( v ) {\n\n\t\treturn this.x * v.y - this.y * v.x;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tangle() {\n\n\t\t// computes the angle in radians with respect to the positive x-axis\n\n\t\tconst angle = Math.atan2( - this.y, - this.x ) + Math.PI;\n\n\t\treturn angle;\n\n\t}\n\n\tangleTo( v ) {\n\n\t\tconst denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );\n\n\t\tif ( denominator === 0 ) return Math.PI / 2;\n\n\t\tconst theta = this.dot( v ) / denominator;\n\n\t\t// clamp, to handle numerical problems\n\n\t\treturn Math.acos( clamp( theta, - 1, 1 ) );\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y;\n\t\treturn dx * dx + dy * dy;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\n\t\treturn this;\n\n\t}\n\n\trotateAround( center, angle ) {\n\n\t\tconst c = Math.cos( angle ), s = Math.sin( angle );\n\n\t\tconst x = this.x - center.x;\n\t\tconst y = this.y - center.y;\n\n\t\tthis.x = x * c - y * s + center.x;\n\t\tthis.y = x * s + y * c + center.y;\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\n\t\treturn this;\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.x;\n\t\tyield this.y;\n\n\t}\n\n}\n\nclass Matrix3 {\n\n\tconstructor( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {\n\n\t\tMatrix3.prototype.isMatrix3 = true;\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t];\n\n\t\tif ( n11 !== undefined ) {\n\n\t\t\tthis.set( n11, n12, n13, n21, n22, n23, n31, n32, n33 );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31;\n\t\tte[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32;\n\t\tte[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ];\n\t\tte[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ];\n\t\tte[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrix3Column( this, 0 );\n\t\tyAxis.setFromMatrix3Column( this, 1 );\n\t\tzAxis.setFromMatrix3Column( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix4( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 4 ], me[ 8 ],\n\t\t\tme[ 1 ], me[ 5 ], me[ 9 ],\n\t\t\tme[ 2 ], me[ 6 ], me[ 10 ]\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m ) {\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31;\n\t\tte[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32;\n\t\tte[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31;\n\t\tte[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32;\n\t\tte[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31;\n\t\tte[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32;\n\t\tte[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s;\n\t\tte[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s;\n\t\tte[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst a = te[ 0 ], b = te[ 1 ], c = te[ 2 ],\n\t\t\td = te[ 3 ], e = te[ 4 ], f = te[ 5 ],\n\t\t\tg = te[ 6 ], h = te[ 7 ], i = te[ 8 ];\n\n\t\treturn a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n\n\t}\n\n\tinvert() {\n\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ],\n\t\t\tn12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ],\n\t\t\tn13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ],\n\n\t\t\tt11 = n33 * n22 - n32 * n23,\n\t\t\tt12 = n32 * n13 - n33 * n12,\n\t\t\tt13 = n23 * n12 - n22 * n13,\n\n\t\t\tdet = n11 * t11 + n21 * t12 + n31 * t13;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv;\n\t\tte[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv;\n\n\t\tte[ 3 ] = t12 * detInv;\n\t\tte[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv;\n\t\tte[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv;\n\n\t\tte[ 6 ] = t13 * detInv;\n\t\tte[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv;\n\t\tte[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\ttranspose() {\n\n\t\tlet tmp;\n\t\tconst m = this.elements;\n\n\t\ttmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp;\n\t\ttmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp;\n\t\ttmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tgetNormalMatrix( matrix4 ) {\n\n\t\treturn this.setFromMatrix4( matrix4 ).invert().transpose();\n\n\t}\n\n\ttransposeIntoArray( r ) {\n\n\t\tconst m = this.elements;\n\n\t\tr[ 0 ] = m[ 0 ];\n\t\tr[ 1 ] = m[ 3 ];\n\t\tr[ 2 ] = m[ 6 ];\n\t\tr[ 3 ] = m[ 1 ];\n\t\tr[ 4 ] = m[ 4 ];\n\t\tr[ 5 ] = m[ 7 ];\n\t\tr[ 6 ] = m[ 2 ];\n\t\tr[ 7 ] = m[ 5 ];\n\t\tr[ 8 ] = m[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetUvTransform( tx, ty, sx, sy, rotation, cx, cy ) {\n\n\t\tconst c = Math.cos( rotation );\n\t\tconst s = Math.sin( rotation );\n\n\t\tthis.set(\n\t\t\tsx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx,\n\t\t\t- sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty,\n\t\t\t0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\t//\n\n\tscale( sx, sy ) {\n\n\t\tthis.premultiply( _m3.makeScale( sx, sy ) );\n\n\t\treturn this;\n\n\t}\n\n\trotate( theta ) {\n\n\t\tthis.premultiply( _m3.makeRotation( - theta ) );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( tx, ty ) {\n\n\t\tthis.premultiply( _m3.makeTranslation( tx, ty ) );\n\n\t\treturn this;\n\n\t}\n\n\t// for 2D Transforms\n\n\tmakeTranslation( x, y ) {\n\n\t\tif ( x.isVector2 ) {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, x.x,\n\t\t\t\t0, 1, x.y,\n\t\t\t\t0, 0, 1\n\n\t\t\t);\n\n\t\t} else {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, x,\n\t\t\t\t0, 1, y,\n\t\t\t\t0, 0, 1\n\n\t\t\t);\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotation( theta ) {\n\n\t\t// counterclockwise\n\n\t\tconst c = Math.cos( theta );\n\t\tconst s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\tc, - s, 0,\n\t\t\ts, c, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeScale( x, y ) {\n\n\t\tthis.set(\n\n\t\t\tx, 0, 0,\n\t\t\t0, y, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\t//\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\n\t\treturn array;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().fromArray( this.elements );\n\n\t}\n\n}\n\nconst _m3 = /*@__PURE__*/ new Matrix3();\n\nfunction arrayNeedsUint32( array ) {\n\n\t// assumes larger values usually on last\n\n\tfor ( let i = array.length - 1; i >= 0; -- i ) {\n\n\t\tif ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565\n\n\t}\n\n\treturn false;\n\n}\n\nconst TYPED_ARRAYS = {\n\tInt8Array: Int8Array,\n\tUint8Array: Uint8Array,\n\tUint8ClampedArray: Uint8ClampedArray,\n\tInt16Array: Int16Array,\n\tUint16Array: Uint16Array,\n\tInt32Array: Int32Array,\n\tUint32Array: Uint32Array,\n\tFloat32Array: Float32Array,\n\tFloat64Array: Float64Array\n};\n\nfunction getTypedArray( type, buffer ) {\n\n\treturn new TYPED_ARRAYS[ type ]( buffer );\n\n}\n\nfunction createElementNS( name ) {\n\n\treturn document.createElementNS( 'http://www.w3.org/1999/xhtml', name );\n\n}\n\nconst _cache = {};\n\nfunction warnOnce( message ) {\n\n\tif ( message in _cache ) return;\n\n\t_cache[ message ] = true;\n\n\tconsole.warn( message );\n\n}\n\nfunction SRGBToLinear( c ) {\n\n\treturn ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );\n\n}\n\nfunction LinearToSRGB( c ) {\n\n\treturn ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055;\n\n}\n\n/**\n * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping\n * or clipping. Based on W3C specifications for sRGB and Display P3,\n * and ICC specifications for the D50 connection space. Values in/out\n * are _linear_ sRGB and _linear_ Display P3.\n *\n * Note that both sRGB and Display P3 use the sRGB transfer functions.\n *\n * Reference:\n * - http://www.russellcottrell.com/photo/matrixCalculator.htm\n */\n\nconst LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new Matrix3().fromArray( [\n\t0.8224621, 0.0331941, 0.0170827,\n\t0.1775380, 0.9668058, 0.0723974,\n\t- 0.0000001, 0.0000001, 0.9105199\n] );\n\nconst LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new Matrix3().fromArray( [\n\t1.2249401, - 0.0420569, - 0.0196376,\n\t- 0.2249404, 1.0420571, - 0.0786361,\n\t0.0000001, 0.0000000, 1.0982735\n] );\n\nfunction DisplayP3ToLinearSRGB( color ) {\n\n\t// Display P3 uses the sRGB transfer functions\n\treturn color.convertSRGBToLinear().applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB );\n\n}\n\nfunction LinearSRGBToDisplayP3( color ) {\n\n\t// Display P3 uses the sRGB transfer functions\n\treturn color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ).convertLinearToSRGB();\n\n}\n\n// Conversions from to Linear-sRGB reference space.\nconst TO_LINEAR = {\n\t[ LinearSRGBColorSpace ]: ( color ) => color,\n\t[ SRGBColorSpace ]: ( color ) => color.convertSRGBToLinear(),\n\t[ DisplayP3ColorSpace ]: DisplayP3ToLinearSRGB,\n};\n\n// Conversions to from Linear-sRGB reference space.\nconst FROM_LINEAR = {\n\t[ LinearSRGBColorSpace ]: ( color ) => color,\n\t[ SRGBColorSpace ]: ( color ) => color.convertLinearToSRGB(),\n\t[ DisplayP3ColorSpace ]: LinearSRGBToDisplayP3,\n};\n\nconst ColorManagement = {\n\n\tenabled: true,\n\n\tget legacyMode() {\n\n\t\tconsole.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.' );\n\n\t\treturn ! this.enabled;\n\n\t},\n\n\tset legacyMode( legacyMode ) {\n\n\t\tconsole.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.' );\n\n\t\tthis.enabled = ! legacyMode;\n\n\t},\n\n\tget workingColorSpace() {\n\n\t\treturn LinearSRGBColorSpace;\n\n\t},\n\n\tset workingColorSpace( colorSpace ) {\n\n\t\tconsole.warn( 'THREE.ColorManagement: .workingColorSpace is readonly.' );\n\n\t},\n\n\tconvert: function ( color, sourceColorSpace, targetColorSpace ) {\n\n\t\tif ( this.enabled === false || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) {\n\n\t\t\treturn color;\n\n\t\t}\n\n\t\tconst sourceToLinear = TO_LINEAR[ sourceColorSpace ];\n\t\tconst targetFromLinear = FROM_LINEAR[ targetColorSpace ];\n\n\t\tif ( sourceToLinear === undefined || targetFromLinear === undefined ) {\n\n\t\t\tthrow new Error( `Unsupported color space conversion, \"${ sourceColorSpace }\" to \"${ targetColorSpace }\".` );\n\n\t\t}\n\n\t\treturn targetFromLinear( sourceToLinear( color ) );\n\n\t},\n\n\tfromWorkingColorSpace: function ( color, targetColorSpace ) {\n\n\t\treturn this.convert( color, this.workingColorSpace, targetColorSpace );\n\n\t},\n\n\ttoWorkingColorSpace: function ( color, sourceColorSpace ) {\n\n\t\treturn this.convert( color, sourceColorSpace, this.workingColorSpace );\n\n\t},\n\n};\n\nlet _canvas;\n\nclass ImageUtils {\n\n\tstatic getDataURL( image ) {\n\n\t\tif ( /^data:/i.test( image.src ) ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tif ( typeof HTMLCanvasElement === 'undefined' ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tlet canvas;\n\n\t\tif ( image instanceof HTMLCanvasElement ) {\n\n\t\t\tcanvas = image;\n\n\t\t} else {\n\n\t\t\tif ( _canvas === undefined ) _canvas = createElementNS( 'canvas' );\n\n\t\t\t_canvas.width = image.width;\n\t\t\t_canvas.height = image.height;\n\n\t\t\tconst context = _canvas.getContext( '2d' );\n\n\t\t\tif ( image instanceof ImageData ) {\n\n\t\t\t\tcontext.putImageData( image, 0, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcontext.drawImage( image, 0, 0, image.width, image.height );\n\n\t\t\t}\n\n\t\t\tcanvas = _canvas;\n\n\t\t}\n\n\t\tif ( canvas.width > 2048 || canvas.height > 2048 ) {\n\n\t\t\tconsole.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image );\n\n\t\t\treturn canvas.toDataURL( 'image/jpeg', 0.6 );\n\n\t\t} else {\n\n\t\t\treturn canvas.toDataURL( 'image/png' );\n\n\t\t}\n\n\t}\n\n\tstatic sRGBToLinear( image ) {\n\n\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\tconst canvas = createElementNS( 'canvas' );\n\n\t\t\tcanvas.width = image.width;\n\t\t\tcanvas.height = image.height;\n\n\t\t\tconst context = canvas.getContext( '2d' );\n\t\t\tcontext.drawImage( image, 0, 0, image.width, image.height );\n\n\t\t\tconst imageData = context.getImageData( 0, 0, image.width, image.height );\n\t\t\tconst data = imageData.data;\n\n\t\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\t\tdata[ i ] = SRGBToLinear( data[ i ] / 255 ) * 255;\n\n\t\t\t}\n\n\t\t\tcontext.putImageData( imageData, 0, 0 );\n\n\t\t\treturn canvas;\n\n\t\t} else if ( image.data ) {\n\n\t\t\tconst data = image.data.slice( 0 );\n\n\t\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\t\tif ( data instanceof Uint8Array || data instanceof Uint8ClampedArray ) {\n\n\t\t\t\t\tdata[ i ] = Math.floor( SRGBToLinear( data[ i ] / 255 ) * 255 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// assuming float\n\n\t\t\t\t\tdata[ i ] = SRGBToLinear( data[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdata: data,\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' );\n\t\t\treturn image;\n\n\t\t}\n\n\t}\n\n}\n\nlet sourceId = 0;\n\nclass Source {\n\n\tconstructor( data = null ) {\n\n\t\tthis.isSource = true;\n\n\t\tObject.defineProperty( this, 'id', { value: sourceId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.data = data;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( ! isRootObject && meta.images[ this.uuid ] !== undefined ) {\n\n\t\t\treturn meta.images[ this.uuid ];\n\n\t\t}\n\n\t\tconst output = {\n\t\t\tuuid: this.uuid,\n\t\t\turl: ''\n\t\t};\n\n\t\tconst data = this.data;\n\n\t\tif ( data !== null ) {\n\n\t\t\tlet url;\n\n\t\t\tif ( Array.isArray( data ) ) {\n\n\t\t\t\t// cube texture\n\n\t\t\t\turl = [];\n\n\t\t\t\tfor ( let i = 0, l = data.length; i < l; i ++ ) {\n\n\t\t\t\t\tif ( data[ i ].isDataTexture ) {\n\n\t\t\t\t\t\turl.push( serializeImage( data[ i ].image ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\turl.push( serializeImage( data[ i ] ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// texture\n\n\t\t\t\turl = serializeImage( data );\n\n\t\t\t}\n\n\t\t\toutput.url = url;\n\n\t\t}\n\n\t\tif ( ! isRootObject ) {\n\n\t\t\tmeta.images[ this.uuid ] = output;\n\n\t\t}\n\n\t\treturn output;\n\n\t}\n\n}\n\nfunction serializeImage( image ) {\n\n\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t// default images\n\n\t\treturn ImageUtils.getDataURL( image );\n\n\t} else {\n\n\t\tif ( image.data ) {\n\n\t\t\t// images of DataTexture\n\n\t\t\treturn {\n\t\t\t\tdata: Array.from( image.data ),\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height,\n\t\t\t\ttype: image.data.constructor.name\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.Texture: Unable to serialize Texture.' );\n\t\t\treturn {};\n\n\t\t}\n\n\t}\n\n}\n\nlet textureId = 0;\n\nclass Texture extends EventDispatcher {\n\n\tconstructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = Texture.DEFAULT_ANISOTROPY, colorSpace = NoColorSpace ) {\n\n\t\tsuper();\n\n\t\tthis.isTexture = true;\n\n\t\tObject.defineProperty( this, 'id', { value: textureId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\n\t\tthis.source = new Source( image );\n\t\tthis.mipmaps = [];\n\n\t\tthis.mapping = mapping;\n\t\tthis.channel = 0;\n\n\t\tthis.wrapS = wrapS;\n\t\tthis.wrapT = wrapT;\n\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\n\t\tthis.anisotropy = anisotropy;\n\n\t\tthis.format = format;\n\t\tthis.internalFormat = null;\n\t\tthis.type = type;\n\n\t\tthis.offset = new Vector2( 0, 0 );\n\t\tthis.repeat = new Vector2( 1, 1 );\n\t\tthis.center = new Vector2( 0, 0 );\n\t\tthis.rotation = 0;\n\n\t\tthis.matrixAutoUpdate = true;\n\t\tthis.matrix = new Matrix3();\n\n\t\tthis.generateMipmaps = true;\n\t\tthis.premultiplyAlpha = false;\n\t\tthis.flipY = true;\n\t\tthis.unpackAlignment = 4;\t// valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n\n\t\tif ( typeof colorSpace === 'string' ) {\n\n\t\t\tthis.colorSpace = colorSpace;\n\n\t\t} else { // @deprecated, r152\n\n\t\t\twarnOnce( 'THREE.Texture: Property .encoding has been replaced by .colorSpace.' );\n\t\t\tthis.colorSpace = colorSpace === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t\t}\n\n\n\t\tthis.userData = {};\n\n\t\tthis.version = 0;\n\t\tthis.onUpdate = null;\n\n\t\tthis.isRenderTargetTexture = false; // indicates whether a texture belongs to a render target or not\n\t\tthis.needsPMREMUpdate = false; // indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target textures)\n\n\t}\n\n\tget image() {\n\n\t\treturn this.source.data;\n\n\t}\n\n\tset image( value = null ) {\n\n\t\tthis.source.data = value;\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.source = source.source;\n\t\tthis.mipmaps = source.mipmaps.slice( 0 );\n\n\t\tthis.mapping = source.mapping;\n\t\tthis.channel = source.channel;\n\n\t\tthis.wrapS = source.wrapS;\n\t\tthis.wrapT = source.wrapT;\n\n\t\tthis.magFilter = source.magFilter;\n\t\tthis.minFilter = source.minFilter;\n\n\t\tthis.anisotropy = source.anisotropy;\n\n\t\tthis.format = source.format;\n\t\tthis.internalFormat = source.internalFormat;\n\t\tthis.type = source.type;\n\n\t\tthis.offset.copy( source.offset );\n\t\tthis.repeat.copy( source.repeat );\n\t\tthis.center.copy( source.center );\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrix.copy( source.matrix );\n\n\t\tthis.generateMipmaps = source.generateMipmaps;\n\t\tthis.premultiplyAlpha = source.premultiplyAlpha;\n\t\tthis.flipY = source.flipY;\n\t\tthis.unpackAlignment = source.unpackAlignment;\n\t\tthis.colorSpace = source.colorSpace;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\tthis.needsUpdate = true;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) {\n\n\t\t\treturn meta.textures[ this.uuid ];\n\n\t\t}\n\n\t\tconst output = {\n\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Texture',\n\t\t\t\tgenerator: 'Texture.toJSON'\n\t\t\t},\n\n\t\t\tuuid: this.uuid,\n\t\t\tname: this.name,\n\n\t\t\timage: this.source.toJSON( meta ).uuid,\n\n\t\t\tmapping: this.mapping,\n\t\t\tchannel: this.channel,\n\n\t\t\trepeat: [ this.repeat.x, this.repeat.y ],\n\t\t\toffset: [ this.offset.x, this.offset.y ],\n\t\t\tcenter: [ this.center.x, this.center.y ],\n\t\t\trotation: this.rotation,\n\n\t\t\twrap: [ this.wrapS, this.wrapT ],\n\n\t\t\tformat: this.format,\n\t\t\tinternalFormat: this.internalFormat,\n\t\t\ttype: this.type,\n\t\t\tcolorSpace: this.colorSpace,\n\n\t\t\tminFilter: this.minFilter,\n\t\t\tmagFilter: this.magFilter,\n\t\t\tanisotropy: this.anisotropy,\n\n\t\t\tflipY: this.flipY,\n\n\t\t\tgenerateMipmaps: this.generateMipmaps,\n\t\t\tpremultiplyAlpha: this.premultiplyAlpha,\n\t\t\tunpackAlignment: this.unpackAlignment\n\n\t\t};\n\n\t\tif ( Object.keys( this.userData ).length > 0 ) output.userData = this.userData;\n\n\t\tif ( ! isRootObject ) {\n\n\t\t\tmeta.textures[ this.uuid ] = output;\n\n\t\t}\n\n\t\treturn output;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\ttransformUv( uv ) {\n\n\t\tif ( this.mapping !== UVMapping ) return uv;\n\n\t\tuv.applyMatrix3( this.matrix );\n\n\t\tif ( uv.x < 0 || uv.x > 1 ) {\n\n\t\t\tswitch ( this.wrapS ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.x = uv.x < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.x = Math.ceil( uv.x ) - uv.x;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( uv.y < 0 || uv.y > 1 ) {\n\n\t\t\tswitch ( this.wrapT ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.y = uv.y < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.y = Math.ceil( uv.y ) - uv.y;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.flipY ) {\n\n\t\t\tuv.y = 1 - uv.y;\n\n\t\t}\n\n\t\treturn uv;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) {\n\n\t\t\tthis.version ++;\n\t\t\tthis.source.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tget encoding() { // @deprecated, r152\n\n\t\twarnOnce( 'THREE.Texture: Property .encoding has been replaced by .colorSpace.' );\n\t\treturn this.colorSpace === SRGBColorSpace ? sRGBEncoding : LinearEncoding;\n\n\t}\n\n\tset encoding( encoding ) { // @deprecated, r152\n\n\t\twarnOnce( 'THREE.Texture: Property .encoding has been replaced by .colorSpace.' );\n\t\tthis.colorSpace = encoding === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t}\n\n}\n\nTexture.DEFAULT_IMAGE = null;\nTexture.DEFAULT_MAPPING = UVMapping;\nTexture.DEFAULT_ANISOTROPY = 1;\n\nclass Vector4 {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tVector4.prototype.isVector4 = true;\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.z;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.z = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.w;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.w = value;\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\t\tthis.w = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( w ) {\n\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tcase 3: this.w = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tcase 3: return this.w;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z, this.w );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\t\tthis.w = ( v.w !== undefined ) ? v.w : 1;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v ) {\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\t\tthis.w += v.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\t\tthis.w += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\t\tthis.w = a.w + b.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\t\tthis.w += v.w * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v ) {\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\t\tthis.w -= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\t\tthis.w -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\t\tthis.w = a.w - b.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\t\tthis.w *= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\t\tthis.w *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z, w = this.w;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w;\n\t\tthis.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tsetAxisAngleFromQuaternion( q ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n\n\t\t// q is assumed to be normalized\n\n\t\tthis.w = 2 * Math.acos( q.w );\n\n\t\tconst s = Math.sqrt( 1 - q.w * q.w );\n\n\t\tif ( s < 0.0001 ) {\n\n\t\t\tthis.x = 1;\n\t\t\tthis.y = 0;\n\t\t\tthis.z = 0;\n\n\t\t} else {\n\n\t\t\tthis.x = q.x / s;\n\t\t\tthis.y = q.y / s;\n\t\t\tthis.z = q.z / s;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetAxisAngleFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tlet angle, x, y, z; // variables for result\n\t\tconst epsilon = 0.01,\t\t// margin to allow for rounding errors\n\t\t\tepsilon2 = 0.1,\t\t// margin to distinguish between 0 and 180 degrees\n\n\t\t\tte = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tif ( ( Math.abs( m12 - m21 ) < epsilon ) &&\n\t\t ( Math.abs( m13 - m31 ) < epsilon ) &&\n\t\t ( Math.abs( m23 - m32 ) < epsilon ) ) {\n\n\t\t\t// singularity found\n\t\t\t// first check for identity matrix which must have +1 for all terms\n\t\t\t// in leading diagonal and zero in other terms\n\n\t\t\tif ( ( Math.abs( m12 + m21 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m13 + m31 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m23 + m32 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) {\n\n\t\t\t\t// this singularity is identity matrix so angle = 0\n\n\t\t\t\tthis.set( 1, 0, 0, 0 );\n\n\t\t\t\treturn this; // zero angle, arbitrary axis\n\n\t\t\t}\n\n\t\t\t// otherwise this singularity is angle = 180\n\n\t\t\tangle = Math.PI;\n\n\t\t\tconst xx = ( m11 + 1 ) / 2;\n\t\t\tconst yy = ( m22 + 1 ) / 2;\n\t\t\tconst zz = ( m33 + 1 ) / 2;\n\t\t\tconst xy = ( m12 + m21 ) / 4;\n\t\t\tconst xz = ( m13 + m31 ) / 4;\n\t\t\tconst yz = ( m23 + m32 ) / 4;\n\n\t\t\tif ( ( xx > yy ) && ( xx > zz ) ) {\n\n\t\t\t\t// m11 is the largest diagonal term\n\n\t\t\t\tif ( xx < epsilon ) {\n\n\t\t\t\t\tx = 0;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tx = Math.sqrt( xx );\n\t\t\t\t\ty = xy / x;\n\t\t\t\t\tz = xz / x;\n\n\t\t\t\t}\n\n\t\t\t} else if ( yy > zz ) {\n\n\t\t\t\t// m22 is the largest diagonal term\n\n\t\t\t\tif ( yy < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ty = Math.sqrt( yy );\n\t\t\t\t\tx = xy / y;\n\t\t\t\t\tz = yz / y;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// m33 is the largest diagonal term so base result on this\n\n\t\t\t\tif ( zz < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tz = Math.sqrt( zz );\n\t\t\t\t\tx = xz / z;\n\t\t\t\t\ty = yz / z;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.set( x, y, z, angle );\n\n\t\t\treturn this; // return 180 deg rotation\n\n\t\t}\n\n\t\t// as we have reached here there are no singularities so we can handle normally\n\n\t\tlet s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) +\n\t\t\t( m13 - m31 ) * ( m13 - m31 ) +\n\t\t\t( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize\n\n\t\tif ( Math.abs( s ) < 0.001 ) s = 1;\n\n\t\t// prevent divide by zero, should not happen if matrix is orthogonal and should be\n\t\t// caught by singularity test above, but I've left it in just in case\n\n\t\tthis.x = ( m32 - m23 ) / s;\n\t\tthis.y = ( m13 - m31 ) / s;\n\t\tthis.z = ( m21 - m12 ) / s;\n\t\tthis.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\t\tthis.w = Math.min( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\t\tthis.w = Math.max( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\t\tthis.w = Math.max( min.w, Math.min( max.w, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\t\tthis.w = Math.max( minVal, Math.min( maxVal, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\t\tthis.w = Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\t\tthis.w = Math.ceil( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\t\tthis.w = Math.round( this.w );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\t\tthis.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );\n\t\tthis.w = ( this.w < 0 ) ? Math.ceil( this.w ) : Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\t\tthis.w = - this.w;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\t\tthis.w += ( v.w - this.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\t\tthis.w = v1.w + ( v2.w - v1.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\t\tthis.w = array[ offset + 3 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\t\tarray[ offset + 3 ] = this.w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\t\tthis.w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\t\tthis.w = Math.random();\n\n\t\treturn this;\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.x;\n\t\tyield this.y;\n\t\tyield this.z;\n\t\tyield this.w;\n\n\t}\n\n}\n\n/*\n In options, we can specify:\n * Texture parameters for an auto-generated target texture\n * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n*/\nclass RenderTarget extends EventDispatcher {\n\n\tconstructor( width = 1, height = 1, options = {} ) {\n\n\t\tsuper();\n\n\t\tthis.isRenderTarget = true;\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.depth = 1;\n\n\t\tthis.scissor = new Vector4( 0, 0, width, height );\n\t\tthis.scissorTest = false;\n\n\t\tthis.viewport = new Vector4( 0, 0, width, height );\n\n\t\tconst image = { width: width, height: height, depth: 1 };\n\n\t\tif ( options.encoding !== undefined ) {\n\n\t\t\t// @deprecated, r152\n\t\t\twarnOnce( 'THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace.' );\n\t\t\toptions.colorSpace = options.encoding === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t\t}\n\n\t\tthis.texture = new Texture( image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace );\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t\tthis.texture.flipY = false;\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.internalFormat = options.internalFormat !== undefined ? options.internalFormat : null;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t\tthis.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;\n\t\tthis.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;\n\n\t\tthis.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;\n\n\t\tthis.samples = options.samples !== undefined ? options.samples : 0;\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tthis.texture.image.width = width;\n\t\t\tthis.texture.image.height = height;\n\t\t\tthis.texture.image.depth = depth;\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.scissor.copy( source.scissor );\n\t\tthis.scissorTest = source.scissorTest;\n\n\t\tthis.viewport.copy( source.viewport );\n\n\t\tthis.texture = source.texture.clone();\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t\t// ensure image object is not shared, see #20328\n\n\t\tconst image = Object.assign( {}, source.texture.image );\n\t\tthis.texture.source = new Source( image );\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\n\t\tif ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();\n\n\t\tthis.samples = source.samples;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nclass WebGLRenderTarget extends RenderTarget {\n\n\tconstructor( width = 1, height = 1, options = {} ) {\n\n\t\tsuper( width, height, options );\n\n\t\tthis.isWebGLRenderTarget = true;\n\n\t}\n\n}\n\nclass DataArrayTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( null );\n\n\t\tthis.isDataArrayTexture = true;\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t}\n\n}\n\nclass WebGLArrayRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( width, height );\n\n\t\tthis.isWebGLArrayRenderTarget = true;\n\n\t\tthis.depth = depth;\n\n\t\tthis.texture = new DataArrayTexture( null, width, height, depth );\n\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t}\n\n}\n\nclass Data3DTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\t// We're going to add .setXXX() methods for setting properties later.\n\t\t// Users can still set in DataTexture3D directly.\n\t\t//\n\t\t//\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n\t\t// \ttexture.anisotropy = 16;\n\t\t//\n\t\t// See #14839\n\n\t\tsuper( null );\n\n\t\tthis.isData3DTexture = true;\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t}\n\n}\n\nclass WebGL3DRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( width, height );\n\n\t\tthis.isWebGL3DRenderTarget = true;\n\n\t\tthis.depth = depth;\n\n\t\tthis.texture = new Data3DTexture( null, width, height, depth );\n\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t}\n\n}\n\nclass WebGLMultipleRenderTargets extends WebGLRenderTarget {\n\n\tconstructor( width = 1, height = 1, count = 1, options = {} ) {\n\n\t\tsuper( width, height, options );\n\n\t\tthis.isWebGLMultipleRenderTargets = true;\n\n\t\tconst texture = this.texture;\n\n\t\tthis.texture = [];\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.texture[ i ] = texture.clone();\n\t\t\tthis.texture[ i ].isRenderTargetTexture = true;\n\n\t\t}\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tfor ( let i = 0, il = this.texture.length; i < il; i ++ ) {\n\n\t\t\t\tthis.texture[ i ].image.width = width;\n\t\t\t\tthis.texture[ i ].image.height = height;\n\t\t\t\tthis.texture[ i ].image.depth = depth;\n\n\t\t\t}\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.dispose();\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.scissor.copy( source.scissor );\n\t\tthis.scissorTest = source.scissorTest;\n\n\t\tthis.viewport.copy( source.viewport );\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\n\t\tif ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();\n\n\t\tthis.texture.length = 0;\n\n\t\tfor ( let i = 0, il = source.texture.length; i < il; i ++ ) {\n\n\t\t\tthis.texture[ i ] = source.texture[ i ].clone();\n\t\t\tthis.texture[ i ].isRenderTargetTexture = true;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Quaternion {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tthis.isQuaternion = true;\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t}\n\n\tstatic slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {\n\n\t\t// fuzz-free, array-based Quaternion SLERP operation\n\n\t\tlet x0 = src0[ srcOffset0 + 0 ],\n\t\t\ty0 = src0[ srcOffset0 + 1 ],\n\t\t\tz0 = src0[ srcOffset0 + 2 ],\n\t\t\tw0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 + 0 ],\n\t\t\ty1 = src1[ srcOffset1 + 1 ],\n\t\t\tz1 = src1[ srcOffset1 + 2 ],\n\t\t\tw1 = src1[ srcOffset1 + 3 ];\n\n\t\tif ( t === 0 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x0;\n\t\t\tdst[ dstOffset + 1 ] = y0;\n\t\t\tdst[ dstOffset + 2 ] = z0;\n\t\t\tdst[ dstOffset + 3 ] = w0;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( t === 1 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x1;\n\t\t\tdst[ dstOffset + 1 ] = y1;\n\t\t\tdst[ dstOffset + 2 ] = z1;\n\t\t\tdst[ dstOffset + 3 ] = w1;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {\n\n\t\t\tlet s = 1 - t;\n\t\t\tconst cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,\n\t\t\t\tdir = ( cos >= 0 ? 1 : - 1 ),\n\t\t\t\tsqrSin = 1 - cos * cos;\n\n\t\t\t// Skip the Slerp for tiny steps to avoid numeric problems:\n\t\t\tif ( sqrSin > Number.EPSILON ) {\n\n\t\t\t\tconst sin = Math.sqrt( sqrSin ),\n\t\t\t\t\tlen = Math.atan2( sin, cos * dir );\n\n\t\t\t\ts = Math.sin( s * len ) / sin;\n\t\t\t\tt = Math.sin( t * len ) / sin;\n\n\t\t\t}\n\n\t\t\tconst tDir = t * dir;\n\n\t\t\tx0 = x0 * s + x1 * tDir;\n\t\t\ty0 = y0 * s + y1 * tDir;\n\t\t\tz0 = z0 * s + z1 * tDir;\n\t\t\tw0 = w0 * s + w1 * tDir;\n\n\t\t\t// Normalize in case we just did a lerp:\n\t\t\tif ( s === 1 - t ) {\n\n\t\t\t\tconst f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 );\n\n\t\t\t\tx0 *= f;\n\t\t\t\ty0 *= f;\n\t\t\t\tz0 *= f;\n\t\t\t\tw0 *= f;\n\n\t\t\t}\n\n\t\t}\n\n\t\tdst[ dstOffset ] = x0;\n\t\tdst[ dstOffset + 1 ] = y0;\n\t\tdst[ dstOffset + 2 ] = z0;\n\t\tdst[ dstOffset + 3 ] = w0;\n\n\t}\n\n\tstatic multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) {\n\n\t\tconst x0 = src0[ srcOffset0 ];\n\t\tconst y0 = src0[ srcOffset0 + 1 ];\n\t\tconst z0 = src0[ srcOffset0 + 2 ];\n\t\tconst w0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 ];\n\t\tconst y1 = src1[ srcOffset1 + 1 ];\n\t\tconst z1 = src1[ srcOffset1 + 2 ];\n\t\tconst w1 = src1[ srcOffset1 + 3 ];\n\n\t\tdst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n\t\tdst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n\t\tdst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n\t\tdst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n\n\t\treturn dst;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget w() {\n\n\t\treturn this._w;\n\n\t}\n\n\tset w( value ) {\n\n\t\tthis._w = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._w );\n\n\t}\n\n\tcopy( quaternion ) {\n\n\t\tthis._x = quaternion.x;\n\t\tthis._y = quaternion.y;\n\t\tthis._z = quaternion.z;\n\t\tthis._w = quaternion.w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromEuler( euler, update ) {\n\n\t\tconst x = euler._x, y = euler._y, z = euler._z, order = euler._order;\n\n\t\t// http://www.mathworks.com/matlabcentral/fileexchange/\n\t\t// \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n\t\t//\tcontent/SpinCalc.m\n\n\t\tconst cos = Math.cos;\n\t\tconst sin = Math.sin;\n\n\t\tconst c1 = cos( x / 2 );\n\t\tconst c2 = cos( y / 2 );\n\t\tconst c3 = cos( z / 2 );\n\n\t\tconst s1 = sin( x / 2 );\n\t\tconst s2 = sin( y / 2 );\n\t\tconst s3 = sin( z / 2 );\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tif ( update !== false ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromAxisAngle( axis, angle ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n\n\t\t// assumes axis is normalized\n\n\t\tconst halfAngle = angle / 2, s = Math.sin( halfAngle );\n\n\t\tthis._x = axis.x * s;\n\t\tthis._y = axis.y * s;\n\t\tthis._z = axis.z * s;\n\t\tthis._w = Math.cos( halfAngle );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ],\n\n\t\t\ttrace = m11 + m22 + m33;\n\n\t\tif ( trace > 0 ) {\n\n\t\t\tconst s = 0.5 / Math.sqrt( trace + 1.0 );\n\n\t\t\tthis._w = 0.25 / s;\n\t\t\tthis._x = ( m32 - m23 ) * s;\n\t\t\tthis._y = ( m13 - m31 ) * s;\n\t\t\tthis._z = ( m21 - m12 ) * s;\n\n\t\t} else if ( m11 > m22 && m11 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 );\n\n\t\t\tthis._w = ( m32 - m23 ) / s;\n\t\t\tthis._x = 0.25 * s;\n\t\t\tthis._y = ( m12 + m21 ) / s;\n\t\t\tthis._z = ( m13 + m31 ) / s;\n\n\t\t} else if ( m22 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 );\n\n\t\t\tthis._w = ( m13 - m31 ) / s;\n\t\t\tthis._x = ( m12 + m21 ) / s;\n\t\t\tthis._y = 0.25 * s;\n\t\t\tthis._z = ( m23 + m32 ) / s;\n\n\t\t} else {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 );\n\n\t\t\tthis._w = ( m21 - m12 ) / s;\n\t\t\tthis._x = ( m13 + m31 ) / s;\n\t\t\tthis._y = ( m23 + m32 ) / s;\n\t\t\tthis._z = 0.25 * s;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromUnitVectors( vFrom, vTo ) {\n\n\t\t// assumes direction vectors vFrom and vTo are normalized\n\n\t\tlet r = vFrom.dot( vTo ) + 1;\n\n\t\tif ( r < Number.EPSILON ) {\n\n\t\t\t// vFrom and vTo point in opposite directions\n\n\t\t\tr = 0;\n\n\t\t\tif ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) {\n\n\t\t\t\tthis._x = - vFrom.y;\n\t\t\t\tthis._y = vFrom.x;\n\t\t\t\tthis._z = 0;\n\t\t\t\tthis._w = r;\n\n\t\t\t} else {\n\n\t\t\t\tthis._x = 0;\n\t\t\t\tthis._y = - vFrom.z;\n\t\t\t\tthis._z = vFrom.y;\n\t\t\t\tthis._w = r;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n\n\t\t\tthis._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n\t\t\tthis._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n\t\t\tthis._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n\t\t\tthis._w = r;\n\n\t\t}\n\n\t\treturn this.normalize();\n\n\t}\n\n\tangleTo( q ) {\n\n\t\treturn 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) );\n\n\t}\n\n\trotateTowards( q, step ) {\n\n\t\tconst angle = this.angleTo( q );\n\n\t\tif ( angle === 0 ) return this;\n\n\t\tconst t = Math.min( 1, step / angle );\n\n\t\tthis.slerp( q, t );\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\treturn this.set( 0, 0, 0, 1 );\n\n\t}\n\n\tinvert() {\n\n\t\t// quaternion is assumed to have unit length\n\n\t\treturn this.conjugate();\n\n\t}\n\n\tconjugate() {\n\n\t\tthis._x *= - 1;\n\t\tthis._y *= - 1;\n\t\tthis._z *= - 1;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w );\n\n\t}\n\n\tnormalize() {\n\n\t\tlet l = this.length();\n\n\t\tif ( l === 0 ) {\n\n\t\t\tthis._x = 0;\n\t\t\tthis._y = 0;\n\t\t\tthis._z = 0;\n\t\t\tthis._w = 1;\n\n\t\t} else {\n\n\t\t\tl = 1 / l;\n\n\t\t\tthis._x = this._x * l;\n\t\t\tthis._y = this._y * l;\n\t\t\tthis._z = this._z * l;\n\t\t\tthis._w = this._w * l;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( q ) {\n\n\t\treturn this.multiplyQuaternions( this, q );\n\n\t}\n\n\tpremultiply( q ) {\n\n\t\treturn this.multiplyQuaternions( q, this );\n\n\t}\n\n\tmultiplyQuaternions( a, b ) {\n\n\t\t// from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n\n\t\tconst qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;\n\t\tconst qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;\n\n\t\tthis._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n\t\tthis._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n\t\tthis._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n\t\tthis._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerp( qb, t ) {\n\n\t\tif ( t === 0 ) return this;\n\t\tif ( t === 1 ) return this.copy( qb );\n\n\t\tconst x = this._x, y = this._y, z = this._z, w = this._w;\n\n\t\t// http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n\n\t\tlet cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n\n\t\tif ( cosHalfTheta < 0 ) {\n\n\t\t\tthis._w = - qb._w;\n\t\t\tthis._x = - qb._x;\n\t\t\tthis._y = - qb._y;\n\t\t\tthis._z = - qb._z;\n\n\t\t\tcosHalfTheta = - cosHalfTheta;\n\n\t\t} else {\n\n\t\t\tthis.copy( qb );\n\n\t\t}\n\n\t\tif ( cosHalfTheta >= 1.0 ) {\n\n\t\t\tthis._w = w;\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n\n\t\tif ( sqrSinHalfTheta <= Number.EPSILON ) {\n\n\t\t\tconst s = 1 - t;\n\t\t\tthis._w = s * w + t * this._w;\n\t\t\tthis._x = s * x + t * this._x;\n\t\t\tthis._y = s * y + t * this._y;\n\t\t\tthis._z = s * z + t * this._z;\n\n\t\t\tthis.normalize();\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sinHalfTheta = Math.sqrt( sqrSinHalfTheta );\n\t\tconst halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );\n\t\tconst ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,\n\t\t\tratioB = Math.sin( t * halfTheta ) / sinHalfTheta;\n\n\t\tthis._w = ( w * ratioA + this._w * ratioB );\n\t\tthis._x = ( x * ratioA + this._x * ratioB );\n\t\tthis._y = ( y * ratioA + this._y * ratioB );\n\t\tthis._z = ( z * ratioA + this._z * ratioB );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerpQuaternions( qa, qb, t ) {\n\n\t\treturn this.copy( qa ).slerp( qb, t );\n\n\t}\n\n\trandom() {\n\n\t\t// Derived from http://planning.cs.uiuc.edu/node198.html\n\t\t// Note, this source uses w, x, y, z ordering,\n\t\t// so we swap the order below.\n\n\t\tconst u1 = Math.random();\n\t\tconst sqrt1u1 = Math.sqrt( 1 - u1 );\n\t\tconst sqrtu1 = Math.sqrt( u1 );\n\n\t\tconst u2 = 2 * Math.PI * Math.random();\n\n\t\tconst u3 = 2 * Math.PI * Math.random();\n\n\t\treturn this.set(\n\t\t\tsqrt1u1 * Math.cos( u2 ),\n\t\t\tsqrtu1 * Math.sin( u3 ),\n\t\t\tsqrtu1 * Math.cos( u3 ),\n\t\t\tsqrt1u1 * Math.sin( u2 ),\n\t\t);\n\n\t}\n\n\tequals( quaternion ) {\n\n\t\treturn ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis._x = array[ offset ];\n\t\tthis._y = array[ offset + 1 ];\n\t\tthis._z = array[ offset + 2 ];\n\t\tthis._w = array[ offset + 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis._x = attribute.getX( index );\n\t\tthis._y = attribute.getY( index );\n\t\tthis._z = attribute.getZ( index );\n\t\tthis._w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.toArray();\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this._x;\n\t\tyield this._y;\n\t\tyield this._z;\n\t\tyield this._w;\n\n\t}\n\n}\n\nclass Vector3 {\n\n\tconstructor( x = 0, y = 0, z = 0 ) {\n\n\t\tVector3.prototype.isVector3 = true;\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t}\n\n\tset( x, y, z ) {\n\n\t\tif ( z === undefined ) z = this.z; // sprite.scale.set(x,y)\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v ) {\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v ) {\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyVectors( a, b ) {\n\n\t\tthis.x = a.x * b.x;\n\t\tthis.y = a.y * b.y;\n\t\tthis.z = a.z * b.z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyEuler( euler ) {\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromEuler( euler ) );\n\n\t}\n\n\tapplyAxisAngle( axis, angle ) {\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\treturn this.applyMatrix3( m ).normalize();\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tconst w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] );\n\n\t\tthis.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w;\n\t\tthis.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w;\n\t\tthis.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w;\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n\n\t\t// calculate quat * vector\n\n\t\tconst ix = qw * x + qy * z - qz * y;\n\t\tconst iy = qw * y + qz * x - qx * z;\n\t\tconst iz = qw * z + qx * y - qy * x;\n\t\tconst iw = - qx * x - qy * y - qz * z;\n\n\t\t// calculate result * inverse quat\n\n\t\tthis.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;\n\t\tthis.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;\n\t\tthis.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;\n\n\t\treturn this;\n\n\t}\n\n\tproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix );\n\n\t}\n\n\tunproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld );\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\t// input: THREE.Matrix4 affine matrix\n\t\t// vector interpreted as a direction\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;\n\n\t\treturn this.normalize();\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\t\tthis.z /= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\t\tthis.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z;\n\n\t}\n\n\t// TODO lengthSquared?\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tcross( v ) {\n\n\t\treturn this.crossVectors( this, v );\n\n\t}\n\n\tcrossVectors( a, b ) {\n\n\t\tconst ax = a.x, ay = a.y, az = a.z;\n\t\tconst bx = b.x, by = b.y, bz = b.z;\n\n\t\tthis.x = ay * bz - az * by;\n\t\tthis.y = az * bx - ax * bz;\n\t\tthis.z = ax * by - ay * bx;\n\n\t\treturn this;\n\n\t}\n\n\tprojectOnVector( v ) {\n\n\t\tconst denominator = v.lengthSq();\n\n\t\tif ( denominator === 0 ) return this.set( 0, 0, 0 );\n\n\t\tconst scalar = v.dot( this ) / denominator;\n\n\t\treturn this.copy( v ).multiplyScalar( scalar );\n\n\t}\n\n\tprojectOnPlane( planeNormal ) {\n\n\t\t_vector$b.copy( this ).projectOnVector( planeNormal );\n\n\t\treturn this.sub( _vector$b );\n\n\t}\n\n\treflect( normal ) {\n\n\t\t// reflect incident vector off plane orthogonal to normal\n\t\t// normal is assumed to have unit length\n\n\t\treturn this.sub( _vector$b.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );\n\n\t}\n\n\tangleTo( v ) {\n\n\t\tconst denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );\n\n\t\tif ( denominator === 0 ) return Math.PI / 2;\n\n\t\tconst theta = this.dot( v ) / denominator;\n\n\t\t// clamp, to handle numerical problems\n\n\t\treturn Math.acos( clamp( theta, - 1, 1 ) );\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;\n\n\t\treturn dx * dx + dy * dy + dz * dz;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z );\n\n\t}\n\n\tsetFromSpherical( s ) {\n\n\t\treturn this.setFromSphericalCoords( s.radius, s.phi, s.theta );\n\n\t}\n\n\tsetFromSphericalCoords( radius, phi, theta ) {\n\n\t\tconst sinPhiRadius = Math.sin( phi ) * radius;\n\n\t\tthis.x = sinPhiRadius * Math.sin( theta );\n\t\tthis.y = Math.cos( phi ) * radius;\n\t\tthis.z = sinPhiRadius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCylindrical( c ) {\n\n\t\treturn this.setFromCylindricalCoords( c.radius, c.theta, c.y );\n\n\t}\n\n\tsetFromCylindricalCoords( radius, theta, y ) {\n\n\t\tthis.x = radius * Math.sin( theta );\n\t\tthis.y = y;\n\t\tthis.z = radius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixPosition( m ) {\n\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 12 ];\n\t\tthis.y = e[ 13 ];\n\t\tthis.z = e[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixScale( m ) {\n\n\t\tconst sx = this.setFromMatrixColumn( m, 0 ).length();\n\t\tconst sy = this.setFromMatrixColumn( m, 1 ).length();\n\t\tconst sz = this.setFromMatrixColumn( m, 2 ).length();\n\n\t\tthis.x = sx;\n\t\tthis.y = sy;\n\t\tthis.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixColumn( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 4 );\n\n\t}\n\n\tsetFromMatrix3Column( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 3 );\n\n\t}\n\n\tsetFromEuler( e ) {\n\n\t\tthis.x = e._x;\n\t\tthis.y = e._y;\n\t\tthis.z = e._z;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromColor( c ) {\n\n\t\tthis.x = c.r;\n\t\tthis.y = c.g;\n\t\tthis.z = c.b;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\n\t\treturn this;\n\n\t}\n\n\trandomDirection() {\n\n\t\t// Derived from https://mathworld.wolfram.com/SpherePointPicking.html\n\n\t\tconst u = ( Math.random() - 0.5 ) * 2;\n\t\tconst t = Math.random() * Math.PI * 2;\n\t\tconst f = Math.sqrt( 1 - u ** 2 );\n\n\t\tthis.x = f * Math.cos( t );\n\t\tthis.y = f * Math.sin( t );\n\t\tthis.z = u;\n\n\t\treturn this;\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.x;\n\t\tyield this.y;\n\t\tyield this.z;\n\n\t}\n\n}\n\nconst _vector$b = /*@__PURE__*/ new Vector3();\nconst _quaternion$4 = /*@__PURE__*/ new Quaternion();\n\nclass Box3 {\n\n\tconstructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {\n\n\t\tthis.isBox3 = true;\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromArray( array ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = array.length; i < il; i += 3 ) {\n\n\t\t\tthis.expandByPoint( _vector$a.fromArray( array, i ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromBufferAttribute( attribute ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = attribute.count; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( _vector$a.fromBufferAttribute( attribute, i ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$a.copy( size ).multiplyScalar( 0.5 );\n\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromObject( object, precise = false ) {\n\n\t\tthis.makeEmpty();\n\n\t\treturn this.expandByObject( object, precise );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = this.min.z = + Infinity;\n\t\tthis.max.x = this.max.y = this.max.z = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\texpandByObject( object, precise = false ) {\n\n\t\t// Computes the world-axis-aligned bounding box of an object (including its children),\n\t\t// accounting for both the object's, and children's, world transforms\n\n\t\tobject.updateWorldMatrix( false, false );\n\n\t\tif ( object.boundingBox !== undefined ) {\n\n\t\t\tif ( object.boundingBox === null ) {\n\n\t\t\t\tobject.computeBoundingBox();\n\n\t\t\t}\n\n\t\t\t_box$3.copy( object.boundingBox );\n\t\t\t_box$3.applyMatrix4( object.matrixWorld );\n\n\t\t\tthis.union( _box$3 );\n\n\t\t} else {\n\n\t\t\tconst geometry = object.geometry;\n\n\t\t\tif ( geometry !== undefined ) {\n\n\t\t\t\tif ( precise && geometry.attributes !== undefined && geometry.attributes.position !== undefined ) {\n\n\t\t\t\t\tconst position = geometry.attributes.position;\n\t\t\t\t\tfor ( let i = 0, l = position.count; i < l; i ++ ) {\n\n\t\t\t\t\t\t_vector$a.fromBufferAttribute( position, i ).applyMatrix4( object.matrixWorld );\n\t\t\t\t\t\tthis.expandByPoint( _vector$a );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\t\t\t\tgeometry.computeBoundingBox();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_box$3.copy( geometry.boundingBox );\n\t\t\t\t\t_box$3.applyMatrix4( object.matrixWorld );\n\n\t\t\t\t\tthis.union( _box$3 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tthis.expandByObject( children[ i ], precise );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ||\n\t\t\tpoint.z < this.min.z || point.z > this.max.z ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y &&\n\t\t\tthis.min.z <= box.min.z && box.max.z <= this.max.z;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y ),\n\t\t\t( point.z - this.min.z ) / ( this.max.z - this.min.z )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 6 splitting planes to rule out intersections.\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ||\n\t\t\tbox.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\t// Find the point on the AABB closest to the sphere center.\n\t\tthis.clampPoint( sphere.center, _vector$a );\n\n\t\t// If that point is inside the sphere, the AABB and sphere intersect.\n\t\treturn _vector$a.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// We compute the minimum and maximum dot product values. If those values\n\t\t// are on the same side (back or front) of the plane, then there is no intersection.\n\n\t\tlet min, max;\n\n\t\tif ( plane.normal.x > 0 ) {\n\n\t\t\tmin = plane.normal.x * this.min.x;\n\t\t\tmax = plane.normal.x * this.max.x;\n\n\t\t} else {\n\n\t\t\tmin = plane.normal.x * this.max.x;\n\t\t\tmax = plane.normal.x * this.min.x;\n\n\t\t}\n\n\t\tif ( plane.normal.y > 0 ) {\n\n\t\t\tmin += plane.normal.y * this.min.y;\n\t\t\tmax += plane.normal.y * this.max.y;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.y * this.max.y;\n\t\t\tmax += plane.normal.y * this.min.y;\n\n\t\t}\n\n\t\tif ( plane.normal.z > 0 ) {\n\n\t\t\tmin += plane.normal.z * this.min.z;\n\t\t\tmax += plane.normal.z * this.max.z;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.z * this.max.z;\n\t\t\tmax += plane.normal.z * this.min.z;\n\n\t\t}\n\n\t\treturn ( min <= - plane.constant && max >= - plane.constant );\n\n\t}\n\n\tintersectsTriangle( triangle ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// compute box center and extents\n\t\tthis.getCenter( _center );\n\t\t_extents.subVectors( this.max, _center );\n\n\t\t// translate triangle to aabb origin\n\t\t_v0$2.subVectors( triangle.a, _center );\n\t\t_v1$7.subVectors( triangle.b, _center );\n\t\t_v2$4.subVectors( triangle.c, _center );\n\n\t\t// compute edge vectors for triangle\n\t\t_f0.subVectors( _v1$7, _v0$2 );\n\t\t_f1.subVectors( _v2$4, _v1$7 );\n\t\t_f2.subVectors( _v0$2, _v2$4 );\n\n\t\t// test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n\t\t// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n\t\t// axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n\t\tlet axes = [\n\t\t\t0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y,\n\t\t\t_f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x,\n\t\t\t- _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0\n\t\t];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// test 3 face normals from the aabb\n\t\taxes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// finally testing the face normal of the triangle\n\t\t// use already existing triangle edge vectors here\n\t\t_triangleNormal.crossVectors( _f0, _f1 );\n\t\taxes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ];\n\n\t\treturn satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents );\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.clampPoint( point, _vector$a ).distanceTo( point );\n\n\t}\n\n\tgetBoundingSphere( target ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\ttarget.makeEmpty();\n\n\t\t} else {\n\n\t\t\tthis.getCenter( target.center );\n\n\t\t\ttarget.radius = this.getSize( _vector$a ).length() * 0.5;\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\t// ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n\t\tif ( this.isEmpty() ) this.makeEmpty();\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\t// transform of empty box is an empty box.\n\t\tif ( this.isEmpty() ) return this;\n\n\t\t// NOTE: I am using a binary pattern to specify all 2^3 combinations below\n\t\t_points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000\n\t\t_points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001\n\t\t_points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010\n\t\t_points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011\n\t\t_points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100\n\t\t_points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101\n\t\t_points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110\n\t\t_points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111\n\n\t\tthis.setFromPoints( _points );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nconst _points = [\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3()\n];\n\nconst _vector$a = /*@__PURE__*/ new Vector3();\n\nconst _box$3 = /*@__PURE__*/ new Box3();\n\n// triangle centered vertices\n\nconst _v0$2 = /*@__PURE__*/ new Vector3();\nconst _v1$7 = /*@__PURE__*/ new Vector3();\nconst _v2$4 = /*@__PURE__*/ new Vector3();\n\n// triangle edge vectors\n\nconst _f0 = /*@__PURE__*/ new Vector3();\nconst _f1 = /*@__PURE__*/ new Vector3();\nconst _f2 = /*@__PURE__*/ new Vector3();\n\nconst _center = /*@__PURE__*/ new Vector3();\nconst _extents = /*@__PURE__*/ new Vector3();\nconst _triangleNormal = /*@__PURE__*/ new Vector3();\nconst _testAxis = /*@__PURE__*/ new Vector3();\n\nfunction satForAxes( axes, v0, v1, v2, extents ) {\n\n\tfor ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) {\n\n\t\t_testAxis.fromArray( axes, i );\n\t\t// project the aabb onto the separating axis\n\t\tconst r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z );\n\t\t// project all 3 vertices of the triangle onto the separating axis\n\t\tconst p0 = v0.dot( _testAxis );\n\t\tconst p1 = v1.dot( _testAxis );\n\t\tconst p2 = v2.dot( _testAxis );\n\t\t// actual test, basically see if either of the most extreme of the triangle points intersects r\n\t\tif ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) {\n\n\t\t\t// points of the projected triangle are outside the projected half-length of the aabb\n\t\t\t// the axis is separating and we can exit\n\t\t\treturn false;\n\n\t\t}\n\n\t}\n\n\treturn true;\n\n}\n\nconst _box$2 = /*@__PURE__*/ new Box3();\nconst _v1$6 = /*@__PURE__*/ new Vector3();\nconst _v2$3 = /*@__PURE__*/ new Vector3();\n\nclass Sphere {\n\n\tconstructor( center = new Vector3(), radius = - 1 ) {\n\n\t\tthis.center = center;\n\t\tthis.radius = radius;\n\n\t}\n\n\tset( center, radius ) {\n\n\t\tthis.center.copy( center );\n\t\tthis.radius = radius;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points, optionalCenter ) {\n\n\t\tconst center = this.center;\n\n\t\tif ( optionalCenter !== undefined ) {\n\n\t\t\tcenter.copy( optionalCenter );\n\n\t\t} else {\n\n\t\t\t_box$2.setFromPoints( points ).getCenter( center );\n\n\t\t}\n\n\t\tlet maxRadiusSq = 0;\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) );\n\n\t\t}\n\n\t\tthis.radius = Math.sqrt( maxRadiusSq );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( sphere ) {\n\n\t\tthis.center.copy( sphere.center );\n\t\tthis.radius = sphere.radius;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\treturn ( this.radius < 0 );\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.center.set( 0, 0, 0 );\n\t\tthis.radius = - 1;\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn ( point.distanceTo( this.center ) - this.radius );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst radiusSum = this.radius + sphere.radius;\n\n\t\treturn sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsSphere( this );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\treturn Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\tconst deltaLengthSq = this.center.distanceToSquared( point );\n\n\t\ttarget.copy( point );\n\n\t\tif ( deltaLengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\ttarget.sub( this.center ).normalize();\n\t\t\ttarget.multiplyScalar( this.radius ).add( this.center );\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\tgetBoundingBox( target ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\t// Empty sphere produces empty bounding box\n\t\t\ttarget.makeEmpty();\n\t\t\treturn target;\n\n\t\t}\n\n\t\ttarget.set( this.center, this.center );\n\t\ttarget.expandByScalar( this.radius );\n\n\t\treturn target;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.center.applyMatrix4( matrix );\n\t\tthis.radius = this.radius * matrix.getMaxScaleOnAxis();\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.center.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\tthis.center.copy( point );\n\n\t\t\tthis.radius = 0;\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\t_v1$6.subVectors( point, this.center );\n\n\t\tconst lengthSq = _v1$6.lengthSq();\n\n\t\tif ( lengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\t// calculate the minimal sphere\n\n\t\t\tconst length = Math.sqrt( lengthSq );\n\n\t\t\tconst delta = ( length - this.radius ) * 0.5;\n\n\t\t\tthis.center.addScaledVector( _v1$6, delta / length );\n\n\t\t\tthis.radius += delta;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tunion( sphere ) {\n\n\t\tif ( sphere.isEmpty() ) {\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\tthis.copy( sphere );\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( this.center.equals( sphere.center ) === true ) {\n\n\t\t\t this.radius = Math.max( this.radius, sphere.radius );\n\n\t\t} else {\n\n\t\t\t_v2$3.subVectors( sphere.center, this.center ).setLength( sphere.radius );\n\n\t\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).add( _v2$3 ) );\n\n\t\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).sub( _v2$3 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tequals( sphere ) {\n\n\t\treturn sphere.center.equals( this.center ) && ( sphere.radius === this.radius );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$9 = /*@__PURE__*/ new Vector3();\nconst _segCenter = /*@__PURE__*/ new Vector3();\nconst _segDir = /*@__PURE__*/ new Vector3();\nconst _diff = /*@__PURE__*/ new Vector3();\n\nconst _edge1 = /*@__PURE__*/ new Vector3();\nconst _edge2 = /*@__PURE__*/ new Vector3();\nconst _normal$1 = /*@__PURE__*/ new Vector3();\n\nclass Ray {\n\n\tconstructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) {\n\n\t\tthis.origin = origin;\n\t\tthis.direction = direction;\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\tthis.origin.copy( origin );\n\t\tthis.direction.copy( direction );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( ray ) {\n\n\t\tthis.origin.copy( ray.origin );\n\t\tthis.direction.copy( ray.direction );\n\n\t\treturn this;\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn target.copy( this.origin ).addScaledVector( this.direction, t );\n\n\t}\n\n\tlookAt( v ) {\n\n\t\tthis.direction.copy( v ).sub( this.origin ).normalize();\n\n\t\treturn this;\n\n\t}\n\n\trecast( t ) {\n\n\t\tthis.origin.copy( this.at( t, _vector$9 ) );\n\n\t\treturn this;\n\n\t}\n\n\tclosestPointToPoint( point, target ) {\n\n\t\ttarget.subVectors( point, this.origin );\n\n\t\tconst directionDistance = target.dot( this.direction );\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn target.copy( this.origin );\n\n\t\t}\n\n\t\treturn target.copy( this.origin ).addScaledVector( this.direction, directionDistance );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn Math.sqrt( this.distanceSqToPoint( point ) );\n\n\t}\n\n\tdistanceSqToPoint( point ) {\n\n\t\tconst directionDistance = _vector$9.subVectors( point, this.origin ).dot( this.direction );\n\n\t\t// point behind the ray\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn this.origin.distanceToSquared( point );\n\n\t\t}\n\n\t\t_vector$9.copy( this.origin ).addScaledVector( this.direction, directionDistance );\n\n\t\treturn _vector$9.distanceToSquared( point );\n\n\t}\n\n\tdistanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) {\n\n\t\t// from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteDistRaySegment.h\n\t\t// It returns the min distance between the ray and the segment\n\t\t// defined by v0 and v1\n\t\t// It can also set two optional targets :\n\t\t// - The closest point on the ray\n\t\t// - The closest point on the segment\n\n\t\t_segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 );\n\t\t_segDir.copy( v1 ).sub( v0 ).normalize();\n\t\t_diff.copy( this.origin ).sub( _segCenter );\n\n\t\tconst segExtent = v0.distanceTo( v1 ) * 0.5;\n\t\tconst a01 = - this.direction.dot( _segDir );\n\t\tconst b0 = _diff.dot( this.direction );\n\t\tconst b1 = - _diff.dot( _segDir );\n\t\tconst c = _diff.lengthSq();\n\t\tconst det = Math.abs( 1 - a01 * a01 );\n\t\tlet s0, s1, sqrDist, extDet;\n\n\t\tif ( det > 0 ) {\n\n\t\t\t// The ray and segment are not parallel.\n\n\t\t\ts0 = a01 * b1 - b0;\n\t\t\ts1 = a01 * b0 - b1;\n\t\t\textDet = segExtent * det;\n\n\t\t\tif ( s0 >= 0 ) {\n\n\t\t\t\tif ( s1 >= - extDet ) {\n\n\t\t\t\t\tif ( s1 <= extDet ) {\n\n\t\t\t\t\t\t// region 0\n\t\t\t\t\t\t// Minimum at interior points of ray and segment.\n\n\t\t\t\t\t\tconst invDet = 1 / det;\n\t\t\t\t\t\ts0 *= invDet;\n\t\t\t\t\t\ts1 *= invDet;\n\t\t\t\t\t\tsqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// region 1\n\n\t\t\t\t\t\ts1 = segExtent;\n\t\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 5\n\n\t\t\t\t\ts1 = - segExtent;\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( s1 <= - extDet ) {\n\n\t\t\t\t\t// region 4\n\n\t\t\t\t\ts0 = Math.max( 0, - ( - a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else if ( s1 <= extDet ) {\n\n\t\t\t\t\t// region 3\n\n\t\t\t\t\ts0 = 0;\n\t\t\t\t\ts1 = Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 2\n\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Ray and segment are parallel.\n\n\t\t\ts1 = ( a01 > 0 ) ? - segExtent : segExtent;\n\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t}\n\n\t\tif ( optionalPointOnRay ) {\n\n\t\t\toptionalPointOnRay.copy( this.origin ).addScaledVector( this.direction, s0 );\n\n\t\t}\n\n\t\tif ( optionalPointOnSegment ) {\n\n\t\t\toptionalPointOnSegment.copy( _segCenter ).addScaledVector( _segDir, s1 );\n\n\t\t}\n\n\t\treturn sqrDist;\n\n\t}\n\n\tintersectSphere( sphere, target ) {\n\n\t\t_vector$9.subVectors( sphere.center, this.origin );\n\t\tconst tca = _vector$9.dot( this.direction );\n\t\tconst d2 = _vector$9.dot( _vector$9 ) - tca * tca;\n\t\tconst radius2 = sphere.radius * sphere.radius;\n\n\t\tif ( d2 > radius2 ) return null;\n\n\t\tconst thc = Math.sqrt( radius2 - d2 );\n\n\t\t// t0 = first intersect point - entrance on front of sphere\n\t\tconst t0 = tca - thc;\n\n\t\t// t1 = second intersect point - exit point on back of sphere\n\t\tconst t1 = tca + thc;\n\n\t\t// test to see if t1 is behind the ray - if so, return null\n\t\tif ( t1 < 0 ) return null;\n\n\t\t// test to see if t0 is behind the ray:\n\t\t// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n\t\t// in order to always return an intersect point that is in front of the ray.\n\t\tif ( t0 < 0 ) return this.at( t1, target );\n\n\t\t// else t0 is in front of the ray, so return the first collision point scaled by t0\n\t\treturn this.at( t0, target );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tdistanceToPlane( plane ) {\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( plane.distanceToPoint( this.origin ) === 0 ) {\n\n\t\t\t\treturn 0;\n\n\t\t\t}\n\n\t\t\t// Null is preferable to undefined since undefined means.... it is undefined\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator;\n\n\t\t// Return if the ray never intersects the plane\n\n\t\treturn t >= 0 ? t : null;\n\n\t}\n\n\tintersectPlane( plane, target ) {\n\n\t\tconst t = this.distanceToPlane( plane );\n\n\t\tif ( t === null ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn this.at( t, target );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// check if the ray lies on the plane first\n\n\t\tconst distToPoint = plane.distanceToPoint( this.origin );\n\n\t\tif ( distToPoint === 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator * distToPoint < 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\t// ray origin is behind the plane (and is pointing behind it)\n\n\t\treturn false;\n\n\t}\n\n\tintersectBox( box, target ) {\n\n\t\tlet tmin, tmax, tymin, tymax, tzmin, tzmax;\n\n\t\tconst invdirx = 1 / this.direction.x,\n\t\t\tinvdiry = 1 / this.direction.y,\n\t\t\tinvdirz = 1 / this.direction.z;\n\n\t\tconst origin = this.origin;\n\n\t\tif ( invdirx >= 0 ) {\n\n\t\t\ttmin = ( box.min.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.max.x - origin.x ) * invdirx;\n\n\t\t} else {\n\n\t\t\ttmin = ( box.max.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.min.x - origin.x ) * invdirx;\n\n\t\t}\n\n\t\tif ( invdiry >= 0 ) {\n\n\t\t\ttymin = ( box.min.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.max.y - origin.y ) * invdiry;\n\n\t\t} else {\n\n\t\t\ttymin = ( box.max.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.min.y - origin.y ) * invdiry;\n\n\t\t}\n\n\t\tif ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;\n\n\t\tif ( tymin > tmin || isNaN( tmin ) ) tmin = tymin;\n\n\t\tif ( tymax < tmax || isNaN( tmax ) ) tmax = tymax;\n\n\t\tif ( invdirz >= 0 ) {\n\n\t\t\ttzmin = ( box.min.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.max.z - origin.z ) * invdirz;\n\n\t\t} else {\n\n\t\t\ttzmin = ( box.max.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.min.z - origin.z ) * invdirz;\n\n\t\t}\n\n\t\tif ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null;\n\n\t\tif ( tzmin > tmin || tmin !== tmin ) tmin = tzmin;\n\n\t\tif ( tzmax < tmax || tmax !== tmax ) tmax = tzmax;\n\n\t\t//return point closest to the ray (positive side)\n\n\t\tif ( tmax < 0 ) return null;\n\n\t\treturn this.at( tmin >= 0 ? tmin : tmax, target );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn this.intersectBox( box, _vector$9 ) !== null;\n\n\t}\n\n\tintersectTriangle( a, b, c, backfaceCulling, target ) {\n\n\t\t// Compute the offset origin, edges, and normal.\n\n\t\t// from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n\n\t\t_edge1.subVectors( b, a );\n\t\t_edge2.subVectors( c, a );\n\t\t_normal$1.crossVectors( _edge1, _edge2 );\n\n\t\t// Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n\t\t// E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n\t\t// |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n\t\t// |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n\t\t// |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n\t\tlet DdN = this.direction.dot( _normal$1 );\n\t\tlet sign;\n\n\t\tif ( DdN > 0 ) {\n\n\t\t\tif ( backfaceCulling ) return null;\n\t\t\tsign = 1;\n\n\t\t} else if ( DdN < 0 ) {\n\n\t\t\tsign = - 1;\n\t\t\tDdN = - DdN;\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t_diff.subVectors( this.origin, a );\n\t\tconst DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) );\n\n\t\t// b1 < 0, no intersection\n\t\tif ( DdQxE2 < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) );\n\n\t\t// b2 < 0, no intersection\n\t\tif ( DdE1xQ < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// b1+b2 > 1, no intersection\n\t\tif ( DdQxE2 + DdE1xQ > DdN ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Line intersects triangle, check if ray does.\n\t\tconst QdN = - sign * _diff.dot( _normal$1 );\n\n\t\t// t < 0, no intersection\n\t\tif ( QdN < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Ray intersects triangle.\n\t\treturn this.at( QdN / DdN, target );\n\n\t}\n\n\tapplyMatrix4( matrix4 ) {\n\n\t\tthis.origin.applyMatrix4( matrix4 );\n\t\tthis.direction.transformDirection( matrix4 );\n\n\t\treturn this;\n\n\t}\n\n\tequals( ray ) {\n\n\t\treturn ray.origin.equals( this.origin ) && ray.direction.equals( this.direction );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass Matrix4 {\n\n\tconstructor( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {\n\n\t\tMatrix4.prototype.isMatrix4 = true;\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t];\n\n\t\tif ( n11 !== undefined ) {\n\n\t\t\tthis.set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14;\n\t\tte[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24;\n\t\tte[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34;\n\t\tte[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Matrix4().fromArray( this.elements );\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ];\n\t\tte[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ];\n\t\tte[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ];\n\t\tte[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ];\n\n\t\treturn this;\n\n\t}\n\n\tcopyPosition( m ) {\n\n\t\tconst te = this.elements, me = m.elements;\n\n\t\tte[ 12 ] = me[ 12 ];\n\t\tte[ 13 ] = me[ 13 ];\n\t\tte[ 14 ] = me[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix3( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 3 ], me[ 6 ], 0,\n\t\t\tme[ 1 ], me[ 4 ], me[ 7 ], 0,\n\t\t\tme[ 2 ], me[ 5 ], me[ 8 ], 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrixColumn( this, 0 );\n\t\tyAxis.setFromMatrixColumn( this, 1 );\n\t\tzAxis.setFromMatrixColumn( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmakeBasis( xAxis, yAxis, zAxis ) {\n\n\t\tthis.set(\n\t\t\txAxis.x, yAxis.x, zAxis.x, 0,\n\t\t\txAxis.y, yAxis.y, zAxis.y, 0,\n\t\t\txAxis.z, yAxis.z, zAxis.z, 0,\n\t\t\t0, 0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractRotation( m ) {\n\n\t\t// this method does not support reflection matrices\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tconst scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length();\n\t\tconst scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length();\n\t\tconst scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length();\n\n\t\tte[ 0 ] = me[ 0 ] * scaleX;\n\t\tte[ 1 ] = me[ 1 ] * scaleX;\n\t\tte[ 2 ] = me[ 2 ] * scaleX;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = me[ 4 ] * scaleY;\n\t\tte[ 5 ] = me[ 5 ] * scaleY;\n\t\tte[ 6 ] = me[ 6 ] * scaleY;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = me[ 8 ] * scaleZ;\n\t\tte[ 9 ] = me[ 9 ] * scaleZ;\n\t\tte[ 10 ] = me[ 10 ] * scaleZ;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromEuler( euler ) {\n\n\t\tconst te = this.elements;\n\n\t\tconst x = euler.x, y = euler.y, z = euler.z;\n\t\tconst a = Math.cos( x ), b = Math.sin( x );\n\t\tconst c = Math.cos( y ), d = Math.sin( y );\n\t\tconst e = Math.cos( z ), f = Math.sin( z );\n\n\t\tif ( euler.order === 'XYZ' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - c * f;\n\t\t\tte[ 8 ] = d;\n\n\t\t\tte[ 1 ] = af + be * d;\n\t\t\tte[ 5 ] = ae - bf * d;\n\t\t\tte[ 9 ] = - b * c;\n\n\t\t\tte[ 2 ] = bf - ae * d;\n\t\t\tte[ 6 ] = be + af * d;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YXZ' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce + df * b;\n\t\t\tte[ 4 ] = de * b - cf;\n\t\t\tte[ 8 ] = a * d;\n\n\t\t\tte[ 1 ] = a * f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b;\n\n\t\t\tte[ 2 ] = cf * b - de;\n\t\t\tte[ 6 ] = df + ce * b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZXY' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce - df * b;\n\t\t\tte[ 4 ] = - a * f;\n\t\t\tte[ 8 ] = de + cf * b;\n\n\t\t\tte[ 1 ] = cf + de * b;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = df - ce * b;\n\n\t\t\tte[ 2 ] = - a * d;\n\t\t\tte[ 6 ] = b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZYX' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = be * d - af;\n\t\t\tte[ 8 ] = ae * d + bf;\n\n\t\t\tte[ 1 ] = c * f;\n\t\t\tte[ 5 ] = bf * d + ae;\n\t\t\tte[ 9 ] = af * d - be;\n\n\t\t\tte[ 2 ] = - d;\n\t\t\tte[ 6 ] = b * c;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YZX' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = bd - ac * f;\n\t\t\tte[ 8 ] = bc * f + ad;\n\n\t\t\tte[ 1 ] = f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b * e;\n\n\t\t\tte[ 2 ] = - d * e;\n\t\t\tte[ 6 ] = ad * f + bc;\n\t\t\tte[ 10 ] = ac - bd * f;\n\n\t\t} else if ( euler.order === 'XZY' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - f;\n\t\t\tte[ 8 ] = d * e;\n\n\t\t\tte[ 1 ] = ac * f + bd;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = ad * f - bc;\n\n\t\t\tte[ 2 ] = bc * f - ad;\n\t\t\tte[ 6 ] = b * e;\n\t\t\tte[ 10 ] = bd * f + ac;\n\n\t\t}\n\n\t\t// bottom row\n\t\tte[ 3 ] = 0;\n\t\tte[ 7 ] = 0;\n\t\tte[ 11 ] = 0;\n\n\t\t// last column\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromQuaternion( q ) {\n\n\t\treturn this.compose( _zero, q, _one );\n\n\t}\n\n\tlookAt( eye, target, up ) {\n\n\t\tconst te = this.elements;\n\n\t\t_z.subVectors( eye, target );\n\n\t\tif ( _z.lengthSq() === 0 ) {\n\n\t\t\t// eye and target are in the same position\n\n\t\t\t_z.z = 1;\n\n\t\t}\n\n\t\t_z.normalize();\n\t\t_x.crossVectors( up, _z );\n\n\t\tif ( _x.lengthSq() === 0 ) {\n\n\t\t\t// up and z are parallel\n\n\t\t\tif ( Math.abs( up.z ) === 1 ) {\n\n\t\t\t\t_z.x += 0.0001;\n\n\t\t\t} else {\n\n\t\t\t\t_z.z += 0.0001;\n\n\t\t\t}\n\n\t\t\t_z.normalize();\n\t\t\t_x.crossVectors( up, _z );\n\n\t\t}\n\n\t\t_x.normalize();\n\t\t_y.crossVectors( _z, _x );\n\n\t\tte[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x;\n\t\tte[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y;\n\t\tte[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m ) {\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ];\n\t\tconst a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ];\n\t\tconst b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n\t\tte[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n\t\tte[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n\t\tte[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n\t\tte[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n\t\tte[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n\t\tte[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n\t\tte[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n\t\tte[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n\t\tte[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\n\t\tte[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n\t\tte[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n\t\tte[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n\t\tte[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s;\n\t\tte[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s;\n\t\tte[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s;\n\t\tte[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ];\n\t\tconst n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ];\n\t\tconst n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ];\n\t\tconst n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ];\n\n\t\t//TODO: make this more efficient\n\t\t//( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n\n\t\treturn (\n\t\t\tn41 * (\n\t\t\t\t+ n14 * n23 * n32\n\t\t\t\t - n13 * n24 * n32\n\t\t\t\t - n14 * n22 * n33\n\t\t\t\t + n12 * n24 * n33\n\t\t\t\t + n13 * n22 * n34\n\t\t\t\t - n12 * n23 * n34\n\t\t\t) +\n\t\t\tn42 * (\n\t\t\t\t+ n11 * n23 * n34\n\t\t\t\t - n11 * n24 * n33\n\t\t\t\t + n14 * n21 * n33\n\t\t\t\t - n13 * n21 * n34\n\t\t\t\t + n13 * n24 * n31\n\t\t\t\t - n14 * n23 * n31\n\t\t\t) +\n\t\t\tn43 * (\n\t\t\t\t+ n11 * n24 * n32\n\t\t\t\t - n11 * n22 * n34\n\t\t\t\t - n14 * n21 * n32\n\t\t\t\t + n12 * n21 * n34\n\t\t\t\t + n14 * n22 * n31\n\t\t\t\t - n12 * n24 * n31\n\t\t\t) +\n\t\t\tn44 * (\n\t\t\t\t- n13 * n22 * n31\n\t\t\t\t - n11 * n23 * n32\n\t\t\t\t + n11 * n22 * n33\n\t\t\t\t + n13 * n21 * n32\n\t\t\t\t - n12 * n21 * n33\n\t\t\t\t + n12 * n23 * n31\n\t\t\t)\n\n\t\t);\n\n\t}\n\n\ttranspose() {\n\n\t\tconst te = this.elements;\n\t\tlet tmp;\n\n\t\ttmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp;\n\t\ttmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp;\n\t\ttmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp;\n\n\t\ttmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp;\n\t\ttmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp;\n\t\ttmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tsetPosition( x, y, z ) {\n\n\t\tconst te = this.elements;\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\tte[ 12 ] = x.x;\n\t\t\tte[ 13 ] = x.y;\n\t\t\tte[ 14 ] = x.z;\n\n\t\t} else {\n\n\t\t\tte[ 12 ] = x;\n\t\t\tte[ 13 ] = y;\n\t\t\tte[ 14 ] = z;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tinvert() {\n\n\t\t// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ],\n\t\t\tn12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ],\n\t\t\tn13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ],\n\t\t\tn14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ],\n\n\t\t\tt11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,\n\t\t\tt12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,\n\t\t\tt13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,\n\t\t\tt14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n\n\t\tconst det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv;\n\t\tte[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv;\n\t\tte[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv;\n\n\t\tte[ 4 ] = t12 * detInv;\n\t\tte[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv;\n\t\tte[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv;\n\t\tte[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv;\n\n\t\tte[ 8 ] = t13 * detInv;\n\t\tte[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv;\n\t\tte[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv;\n\t\tte[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv;\n\n\t\tte[ 12 ] = t14 * detInv;\n\t\tte[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv;\n\t\tte[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv;\n\t\tte[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\tscale( v ) {\n\n\t\tconst te = this.elements;\n\t\tconst x = v.x, y = v.y, z = v.z;\n\n\t\tte[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z;\n\t\tte[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z;\n\t\tte[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z;\n\t\tte[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxScaleOnAxis() {\n\n\t\tconst te = this.elements;\n\n\t\tconst scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ];\n\t\tconst scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ];\n\t\tconst scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ];\n\n\t\treturn Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) );\n\n\t}\n\n\tmakeTranslation( x, y, z ) {\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, 0, x.x,\n\t\t\t\t0, 1, 0, x.y,\n\t\t\t\t0, 0, 1, x.z,\n\t\t\t\t0, 0, 0, 1\n\n\t\t\t);\n\n\t\t} else {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, 0, x,\n\t\t\t\t0, 1, 0, y,\n\t\t\t\t0, 0, 1, z,\n\t\t\t\t0, 0, 0, 1\n\n\t\t\t);\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationX( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, c, - s, 0,\n\t\t\t0, s, c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationY( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t c, 0, s, 0,\n\t\t\t 0, 1, 0, 0,\n\t\t\t- s, 0, c, 0,\n\t\t\t 0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationZ( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\tc, - s, 0, 0,\n\t\t\ts, c, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationAxis( axis, angle ) {\n\n\t\t// Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n\t\tconst c = Math.cos( angle );\n\t\tconst s = Math.sin( angle );\n\t\tconst t = 1 - c;\n\t\tconst x = axis.x, y = axis.y, z = axis.z;\n\t\tconst tx = t * x, ty = t * y;\n\n\t\tthis.set(\n\n\t\t\ttx * x + c, tx * y - s * z, tx * z + s * y, 0,\n\t\t\ttx * y + s * z, ty * y + c, ty * z - s * x, 0,\n\t\t\ttx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeScale( x, y, z ) {\n\n\t\tthis.set(\n\n\t\t\tx, 0, 0, 0,\n\t\t\t0, y, 0, 0,\n\t\t\t0, 0, z, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeShear( xy, xz, yx, yz, zx, zy ) {\n\n\t\tthis.set(\n\n\t\t\t1, yx, zx, 0,\n\t\t\txy, 1, zy, 0,\n\t\t\txz, yz, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tconst x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;\n\t\tconst x2 = x + x,\ty2 = y + y, z2 = z + z;\n\t\tconst xx = x * x2, xy = x * y2, xz = x * z2;\n\t\tconst yy = y * y2, yz = y * z2, zz = z * z2;\n\t\tconst wx = w * x2, wy = w * y2, wz = w * z2;\n\n\t\tconst sx = scale.x, sy = scale.y, sz = scale.z;\n\n\t\tte[ 0 ] = ( 1 - ( yy + zz ) ) * sx;\n\t\tte[ 1 ] = ( xy + wz ) * sx;\n\t\tte[ 2 ] = ( xz - wy ) * sx;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = ( xy - wz ) * sy;\n\t\tte[ 5 ] = ( 1 - ( xx + zz ) ) * sy;\n\t\tte[ 6 ] = ( yz + wx ) * sy;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = ( xz + wy ) * sz;\n\t\tte[ 9 ] = ( yz - wx ) * sz;\n\t\tte[ 10 ] = ( 1 - ( xx + yy ) ) * sz;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = position.x;\n\t\tte[ 13 ] = position.y;\n\t\tte[ 14 ] = position.z;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tdecompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tlet sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();\n\t\tconst sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length();\n\t\tconst sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length();\n\n\t\t// if determine is negative, we need to invert one scale\n\t\tconst det = this.determinant();\n\t\tif ( det < 0 ) sx = - sx;\n\n\t\tposition.x = te[ 12 ];\n\t\tposition.y = te[ 13 ];\n\t\tposition.z = te[ 14 ];\n\n\t\t// scale the rotation part\n\t\t_m1$2.copy( this );\n\n\t\tconst invSX = 1 / sx;\n\t\tconst invSY = 1 / sy;\n\t\tconst invSZ = 1 / sz;\n\n\t\t_m1$2.elements[ 0 ] *= invSX;\n\t\t_m1$2.elements[ 1 ] *= invSX;\n\t\t_m1$2.elements[ 2 ] *= invSX;\n\n\t\t_m1$2.elements[ 4 ] *= invSY;\n\t\t_m1$2.elements[ 5 ] *= invSY;\n\t\t_m1$2.elements[ 6 ] *= invSY;\n\n\t\t_m1$2.elements[ 8 ] *= invSZ;\n\t\t_m1$2.elements[ 9 ] *= invSZ;\n\t\t_m1$2.elements[ 10 ] *= invSZ;\n\n\t\tquaternion.setFromRotationMatrix( _m1$2 );\n\n\t\tscale.x = sx;\n\t\tscale.y = sy;\n\t\tscale.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tmakePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {\n\n\t\tconst te = this.elements;\n\t\tconst x = 2 * near / ( right - left );\n\t\tconst y = 2 * near / ( top - bottom );\n\n\t\tconst a = ( right + left ) / ( right - left );\n\t\tconst b = ( top + bottom ) / ( top - bottom );\n\n\t\tlet c, d;\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tc = - ( far + near ) / ( far - near );\n\t\t\td = ( - 2 * far * near ) / ( far - near );\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tc = - far / ( far - near );\n\t\t\td = ( - far * near ) / ( far - near );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\tte[ 0 ] = x;\tte[ 4 ] = 0;\tte[ 8 ] = a; \tte[ 12 ] = 0;\n\t\tte[ 1 ] = 0;\tte[ 5 ] = y;\tte[ 9 ] = b; \tte[ 13 ] = 0;\n\t\tte[ 2 ] = 0;\tte[ 6 ] = 0;\tte[ 10 ] = c; \tte[ 14 ] = d;\n\t\tte[ 3 ] = 0;\tte[ 7 ] = 0;\tte[ 11 ] = - 1;\tte[ 15 ] = 0;\n\n\t\treturn this;\n\n\t}\n\n\tmakeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {\n\n\t\tconst te = this.elements;\n\t\tconst w = 1.0 / ( right - left );\n\t\tconst h = 1.0 / ( top - bottom );\n\t\tconst p = 1.0 / ( far - near );\n\n\t\tconst x = ( right + left ) * w;\n\t\tconst y = ( top + bottom ) * h;\n\n\t\tlet z, zInv;\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tz = ( far + near ) * p;\n\t\t\tzInv = - 2 * p;\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tz = near * p;\n\t\t\tzInv = - 1 * p;\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\tte[ 0 ] = 2 * w;\tte[ 4 ] = 0;\t\tte[ 8 ] = 0; \t\tte[ 12 ] = - x;\n\t\tte[ 1 ] = 0; \t\tte[ 5 ] = 2 * h;\tte[ 9 ] = 0; \t\tte[ 13 ] = - y;\n\t\tte[ 2 ] = 0; \t\tte[ 6 ] = 0;\t\tte[ 10 ] = zInv;\tte[ 14 ] = - z;\n\t\tte[ 3 ] = 0; \t\tte[ 7 ] = 0;\t\tte[ 11 ] = 0;\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\t\tarray[ offset + 9 ] = te[ 9 ];\n\t\tarray[ offset + 10 ] = te[ 10 ];\n\t\tarray[ offset + 11 ] = te[ 11 ];\n\n\t\tarray[ offset + 12 ] = te[ 12 ];\n\t\tarray[ offset + 13 ] = te[ 13 ];\n\t\tarray[ offset + 14 ] = te[ 14 ];\n\t\tarray[ offset + 15 ] = te[ 15 ];\n\n\t\treturn array;\n\n\t}\n\n}\n\nconst _v1$5 = /*@__PURE__*/ new Vector3();\nconst _m1$2 = /*@__PURE__*/ new Matrix4();\nconst _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 );\nconst _one = /*@__PURE__*/ new Vector3( 1, 1, 1 );\nconst _x = /*@__PURE__*/ new Vector3();\nconst _y = /*@__PURE__*/ new Vector3();\nconst _z = /*@__PURE__*/ new Vector3();\n\nconst _matrix = /*@__PURE__*/ new Matrix4();\nconst _quaternion$3 = /*@__PURE__*/ new Quaternion();\n\nclass Euler {\n\n\tconstructor( x = 0, y = 0, z = 0, order = Euler.DEFAULT_ORDER ) {\n\n\t\tthis.isEuler = true;\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget order() {\n\n\t\treturn this._order;\n\n\t}\n\n\tset order( value ) {\n\n\t\tthis._order = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, order = this._order ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._order );\n\n\t}\n\n\tcopy( euler ) {\n\n\t\tthis._x = euler._x;\n\t\tthis._y = euler._y;\n\t\tthis._z = euler._z;\n\t\tthis._order = euler._order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m, order = this._order, update = true ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements;\n\t\tconst m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ];\n\t\tconst m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ];\n\t\tconst m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\n\t\t\t\tthis._y = Math.asin( clamp( m13, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m13 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\n\t\t\t\tthis._x = Math.asin( - clamp( m23, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m23 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\n\t\t\t\tthis._x = Math.asin( clamp( m32, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m32 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = 0;\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\n\t\t\t\tthis._y = Math.asin( - clamp( m31, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m31 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\n\t\t\t\tthis._z = Math.asin( clamp( m21, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m21 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m22 );\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\n\t\t\t\tthis._z = Math.asin( - clamp( m12, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m12 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._y = Math.atan2( m13, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._y = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tconsole.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tthis._order = order;\n\n\t\tif ( update === true ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromQuaternion( q, order, update ) {\n\n\t\t_matrix.makeRotationFromQuaternion( q );\n\n\t\treturn this.setFromRotationMatrix( _matrix, order, update );\n\n\t}\n\n\tsetFromVector3( v, order = this._order ) {\n\n\t\treturn this.set( v.x, v.y, v.z, order );\n\n\t}\n\n\treorder( newOrder ) {\n\n\t\t// WARNING: this discards revolution information -bhouston\n\n\t\t_quaternion$3.setFromEuler( this );\n\n\t\treturn this.setFromQuaternion( _quaternion$3, newOrder );\n\n\t}\n\n\tequals( euler ) {\n\n\t\treturn ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order );\n\n\t}\n\n\tfromArray( array ) {\n\n\t\tthis._x = array[ 0 ];\n\t\tthis._y = array[ 1 ];\n\t\tthis._z = array[ 2 ];\n\t\tif ( array[ 3 ] !== undefined ) this._order = array[ 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._order;\n\n\t\treturn array;\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this._x;\n\t\tyield this._y;\n\t\tyield this._z;\n\t\tyield this._order;\n\n\t}\n\n}\n\nEuler.DEFAULT_ORDER = 'XYZ';\n\nclass Layers {\n\n\tconstructor() {\n\n\t\tthis.mask = 1 | 0;\n\n\t}\n\n\tset( channel ) {\n\n\t\tthis.mask = ( 1 << channel | 0 ) >>> 0;\n\n\t}\n\n\tenable( channel ) {\n\n\t\tthis.mask |= 1 << channel | 0;\n\n\t}\n\n\tenableAll() {\n\n\t\tthis.mask = 0xffffffff | 0;\n\n\t}\n\n\ttoggle( channel ) {\n\n\t\tthis.mask ^= 1 << channel | 0;\n\n\t}\n\n\tdisable( channel ) {\n\n\t\tthis.mask &= ~ ( 1 << channel | 0 );\n\n\t}\n\n\tdisableAll() {\n\n\t\tthis.mask = 0;\n\n\t}\n\n\ttest( layers ) {\n\n\t\treturn ( this.mask & layers.mask ) !== 0;\n\n\t}\n\n\tisEnabled( channel ) {\n\n\t\treturn ( this.mask & ( 1 << channel | 0 ) ) !== 0;\n\n\t}\n\n}\n\nlet _object3DId = 0;\n\nconst _v1$4 = /*@__PURE__*/ new Vector3();\nconst _q1 = /*@__PURE__*/ new Quaternion();\nconst _m1$1 = /*@__PURE__*/ new Matrix4();\nconst _target = /*@__PURE__*/ new Vector3();\n\nconst _position$3 = /*@__PURE__*/ new Vector3();\nconst _scale$2 = /*@__PURE__*/ new Vector3();\nconst _quaternion$2 = /*@__PURE__*/ new Quaternion();\n\nconst _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 );\nconst _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 );\nconst _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 );\n\nconst _addedEvent = { type: 'added' };\nconst _removedEvent = { type: 'removed' };\n\nclass Object3D extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isObject3D = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _object3DId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Object3D';\n\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\n\t\tthis.up = Object3D.DEFAULT_UP.clone();\n\n\t\tconst position = new Vector3();\n\t\tconst rotation = new Euler();\n\t\tconst quaternion = new Quaternion();\n\t\tconst scale = new Vector3( 1, 1, 1 );\n\n\t\tfunction onRotationChange() {\n\n\t\t\tquaternion.setFromEuler( rotation, false );\n\n\t\t}\n\n\t\tfunction onQuaternionChange() {\n\n\t\t\trotation.setFromQuaternion( quaternion, undefined, false );\n\n\t\t}\n\n\t\trotation._onChange( onRotationChange );\n\t\tquaternion._onChange( onQuaternionChange );\n\n\t\tObject.defineProperties( this, {\n\t\t\tposition: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: position\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: rotation\n\t\t\t},\n\t\t\tquaternion: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: quaternion\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: scale\n\t\t\t},\n\t\t\tmodelViewMatrix: {\n\t\t\t\tvalue: new Matrix4()\n\t\t\t},\n\t\t\tnormalMatrix: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t} );\n\n\t\tthis.matrix = new Matrix4();\n\t\tthis.matrixWorld = new Matrix4();\n\n\t\tthis.matrixAutoUpdate = Object3D.DEFAULT_MATRIX_AUTO_UPDATE;\n\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\tthis.matrixWorldAutoUpdate = Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer\n\n\t\tthis.layers = new Layers();\n\t\tthis.visible = true;\n\n\t\tthis.castShadow = false;\n\t\tthis.receiveShadow = false;\n\n\t\tthis.frustumCulled = true;\n\t\tthis.renderOrder = 0;\n\n\t\tthis.animations = [];\n\n\t\tthis.userData = {};\n\n\t}\n\n\tonBeforeRender( /* renderer, scene, camera, geometry, material, group */ ) {}\n\n\tonAfterRender( /* renderer, scene, camera, geometry, material, group */ ) {}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tthis.matrix.premultiply( matrix );\n\n\t\tthis.matrix.decompose( this.position, this.quaternion, this.scale );\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tthis.quaternion.premultiply( q );\n\n\t\treturn this;\n\n\t}\n\n\tsetRotationFromAxisAngle( axis, angle ) {\n\n\t\t// assumes axis is normalized\n\n\t\tthis.quaternion.setFromAxisAngle( axis, angle );\n\n\t}\n\n\tsetRotationFromEuler( euler ) {\n\n\t\tthis.quaternion.setFromEuler( euler, true );\n\n\t}\n\n\tsetRotationFromMatrix( m ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tthis.quaternion.setFromRotationMatrix( m );\n\n\t}\n\n\tsetRotationFromQuaternion( q ) {\n\n\t\t// assumes q is normalized\n\n\t\tthis.quaternion.copy( q );\n\n\t}\n\n\trotateOnAxis( axis, angle ) {\n\n\t\t// rotate object on axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.multiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateOnWorldAxis( axis, angle ) {\n\n\t\t// rotate object on axis in world space\n\t\t// axis is assumed to be normalized\n\t\t// method assumes no rotated parent\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.premultiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\treturn this.rotateOnAxis( _xAxis, angle );\n\n\t}\n\n\trotateY( angle ) {\n\n\t\treturn this.rotateOnAxis( _yAxis, angle );\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\treturn this.rotateOnAxis( _zAxis, angle );\n\n\t}\n\n\ttranslateOnAxis( axis, distance ) {\n\n\t\t// translate object by distance along axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_v1$4.copy( axis ).applyQuaternion( this.quaternion );\n\n\t\tthis.position.add( _v1$4.multiplyScalar( distance ) );\n\n\t\treturn this;\n\n\t}\n\n\ttranslateX( distance ) {\n\n\t\treturn this.translateOnAxis( _xAxis, distance );\n\n\t}\n\n\ttranslateY( distance ) {\n\n\t\treturn this.translateOnAxis( _yAxis, distance );\n\n\t}\n\n\ttranslateZ( distance ) {\n\n\t\treturn this.translateOnAxis( _zAxis, distance );\n\n\t}\n\n\tlocalToWorld( vector ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn vector.applyMatrix4( this.matrixWorld );\n\n\t}\n\n\tworldToLocal( vector ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn vector.applyMatrix4( _m1$1.copy( this.matrixWorld ).invert() );\n\n\t}\n\n\tlookAt( x, y, z ) {\n\n\t\t// This method does not support objects having non-uniformly-scaled parent(s)\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\t_target.copy( x );\n\n\t\t} else {\n\n\t\t\t_target.set( x, y, z );\n\n\t\t}\n\n\t\tconst parent = this.parent;\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_position$3.setFromMatrixPosition( this.matrixWorld );\n\n\t\tif ( this.isCamera || this.isLight ) {\n\n\t\t\t_m1$1.lookAt( _position$3, _target, this.up );\n\n\t\t} else {\n\n\t\t\t_m1$1.lookAt( _target, _position$3, this.up );\n\n\t\t}\n\n\t\tthis.quaternion.setFromRotationMatrix( _m1$1 );\n\n\t\tif ( parent ) {\n\n\t\t\t_m1$1.extractRotation( parent.matrixWorld );\n\t\t\t_q1.setFromRotationMatrix( _m1$1 );\n\t\t\tthis.quaternion.premultiply( _q1.invert() );\n\n\t\t}\n\n\t}\n\n\tadd( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.add( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object === this ) {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object can\\'t be added as a child of itself.', object );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object && object.isObject3D ) {\n\n\t\t\tif ( object.parent !== null ) {\n\n\t\t\t\tobject.parent.remove( object );\n\n\t\t\t}\n\n\t\t\tobject.parent = this;\n\t\t\tthis.children.push( object );\n\n\t\t\tobject.dispatchEvent( _addedEvent );\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremove( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.remove( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst index = this.children.indexOf( object );\n\n\t\tif ( index !== - 1 ) {\n\n\t\t\tobject.parent = null;\n\t\t\tthis.children.splice( index, 1 );\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremoveFromParent() {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tparent.remove( this );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclear() {\n\n\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\tconst object = this.children[ i ];\n\n\t\t\tobject.parent = null;\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\tthis.children.length = 0;\n\n\t\treturn this;\n\n\n\t}\n\n\tattach( object ) {\n\n\t\t// adds object as a child of this, while maintaining the object's world transform\n\n\t\t// Note: This method does not support scene graphs having non-uniformly-scaled nodes(s)\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_m1$1.copy( this.matrixWorld ).invert();\n\n\t\tif ( object.parent !== null ) {\n\n\t\t\tobject.parent.updateWorldMatrix( true, false );\n\n\t\t\t_m1$1.multiply( object.parent.matrixWorld );\n\n\t\t}\n\n\t\tobject.applyMatrix4( _m1$1 );\n\n\t\tthis.add( object );\n\n\t\tobject.updateWorldMatrix( false, true );\n\n\t\treturn this;\n\n\t}\n\n\tgetObjectById( id ) {\n\n\t\treturn this.getObjectByProperty( 'id', id );\n\n\t}\n\n\tgetObjectByName( name ) {\n\n\t\treturn this.getObjectByProperty( 'name', name );\n\n\t}\n\n\tgetObjectByProperty( name, value ) {\n\n\t\tif ( this[ name ] === value ) return this;\n\n\t\tfor ( let i = 0, l = this.children.length; i < l; i ++ ) {\n\n\t\t\tconst child = this.children[ i ];\n\t\t\tconst object = child.getObjectByProperty( name, value );\n\n\t\t\tif ( object !== undefined ) {\n\n\t\t\t\treturn object;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tgetObjectsByProperty( name, value ) {\n\n\t\tlet result = [];\n\n\t\tif ( this[ name ] === value ) result.push( this );\n\n\t\tfor ( let i = 0, l = this.children.length; i < l; i ++ ) {\n\n\t\t\tconst childResult = this.children[ i ].getObjectsByProperty( name, value );\n\n\t\t\tif ( childResult.length > 0 ) {\n\n\t\t\t\tresult = result.concat( childResult );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tgetWorldPosition( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn target.setFromMatrixPosition( this.matrixWorld );\n\n\t}\n\n\tgetWorldQuaternion( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, target, _scale$2 );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldScale( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, _quaternion$2, target );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize();\n\n\t}\n\n\traycast( /* raycaster, intersects */ ) {}\n\n\ttraverse( callback ) {\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverse( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseVisible( callback ) {\n\n\t\tif ( this.visible === false ) return;\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverseVisible( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseAncestors( callback ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tcallback( parent );\n\n\t\t\tparent.traverseAncestors( callback );\n\n\t\t}\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.compose( this.position, this.quaternion, this.scale );\n\n\t\tthis.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.matrixWorldNeedsUpdate || force ) {\n\n\t\t\tif ( this.parent === null ) {\n\n\t\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t\t}\n\n\t\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\t\tforce = true;\n\n\t\t}\n\n\t\t// update children\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tconst child = children[ i ];\n\n\t\t\tif ( child.matrixWorldAutoUpdate === true || force === true ) {\n\n\t\t\t\tchild.updateMatrixWorld( force );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( updateParents === true && parent !== null && parent.matrixWorldAutoUpdate === true ) {\n\n\t\t\tparent.updateWorldMatrix( true, false );\n\n\t\t}\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.parent === null ) {\n\n\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t} else {\n\n\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t}\n\n\t\t// update children\n\n\t\tif ( updateChildren === true ) {\n\n\t\t\tconst children = this.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tconst child = children[ i ];\n\n\t\t\t\tif ( child.matrixWorldAutoUpdate === true ) {\n\n\t\t\t\t\tchild.updateWorldMatrix( false, true );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\t// meta is a string when called from JSON.stringify\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tconst output = {};\n\n\t\t// meta is a hash used to collect geometries, materials.\n\t\t// not providing it implies that this is the root object\n\t\t// being serialized.\n\t\tif ( isRootObject ) {\n\n\t\t\t// initialize meta obj\n\t\t\tmeta = {\n\t\t\t\tgeometries: {},\n\t\t\t\tmaterials: {},\n\t\t\t\ttextures: {},\n\t\t\t\timages: {},\n\t\t\t\tshapes: {},\n\t\t\t\tskeletons: {},\n\t\t\t\tanimations: {},\n\t\t\t\tnodes: {}\n\t\t\t};\n\n\t\t\toutput.metadata = {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Object',\n\t\t\t\tgenerator: 'Object3D.toJSON'\n\t\t\t};\n\n\t\t}\n\n\t\t// standard Object3D serialization\n\n\t\tconst object = {};\n\n\t\tobject.uuid = this.uuid;\n\t\tobject.type = this.type;\n\n\t\tif ( this.name !== '' ) object.name = this.name;\n\t\tif ( this.castShadow === true ) object.castShadow = true;\n\t\tif ( this.receiveShadow === true ) object.receiveShadow = true;\n\t\tif ( this.visible === false ) object.visible = false;\n\t\tif ( this.frustumCulled === false ) object.frustumCulled = false;\n\t\tif ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;\n\t\tif ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData;\n\n\t\tobject.layers = this.layers.mask;\n\t\tobject.matrix = this.matrix.toArray();\n\t\tobject.up = this.up.toArray();\n\n\t\tif ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false;\n\n\t\t// object specific properties\n\n\t\tif ( this.isInstancedMesh ) {\n\n\t\t\tobject.type = 'InstancedMesh';\n\t\t\tobject.count = this.count;\n\t\t\tobject.instanceMatrix = this.instanceMatrix.toJSON();\n\t\t\tif ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON();\n\n\t\t}\n\n\t\t//\n\n\t\tfunction serialize( library, element ) {\n\n\t\t\tif ( library[ element.uuid ] === undefined ) {\n\n\t\t\t\tlibrary[ element.uuid ] = element.toJSON( meta );\n\n\t\t\t}\n\n\t\t\treturn element.uuid;\n\n\t\t}\n\n\t\tif ( this.isScene ) {\n\n\t\t\tif ( this.background ) {\n\n\t\t\t\tif ( this.background.isColor ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON();\n\n\t\t\t\t} else if ( this.background.isTexture ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON( meta ).uuid;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== true ) {\n\n\t\t\t\tobject.environment = this.environment.toJSON( meta ).uuid;\n\n\t\t\t}\n\n\t\t} else if ( this.isMesh || this.isLine || this.isPoints ) {\n\n\t\t\tobject.geometry = serialize( meta.geometries, this.geometry );\n\n\t\t\tconst parameters = this.geometry.parameters;\n\n\t\t\tif ( parameters !== undefined && parameters.shapes !== undefined ) {\n\n\t\t\t\tconst shapes = parameters.shapes;\n\n\t\t\t\tif ( Array.isArray( shapes ) ) {\n\n\t\t\t\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\t\t\t\tconst shape = shapes[ i ];\n\n\t\t\t\t\t\tserialize( meta.shapes, shape );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tserialize( meta.shapes, shapes );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.isSkinnedMesh ) {\n\n\t\t\tobject.bindMode = this.bindMode;\n\t\t\tobject.bindMatrix = this.bindMatrix.toArray();\n\n\t\t\tif ( this.skeleton !== undefined ) {\n\n\t\t\t\tserialize( meta.skeletons, this.skeleton );\n\n\t\t\t\tobject.skeleton = this.skeleton.uuid;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.material !== undefined ) {\n\n\t\t\tif ( Array.isArray( this.material ) ) {\n\n\t\t\t\tconst uuids = [];\n\n\t\t\t\tfor ( let i = 0, l = this.material.length; i < l; i ++ ) {\n\n\t\t\t\t\tuuids.push( serialize( meta.materials, this.material[ i ] ) );\n\n\t\t\t\t}\n\n\t\t\t\tobject.material = uuids;\n\n\t\t\t} else {\n\n\t\t\t\tobject.material = serialize( meta.materials, this.material );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.children.length > 0 ) {\n\n\t\t\tobject.children = [];\n\n\t\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\t\tobject.children.push( this.children[ i ].toJSON( meta ).object );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.animations.length > 0 ) {\n\n\t\t\tobject.animations = [];\n\n\t\t\tfor ( let i = 0; i < this.animations.length; i ++ ) {\n\n\t\t\t\tconst animation = this.animations[ i ];\n\n\t\t\t\tobject.animations.push( serialize( meta.animations, animation ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( isRootObject ) {\n\n\t\t\tconst geometries = extractFromCache( meta.geometries );\n\t\t\tconst materials = extractFromCache( meta.materials );\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\t\t\tconst shapes = extractFromCache( meta.shapes );\n\t\t\tconst skeletons = extractFromCache( meta.skeletons );\n\t\t\tconst animations = extractFromCache( meta.animations );\n\t\t\tconst nodes = extractFromCache( meta.nodes );\n\n\t\t\tif ( geometries.length > 0 ) output.geometries = geometries;\n\t\t\tif ( materials.length > 0 ) output.materials = materials;\n\t\t\tif ( textures.length > 0 ) output.textures = textures;\n\t\t\tif ( images.length > 0 ) output.images = images;\n\t\t\tif ( shapes.length > 0 ) output.shapes = shapes;\n\t\t\tif ( skeletons.length > 0 ) output.skeletons = skeletons;\n\t\t\tif ( animations.length > 0 ) output.animations = animations;\n\t\t\tif ( nodes.length > 0 ) output.nodes = nodes;\n\n\t\t}\n\n\t\toutput.object = object;\n\n\t\treturn output;\n\n\t\t// extract data from the cache hash\n\t\t// remove metadata on each item\n\t\t// and return as array\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t}\n\n\tclone( recursive ) {\n\n\t\treturn new this.constructor().copy( this, recursive );\n\n\t}\n\n\tcopy( source, recursive = true ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.up.copy( source.up );\n\n\t\tthis.position.copy( source.position );\n\t\tthis.rotation.order = source.rotation.order;\n\t\tthis.quaternion.copy( source.quaternion );\n\t\tthis.scale.copy( source.scale );\n\n\t\tthis.matrix.copy( source.matrix );\n\t\tthis.matrixWorld.copy( source.matrixWorld );\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n\n\t\tthis.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate;\n\n\t\tthis.layers.mask = source.layers.mask;\n\t\tthis.visible = source.visible;\n\n\t\tthis.castShadow = source.castShadow;\n\t\tthis.receiveShadow = source.receiveShadow;\n\n\t\tthis.frustumCulled = source.frustumCulled;\n\t\tthis.renderOrder = source.renderOrder;\n\n\t\tthis.animations = source.animations.slice();\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\tif ( recursive === true ) {\n\n\t\t\tfor ( let i = 0; i < source.children.length; i ++ ) {\n\n\t\t\t\tconst child = source.children[ i ];\n\t\t\t\tthis.add( child.clone() );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nObject3D.DEFAULT_UP = /*@__PURE__*/ new Vector3( 0, 1, 0 );\nObject3D.DEFAULT_MATRIX_AUTO_UPDATE = true;\nObject3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;\n\nconst _v0$1 = /*@__PURE__*/ new Vector3();\nconst _v1$3 = /*@__PURE__*/ new Vector3();\nconst _v2$2 = /*@__PURE__*/ new Vector3();\nconst _v3$1 = /*@__PURE__*/ new Vector3();\n\nconst _vab = /*@__PURE__*/ new Vector3();\nconst _vac = /*@__PURE__*/ new Vector3();\nconst _vbc = /*@__PURE__*/ new Vector3();\nconst _vap = /*@__PURE__*/ new Vector3();\nconst _vbp = /*@__PURE__*/ new Vector3();\nconst _vcp = /*@__PURE__*/ new Vector3();\n\nlet warnedGetUV = false;\n\nclass Triangle {\n\n\tconstructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {\n\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\tthis.c = c;\n\n\t}\n\n\tstatic getNormal( a, b, c, target ) {\n\n\t\ttarget.subVectors( c, b );\n\t\t_v0$1.subVectors( a, b );\n\t\ttarget.cross( _v0$1 );\n\n\t\tconst targetLengthSq = target.lengthSq();\n\t\tif ( targetLengthSq > 0 ) {\n\n\t\t\treturn target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) );\n\n\t\t}\n\n\t\treturn target.set( 0, 0, 0 );\n\n\t}\n\n\t// static/instance method to calculate barycentric coordinates\n\t// based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n\tstatic getBarycoord( point, a, b, c, target ) {\n\n\t\t_v0$1.subVectors( c, a );\n\t\t_v1$3.subVectors( b, a );\n\t\t_v2$2.subVectors( point, a );\n\n\t\tconst dot00 = _v0$1.dot( _v0$1 );\n\t\tconst dot01 = _v0$1.dot( _v1$3 );\n\t\tconst dot02 = _v0$1.dot( _v2$2 );\n\t\tconst dot11 = _v1$3.dot( _v1$3 );\n\t\tconst dot12 = _v1$3.dot( _v2$2 );\n\n\t\tconst denom = ( dot00 * dot11 - dot01 * dot01 );\n\n\t\t// collinear or singular triangle\n\t\tif ( denom === 0 ) {\n\n\t\t\t// arbitrary location outside of triangle?\n\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\treturn target.set( - 2, - 1, - 1 );\n\n\t\t}\n\n\t\tconst invDenom = 1 / denom;\n\t\tconst u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom;\n\t\tconst v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom;\n\n\t\t// barycentric coordinates must always sum to 1\n\t\treturn target.set( 1 - u - v, v, u );\n\n\t}\n\n\tstatic containsPoint( point, a, b, c ) {\n\n\t\tthis.getBarycoord( point, a, b, c, _v3$1 );\n\n\t\treturn ( _v3$1.x >= 0 ) && ( _v3$1.y >= 0 ) && ( ( _v3$1.x + _v3$1.y ) <= 1 );\n\n\t}\n\n\tstatic getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) { // @deprecated, r151\n\n\t\tif ( warnedGetUV === false ) {\n\n\t\t\tconsole.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );\n\n\t\t\twarnedGetUV = true;\n\n\t\t}\n\n\t\treturn this.getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target );\n\n\t}\n\n\tstatic getInterpolation( point, p1, p2, p3, v1, v2, v3, target ) {\n\n\t\tthis.getBarycoord( point, p1, p2, p3, _v3$1 );\n\n\t\ttarget.setScalar( 0 );\n\t\ttarget.addScaledVector( v1, _v3$1.x );\n\t\ttarget.addScaledVector( v2, _v3$1.y );\n\t\ttarget.addScaledVector( v3, _v3$1.z );\n\n\t\treturn target;\n\n\t}\n\n\tstatic isFrontFacing( a, b, c, direction ) {\n\n\t\t_v0$1.subVectors( c, b );\n\t\t_v1$3.subVectors( a, b );\n\n\t\t// strictly front facing\n\t\treturn ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false;\n\n\t}\n\n\tset( a, b, c ) {\n\n\t\tthis.a.copy( a );\n\t\tthis.b.copy( b );\n\t\tthis.c.copy( c );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPointsAndIndices( points, i0, i1, i2 ) {\n\n\t\tthis.a.copy( points[ i0 ] );\n\t\tthis.b.copy( points[ i1 ] );\n\t\tthis.c.copy( points[ i2 ] );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromAttributeAndIndices( attribute, i0, i1, i2 ) {\n\n\t\tthis.a.fromBufferAttribute( attribute, i0 );\n\t\tthis.b.fromBufferAttribute( attribute, i1 );\n\t\tthis.c.fromBufferAttribute( attribute, i2 );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( triangle ) {\n\n\t\tthis.a.copy( triangle.a );\n\t\tthis.b.copy( triangle.b );\n\t\tthis.c.copy( triangle.c );\n\n\t\treturn this;\n\n\t}\n\n\tgetArea() {\n\n\t\t_v0$1.subVectors( this.c, this.b );\n\t\t_v1$3.subVectors( this.a, this.b );\n\n\t\treturn _v0$1.cross( _v1$3 ).length() * 0.5;\n\n\t}\n\n\tgetMidpoint( target ) {\n\n\t\treturn target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 );\n\n\t}\n\n\tgetNormal( target ) {\n\n\t\treturn Triangle.getNormal( this.a, this.b, this.c, target );\n\n\t}\n\n\tgetPlane( target ) {\n\n\t\treturn target.setFromCoplanarPoints( this.a, this.b, this.c );\n\n\t}\n\n\tgetBarycoord( point, target ) {\n\n\t\treturn Triangle.getBarycoord( point, this.a, this.b, this.c, target );\n\n\t}\n\n\tgetUV( point, uv1, uv2, uv3, target ) { // @deprecated, r151\n\n\t\tif ( warnedGetUV === false ) {\n\n\t\t\tconsole.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );\n\n\t\t\twarnedGetUV = true;\n\n\t\t}\n\n\t\treturn Triangle.getInterpolation( point, this.a, this.b, this.c, uv1, uv2, uv3, target );\n\n\t}\n\n\tgetInterpolation( point, v1, v2, v3, target ) {\n\n\t\treturn Triangle.getInterpolation( point, this.a, this.b, this.c, v1, v2, v3, target );\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn Triangle.containsPoint( point, this.a, this.b, this.c );\n\n\t}\n\n\tisFrontFacing( direction ) {\n\n\t\treturn Triangle.isFrontFacing( this.a, this.b, this.c, direction );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsTriangle( this );\n\n\t}\n\n\tclosestPointToPoint( p, target ) {\n\n\t\tconst a = this.a, b = this.b, c = this.c;\n\t\tlet v, w;\n\n\t\t// algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n\t\t// published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n\t\t// under the accompanying license; see chapter 5.1.5 for detailed explanation.\n\t\t// basically, we're distinguishing which of the voronoi regions of the triangle\n\t\t// the point lies in with the minimum amount of redundant computation.\n\n\t\t_vab.subVectors( b, a );\n\t\t_vac.subVectors( c, a );\n\t\t_vap.subVectors( p, a );\n\t\tconst d1 = _vab.dot( _vap );\n\t\tconst d2 = _vac.dot( _vap );\n\t\tif ( d1 <= 0 && d2 <= 0 ) {\n\n\t\t\t// vertex region of A; barycentric coords (1, 0, 0)\n\t\t\treturn target.copy( a );\n\n\t\t}\n\n\t\t_vbp.subVectors( p, b );\n\t\tconst d3 = _vab.dot( _vbp );\n\t\tconst d4 = _vac.dot( _vbp );\n\t\tif ( d3 >= 0 && d4 <= d3 ) {\n\n\t\t\t// vertex region of B; barycentric coords (0, 1, 0)\n\t\t\treturn target.copy( b );\n\n\t\t}\n\n\t\tconst vc = d1 * d4 - d3 * d2;\n\t\tif ( vc <= 0 && d1 >= 0 && d3 <= 0 ) {\n\n\t\t\tv = d1 / ( d1 - d3 );\n\t\t\t// edge region of AB; barycentric coords (1-v, v, 0)\n\t\t\treturn target.copy( a ).addScaledVector( _vab, v );\n\n\t\t}\n\n\t\t_vcp.subVectors( p, c );\n\t\tconst d5 = _vab.dot( _vcp );\n\t\tconst d6 = _vac.dot( _vcp );\n\t\tif ( d6 >= 0 && d5 <= d6 ) {\n\n\t\t\t// vertex region of C; barycentric coords (0, 0, 1)\n\t\t\treturn target.copy( c );\n\n\t\t}\n\n\t\tconst vb = d5 * d2 - d1 * d6;\n\t\tif ( vb <= 0 && d2 >= 0 && d6 <= 0 ) {\n\n\t\t\tw = d2 / ( d2 - d6 );\n\t\t\t// edge region of AC; barycentric coords (1-w, 0, w)\n\t\t\treturn target.copy( a ).addScaledVector( _vac, w );\n\n\t\t}\n\n\t\tconst va = d3 * d6 - d5 * d4;\n\t\tif ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) {\n\n\t\t\t_vbc.subVectors( c, b );\n\t\t\tw = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) );\n\t\t\t// edge region of BC; barycentric coords (0, 1-w, w)\n\t\t\treturn target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC\n\n\t\t}\n\n\t\t// face region\n\t\tconst denom = 1 / ( va + vb + vc );\n\t\t// u = va * denom\n\t\tv = vb * denom;\n\t\tw = vc * denom;\n\n\t\treturn target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w );\n\n\t}\n\n\tequals( triangle ) {\n\n\t\treturn triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c );\n\n\t}\n\n}\n\nlet materialId = 0;\n\nclass Material extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isMaterial = true;\n\n\t\tObject.defineProperty( this, 'id', { value: materialId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Material';\n\n\t\tthis.blending = NormalBlending;\n\t\tthis.side = FrontSide;\n\t\tthis.vertexColors = false;\n\n\t\tthis.opacity = 1;\n\t\tthis.transparent = false;\n\t\tthis.alphaHash = false;\n\n\t\tthis.blendSrc = SrcAlphaFactor;\n\t\tthis.blendDst = OneMinusSrcAlphaFactor;\n\t\tthis.blendEquation = AddEquation;\n\t\tthis.blendSrcAlpha = null;\n\t\tthis.blendDstAlpha = null;\n\t\tthis.blendEquationAlpha = null;\n\n\t\tthis.depthFunc = LessEqualDepth;\n\t\tthis.depthTest = true;\n\t\tthis.depthWrite = true;\n\n\t\tthis.stencilWriteMask = 0xff;\n\t\tthis.stencilFunc = AlwaysStencilFunc;\n\t\tthis.stencilRef = 0;\n\t\tthis.stencilFuncMask = 0xff;\n\t\tthis.stencilFail = KeepStencilOp;\n\t\tthis.stencilZFail = KeepStencilOp;\n\t\tthis.stencilZPass = KeepStencilOp;\n\t\tthis.stencilWrite = false;\n\n\t\tthis.clippingPlanes = null;\n\t\tthis.clipIntersection = false;\n\t\tthis.clipShadows = false;\n\n\t\tthis.shadowSide = null;\n\n\t\tthis.colorWrite = true;\n\n\t\tthis.precision = null; // override the renderer's default precision for this material\n\n\t\tthis.polygonOffset = false;\n\t\tthis.polygonOffsetFactor = 0;\n\t\tthis.polygonOffsetUnits = 0;\n\n\t\tthis.dithering = false;\n\n\t\tthis.alphaToCoverage = false;\n\t\tthis.premultipliedAlpha = false;\n\t\tthis.forceSinglePass = false;\n\n\t\tthis.visible = true;\n\n\t\tthis.toneMapped = true;\n\n\t\tthis.userData = {};\n\n\t\tthis.version = 0;\n\n\t\tthis._alphaTest = 0;\n\n\t}\n\n\tget alphaTest() {\n\n\t\treturn this._alphaTest;\n\n\t}\n\n\tset alphaTest( value ) {\n\n\t\tif ( this._alphaTest > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._alphaTest = value;\n\n\t}\n\n\tonBuild( /* shaderobject, renderer */ ) {}\n\n\tonBeforeRender( /* renderer, scene, camera, geometry, object, group */ ) {}\n\n\tonBeforeCompile( /* shaderobject, renderer */ ) {}\n\n\tcustomProgramCacheKey() {\n\n\t\treturn this.onBeforeCompile.toString();\n\n\t}\n\n\tsetValues( values ) {\n\n\t\tif ( values === undefined ) return;\n\n\t\tfor ( const key in values ) {\n\n\t\t\tconst newValue = values[ key ];\n\n\t\t\tif ( newValue === undefined ) {\n\n\t\t\t\tconsole.warn( `THREE.Material: parameter '${ key }' has value of undefined.` );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tconst currentValue = this[ key ];\n\n\t\t\tif ( currentValue === undefined ) {\n\n\t\t\t\tconsole.warn( `THREE.Material: '${ key }' is not a property of THREE.${ this.type }.` );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( currentValue && currentValue.isColor ) {\n\n\t\t\t\tcurrentValue.set( newValue );\n\n\t\t\t} else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) {\n\n\t\t\t\tcurrentValue.copy( newValue );\n\n\t\t\t} else {\n\n\t\t\t\tthis[ key ] = newValue;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( isRootObject ) {\n\n\t\t\tmeta = {\n\t\t\t\ttextures: {},\n\t\t\t\timages: {}\n\t\t\t};\n\n\t\t}\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Material',\n\t\t\t\tgenerator: 'Material.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard Material serialization\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\n\t\tif ( this.color && this.color.isColor ) data.color = this.color.getHex();\n\n\t\tif ( this.roughness !== undefined ) data.roughness = this.roughness;\n\t\tif ( this.metalness !== undefined ) data.metalness = this.metalness;\n\n\t\tif ( this.sheen !== undefined ) data.sheen = this.sheen;\n\t\tif ( this.sheenColor && this.sheenColor.isColor ) data.sheenColor = this.sheenColor.getHex();\n\t\tif ( this.sheenRoughness !== undefined ) data.sheenRoughness = this.sheenRoughness;\n\t\tif ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex();\n\t\tif ( this.emissiveIntensity && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity;\n\n\t\tif ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();\n\t\tif ( this.specularIntensity !== undefined ) data.specularIntensity = this.specularIntensity;\n\t\tif ( this.specularColor && this.specularColor.isColor ) data.specularColor = this.specularColor.getHex();\n\t\tif ( this.shininess !== undefined ) data.shininess = this.shininess;\n\t\tif ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat;\n\t\tif ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness;\n\n\t\tif ( this.clearcoatMap && this.clearcoatMap.isTexture ) {\n\n\t\t\tdata.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) {\n\n\t\t\tdata.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) {\n\n\t\t\tdata.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid;\n\t\t\tdata.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.iridescence !== undefined ) data.iridescence = this.iridescence;\n\t\tif ( this.iridescenceIOR !== undefined ) data.iridescenceIOR = this.iridescenceIOR;\n\t\tif ( this.iridescenceThicknessRange !== undefined ) data.iridescenceThicknessRange = this.iridescenceThicknessRange;\n\n\t\tif ( this.iridescenceMap && this.iridescenceMap.isTexture ) {\n\n\t\t\tdata.iridescenceMap = this.iridescenceMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture ) {\n\n\t\t\tdata.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.anisotropy !== undefined ) data.anisotropy = this.anisotropy;\n\t\tif ( this.anisotropyRotation !== undefined ) data.anisotropyRotation = this.anisotropyRotation;\n\n\t\tif ( this.anisotropyMap && this.anisotropyMap.isTexture ) {\n\n\t\t\tdata.anisotropyMap = this.anisotropyMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;\n\t\tif ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;\n\t\tif ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;\n\n\t\tif ( this.lightMap && this.lightMap.isTexture ) {\n\n\t\t\tdata.lightMap = this.lightMap.toJSON( meta ).uuid;\n\t\t\tdata.lightMapIntensity = this.lightMapIntensity;\n\n\t\t}\n\n\t\tif ( this.aoMap && this.aoMap.isTexture ) {\n\n\t\t\tdata.aoMap = this.aoMap.toJSON( meta ).uuid;\n\t\t\tdata.aoMapIntensity = this.aoMapIntensity;\n\n\t\t}\n\n\t\tif ( this.bumpMap && this.bumpMap.isTexture ) {\n\n\t\t\tdata.bumpMap = this.bumpMap.toJSON( meta ).uuid;\n\t\t\tdata.bumpScale = this.bumpScale;\n\n\t\t}\n\n\t\tif ( this.normalMap && this.normalMap.isTexture ) {\n\n\t\t\tdata.normalMap = this.normalMap.toJSON( meta ).uuid;\n\t\t\tdata.normalMapType = this.normalMapType;\n\t\t\tdata.normalScale = this.normalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.displacementMap && this.displacementMap.isTexture ) {\n\n\t\t\tdata.displacementMap = this.displacementMap.toJSON( meta ).uuid;\n\t\t\tdata.displacementScale = this.displacementScale;\n\t\t\tdata.displacementBias = this.displacementBias;\n\n\t\t}\n\n\t\tif ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid;\n\t\tif ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid;\n\n\t\tif ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid;\n\t\tif ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid;\n\t\tif ( this.specularIntensityMap && this.specularIntensityMap.isTexture ) data.specularIntensityMap = this.specularIntensityMap.toJSON( meta ).uuid;\n\t\tif ( this.specularColorMap && this.specularColorMap.isTexture ) data.specularColorMap = this.specularColorMap.toJSON( meta ).uuid;\n\n\t\tif ( this.envMap && this.envMap.isTexture ) {\n\n\t\t\tdata.envMap = this.envMap.toJSON( meta ).uuid;\n\n\t\t\tif ( this.combine !== undefined ) data.combine = this.combine;\n\n\t\t}\n\n\t\tif ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;\n\t\tif ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity;\n\t\tif ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio;\n\n\t\tif ( this.gradientMap && this.gradientMap.isTexture ) {\n\n\t\t\tdata.gradientMap = this.gradientMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.transmission !== undefined ) data.transmission = this.transmission;\n\t\tif ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid;\n\t\tif ( this.thickness !== undefined ) data.thickness = this.thickness;\n\t\tif ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;\n\t\tif ( this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity ) data.attenuationDistance = this.attenuationDistance;\n\t\tif ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();\n\n\t\tif ( this.size !== undefined ) data.size = this.size;\n\t\tif ( this.shadowSide !== null ) data.shadowSide = this.shadowSide;\n\t\tif ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation;\n\n\t\tif ( this.blending !== NormalBlending ) data.blending = this.blending;\n\t\tif ( this.side !== FrontSide ) data.side = this.side;\n\t\tif ( this.vertexColors ) data.vertexColors = true;\n\n\t\tif ( this.opacity < 1 ) data.opacity = this.opacity;\n\t\tif ( this.transparent === true ) data.transparent = this.transparent;\n\n\t\tdata.depthFunc = this.depthFunc;\n\t\tdata.depthTest = this.depthTest;\n\t\tdata.depthWrite = this.depthWrite;\n\t\tdata.colorWrite = this.colorWrite;\n\n\t\tdata.stencilWrite = this.stencilWrite;\n\t\tdata.stencilWriteMask = this.stencilWriteMask;\n\t\tdata.stencilFunc = this.stencilFunc;\n\t\tdata.stencilRef = this.stencilRef;\n\t\tdata.stencilFuncMask = this.stencilFuncMask;\n\t\tdata.stencilFail = this.stencilFail;\n\t\tdata.stencilZFail = this.stencilZFail;\n\t\tdata.stencilZPass = this.stencilZPass;\n\n\t\t// rotation (SpriteMaterial)\n\t\tif ( this.rotation !== undefined && this.rotation !== 0 ) data.rotation = this.rotation;\n\n\t\tif ( this.polygonOffset === true ) data.polygonOffset = true;\n\t\tif ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;\n\t\tif ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;\n\n\t\tif ( this.linewidth !== undefined && this.linewidth !== 1 ) data.linewidth = this.linewidth;\n\t\tif ( this.dashSize !== undefined ) data.dashSize = this.dashSize;\n\t\tif ( this.gapSize !== undefined ) data.gapSize = this.gapSize;\n\t\tif ( this.scale !== undefined ) data.scale = this.scale;\n\n\t\tif ( this.dithering === true ) data.dithering = true;\n\n\t\tif ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;\n\t\tif ( this.alphaHash === true ) data.alphaHash = this.alphaHash;\n\t\tif ( this.alphaToCoverage === true ) data.alphaToCoverage = this.alphaToCoverage;\n\t\tif ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;\n\t\tif ( this.forceSinglePass === true ) data.forceSinglePass = this.forceSinglePass;\n\n\t\tif ( this.wireframe === true ) data.wireframe = this.wireframe;\n\t\tif ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth;\n\t\tif ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;\n\t\tif ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;\n\n\t\tif ( this.flatShading === true ) data.flatShading = this.flatShading;\n\n\t\tif ( this.visible === false ) data.visible = false;\n\n\t\tif ( this.toneMapped === false ) data.toneMapped = false;\n\n\t\tif ( this.fog === false ) data.fog = false;\n\n\t\tif ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;\n\n\t\t// TODO: Copied from Object3D.toJSON\n\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t\tif ( isRootObject ) {\n\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\n\t\t\tif ( textures.length > 0 ) data.textures = textures;\n\t\t\tif ( images.length > 0 ) data.images = images;\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.blending = source.blending;\n\t\tthis.side = source.side;\n\t\tthis.vertexColors = source.vertexColors;\n\n\t\tthis.opacity = source.opacity;\n\t\tthis.transparent = source.transparent;\n\n\t\tthis.blendSrc = source.blendSrc;\n\t\tthis.blendDst = source.blendDst;\n\t\tthis.blendEquation = source.blendEquation;\n\t\tthis.blendSrcAlpha = source.blendSrcAlpha;\n\t\tthis.blendDstAlpha = source.blendDstAlpha;\n\t\tthis.blendEquationAlpha = source.blendEquationAlpha;\n\n\t\tthis.depthFunc = source.depthFunc;\n\t\tthis.depthTest = source.depthTest;\n\t\tthis.depthWrite = source.depthWrite;\n\n\t\tthis.stencilWriteMask = source.stencilWriteMask;\n\t\tthis.stencilFunc = source.stencilFunc;\n\t\tthis.stencilRef = source.stencilRef;\n\t\tthis.stencilFuncMask = source.stencilFuncMask;\n\t\tthis.stencilFail = source.stencilFail;\n\t\tthis.stencilZFail = source.stencilZFail;\n\t\tthis.stencilZPass = source.stencilZPass;\n\t\tthis.stencilWrite = source.stencilWrite;\n\n\t\tconst srcPlanes = source.clippingPlanes;\n\t\tlet dstPlanes = null;\n\n\t\tif ( srcPlanes !== null ) {\n\n\t\t\tconst n = srcPlanes.length;\n\t\t\tdstPlanes = new Array( n );\n\n\t\t\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\t\t\tdstPlanes[ i ] = srcPlanes[ i ].clone();\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.clippingPlanes = dstPlanes;\n\t\tthis.clipIntersection = source.clipIntersection;\n\t\tthis.clipShadows = source.clipShadows;\n\n\t\tthis.shadowSide = source.shadowSide;\n\n\t\tthis.colorWrite = source.colorWrite;\n\n\t\tthis.precision = source.precision;\n\n\t\tthis.polygonOffset = source.polygonOffset;\n\t\tthis.polygonOffsetFactor = source.polygonOffsetFactor;\n\t\tthis.polygonOffsetUnits = source.polygonOffsetUnits;\n\n\t\tthis.dithering = source.dithering;\n\n\t\tthis.alphaTest = source.alphaTest;\n\t\tthis.alphaHash = source.alphaHash;\n\t\tthis.alphaToCoverage = source.alphaToCoverage;\n\t\tthis.premultipliedAlpha = source.premultipliedAlpha;\n\t\tthis.forceSinglePass = source.forceSinglePass;\n\n\t\tthis.visible = source.visible;\n\n\t\tthis.toneMapped = source.toneMapped;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n}\n\nconst _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,\n\t'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,\n\t'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50,\n\t'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B,\n\t'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B,\n\t'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F,\n\t'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3,\n\t'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222,\n\t'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700,\n\t'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4,\n\t'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00,\n\t'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3,\n\t'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA,\n\t'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32,\n\t'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3,\n\t'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC,\n\t'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD,\n\t'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6,\n\t'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9,\n\t'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F,\n\t'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE,\n\t'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA,\n\t'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0,\n\t'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 };\n\nconst _hslA = { h: 0, s: 0, l: 0 };\nconst _hslB = { h: 0, s: 0, l: 0 };\n\nfunction hue2rgb( p, q, t ) {\n\n\tif ( t < 0 ) t += 1;\n\tif ( t > 1 ) t -= 1;\n\tif ( t < 1 / 6 ) return p + ( q - p ) * 6 * t;\n\tif ( t < 1 / 2 ) return q;\n\tif ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t );\n\treturn p;\n\n}\n\nclass Color {\n\n\tconstructor( r, g, b ) {\n\n\t\tthis.isColor = true;\n\n\t\tthis.r = 1;\n\t\tthis.g = 1;\n\t\tthis.b = 1;\n\n\t\treturn this.set( r, g, b );\n\n\t}\n\n\tset( r, g, b ) {\n\n\t\tif ( g === undefined && b === undefined ) {\n\n\t\t\t// r is THREE.Color, hex or string\n\n\t\t\tconst value = r;\n\n\t\t\tif ( value && value.isColor ) {\n\n\t\t\t\tthis.copy( value );\n\n\t\t\t} else if ( typeof value === 'number' ) {\n\n\t\t\t\tthis.setHex( value );\n\n\t\t\t} else if ( typeof value === 'string' ) {\n\n\t\t\t\tthis.setStyle( value );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.setRGB( r, g, b );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.r = scalar;\n\t\tthis.g = scalar;\n\t\tthis.b = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetHex( hex, colorSpace = SRGBColorSpace ) {\n\n\t\thex = Math.floor( hex );\n\n\t\tthis.r = ( hex >> 16 & 255 ) / 255;\n\t\tthis.g = ( hex >> 8 & 255 ) / 255;\n\t\tthis.b = ( hex & 255 ) / 255;\n\n\t\tColorManagement.toWorkingColorSpace( this, colorSpace );\n\n\t\treturn this;\n\n\t}\n\n\tsetRGB( r, g, b, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\tthis.r = r;\n\t\tthis.g = g;\n\t\tthis.b = b;\n\n\t\tColorManagement.toWorkingColorSpace( this, colorSpace );\n\n\t\treturn this;\n\n\t}\n\n\tsetHSL( h, s, l, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\th = euclideanModulo( h, 1 );\n\t\ts = clamp( s, 0, 1 );\n\t\tl = clamp( l, 0, 1 );\n\n\t\tif ( s === 0 ) {\n\n\t\t\tthis.r = this.g = this.b = l;\n\n\t\t} else {\n\n\t\t\tconst p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s );\n\t\t\tconst q = ( 2 * l ) - p;\n\n\t\t\tthis.r = hue2rgb( q, p, h + 1 / 3 );\n\t\t\tthis.g = hue2rgb( q, p, h );\n\t\t\tthis.b = hue2rgb( q, p, h - 1 / 3 );\n\n\t\t}\n\n\t\tColorManagement.toWorkingColorSpace( this, colorSpace );\n\n\t\treturn this;\n\n\t}\n\n\tsetStyle( style, colorSpace = SRGBColorSpace ) {\n\n\t\tfunction handleAlpha( string ) {\n\n\t\t\tif ( string === undefined ) return;\n\n\t\t\tif ( parseFloat( string ) < 1 ) {\n\n\t\t\t\tconsole.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' );\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tlet m;\n\n\t\tif ( m = /^(\\w+)\\(([^\\)]*)\\)/.exec( style ) ) {\n\n\t\t\t// rgb / hsl\n\n\t\t\tlet color;\n\t\t\tconst name = m[ 1 ];\n\t\t\tconst components = m[ 2 ];\n\n\t\t\tswitch ( name ) {\n\n\t\t\t\tcase 'rgb':\n\t\t\t\tcase 'rgba':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(255,0,0) rgba(255,0,0,0.5)\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setRGB(\n\t\t\t\t\t\t\tMath.min( 255, parseInt( color[ 1 ], 10 ) ) / 255,\n\t\t\t\t\t\t\tMath.min( 255, parseInt( color[ 2 ], 10 ) ) / 255,\n\t\t\t\t\t\t\tMath.min( 255, parseInt( color[ 3 ], 10 ) ) / 255,\n\t\t\t\t\t\t\tcolorSpace\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setRGB(\n\t\t\t\t\t\t\tMath.min( 100, parseInt( color[ 1 ], 10 ) ) / 100,\n\t\t\t\t\t\t\tMath.min( 100, parseInt( color[ 2 ], 10 ) ) / 100,\n\t\t\t\t\t\t\tMath.min( 100, parseInt( color[ 3 ], 10 ) ) / 100,\n\t\t\t\t\t\t\tcolorSpace\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hsl':\n\t\t\t\tcase 'hsla':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setHSL(\n\t\t\t\t\t\t\tparseFloat( color[ 1 ] ) / 360,\n\t\t\t\t\t\t\tparseFloat( color[ 2 ] ) / 100,\n\t\t\t\t\t\t\tparseFloat( color[ 3 ] ) / 100,\n\t\t\t\t\t\t\tcolorSpace\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tconsole.warn( 'THREE.Color: Unknown color model ' + style );\n\n\t\t\t}\n\n\t\t} else if ( m = /^\\#([A-Fa-f\\d]+)$/.exec( style ) ) {\n\n\t\t\t// hex color\n\n\t\t\tconst hex = m[ 1 ];\n\t\t\tconst size = hex.length;\n\n\t\t\tif ( size === 3 ) {\n\n\t\t\t\t// #ff0\n\t\t\t\treturn this.setRGB(\n\t\t\t\t\tparseInt( hex.charAt( 0 ), 16 ) / 15,\n\t\t\t\t\tparseInt( hex.charAt( 1 ), 16 ) / 15,\n\t\t\t\t\tparseInt( hex.charAt( 2 ), 16 ) / 15,\n\t\t\t\t\tcolorSpace\n\t\t\t\t);\n\n\t\t\t} else if ( size === 6 ) {\n\n\t\t\t\t// #ff0000\n\t\t\t\treturn this.setHex( parseInt( hex, 16 ), colorSpace );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.Color: Invalid hex color ' + style );\n\n\t\t\t}\n\n\t\t} else if ( style && style.length > 0 ) {\n\n\t\t\treturn this.setColorName( style, colorSpace );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetColorName( style, colorSpace = SRGBColorSpace ) {\n\n\t\t// color keywords\n\t\tconst hex = _colorKeywords[ style.toLowerCase() ];\n\n\t\tif ( hex !== undefined ) {\n\n\t\t\t// red\n\t\t\tthis.setHex( hex, colorSpace );\n\n\t\t} else {\n\n\t\t\t// unknown color\n\t\t\tconsole.warn( 'THREE.Color: Unknown color ' + style );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.r, this.g, this.b );\n\n\t}\n\n\tcopy( color ) {\n\n\t\tthis.r = color.r;\n\t\tthis.g = color.g;\n\t\tthis.b = color.b;\n\n\t\treturn this;\n\n\t}\n\n\tcopySRGBToLinear( color ) {\n\n\t\tthis.r = SRGBToLinear( color.r );\n\t\tthis.g = SRGBToLinear( color.g );\n\t\tthis.b = SRGBToLinear( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tcopyLinearToSRGB( color ) {\n\n\t\tthis.r = LinearToSRGB( color.r );\n\t\tthis.g = LinearToSRGB( color.g );\n\t\tthis.b = LinearToSRGB( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tconvertSRGBToLinear() {\n\n\t\tthis.copySRGBToLinear( this );\n\n\t\treturn this;\n\n\t}\n\n\tconvertLinearToSRGB() {\n\n\t\tthis.copyLinearToSRGB( this );\n\n\t\treturn this;\n\n\t}\n\n\tgetHex( colorSpace = SRGBColorSpace ) {\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\treturn Math.round( clamp( _color.r * 255, 0, 255 ) ) * 65536 + Math.round( clamp( _color.g * 255, 0, 255 ) ) * 256 + Math.round( clamp( _color.b * 255, 0, 255 ) );\n\n\t}\n\n\tgetHexString( colorSpace = SRGBColorSpace ) {\n\n\t\treturn ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( - 6 );\n\n\t}\n\n\tgetHSL( target, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\tconst r = _color.r, g = _color.g, b = _color.b;\n\n\t\tconst max = Math.max( r, g, b );\n\t\tconst min = Math.min( r, g, b );\n\n\t\tlet hue, saturation;\n\t\tconst lightness = ( min + max ) / 2.0;\n\n\t\tif ( min === max ) {\n\n\t\t\thue = 0;\n\t\t\tsaturation = 0;\n\n\t\t} else {\n\n\t\t\tconst delta = max - min;\n\n\t\t\tsaturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min );\n\n\t\t\tswitch ( max ) {\n\n\t\t\t\tcase r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break;\n\t\t\t\tcase g: hue = ( b - r ) / delta + 2; break;\n\t\t\t\tcase b: hue = ( r - g ) / delta + 4; break;\n\n\t\t\t}\n\n\t\t\thue /= 6;\n\n\t\t}\n\n\t\ttarget.h = hue;\n\t\ttarget.s = saturation;\n\t\ttarget.l = lightness;\n\n\t\treturn target;\n\n\t}\n\n\tgetRGB( target, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\ttarget.r = _color.r;\n\t\ttarget.g = _color.g;\n\t\ttarget.b = _color.b;\n\n\t\treturn target;\n\n\t}\n\n\tgetStyle( colorSpace = SRGBColorSpace ) {\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\tconst r = _color.r, g = _color.g, b = _color.b;\n\n\t\tif ( colorSpace !== SRGBColorSpace ) {\n\n\t\t\t// Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/).\n\t\t\treturn `color(${ colorSpace } ${ r.toFixed( 3 ) } ${ g.toFixed( 3 ) } ${ b.toFixed( 3 ) })`;\n\n\t\t}\n\n\t\treturn `rgb(${ Math.round( r * 255 ) },${ Math.round( g * 255 ) },${ Math.round( b * 255 ) })`;\n\n\t}\n\n\toffsetHSL( h, s, l ) {\n\n\t\tthis.getHSL( _hslA );\n\n\t\t_hslA.h += h; _hslA.s += s; _hslA.l += l;\n\n\t\tthis.setHSL( _hslA.h, _hslA.s, _hslA.l );\n\n\t\treturn this;\n\n\t}\n\n\tadd( color ) {\n\n\t\tthis.r += color.r;\n\t\tthis.g += color.g;\n\t\tthis.b += color.b;\n\n\t\treturn this;\n\n\t}\n\n\taddColors( color1, color2 ) {\n\n\t\tthis.r = color1.r + color2.r;\n\t\tthis.g = color1.g + color2.g;\n\t\tthis.b = color1.b + color2.b;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.r += s;\n\t\tthis.g += s;\n\t\tthis.b += s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( color ) {\n\n\t\tthis.r = Math.max( 0, this.r - color.r );\n\t\tthis.g = Math.max( 0, this.g - color.g );\n\t\tthis.b = Math.max( 0, this.b - color.b );\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( color ) {\n\n\t\tthis.r *= color.r;\n\t\tthis.g *= color.g;\n\t\tthis.b *= color.b;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tthis.r *= s;\n\t\tthis.g *= s;\n\t\tthis.b *= s;\n\n\t\treturn this;\n\n\t}\n\n\tlerp( color, alpha ) {\n\n\t\tthis.r += ( color.r - this.r ) * alpha;\n\t\tthis.g += ( color.g - this.g ) * alpha;\n\t\tthis.b += ( color.b - this.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpColors( color1, color2, alpha ) {\n\n\t\tthis.r = color1.r + ( color2.r - color1.r ) * alpha;\n\t\tthis.g = color1.g + ( color2.g - color1.g ) * alpha;\n\t\tthis.b = color1.b + ( color2.b - color1.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpHSL( color, alpha ) {\n\n\t\tthis.getHSL( _hslA );\n\t\tcolor.getHSL( _hslB );\n\n\t\tconst h = lerp( _hslA.h, _hslB.h, alpha );\n\t\tconst s = lerp( _hslA.s, _hslB.s, alpha );\n\t\tconst l = lerp( _hslA.l, _hslB.l, alpha );\n\n\t\tthis.setHSL( h, s, l );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\tthis.r = v.x;\n\t\tthis.g = v.y;\n\t\tthis.b = v.z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst r = this.r, g = this.g, b = this.b;\n\t\tconst e = m.elements;\n\n\t\tthis.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b;\n\t\tthis.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b;\n\t\tthis.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b;\n\n\t\treturn this;\n\n\t}\n\n\tequals( c ) {\n\n\t\treturn ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.r = array[ offset ];\n\t\tthis.g = array[ offset + 1 ];\n\t\tthis.b = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.r;\n\t\tarray[ offset + 1 ] = this.g;\n\t\tarray[ offset + 2 ] = this.b;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.r = attribute.getX( index );\n\t\tthis.g = attribute.getY( index );\n\t\tthis.b = attribute.getZ( index );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.getHex();\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.r;\n\t\tyield this.g;\n\t\tyield this.b;\n\n\t}\n\n}\n\nconst _color = /*@__PURE__*/ new Color();\n\nColor.NAMES = _colorKeywords;\n\nclass MeshBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshBasicMaterial = true;\n\n\t\tthis.type = 'MeshBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // emissive\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\n// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf\n\nconst _tables = /*@__PURE__*/ _generateTables();\n\nfunction _generateTables() {\n\n\t// float32 to float16 helpers\n\n\tconst buffer = new ArrayBuffer( 4 );\n\tconst floatView = new Float32Array( buffer );\n\tconst uint32View = new Uint32Array( buffer );\n\n\tconst baseTable = new Uint32Array( 512 );\n\tconst shiftTable = new Uint32Array( 512 );\n\n\tfor ( let i = 0; i < 256; ++ i ) {\n\n\t\tconst e = i - 127;\n\n\t\t// very small number (0, -0)\n\n\t\tif ( e < - 27 ) {\n\n\t\t\tbaseTable[ i ] = 0x0000;\n\t\t\tbaseTable[ i | 0x100 ] = 0x8000;\n\t\t\tshiftTable[ i ] = 24;\n\t\t\tshiftTable[ i | 0x100 ] = 24;\n\n\t\t\t// small number (denorm)\n\n\t\t} else if ( e < - 14 ) {\n\n\t\t\tbaseTable[ i ] = 0x0400 >> ( - e - 14 );\n\t\t\tbaseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000;\n\t\t\tshiftTable[ i ] = - e - 1;\n\t\t\tshiftTable[ i | 0x100 ] = - e - 1;\n\n\t\t\t// normal number\n\n\t\t} else if ( e <= 15 ) {\n\n\t\t\tbaseTable[ i ] = ( e + 15 ) << 10;\n\t\t\tbaseTable[ i | 0x100 ] = ( ( e + 15 ) << 10 ) | 0x8000;\n\t\t\tshiftTable[ i ] = 13;\n\t\t\tshiftTable[ i | 0x100 ] = 13;\n\n\t\t\t// large number (Infinity, -Infinity)\n\n\t\t} else if ( e < 128 ) {\n\n\t\t\tbaseTable[ i ] = 0x7c00;\n\t\t\tbaseTable[ i | 0x100 ] = 0xfc00;\n\t\t\tshiftTable[ i ] = 24;\n\t\t\tshiftTable[ i | 0x100 ] = 24;\n\n\t\t\t// stay (NaN, Infinity, -Infinity)\n\n\t\t} else {\n\n\t\t\tbaseTable[ i ] = 0x7c00;\n\t\t\tbaseTable[ i | 0x100 ] = 0xfc00;\n\t\t\tshiftTable[ i ] = 13;\n\t\t\tshiftTable[ i | 0x100 ] = 13;\n\n\t\t}\n\n\t}\n\n\t// float16 to float32 helpers\n\n\tconst mantissaTable = new Uint32Array( 2048 );\n\tconst exponentTable = new Uint32Array( 64 );\n\tconst offsetTable = new Uint32Array( 64 );\n\n\tfor ( let i = 1; i < 1024; ++ i ) {\n\n\t\tlet m = i << 13; // zero pad mantissa bits\n\t\tlet e = 0; // zero exponent\n\n\t\t// normalized\n\t\twhile ( ( m & 0x00800000 ) === 0 ) {\n\n\t\t\tm <<= 1;\n\t\t\te -= 0x00800000; // decrement exponent\n\n\t\t}\n\n\t\tm &= ~ 0x00800000; // clear leading 1 bit\n\t\te += 0x38800000; // adjust bias\n\n\t\tmantissaTable[ i ] = m | e;\n\n\t}\n\n\tfor ( let i = 1024; i < 2048; ++ i ) {\n\n\t\tmantissaTable[ i ] = 0x38000000 + ( ( i - 1024 ) << 13 );\n\n\t}\n\n\tfor ( let i = 1; i < 31; ++ i ) {\n\n\t\texponentTable[ i ] = i << 23;\n\n\t}\n\n\texponentTable[ 31 ] = 0x47800000;\n\texponentTable[ 32 ] = 0x80000000;\n\n\tfor ( let i = 33; i < 63; ++ i ) {\n\n\t\texponentTable[ i ] = 0x80000000 + ( ( i - 32 ) << 23 );\n\n\t}\n\n\texponentTable[ 63 ] = 0xc7800000;\n\n\tfor ( let i = 1; i < 64; ++ i ) {\n\n\t\tif ( i !== 32 ) {\n\n\t\t\toffsetTable[ i ] = 1024;\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tfloatView: floatView,\n\t\tuint32View: uint32View,\n\t\tbaseTable: baseTable,\n\t\tshiftTable: shiftTable,\n\t\tmantissaTable: mantissaTable,\n\t\texponentTable: exponentTable,\n\t\toffsetTable: offsetTable\n\t};\n\n}\n\n// float32 to float16\n\nfunction toHalfFloat( val ) {\n\n\tif ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' );\n\n\tval = clamp( val, - 65504, 65504 );\n\n\t_tables.floatView[ 0 ] = val;\n\tconst f = _tables.uint32View[ 0 ];\n\tconst e = ( f >> 23 ) & 0x1ff;\n\treturn _tables.baseTable[ e ] + ( ( f & 0x007fffff ) >> _tables.shiftTable[ e ] );\n\n}\n\n// float16 to float32\n\nfunction fromHalfFloat( val ) {\n\n\tconst m = val >> 10;\n\t_tables.uint32View[ 0 ] = _tables.mantissaTable[ _tables.offsetTable[ m ] + ( val & 0x3ff ) ] + _tables.exponentTable[ m ];\n\treturn _tables.floatView[ 0 ];\n\n}\n\nconst DataUtils = {\n\ttoHalfFloat: toHalfFloat,\n\tfromHalfFloat: fromHalfFloat,\n};\n\nconst _vector$8 = /*@__PURE__*/ new Vector3();\nconst _vector2$1 = /*@__PURE__*/ new Vector2();\n\nclass BufferAttribute {\n\n\tconstructor( array, itemSize, normalized = false ) {\n\n\t\tif ( Array.isArray( array ) ) {\n\n\t\t\tthrow new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );\n\n\t\t}\n\n\t\tthis.isBufferAttribute = true;\n\n\t\tthis.name = '';\n\n\t\tthis.array = array;\n\t\tthis.itemSize = itemSize;\n\t\tthis.count = array !== undefined ? array.length / itemSize : 0;\n\t\tthis.normalized = normalized;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\t\tthis.gpuType = FloatType;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.itemSize = source.itemSize;\n\t\tthis.count = source.count;\n\t\tthis.normalized = source.normalized;\n\n\t\tthis.usage = source.usage;\n\t\tthis.gpuType = source.gpuType;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.itemSize;\n\t\tindex2 *= attribute.itemSize;\n\n\t\tfor ( let i = 0, l = this.itemSize; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyArray( array ) {\n\n\t\tthis.array.set( array );\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tif ( this.itemSize === 2 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector2$1.fromBufferAttribute( this, i );\n\t\t\t\t_vector2$1.applyMatrix3( m );\n\n\t\t\t\tthis.setXY( i, _vector2$1.x, _vector2$1.y );\n\n\t\t\t}\n\n\t\t} else if ( this.itemSize === 3 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector$8.fromBufferAttribute( this, i );\n\t\t\t\t_vector$8.applyMatrix3( m );\n\n\t\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( this, i );\n\n\t\t\t_vector$8.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( this, i );\n\n\t\t\t_vector$8.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( this, i );\n\n\t\t\t_vector$8.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\t// Matching BufferAttribute constructor, do not normalize the array.\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index, component ) {\n\n\t\tlet value = this.array[ index * this.itemSize + component ];\n\n\t\tif ( this.normalized ) value = denormalize( value, this.array );\n\n\t\treturn value;\n\n\t}\n\n\tsetComponent( index, component, value ) {\n\n\t\tif ( this.normalized ) value = normalize( value, this.array );\n\n\t\tthis.array[ index * this.itemSize + component ] = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\tlet x = this.array[ index * this.itemSize ];\n\n\t\tif ( this.normalized ) x = denormalize( x, this.array );\n\n\t\treturn x;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tif ( this.normalized ) x = normalize( x, this.array );\n\n\t\tthis.array[ index * this.itemSize ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tgetY( index ) {\n\n\t\tlet y = this.array[ index * this.itemSize + 1 ];\n\n\t\tif ( this.normalized ) y = denormalize( y, this.array );\n\n\t\treturn y;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tif ( this.normalized ) y = normalize( y, this.array );\n\n\t\tthis.array[ index * this.itemSize + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\tlet z = this.array[ index * this.itemSize + 2 ];\n\n\t\tif ( this.normalized ) z = denormalize( z, this.array );\n\n\t\treturn z;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tif ( this.normalized ) z = normalize( z, this.array );\n\n\t\tthis.array[ index * this.itemSize + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tgetW( index ) {\n\n\t\tlet w = this.array[ index * this.itemSize + 3 ];\n\n\t\tif ( this.normalized ) w = denormalize( w, this.array );\n\n\t\treturn w;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tif ( this.normalized ) w = normalize( w, this.array );\n\n\t\tthis.array[ index * this.itemSize + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\t\t\tw = normalize( w, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\t\tthis.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.array, this.itemSize ).copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\titemSize: this.itemSize,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tarray: Array.from( this.array ),\n\t\t\tnormalized: this.normalized\n\t\t};\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( this.usage !== StaticDrawUsage ) data.usage = this.usage;\n\t\tif ( this.updateRange.offset !== 0 || this.updateRange.count !== - 1 ) data.updateRange = this.updateRange;\n\n\t\treturn data;\n\n\t}\n\n}\n\n//\n\nclass Int8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8ClampedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8ClampedArray( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t\tthis.isFloat16BufferAttribute = true;\n\n\t}\n\n\tgetX( index ) {\n\n\t\tlet x = fromHalfFloat( this.array[ index * this.itemSize ] );\n\n\t\tif ( this.normalized ) x = denormalize( x, this.array );\n\n\t\treturn x;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tif ( this.normalized ) x = normalize( x, this.array );\n\n\t\tthis.array[ index * this.itemSize ] = toHalfFloat( x );\n\n\t\treturn this;\n\n\t}\n\n\tgetY( index ) {\n\n\t\tlet y = fromHalfFloat( this.array[ index * this.itemSize + 1 ] );\n\n\t\tif ( this.normalized ) y = denormalize( y, this.array );\n\n\t\treturn y;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tif ( this.normalized ) y = normalize( y, this.array );\n\n\t\tthis.array[ index * this.itemSize + 1 ] = toHalfFloat( y );\n\n\t\treturn this;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\tlet z = fromHalfFloat( this.array[ index * this.itemSize + 2 ] );\n\n\t\tif ( this.normalized ) z = denormalize( z, this.array );\n\n\t\treturn z;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tif ( this.normalized ) z = normalize( z, this.array );\n\n\t\tthis.array[ index * this.itemSize + 2 ] = toHalfFloat( z );\n\n\t\treturn this;\n\n\t}\n\n\tgetW( index ) {\n\n\t\tlet w = fromHalfFloat( this.array[ index * this.itemSize + 3 ] );\n\n\t\tif ( this.normalized ) w = denormalize( w, this.array );\n\n\t\treturn w;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tif ( this.normalized ) w = normalize( w, this.array );\n\n\t\tthis.array[ index * this.itemSize + 3 ] = toHalfFloat( w );\n\n\t\treturn this;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = toHalfFloat( x );\n\t\tthis.array[ index + 1 ] = toHalfFloat( y );\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = toHalfFloat( x );\n\t\tthis.array[ index + 1 ] = toHalfFloat( y );\n\t\tthis.array[ index + 2 ] = toHalfFloat( z );\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\t\t\tw = normalize( w, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = toHalfFloat( x );\n\t\tthis.array[ index + 1 ] = toHalfFloat( y );\n\t\tthis.array[ index + 2 ] = toHalfFloat( z );\n\t\tthis.array[ index + 3 ] = toHalfFloat( w );\n\n\t\treturn this;\n\n\t}\n\n}\n\n\nclass Float32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float64BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float64Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nlet _id$1 = 0;\n\nconst _m1 = /*@__PURE__*/ new Matrix4();\nconst _obj = /*@__PURE__*/ new Object3D();\nconst _offset = /*@__PURE__*/ new Vector3();\nconst _box$1 = /*@__PURE__*/ new Box3();\nconst _boxMorphTargets = /*@__PURE__*/ new Box3();\nconst _vector$7 = /*@__PURE__*/ new Vector3();\n\nclass BufferGeometry extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isBufferGeometry = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _id$1 ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'BufferGeometry';\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\n\t\tthis.morphAttributes = {};\n\t\tthis.morphTargetsRelative = false;\n\n\t\tthis.groups = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\tthis.drawRange = { start: 0, count: Infinity };\n\n\t\tthis.userData = {};\n\n\t}\n\n\tgetIndex() {\n\n\t\treturn this.index;\n\n\t}\n\n\tsetIndex( index ) {\n\n\t\tif ( Array.isArray( index ) ) {\n\n\t\t\tthis.index = new ( arrayNeedsUint32( index ) ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );\n\n\t\t} else {\n\n\t\t\tthis.index = index;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetAttribute( name ) {\n\n\t\treturn this.attributes[ name ];\n\n\t}\n\n\tsetAttribute( name, attribute ) {\n\n\t\tthis.attributes[ name ] = attribute;\n\n\t\treturn this;\n\n\t}\n\n\tdeleteAttribute( name ) {\n\n\t\tdelete this.attributes[ name ];\n\n\t\treturn this;\n\n\t}\n\n\thasAttribute( name ) {\n\n\t\treturn this.attributes[ name ] !== undefined;\n\n\t}\n\n\taddGroup( start, count, materialIndex = 0 ) {\n\n\t\tthis.groups.push( {\n\n\t\t\tstart: start,\n\t\t\tcount: count,\n\t\t\tmaterialIndex: materialIndex\n\n\t\t} );\n\n\t}\n\n\tclearGroups() {\n\n\t\tthis.groups = [];\n\n\t}\n\n\tsetDrawRange( start, count ) {\n\n\t\tthis.drawRange.start = start;\n\t\tthis.drawRange.count = count;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tconst position = this.attributes.position;\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tposition.applyMatrix4( matrix );\n\n\t\t\tposition.needsUpdate = true;\n\n\t\t}\n\n\t\tconst normal = this.attributes.normal;\n\n\t\tif ( normal !== undefined ) {\n\n\t\t\tconst normalMatrix = new Matrix3().getNormalMatrix( matrix );\n\n\t\t\tnormal.applyNormalMatrix( normalMatrix );\n\n\t\t\tnormal.needsUpdate = true;\n\n\t\t}\n\n\t\tconst tangent = this.attributes.tangent;\n\n\t\tif ( tangent !== undefined ) {\n\n\t\t\ttangent.transformDirection( matrix );\n\n\t\t\ttangent.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tthis.computeBoundingSphere();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\t_m1.makeRotationFromQuaternion( q );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\t// rotate geometry around world x-axis\n\n\t\t_m1.makeRotationX( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateY( angle ) {\n\n\t\t// rotate geometry around world y-axis\n\n\t\t_m1.makeRotationY( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\t// rotate geometry around world z-axis\n\n\t\t_m1.makeRotationZ( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( x, y, z ) {\n\n\t\t// translate geometry\n\n\t\t_m1.makeTranslation( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tscale( x, y, z ) {\n\n\t\t// scale geometry\n\n\t\t_m1.makeScale( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tlookAt( vector ) {\n\n\t\t_obj.lookAt( vector );\n\n\t\t_obj.updateMatrix();\n\n\t\tthis.applyMatrix4( _obj.matrix );\n\n\t\treturn this;\n\n\t}\n\n\tcenter() {\n\n\t\tthis.computeBoundingBox();\n\n\t\tthis.boundingBox.getCenter( _offset ).negate();\n\n\t\tthis.translate( _offset.x, _offset.y, _offset.z );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tconst position = [];\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tconst point = points[ i ];\n\t\t\tposition.push( point.x, point.y, point.z || 0 );\n\n\t\t}\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) );\n\n\t\treturn this;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingBox.set(\n\t\t\t\tnew Vector3( - Infinity, - Infinity, - Infinity ),\n\t\t\t\tnew Vector3( + Infinity, + Infinity, + Infinity )\n\t\t\t);\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tthis.boundingBox.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_box$1.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$7.addVectors( this.boundingBox.min, _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$7 );\n\n\t\t\t\t\t\t_vector$7.addVectors( this.boundingBox.max, _box$1.max );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$7 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.boundingBox.makeEmpty();\n\n\t\t}\n\n\t\tif ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingSphere.set( new Vector3(), Infinity );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position ) {\n\n\t\t\t// first, find the center of the bounding sphere\n\n\t\t\tconst center = this.boundingSphere.center;\n\n\t\t\t_box$1.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_boxMorphTargets.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$7.addVectors( _box$1.min, _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$7 );\n\n\t\t\t\t\t\t_vector$7.addVectors( _box$1.max, _boxMorphTargets.max );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$7 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_box$1.getCenter( center );\n\n\t\t\t// second, try to find a boundingSphere with a radius smaller than the\n\t\t\t// boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n\n\t\t\tlet maxRadiusSq = 0;\n\n\t\t\tfor ( let i = 0, il = position.count; i < il; i ++ ) {\n\n\t\t\t\t_vector$7.fromBufferAttribute( position, i );\n\n\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$7 ) );\n\n\t\t\t}\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\tconst morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t\t\t\tfor ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) {\n\n\t\t\t\t\t\t_vector$7.fromBufferAttribute( morphAttribute, j );\n\n\t\t\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t\t\t_offset.fromBufferAttribute( position, j );\n\t\t\t\t\t\t\t_vector$7.add( _offset );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$7 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.boundingSphere.radius = Math.sqrt( maxRadiusSq );\n\n\t\t\tif ( isNaN( this.boundingSphere.radius ) ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeTangents() {\n\n\t\tconst index = this.index;\n\t\tconst attributes = this.attributes;\n\n\t\t// based on http://www.terathon.com/code/tangent.html\n\t\t// (per vertex tangents)\n\n\t\tif ( index === null ||\n\t\t\t attributes.position === undefined ||\n\t\t\t attributes.normal === undefined ||\n\t\t\t attributes.uv === undefined ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst indices = index.array;\n\t\tconst positions = attributes.position.array;\n\t\tconst normals = attributes.normal.array;\n\t\tconst uvs = attributes.uv.array;\n\n\t\tconst nVertices = positions.length / 3;\n\n\t\tif ( this.hasAttribute( 'tangent' ) === false ) {\n\n\t\t\tthis.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) );\n\n\t\t}\n\n\t\tconst tangents = this.getAttribute( 'tangent' ).array;\n\n\t\tconst tan1 = [], tan2 = [];\n\n\t\tfor ( let i = 0; i < nVertices; i ++ ) {\n\n\t\t\ttan1[ i ] = new Vector3();\n\t\t\ttan2[ i ] = new Vector3();\n\n\t\t}\n\n\t\tconst vA = new Vector3(),\n\t\t\tvB = new Vector3(),\n\t\t\tvC = new Vector3(),\n\n\t\t\tuvA = new Vector2(),\n\t\t\tuvB = new Vector2(),\n\t\t\tuvC = new Vector2(),\n\n\t\t\tsdir = new Vector3(),\n\t\t\ttdir = new Vector3();\n\n\t\tfunction handleTriangle( a, b, c ) {\n\n\t\t\tvA.fromArray( positions, a * 3 );\n\t\t\tvB.fromArray( positions, b * 3 );\n\t\t\tvC.fromArray( positions, c * 3 );\n\n\t\t\tuvA.fromArray( uvs, a * 2 );\n\t\t\tuvB.fromArray( uvs, b * 2 );\n\t\t\tuvC.fromArray( uvs, c * 2 );\n\n\t\t\tvB.sub( vA );\n\t\t\tvC.sub( vA );\n\n\t\t\tuvB.sub( uvA );\n\t\t\tuvC.sub( uvA );\n\n\t\t\tconst r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y );\n\n\t\t\t// silently ignore degenerate uv triangles having coincident or colinear vertices\n\n\t\t\tif ( ! isFinite( r ) ) return;\n\n\t\t\tsdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r );\n\t\t\ttdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r );\n\n\t\t\ttan1[ a ].add( sdir );\n\t\t\ttan1[ b ].add( sdir );\n\t\t\ttan1[ c ].add( sdir );\n\n\t\t\ttan2[ a ].add( tdir );\n\t\t\ttan2[ b ].add( tdir );\n\t\t\ttan2[ c ].add( tdir );\n\n\t\t}\n\n\t\tlet groups = this.groups;\n\n\t\tif ( groups.length === 0 ) {\n\n\t\t\tgroups = [ {\n\t\t\t\tstart: 0,\n\t\t\t\tcount: indices.length\n\t\t\t} ];\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleTriangle(\n\t\t\t\t\tindices[ j + 0 ],\n\t\t\t\t\tindices[ j + 1 ],\n\t\t\t\t\tindices[ j + 2 ]\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst tmp = new Vector3(), tmp2 = new Vector3();\n\t\tconst n = new Vector3(), n2 = new Vector3();\n\n\t\tfunction handleVertex( v ) {\n\n\t\t\tn.fromArray( normals, v * 3 );\n\t\t\tn2.copy( n );\n\n\t\t\tconst t = tan1[ v ];\n\n\t\t\t// Gram-Schmidt orthogonalize\n\n\t\t\ttmp.copy( t );\n\t\t\ttmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize();\n\n\t\t\t// Calculate handedness\n\n\t\t\ttmp2.crossVectors( n2, t );\n\t\t\tconst test = tmp2.dot( tan2[ v ] );\n\t\t\tconst w = ( test < 0.0 ) ? - 1.0 : 1.0;\n\n\t\t\ttangents[ v * 4 ] = tmp.x;\n\t\t\ttangents[ v * 4 + 1 ] = tmp.y;\n\t\t\ttangents[ v * 4 + 2 ] = tmp.z;\n\t\t\ttangents[ v * 4 + 3 ] = w;\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleVertex( indices[ j + 0 ] );\n\t\t\t\thandleVertex( indices[ j + 1 ] );\n\t\t\t\thandleVertex( indices[ j + 2 ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeVertexNormals() {\n\n\t\tconst index = this.index;\n\t\tconst positionAttribute = this.getAttribute( 'position' );\n\n\t\tif ( positionAttribute !== undefined ) {\n\n\t\t\tlet normalAttribute = this.getAttribute( 'normal' );\n\n\t\t\tif ( normalAttribute === undefined ) {\n\n\t\t\t\tnormalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 );\n\t\t\t\tthis.setAttribute( 'normal', normalAttribute );\n\n\t\t\t} else {\n\n\t\t\t\t// reset existing normals to zero\n\n\t\t\t\tfor ( let i = 0, il = normalAttribute.count; i < il; i ++ ) {\n\n\t\t\t\t\tnormalAttribute.setXYZ( i, 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst pA = new Vector3(), pB = new Vector3(), pC = new Vector3();\n\t\t\tconst nA = new Vector3(), nB = new Vector3(), nC = new Vector3();\n\t\t\tconst cb = new Vector3(), ab = new Vector3();\n\n\t\t\t// indexed elements\n\n\t\t\tif ( index ) {\n\n\t\t\t\tfor ( let i = 0, il = index.count; i < il; i += 3 ) {\n\n\t\t\t\t\tconst vA = index.getX( i + 0 );\n\t\t\t\t\tconst vB = index.getX( i + 1 );\n\t\t\t\t\tconst vC = index.getX( i + 2 );\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, vA );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, vB );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, vC );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnA.fromBufferAttribute( normalAttribute, vA );\n\t\t\t\t\tnB.fromBufferAttribute( normalAttribute, vB );\n\t\t\t\t\tnC.fromBufferAttribute( normalAttribute, vC );\n\n\t\t\t\t\tnA.add( cb );\n\t\t\t\t\tnB.add( cb );\n\t\t\t\t\tnC.add( cb );\n\n\t\t\t\t\tnormalAttribute.setXYZ( vA, nA.x, nA.y, nA.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vB, nB.x, nB.y, nB.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vC, nC.x, nC.y, nC.z );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// non-indexed elements (unconnected triangle soup)\n\n\t\t\t\tfor ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) {\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, i + 0 );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, i + 1 );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, i + 2 );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnormalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.normalizeNormals();\n\n\t\t\tnormalAttribute.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tnormalizeNormals() {\n\n\t\tconst normals = this.attributes.normal;\n\n\t\tfor ( let i = 0, il = normals.count; i < il; i ++ ) {\n\n\t\t\t_vector$7.fromBufferAttribute( normals, i );\n\n\t\t\t_vector$7.normalize();\n\n\t\t\tnormals.setXYZ( i, _vector$7.x, _vector$7.y, _vector$7.z );\n\n\t\t}\n\n\t}\n\n\ttoNonIndexed() {\n\n\t\tfunction convertBufferAttribute( attribute, indices ) {\n\n\t\t\tconst array = attribute.array;\n\t\t\tconst itemSize = attribute.itemSize;\n\t\t\tconst normalized = attribute.normalized;\n\n\t\t\tconst array2 = new array.constructor( indices.length * itemSize );\n\n\t\t\tlet index = 0, index2 = 0;\n\n\t\t\tfor ( let i = 0, l = indices.length; i < l; i ++ ) {\n\n\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\tindex = indices[ i ] * attribute.data.stride + attribute.offset;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindex = indices[ i ] * itemSize;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let j = 0; j < itemSize; j ++ ) {\n\n\t\t\t\t\tarray2[ index2 ++ ] = array[ index ++ ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( array2, itemSize, normalized );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.index === null ) {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst geometry2 = new BufferGeometry();\n\n\t\tconst indices = this.index.array;\n\t\tconst attributes = this.attributes;\n\n\t\t// attributes\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\n\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\tgeometry2.setAttribute( name, newAttribute );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = this.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst morphArray = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, il = morphAttribute.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = morphAttribute[ i ];\n\n\t\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\t\tmorphArray.push( newAttribute );\n\n\t\t\t}\n\n\t\t\tgeometry2.morphAttributes[ name ] = morphArray;\n\n\t\t}\n\n\t\tgeometry2.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = this.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tgeometry2.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\treturn geometry2;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'BufferGeometry',\n\t\t\t\tgenerator: 'BufferGeometry.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard BufferGeometry serialization\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;\n\n\t\tif ( this.parameters !== undefined ) {\n\n\t\t\tconst parameters = this.parameters;\n\n\t\t\tfor ( const key in parameters ) {\n\n\t\t\t\tif ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ];\n\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t}\n\n\t\t// for simplicity the code assumes attributes are not shared across geometries, see #15811\n\n\t\tdata.data = { attributes: {} };\n\n\t\tconst index = this.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tdata.data.index = {\n\t\t\t\ttype: index.array.constructor.name,\n\t\t\t\tarray: Array.prototype.slice.call( index.array )\n\t\t\t};\n\n\t\t}\n\n\t\tconst attributes = this.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\n\t\t\tdata.data.attributes[ key ] = attribute.toJSON( data.data );\n\n\t\t}\n\n\t\tconst morphAttributes = {};\n\t\tlet hasMorphAttributes = false;\n\n\t\tfor ( const key in this.morphAttributes ) {\n\n\t\t\tconst attributeArray = this.morphAttributes[ key ];\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = attributeArray[ i ];\n\n\t\t\t\tarray.push( attribute.toJSON( data.data ) );\n\n\t\t\t}\n\n\t\t\tif ( array.length > 0 ) {\n\n\t\t\t\tmorphAttributes[ key ] = array;\n\n\t\t\t\thasMorphAttributes = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( hasMorphAttributes ) {\n\n\t\t\tdata.data.morphAttributes = morphAttributes;\n\t\t\tdata.data.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t}\n\n\t\tconst groups = this.groups;\n\n\t\tif ( groups.length > 0 ) {\n\n\t\t\tdata.data.groups = JSON.parse( JSON.stringify( groups ) );\n\n\t\t}\n\n\t\tconst boundingSphere = this.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tdata.data.boundingSphere = {\n\t\t\t\tcenter: boundingSphere.center.toArray(),\n\t\t\t\tradius: boundingSphere.radius\n\t\t\t};\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\t// reset\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\t\tthis.morphAttributes = {};\n\t\tthis.groups = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// used for storing cloned, shared data\n\n\t\tconst data = {};\n\n\t\t// name\n\n\t\tthis.name = source.name;\n\n\t\t// index\n\n\t\tconst index = source.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tthis.setIndex( index.clone( data ) );\n\n\t\t}\n\n\t\t// attributes\n\n\t\tconst attributes = source.attributes;\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\t\t\tthis.setAttribute( name, attribute.clone( data ) );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = source.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, l = morphAttribute.length; i < l; i ++ ) {\n\n\t\t\t\tarray.push( morphAttribute[ i ].clone( data ) );\n\n\t\t\t}\n\n\t\t\tthis.morphAttributes[ name ] = array;\n\n\t\t}\n\n\t\tthis.morphTargetsRelative = source.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = source.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tthis.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\t// bounding box\n\n\t\tconst boundingBox = source.boundingBox;\n\n\t\tif ( boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = boundingBox.clone();\n\n\t\t}\n\n\t\t// bounding sphere\n\n\t\tconst boundingSphere = source.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = boundingSphere.clone();\n\n\t\t}\n\n\t\t// draw range\n\n\t\tthis.drawRange.start = source.drawRange.start;\n\t\tthis.drawRange.count = source.drawRange.count;\n\n\t\t// user data\n\n\t\tthis.userData = source.userData;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nconst _inverseMatrix$3 = /*@__PURE__*/ new Matrix4();\nconst _ray$3 = /*@__PURE__*/ new Ray();\nconst _sphere$5 = /*@__PURE__*/ new Sphere();\nconst _sphereHitAt = /*@__PURE__*/ new Vector3();\n\nconst _vA$1 = /*@__PURE__*/ new Vector3();\nconst _vB$1 = /*@__PURE__*/ new Vector3();\nconst _vC$1 = /*@__PURE__*/ new Vector3();\n\nconst _tempA = /*@__PURE__*/ new Vector3();\nconst _morphA = /*@__PURE__*/ new Vector3();\n\nconst _uvA$1 = /*@__PURE__*/ new Vector2();\nconst _uvB$1 = /*@__PURE__*/ new Vector2();\nconst _uvC$1 = /*@__PURE__*/ new Vector2();\n\nconst _normalA = /*@__PURE__*/ new Vector3();\nconst _normalB = /*@__PURE__*/ new Vector3();\nconst _normalC = /*@__PURE__*/ new Vector3();\n\nconst _intersectionPoint = /*@__PURE__*/ new Vector3();\nconst _intersectionPointWorld = /*@__PURE__*/ new Vector3();\n\nclass Mesh extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isMesh = true;\n\n\t\tthis.type = 'Mesh';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.morphTargetInfluences !== undefined ) {\n\n\t\t\tthis.morphTargetInfluences = source.morphTargetInfluences.slice();\n\n\t\t}\n\n\t\tif ( source.morphTargetDictionary !== undefined ) {\n\n\t\t\tthis.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary );\n\n\t\t}\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\t\tconst keys = Object.keys( morphAttributes );\n\n\t\tif ( keys.length > 0 ) {\n\n\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tgetVertexPosition( index, target ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst position = geometry.attributes.position;\n\t\tconst morphPosition = geometry.morphAttributes.position;\n\t\tconst morphTargetsRelative = geometry.morphTargetsRelative;\n\n\t\ttarget.fromBufferAttribute( position, index );\n\n\t\tconst morphInfluences = this.morphTargetInfluences;\n\n\t\tif ( morphPosition && morphInfluences ) {\n\n\t\t\t_morphA.set( 0, 0, 0 );\n\n\t\t\tfor ( let i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n\t\t\t\tconst influence = morphInfluences[ i ];\n\t\t\t\tconst morphAttribute = morphPosition[ i ];\n\n\t\t\t\tif ( influence === 0 ) continue;\n\n\t\t\t\t_tempA.fromBufferAttribute( morphAttribute, index );\n\n\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t_morphA.addScaledVector( _tempA, influence );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_morphA.addScaledVector( _tempA.sub( target ), influence );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttarget.add( _morphA );\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\t\tconst matrixWorld = this.matrixWorld;\n\n\t\tif ( material === undefined ) return;\n\n\t\t// test with bounding sphere in world space\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$5.copy( geometry.boundingSphere );\n\t\t_sphere$5.applyMatrix4( matrixWorld );\n\n\t\t// check distance from ray origin to bounding sphere\n\n\t\t_ray$3.copy( raycaster.ray ).recast( raycaster.near );\n\n\t\tif ( _sphere$5.containsPoint( _ray$3.origin ) === false ) {\n\n\t\t\tif ( _ray$3.intersectSphere( _sphere$5, _sphereHitAt ) === null ) return;\n\n\t\t\tif ( _ray$3.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return;\n\n\t\t}\n\n\t\t// convert ray to local space of mesh\n\n\t\t_inverseMatrix$3.copy( matrixWorld ).invert();\n\t\t_ray$3.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$3 );\n\n\t\t// test with bounding box in local space\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tif ( _ray$3.intersectsBox( geometry.boundingBox ) === false ) return;\n\n\t\t}\n\n\t\t// test for intersections with geometry\n\n\t\tthis._computeIntersections( raycaster, intersects, _ray$3 );\n\n\t}\n\n\t_computeIntersections( raycaster, intersects, rayLocalSpace ) {\n\n\t\tlet intersection;\n\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\n\t\tconst index = geometry.index;\n\t\tconst position = geometry.attributes.position;\n\t\tconst uv = geometry.attributes.uv;\n\t\tconst uv1 = geometry.attributes.uv1;\n\t\tconst normal = geometry.attributes.normal;\n\t\tconst groups = geometry.groups;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\tif ( index !== null ) {\n\n\t\t\t// indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\tconst end = Math.min( index.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) );\n\n\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\tconst a = index.getX( j );\n\t\t\t\t\t\tconst b = index.getX( j + 1 );\n\t\t\t\t\t\tconst c = index.getX( j + 2 );\n\n\t\t\t\t\t\tintersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n\t\t\t\t\tconst b = index.getX( i + 1 );\n\t\t\t\t\tconst c = index.getX( i + 2 );\n\n\t\t\t\t\tintersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( position !== undefined ) {\n\n\t\t\t// non-indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\tconst end = Math.min( position.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) );\n\n\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\tconst a = j;\n\t\t\t\t\t\tconst b = j + 1;\n\t\t\t\t\t\tconst c = j + 2;\n\n\t\t\t\t\t\tintersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( position.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\tconst a = i;\n\t\t\t\t\tconst b = i + 1;\n\t\t\t\t\tconst c = i + 2;\n\n\t\t\t\t\tintersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nfunction checkIntersection( object, material, raycaster, ray, pA, pB, pC, point ) {\n\n\tlet intersect;\n\n\tif ( material.side === BackSide ) {\n\n\t\tintersect = ray.intersectTriangle( pC, pB, pA, true, point );\n\n\t} else {\n\n\t\tintersect = ray.intersectTriangle( pA, pB, pC, ( material.side === FrontSide ), point );\n\n\t}\n\n\tif ( intersect === null ) return null;\n\n\t_intersectionPointWorld.copy( point );\n\t_intersectionPointWorld.applyMatrix4( object.matrixWorld );\n\n\tconst distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld );\n\n\tif ( distance < raycaster.near || distance > raycaster.far ) return null;\n\n\treturn {\n\t\tdistance: distance,\n\t\tpoint: _intersectionPointWorld.clone(),\n\t\tobject: object\n\t};\n\n}\n\nfunction checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, normal, a, b, c ) {\n\n\tobject.getVertexPosition( a, _vA$1 );\n\tobject.getVertexPosition( b, _vB$1 );\n\tobject.getVertexPosition( c, _vC$1 );\n\n\tconst intersection = checkIntersection( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint );\n\n\tif ( intersection ) {\n\n\t\tif ( uv ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv, c );\n\n\t\t\tintersection.uv = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\n\t\t}\n\n\t\tif ( uv1 ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv1, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv1, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv1, c );\n\n\t\t\tintersection.uv1 = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\t\t\tintersection.uv2 = intersection.uv1; // @deprecated, r152\n\n\t\t}\n\n\t\tif ( normal ) {\n\n\t\t\t_normalA.fromBufferAttribute( normal, a );\n\t\t\t_normalB.fromBufferAttribute( normal, b );\n\t\t\t_normalC.fromBufferAttribute( normal, c );\n\n\t\t\tintersection.normal = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _normalA, _normalB, _normalC, new Vector3() );\n\n\t\t\tif ( intersection.normal.dot( ray.direction ) > 0 ) {\n\n\t\t\t\tintersection.normal.multiplyScalar( - 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst face = {\n\t\t\ta: a,\n\t\t\tb: b,\n\t\t\tc: c,\n\t\t\tnormal: new Vector3(),\n\t\t\tmaterialIndex: 0\n\t\t};\n\n\t\tTriangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal );\n\n\t\tintersection.face = face;\n\n\t}\n\n\treturn intersection;\n\n}\n\nclass BoxGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'BoxGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tdepthSegments: depthSegments\n\t\t};\n\n\t\tconst scope = this;\n\n\t\t// segments\n\n\t\twidthSegments = Math.floor( widthSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\t\tdepthSegments = Math.floor( depthSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet numberOfVertices = 0;\n\t\tlet groupStart = 0;\n\n\t\t// build each side of the box geometry\n\n\t\tbuildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px\n\t\tbuildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx\n\t\tbuildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py\n\t\tbuildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny\n\t\tbuildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz\n\t\tbuildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) {\n\n\t\t\tconst segmentWidth = width / gridX;\n\t\t\tconst segmentHeight = height / gridY;\n\n\t\t\tconst widthHalf = width / 2;\n\t\t\tconst heightHalf = height / 2;\n\t\t\tconst depthHalf = depth / 2;\n\n\t\t\tconst gridX1 = gridX + 1;\n\t\t\tconst gridY1 = gridY + 1;\n\n\t\t\tlet vertexCounter = 0;\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst vector = new Vector3();\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\t\tconst y = iy * segmentHeight - heightHalf;\n\n\t\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\t\tconst x = ix * segmentWidth - widthHalf;\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = x * udir;\n\t\t\t\t\tvector[ v ] = y * vdir;\n\t\t\t\t\tvector[ w ] = depthHalf;\n\n\t\t\t\t\t// now apply vector to vertex buffer\n\n\t\t\t\t\tvertices.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = 0;\n\t\t\t\t\tvector[ v ] = 0;\n\t\t\t\t\tvector[ w ] = depth > 0 ? 1 : - 1;\n\n\t\t\t\t\t// now apply vector to normal buffer\n\n\t\t\t\t\tnormals.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// uvs\n\n\t\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t\t\t// counters\n\n\t\t\t\t\tvertexCounter += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// indices\n\n\t\t\t// 1. you need three indices to draw a single face\n\t\t\t// 2. a single segment consists of two faces\n\t\t\t// 3. so we need to generate six (2*3) indices per segment\n\n\t\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\t\tconst a = numberOfVertices + ix + gridX1 * iy;\n\t\t\t\t\tconst b = numberOfVertices + ix + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst d = numberOfVertices + ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// increase counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, materialIndex );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t\t// update total number of vertices\n\n\t\t\tnumberOfVertices += vertexCounter;\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );\n\n\t}\n\n}\n\n/**\n * Uniform Utilities\n */\n\nfunction cloneUniforms( src ) {\n\n\tconst dst = {};\n\n\tfor ( const u in src ) {\n\n\t\tdst[ u ] = {};\n\n\t\tfor ( const p in src[ u ] ) {\n\n\t\t\tconst property = src[ u ][ p ];\n\n\t\t\tif ( property && ( property.isColor ||\n\t\t\t\tproperty.isMatrix3 || property.isMatrix4 ||\n\t\t\t\tproperty.isVector2 || property.isVector3 || property.isVector4 ||\n\t\t\t\tproperty.isTexture || property.isQuaternion ) ) {\n\n\t\t\t\tif ( property.isRenderTargetTexture ) {\n\n\t\t\t\t\tconsole.warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' );\n\t\t\t\t\tdst[ u ][ p ] = null;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tdst[ u ][ p ] = property.clone();\n\n\t\t\t\t}\n\n\t\t\t} else if ( Array.isArray( property ) ) {\n\n\t\t\t\tdst[ u ][ p ] = property.slice();\n\n\t\t\t} else {\n\n\t\t\t\tdst[ u ][ p ] = property;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn dst;\n\n}\n\nfunction mergeUniforms( uniforms ) {\n\n\tconst merged = {};\n\n\tfor ( let u = 0; u < uniforms.length; u ++ ) {\n\n\t\tconst tmp = cloneUniforms( uniforms[ u ] );\n\n\t\tfor ( const p in tmp ) {\n\n\t\t\tmerged[ p ] = tmp[ p ];\n\n\t\t}\n\n\t}\n\n\treturn merged;\n\n}\n\nfunction cloneUniformsGroups( src ) {\n\n\tconst dst = [];\n\n\tfor ( let u = 0; u < src.length; u ++ ) {\n\n\t\tdst.push( src[ u ].clone() );\n\n\t}\n\n\treturn dst;\n\n}\n\nfunction getUnlitUniformColorSpace( renderer ) {\n\n\tif ( renderer.getRenderTarget() === null ) {\n\n\t\t// https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398\n\t\treturn renderer.outputColorSpace;\n\n\t}\n\n\treturn LinearSRGBColorSpace;\n\n}\n\n// Legacy\n\nconst UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };\n\nvar default_vertex = \"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\n\nvar default_fragment = \"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\n\nclass ShaderMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isShaderMaterial = true;\n\n\t\tthis.type = 'ShaderMaterial';\n\n\t\tthis.defines = {};\n\t\tthis.uniforms = {};\n\t\tthis.uniformsGroups = [];\n\n\t\tthis.vertexShader = default_vertex;\n\t\tthis.fragmentShader = default_fragment;\n\n\t\tthis.linewidth = 1;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false; // set to use scene fog\n\t\tthis.lights = false; // set to use scene lights\n\t\tthis.clipping = false; // set to use user-defined clipping planes\n\n\t\tthis.forceSinglePass = true;\n\n\t\tthis.extensions = {\n\t\t\tderivatives: false, // set to use derivatives\n\t\t\tfragDepth: false, // set to use fragment depth values\n\t\t\tdrawBuffers: false, // set to use draw buffers\n\t\t\tshaderTextureLOD: false // set to use shader texture LOD\n\t\t};\n\n\t\t// When rendered geometry doesn't include these attributes but the material does,\n\t\t// use these default values in WebGL. This avoids errors when buffer data is missing.\n\t\tthis.defaultAttributeValues = {\n\t\t\t'color': [ 1, 1, 1 ],\n\t\t\t'uv': [ 0, 0 ],\n\t\t\t'uv1': [ 0, 0 ]\n\t\t};\n\n\t\tthis.index0AttributeName = undefined;\n\t\tthis.uniformsNeedUpdate = false;\n\n\t\tthis.glslVersion = null;\n\n\t\tif ( parameters !== undefined ) {\n\n\t\t\tthis.setValues( parameters );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.fragmentShader = source.fragmentShader;\n\t\tthis.vertexShader = source.vertexShader;\n\n\t\tthis.uniforms = cloneUniforms( source.uniforms );\n\t\tthis.uniformsGroups = cloneUniformsGroups( source.uniformsGroups );\n\n\t\tthis.defines = Object.assign( {}, source.defines );\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.fog = source.fog;\n\t\tthis.lights = source.lights;\n\t\tthis.clipping = source.clipping;\n\n\t\tthis.extensions = Object.assign( {}, source.extensions );\n\n\t\tthis.glslVersion = source.glslVersion;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.glslVersion = this.glslVersion;\n\t\tdata.uniforms = {};\n\n\t\tfor ( const name in this.uniforms ) {\n\n\t\t\tconst uniform = this.uniforms[ name ];\n\t\t\tconst value = uniform.value;\n\n\t\t\tif ( value && value.isTexture ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 't',\n\t\t\t\t\tvalue: value.toJSON( meta ).uuid\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isColor ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'c',\n\t\t\t\t\tvalue: value.getHex()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector2 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v2',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\n\t\t\t\t// note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines;\n\n\t\tdata.vertexShader = this.vertexShader;\n\t\tdata.fragmentShader = this.fragmentShader;\n\n\t\tdata.lights = this.lights;\n\t\tdata.clipping = this.clipping;\n\n\t\tconst extensions = {};\n\n\t\tfor ( const key in this.extensions ) {\n\n\t\t\tif ( this.extensions[ key ] === true ) extensions[ key ] = true;\n\n\t\t}\n\n\t\tif ( Object.keys( extensions ).length > 0 ) data.extensions = extensions;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass Camera extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isCamera = true;\n\n\t\tthis.type = 'Camera';\n\n\t\tthis.matrixWorldInverse = new Matrix4();\n\n\t\tthis.projectionMatrix = new Matrix4();\n\t\tthis.projectionMatrixInverse = new Matrix4();\n\n\t\tthis.coordinateSystem = WebGLCoordinateSystem;\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.matrixWorldInverse.copy( source.matrixWorldInverse );\n\n\t\tthis.projectionMatrix.copy( source.projectionMatrix );\n\t\tthis.projectionMatrixInverse.copy( source.projectionMatrixInverse );\n\n\t\tthis.coordinateSystem = source.coordinateSystem;\n\n\t\treturn this;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( - e[ 8 ], - e[ 9 ], - e[ 10 ] ).normalize();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tsuper.updateWorldMatrix( updateParents, updateChildren );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass PerspectiveCamera extends Camera {\n\n\tconstructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.isPerspectiveCamera = true;\n\n\t\tthis.type = 'PerspectiveCamera';\n\n\t\tthis.fov = fov;\n\t\tthis.zoom = 1;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.focus = 10;\n\n\t\tthis.aspect = aspect;\n\t\tthis.view = null;\n\n\t\tthis.filmGauge = 35;\t// width of the film (default in millimeters)\n\t\tthis.filmOffset = 0;\t// horizontal film offset (same unit as gauge)\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.fov = source.fov;\n\t\tthis.zoom = source.zoom;\n\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\t\tthis.focus = source.focus;\n\n\t\tthis.aspect = source.aspect;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\tthis.filmGauge = source.filmGauge;\n\t\tthis.filmOffset = source.filmOffset;\n\n\t\treturn this;\n\n\t}\n\n\t/**\n\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t *\n\t * The default film gauge is 35, so that the focal length can be specified for\n\t * a 35mm (full frame) camera.\n\t *\n\t * Values for focal length and film gauge must have the same unit.\n\t */\n\tsetFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * Math.atan( vExtentSlope );\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\t/**\n\t * Calculates the focal length from the current .fov and .filmGauge.\n\t */\n\tgetFocalLength() {\n\n\t\tconst vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov );\n\n\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\n\t}\n\n\tgetEffectiveFOV() {\n\n\t\treturn RAD2DEG * 2 * Math.atan(\n\t\t\tMath.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom );\n\n\t}\n\n\tgetFilmWidth() {\n\n\t\t// film not completely covered in portrait format (aspect < 1)\n\t\treturn this.filmGauge * Math.min( this.aspect, 1 );\n\n\t}\n\n\tgetFilmHeight() {\n\n\t\t// film not completely covered in landscape format (aspect > 1)\n\t\treturn this.filmGauge / Math.max( this.aspect, 1 );\n\n\t}\n\n\t/**\n\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t * multi-monitor/multi-machine setups.\n\t *\n\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t * the monitors are in grid like this\n\t *\n\t * +---+---+---+\n\t * | A | B | C |\n\t * +---+---+---+\n\t * | D | E | F |\n\t * +---+---+---+\n\t *\n\t * then for each monitor you would call it like this\n\t *\n\t * const w = 1920;\n\t * const h = 1080;\n\t * const fullWidth = w * 3;\n\t * const fullHeight = h * 2;\n\t *\n\t * --A--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t * --B--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t * --C--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t * --D--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t * --E--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t * --F--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t *\n\t * Note there is no reason monitors have to be the same size or in a grid.\n\t */\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tthis.aspect = fullWidth / fullHeight;\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst near = this.near;\n\t\tlet top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;\n\t\tlet height = 2 * top;\n\t\tlet width = this.aspect * height;\n\t\tlet left = - 0.5 * width;\n\t\tconst view = this.view;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst fullWidth = view.fullWidth,\n\t\t\t\tfullHeight = view.fullHeight;\n\n\t\t\tleft += view.offsetX * width / fullWidth;\n\t\t\ttop -= view.offsetY * height / fullHeight;\n\t\t\twidth *= view.width / fullWidth;\n\t\t\theight *= view.height / fullHeight;\n\n\t\t}\n\n\t\tconst skew = this.filmOffset;\n\t\tif ( skew !== 0 ) left += near * skew / this.getFilmWidth();\n\n\t\tthis.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.fov = this.fov;\n\t\tdata.object.zoom = this.zoom;\n\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\t\tdata.object.focus = this.focus;\n\n\t\tdata.object.aspect = this.aspect;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\tdata.object.filmGauge = this.filmGauge;\n\t\tdata.object.filmOffset = this.filmOffset;\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst fov = - 90; // negative fov is not an error\nconst aspect = 1;\n\nclass CubeCamera extends Object3D {\n\n\tconstructor( near, far, renderTarget ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubeCamera';\n\n\t\tthis.renderTarget = renderTarget;\n\t\tthis.coordinateSystem = null;\n\n\t\tconst cameraPX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPX.layers = this.layers;\n\t\tthis.add( cameraPX );\n\n\t\tconst cameraNX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNX.layers = this.layers;\n\t\tthis.add( cameraNX );\n\n\t\tconst cameraPY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPY.layers = this.layers;\n\t\tthis.add( cameraPY );\n\n\t\tconst cameraNY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNY.layers = this.layers;\n\t\tthis.add( cameraNY );\n\n\t\tconst cameraPZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPZ.layers = this.layers;\n\t\tthis.add( cameraPZ );\n\n\t\tconst cameraNZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNZ.layers = this.layers;\n\t\tthis.add( cameraNZ );\n\n\t}\n\n\tupdateCoordinateSystem() {\n\n\t\tconst coordinateSystem = this.coordinateSystem;\n\n\t\tconst cameras = this.children.concat();\n\n\t\tconst [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = cameras;\n\n\t\tfor ( const camera of cameras ) this.remove( camera );\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tcameraPX.up.set( 0, 1, 0 );\n\t\t\tcameraPX.lookAt( 1, 0, 0 );\n\n\t\t\tcameraNX.up.set( 0, 1, 0 );\n\t\t\tcameraNX.lookAt( - 1, 0, 0 );\n\n\t\t\tcameraPY.up.set( 0, 0, - 1 );\n\t\t\tcameraPY.lookAt( 0, 1, 0 );\n\n\t\t\tcameraNY.up.set( 0, 0, 1 );\n\t\t\tcameraNY.lookAt( 0, - 1, 0 );\n\n\t\t\tcameraPZ.up.set( 0, 1, 0 );\n\t\t\tcameraPZ.lookAt( 0, 0, 1 );\n\n\t\t\tcameraNZ.up.set( 0, 1, 0 );\n\t\t\tcameraNZ.lookAt( 0, 0, - 1 );\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tcameraPX.up.set( 0, - 1, 0 );\n\t\t\tcameraPX.lookAt( - 1, 0, 0 );\n\n\t\t\tcameraNX.up.set( 0, - 1, 0 );\n\t\t\tcameraNX.lookAt( 1, 0, 0 );\n\n\t\t\tcameraPY.up.set( 0, 0, 1 );\n\t\t\tcameraPY.lookAt( 0, 1, 0 );\n\n\t\t\tcameraNY.up.set( 0, 0, - 1 );\n\t\t\tcameraNY.lookAt( 0, - 1, 0 );\n\n\t\t\tcameraPZ.up.set( 0, - 1, 0 );\n\t\t\tcameraPZ.lookAt( 0, 0, 1 );\n\n\t\t\tcameraNZ.up.set( 0, - 1, 0 );\n\t\t\tcameraNZ.lookAt( 0, 0, - 1 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\tfor ( const camera of cameras ) {\n\n\t\t\tthis.add( camera );\n\n\t\t\tcamera.updateMatrixWorld();\n\n\t\t}\n\n\t}\n\n\tupdate( renderer, scene ) {\n\n\t\tif ( this.parent === null ) this.updateMatrixWorld();\n\n\t\tconst renderTarget = this.renderTarget;\n\n\t\tif ( this.coordinateSystem !== renderer.coordinateSystem ) {\n\n\t\t\tthis.coordinateSystem = renderer.coordinateSystem;\n\n\t\t\tthis.updateCoordinateSystem();\n\n\t\t}\n\n\t\tconst [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children;\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tconst currentXrEnabled = renderer.xr.enabled;\n\n\t\trenderer.xr.enabled = false;\n\n\t\tconst generateMipmaps = renderTarget.texture.generateMipmaps;\n\n\t\trenderTarget.texture.generateMipmaps = false;\n\n\t\trenderer.setRenderTarget( renderTarget, 0 );\n\t\trenderer.render( scene, cameraPX );\n\n\t\trenderer.setRenderTarget( renderTarget, 1 );\n\t\trenderer.render( scene, cameraNX );\n\n\t\trenderer.setRenderTarget( renderTarget, 2 );\n\t\trenderer.render( scene, cameraPY );\n\n\t\trenderer.setRenderTarget( renderTarget, 3 );\n\t\trenderer.render( scene, cameraNY );\n\n\t\trenderer.setRenderTarget( renderTarget, 4 );\n\t\trenderer.render( scene, cameraPZ );\n\n\t\trenderTarget.texture.generateMipmaps = generateMipmaps;\n\n\t\trenderer.setRenderTarget( renderTarget, 5 );\n\t\trenderer.render( scene, cameraNZ );\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t\trenderer.xr.enabled = currentXrEnabled;\n\n\t\trenderTarget.texture.needsPMREMUpdate = true;\n\n\t}\n\n}\n\nclass CubeTexture extends Texture {\n\n\tconstructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ) {\n\n\t\timages = images !== undefined ? images : [];\n\t\tmapping = mapping !== undefined ? mapping : CubeReflectionMapping;\n\n\t\tsuper( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );\n\n\t\tthis.isCubeTexture = true;\n\n\t\tthis.flipY = false;\n\n\t}\n\n\tget images() {\n\n\t\treturn this.image;\n\n\t}\n\n\tset images( value ) {\n\n\t\tthis.image = value;\n\n\t}\n\n}\n\nclass WebGLCubeRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( size = 1, options = {} ) {\n\n\t\tsuper( size, size, options );\n\n\t\tthis.isWebGLCubeRenderTarget = true;\n\n\t\tconst image = { width: size, height: size, depth: 1 };\n\t\tconst images = [ image, image, image, image, image, image ];\n\n\t\tif ( options.encoding !== undefined ) {\n\n\t\t\t// @deprecated, r152\n\t\t\twarnOnce( 'THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace.' );\n\t\t\toptions.colorSpace = options.encoding === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t\t}\n\n\t\tthis.texture = new CubeTexture( images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace );\n\n\t\t// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n\t\t// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n\t\t// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n\n\t\t// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n\t\t// and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture\n\t\t// as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures).\n\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t}\n\n\tfromEquirectangularTexture( renderer, texture ) {\n\n\t\tthis.texture.type = texture.type;\n\t\tthis.texture.colorSpace = texture.colorSpace;\n\n\t\tthis.texture.generateMipmaps = texture.generateMipmaps;\n\t\tthis.texture.minFilter = texture.minFilter;\n\t\tthis.texture.magFilter = texture.magFilter;\n\n\t\tconst shader = {\n\n\t\t\tuniforms: {\n\t\t\t\ttEquirect: { value: null },\n\t\t\t},\n\n\t\t\tvertexShader: /* glsl */`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,\n\n\t\t\tfragmentShader: /* glsl */`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`\n\t\t};\n\n\t\tconst geometry = new BoxGeometry( 5, 5, 5 );\n\n\t\tconst material = new ShaderMaterial( {\n\n\t\t\tname: 'CubemapFromEquirect',\n\n\t\t\tuniforms: cloneUniforms( shader.uniforms ),\n\t\t\tvertexShader: shader.vertexShader,\n\t\t\tfragmentShader: shader.fragmentShader,\n\t\t\tside: BackSide,\n\t\t\tblending: NoBlending\n\n\t\t} );\n\n\t\tmaterial.uniforms.tEquirect.value = texture;\n\n\t\tconst mesh = new Mesh( geometry, material );\n\n\t\tconst currentMinFilter = texture.minFilter;\n\n\t\t// Avoid blurred poles\n\t\tif ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter;\n\n\t\tconst camera = new CubeCamera( 1, 10, this );\n\t\tcamera.update( renderer, mesh );\n\n\t\ttexture.minFilter = currentMinFilter;\n\n\t\tmesh.geometry.dispose();\n\t\tmesh.material.dispose();\n\n\t\treturn this;\n\n\t}\n\n\tclear( renderer, color, depth, stencil ) {\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\trenderer.setRenderTarget( this, i );\n\n\t\t\trenderer.clear( color, depth, stencil );\n\n\t\t}\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t}\n\n}\n\nconst _vector1 = /*@__PURE__*/ new Vector3();\nconst _vector2 = /*@__PURE__*/ new Vector3();\nconst _normalMatrix = /*@__PURE__*/ new Matrix3();\n\nclass Plane {\n\n\tconstructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) {\n\n\t\tthis.isPlane = true;\n\n\t\t// normal is assumed to be normalized\n\n\t\tthis.normal = normal;\n\t\tthis.constant = constant;\n\n\t}\n\n\tset( normal, constant ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = constant;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponents( x, y, z, w ) {\n\n\t\tthis.normal.set( x, y, z );\n\t\tthis.constant = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromNormalAndCoplanarPoint( normal, point ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = - point.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCoplanarPoints( a, b, c ) {\n\n\t\tconst normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize();\n\n\t\t// Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n\t\tthis.setFromNormalAndCoplanarPoint( normal, a );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( plane ) {\n\n\t\tthis.normal.copy( plane.normal );\n\t\tthis.constant = plane.constant;\n\n\t\treturn this;\n\n\t}\n\n\tnormalize() {\n\n\t\t// Note: will lead to a divide by zero if the plane is invalid.\n\n\t\tconst inverseNormalLength = 1.0 / this.normal.length();\n\t\tthis.normal.multiplyScalar( inverseNormalLength );\n\t\tthis.constant *= inverseNormalLength;\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.constant *= - 1;\n\t\tthis.normal.negate();\n\n\t\treturn this;\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.normal.dot( point ) + this.constant;\n\n\t}\n\n\tdistanceToSphere( sphere ) {\n\n\t\treturn this.distanceToPoint( sphere.center ) - sphere.radius;\n\n\t}\n\n\tprojectPoint( point, target ) {\n\n\t\treturn target.copy( point ).addScaledVector( this.normal, - this.distanceToPoint( point ) );\n\n\t}\n\n\tintersectLine( line, target ) {\n\n\t\tconst direction = line.delta( _vector1 );\n\n\t\tconst denominator = this.normal.dot( direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( this.distanceToPoint( line.start ) === 0 ) {\n\n\t\t\t\treturn target.copy( line.start );\n\n\t\t\t}\n\n\t\t\t// Unsure if this is the correct method to handle this case.\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( line.start.dot( this.normal ) + this.constant ) / denominator;\n\n\t\tif ( t < 0 || t > 1 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn target.copy( line.start ).addScaledVector( direction, t );\n\n\t}\n\n\tintersectsLine( line ) {\n\n\t\t// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\n\t\tconst startSign = this.distanceToPoint( line.start );\n\t\tconst endSign = this.distanceToPoint( line.end );\n\n\t\treturn ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsPlane( this );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn sphere.intersectsPlane( this );\n\n\t}\n\n\tcoplanarPoint( target ) {\n\n\t\treturn target.copy( this.normal ).multiplyScalar( - this.constant );\n\n\t}\n\n\tapplyMatrix4( matrix, optionalNormalMatrix ) {\n\n\t\tconst normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix );\n\n\t\tconst referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix );\n\n\t\tconst normal = this.normal.applyMatrix3( normalMatrix ).normalize();\n\n\t\tthis.constant = - referencePoint.dot( normal );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.constant -= offset.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tequals( plane ) {\n\n\t\treturn plane.normal.equals( this.normal ) && ( plane.constant === this.constant );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _sphere$4 = /*@__PURE__*/ new Sphere();\nconst _vector$6 = /*@__PURE__*/ new Vector3();\n\nclass Frustum {\n\n\tconstructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) {\n\n\t\tthis.planes = [ p0, p1, p2, p3, p4, p5 ];\n\n\t}\n\n\tset( p0, p1, p2, p3, p4, p5 ) {\n\n\t\tconst planes = this.planes;\n\n\t\tplanes[ 0 ].copy( p0 );\n\t\tplanes[ 1 ].copy( p1 );\n\t\tplanes[ 2 ].copy( p2 );\n\t\tplanes[ 3 ].copy( p3 );\n\t\tplanes[ 4 ].copy( p4 );\n\t\tplanes[ 5 ].copy( p5 );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( frustum ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tplanes[ i ].copy( frustum.planes[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem ) {\n\n\t\tconst planes = this.planes;\n\t\tconst me = m.elements;\n\t\tconst me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ];\n\t\tconst me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ];\n\t\tconst me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ];\n\t\tconst me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ];\n\n\t\tplanes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize();\n\t\tplanes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize();\n\t\tplanes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize();\n\t\tplanes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize();\n\t\tplanes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize();\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tplanes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize();\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tplanes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize();\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tintersectsObject( object ) {\n\n\t\tif ( object.boundingSphere !== undefined ) {\n\n\t\t\tif ( object.boundingSphere === null ) object.computeBoundingSphere();\n\n\t\t\t_sphere$4.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );\n\n\t\t} else {\n\n\t\t\tconst geometry = object.geometry;\n\n\t\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$4.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );\n\n\t\t}\n\n\t\treturn this.intersectsSphere( _sphere$4 );\n\n\t}\n\n\tintersectsSprite( sprite ) {\n\n\t\t_sphere$4.center.set( 0, 0, 0 );\n\t\t_sphere$4.radius = 0.7071067811865476;\n\t\t_sphere$4.applyMatrix4( sprite.matrixWorld );\n\n\t\treturn this.intersectsSphere( _sphere$4 );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst planes = this.planes;\n\t\tconst center = sphere.center;\n\t\tconst negRadius = - sphere.radius;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst distance = planes[ i ].distanceToPoint( center );\n\n\t\t\tif ( distance < negRadius ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst plane = planes[ i ];\n\n\t\t\t// corner at max distance\n\n\t\t\t_vector$6.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n\t\t\t_vector$6.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n\t\t\t_vector$6.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n\n\t\t\tif ( plane.distanceToPoint( _vector$6 ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tif ( planes[ i ].distanceToPoint( point ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nfunction WebGLAnimation() {\n\n\tlet context = null;\n\tlet isAnimating = false;\n\tlet animationLoop = null;\n\tlet requestId = null;\n\n\tfunction onAnimationFrame( time, frame ) {\n\n\t\tanimationLoop( time, frame );\n\n\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t}\n\n\treturn {\n\n\t\tstart: function () {\n\n\t\t\tif ( isAnimating === true ) return;\n\t\t\tif ( animationLoop === null ) return;\n\n\t\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t\t\tisAnimating = true;\n\n\t\t},\n\n\t\tstop: function () {\n\n\t\t\tcontext.cancelAnimationFrame( requestId );\n\n\t\t\tisAnimating = false;\n\n\t\t},\n\n\t\tsetAnimationLoop: function ( callback ) {\n\n\t\t\tanimationLoop = callback;\n\n\t\t},\n\n\t\tsetContext: function ( value ) {\n\n\t\t\tcontext = value;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLAttributes( gl, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tconst buffers = new WeakMap();\n\n\tfunction createBuffer( attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst usage = attribute.usage;\n\n\t\tconst buffer = gl.createBuffer();\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\t\tgl.bufferData( bufferType, array, usage );\n\n\t\tattribute.onUploadCallback();\n\n\t\tlet type;\n\n\t\tif ( array instanceof Float32Array ) {\n\n\t\t\ttype = gl.FLOAT;\n\n\t\t} else if ( array instanceof Uint16Array ) {\n\n\t\t\tif ( attribute.isFloat16BufferAttribute ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\ttype = gl.HALF_FLOAT;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( 'THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\ttype = gl.UNSIGNED_SHORT;\n\n\t\t\t}\n\n\t\t} else if ( array instanceof Int16Array ) {\n\n\t\t\ttype = gl.SHORT;\n\n\t\t} else if ( array instanceof Uint32Array ) {\n\n\t\t\ttype = gl.UNSIGNED_INT;\n\n\t\t} else if ( array instanceof Int32Array ) {\n\n\t\t\ttype = gl.INT;\n\n\t\t} else if ( array instanceof Int8Array ) {\n\n\t\t\ttype = gl.BYTE;\n\n\t\t} else if ( array instanceof Uint8Array ) {\n\n\t\t\ttype = gl.UNSIGNED_BYTE;\n\n\t\t} else if ( array instanceof Uint8ClampedArray ) {\n\n\t\t\ttype = gl.UNSIGNED_BYTE;\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.WebGLAttributes: Unsupported buffer data format: ' + array );\n\n\t\t}\n\n\t\treturn {\n\t\t\tbuffer: buffer,\n\t\t\ttype: type,\n\t\t\tbytesPerElement: array.BYTES_PER_ELEMENT,\n\t\t\tversion: attribute.version\n\t\t};\n\n\t}\n\n\tfunction updateBuffer( buffer, attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst updateRange = attribute.updateRange;\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\n\t\tif ( updateRange.count === - 1 ) {\n\n\t\t\t// Not using update ranges\n\n\t\t\tgl.bufferSubData( bufferType, 0, array );\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray, updateRange.offset, updateRange.count );\n\n\t\t\t} else {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray.subarray( updateRange.offset, updateRange.offset + updateRange.count ) );\n\n\t\t\t}\n\n\t\t\tupdateRange.count = - 1; // reset range\n\n\t\t}\n\n\t\tattribute.onUploadCallback();\n\n\t}\n\n\t//\n\n\tfunction get( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\treturn buffers.get( attribute );\n\n\t}\n\n\tfunction remove( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data ) {\n\n\t\t\tgl.deleteBuffer( data.buffer );\n\n\t\t\tbuffers.delete( attribute );\n\n\t\t}\n\n\t}\n\n\tfunction update( attribute, bufferType ) {\n\n\t\tif ( attribute.isGLBufferAttribute ) {\n\n\t\t\tconst cached = buffers.get( attribute );\n\n\t\t\tif ( ! cached || cached.version < attribute.version ) {\n\n\t\t\t\tbuffers.set( attribute, {\n\t\t\t\t\tbuffer: attribute.buffer,\n\t\t\t\t\ttype: attribute.type,\n\t\t\t\t\tbytesPerElement: attribute.elementSize,\n\t\t\t\t\tversion: attribute.version\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data === undefined ) {\n\n\t\t\tbuffers.set( attribute, createBuffer( attribute, bufferType ) );\n\n\t\t} else if ( data.version < attribute.version ) {\n\n\t\t\tupdateBuffer( data.buffer, attribute, bufferType );\n\n\t\t\tdata.version = attribute.version;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update\n\n\t};\n\n}\n\nclass PlaneGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PlaneGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments\n\t\t};\n\n\t\tconst width_half = width / 2;\n\t\tconst height_half = height / 2;\n\n\t\tconst gridX = Math.floor( widthSegments );\n\t\tconst gridY = Math.floor( heightSegments );\n\n\t\tconst gridX1 = gridX + 1;\n\t\tconst gridY1 = gridY + 1;\n\n\t\tconst segment_width = width / gridX;\n\t\tconst segment_height = height / gridY;\n\n\t\t//\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\tconst y = iy * segment_height - height_half;\n\n\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\tconst x = ix * segment_width - width_half;\n\n\t\t\t\tvertices.push( x, - y, 0 );\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\tconst a = ix + gridX1 * iy;\n\t\t\t\tconst b = ix + gridX1 * ( iy + 1 );\n\t\t\t\tconst c = ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\tconst d = ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );\n\n\t}\n\n}\n\nvar alphahash_fragment = \"#ifdef USE_ALPHAHASH\\n\\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\\n#endif\";\n\nvar alphahash_pars_fragment = \"#ifdef USE_ALPHAHASH\\n\\tconst float ALPHA_HASH_SCALE = 0.05;\\n\\tfloat hash2D( vec2 value ) {\\n\\t\\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\\n\\t}\\n\\tfloat hash3D( vec3 value ) {\\n\\t\\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\\n\\t}\\n\\tfloat getAlphaHashThreshold( vec3 position ) {\\n\\t\\tfloat maxDeriv = max(\\n\\t\\t\\tlength( dFdx( position.xyz ) ),\\n\\t\\t\\tlength( dFdy( position.xyz ) )\\n\\t\\t);\\n\\t\\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\\n\\t\\tvec2 pixScales = vec2(\\n\\t\\t\\texp2( floor( log2( pixScale ) ) ),\\n\\t\\t\\texp2( ceil( log2( pixScale ) ) )\\n\\t\\t);\\n\\t\\tvec2 alpha = vec2(\\n\\t\\t\\thash3D( floor( pixScales.x * position.xyz ) ),\\n\\t\\t\\thash3D( floor( pixScales.y * position.xyz ) )\\n\\t\\t);\\n\\t\\tfloat lerpFactor = fract( log2( pixScale ) );\\n\\t\\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\\n\\t\\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\\n\\t\\tvec3 cases = vec3(\\n\\t\\t\\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\\n\\t\\t\\t( x - 0.5 * a ) / ( 1.0 - a ),\\n\\t\\t\\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\\n\\t\\t);\\n\\t\\tfloat threshold = ( x < ( 1.0 - a ) )\\n\\t\\t\\t? ( ( x < a ) ? cases.x : cases.y )\\n\\t\\t\\t: cases.z;\\n\\t\\treturn clamp( threshold , 1.0e-6, 1.0 );\\n\\t}\\n#endif\";\n\nvar alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\\n#endif\";\n\nvar alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar alphatest_fragment = \"#ifdef USE_ALPHATEST\\n\\tif ( diffuseColor.a < alphaTest ) discard;\\n#endif\";\n\nvar alphatest_pars_fragment = \"#ifdef USE_ALPHATEST\\n\\tuniform float alphaTest;\\n#endif\";\n\nvar aomap_fragment = \"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\\n\\t#endif\\n#endif\";\n\nvar aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\";\n\nvar begin_vertex = \"vec3 transformed = vec3( position );\\n#ifdef USE_ALPHAHASH\\n\\tvPosition = vec3( position );\\n#endif\";\n\nvar beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\n\nvar bsdfs = \"float G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n} // validated\";\n\nvar iridescence_fragment = \"#ifdef USE_IRIDESCENCE\\n\\tconst mat3 XYZ_TO_REC709 = mat3(\\n\\t\\t 3.2404542, -0.9692660, 0.0556434,\\n\\t\\t-1.5371385, 1.8760108, -0.2040259,\\n\\t\\t-0.4985314, 0.0415560, 1.0572252\\n\\t);\\n\\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\\n\\t\\tvec3 sqrtF0 = sqrt( fresnel0 );\\n\\t\\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\\n\\t}\\n\\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\\n\\t\\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\\n\\t}\\n\\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\\n\\t\\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\\n\\t}\\n\\tvec3 evalSensitivity( float OPD, vec3 shift ) {\\n\\t\\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\\n\\t\\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\\n\\t\\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\\n\\t\\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\\n\\t\\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\\n\\t\\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\\n\\t\\txyz /= 1.0685e-7;\\n\\t\\tvec3 rgb = XYZ_TO_REC709 * xyz;\\n\\t\\treturn rgb;\\n\\t}\\n\\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\\n\\t\\tvec3 I;\\n\\t\\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\\n\\t\\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\\n\\t\\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\\n\\t\\tif ( cosTheta2Sq < 0.0 ) {\\n\\t\\t\\treturn vec3( 1.0 );\\n\\t\\t}\\n\\t\\tfloat cosTheta2 = sqrt( cosTheta2Sq );\\n\\t\\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\\n\\t\\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\\n\\t\\tfloat T121 = 1.0 - R12;\\n\\t\\tfloat phi12 = 0.0;\\n\\t\\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\\n\\t\\tfloat phi21 = PI - phi12;\\n\\t\\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\\t\\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\\n\\t\\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\\n\\t\\tvec3 phi23 = vec3( 0.0 );\\n\\t\\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\\n\\t\\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\\n\\t\\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\\n\\t\\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\\n\\t\\tvec3 phi = vec3( phi21 ) + phi23;\\n\\t\\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\\n\\t\\tvec3 r123 = sqrt( R123 );\\n\\t\\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\\n\\t\\tvec3 C0 = R12 + Rs;\\n\\t\\tI = C0;\\n\\t\\tvec3 Cm = Rs - T121;\\n\\t\\tfor ( int m = 1; m <= 2; ++ m ) {\\n\\t\\t\\tCm *= r123;\\n\\t\\t\\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\\n\\t\\t\\tI += Cm * Sm;\\n\\t\\t}\\n\\t\\treturn max( I, vec3( 0.0 ) );\\n\\t}\\n#endif\";\n\nvar bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vBumpMapUv );\\n\\t\\tvec2 dSTdy = dFdy( vBumpMapUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\\t\\tvec3 vSigmaX = dFdx( surf_pos.xyz );\\n\\t\\tvec3 vSigmaY = dFdy( surf_pos.xyz );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\";\n\nvar clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\";\n\nvar clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\n\nvar clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\";\n\nvar clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\";\n\nvar color_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\";\n\nvar color_pars_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_pars_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\n\nvar common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nvec3 pow2( const in vec3 x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract( sin( sn ) * c );\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n#ifdef USE_CLEARCOAT\\n\\tvec3 clearcoatNormal;\\n#endif\\n};\\n#ifdef USE_ALPHAHASH\\n\\tvarying vec3 vPosition;\\n#endif\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat luminance( const in vec3 rgb ) {\\n\\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\\n\\treturn dot( weights, rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n}\\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n} // validated\";\n\nvar cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\\n\\t\\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\\n\\t\\tuv.x *= CUBEUV_TEXEL_WIDTH;\\n\\t\\tuv.y *= CUBEUV_TEXEL_HEIGHT;\\n\\t\\t#ifdef texture2DGradEXT\\n\\t\\t\\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn texture2D( envMap, uv ).rgb;\\n\\t\\t#endif\\n\\t}\\n\\t#define cubeUV_r0 1.0\\n\\t#define cubeUV_v0 0.339\\n\\t#define cubeUV_m0 - 2.0\\n\\t#define cubeUV_r1 0.8\\n\\t#define cubeUV_v1 0.276\\n\\t#define cubeUV_m1 - 1.0\\n\\t#define cubeUV_r4 0.4\\n\\t#define cubeUV_v4 0.046\\n\\t#define cubeUV_m4 2.0\\n\\t#define cubeUV_r5 0.305\\n\\t#define cubeUV_v5 0.016\\n\\t#define cubeUV_m5 3.0\\n\\t#define cubeUV_r6 0.21\\n\\t#define cubeUV_v6 0.0038\\n\\t#define cubeUV_m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= cubeUV_r1 ) {\\n\\t\\t\\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\\n\\t\\t} else if ( roughness >= cubeUV_r4 ) {\\n\\t\\t\\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\\n\\t\\t} else if ( roughness >= cubeUV_r5 ) {\\n\\t\\t\\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\\n\\t\\t} else if ( roughness >= cubeUV_r6 ) {\\n\\t\\t\\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\";\n\nvar defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\";\n\nvar displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\";\n\nvar displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\\n#endif\";\n\nvar emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\n\nvar emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\";\n\nvar colorspace_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\n\nvar colorspace_pars_fragment = \"vec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\";\n\nvar envmap_fragment = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\";\n\nvar envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\";\n\nvar envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\";\n\nvar envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\";\n\nvar envmap_vertex = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar fog_vertex = \"#ifdef USE_FOG\\n\\tvFogDepth = - mvPosition.z;\\n#endif\";\n\nvar fog_pars_vertex = \"#ifdef USE_FOG\\n\\tvarying float vFogDepth;\\n#endif\";\n\nvar fog_fragment = \"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\n\nvar fog_pars_fragment = \"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float vFogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\";\n\nvar gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn vec3( texture2D( gradientMap, coord ).r );\\n\\t#else\\n\\t\\tvec2 fw = fwidth( coord ) * 0.5;\\n\\t\\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\\n\\t#endif\\n}\";\n\nvar lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\\treflectedLight.indirectDiffuse += lightMapIrradiance;\\n#endif\";\n\nvar lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\";\n\nvar lights_lambert_fragment = \"LambertMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularStrength = specularStrength;\";\n\nvar lights_lambert_pars_fragment = \"varying vec3 vViewPosition;\\nstruct LambertMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Lambert\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Lambert\";\n\nvar lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\\n\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\treturn irradiance;\\n}\\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\t#if defined ( LEGACY_LIGHTS )\\n\\t\\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\t\\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t\\t}\\n\\t\\treturn 1.0;\\n\\t#else\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tif ( cutoffDistance > 0.0 ) {\\n\\t\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\t}\\n\\t\\treturn distanceFalloff;\\n\\t#endif\\n}\\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\\n\\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\\t\\tlight.color = directionalLight.color;\\n\\t\\tlight.direction = directionalLight.direction;\\n\\t\\tlight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tlight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tlight.color = pointLight.color;\\n\\t\\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tlight.direction = normalize( lVector );\\n\\t\\tfloat angleCos = dot( light.direction, spotLight.direction );\\n\\t\\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\tif ( spotAttenuation > 0.0 ) {\\n\\t\\t\\tfloat lightDistance = length( lVector );\\n\\t\\t\\tlight.color = spotLight.color * spotAttenuation;\\n\\t\\t\\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\\t\\t} else {\\n\\t\\t\\tlight.color = vec3( 0.0 );\\n\\t\\t\\tlight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\\n\\t\\tfloat dotNL = dot( normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\";\n\nvar envmap_physical_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tvec3 getIBLIrradiance( const in vec3 normal ) {\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t\\t#else\\n\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t#endif\\n\\t}\\n\\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\tvec3 reflectVec = reflect( - viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t\\t#else\\n\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t#endif\\n\\t}\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\\n\\t\\t\\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\t\\tvec3 bentNormal = cross( bitangent, viewDir );\\n\\t\\t\\t\\tbentNormal = normalize( cross( bentNormal, bitangent ) );\\n\\t\\t\\t\\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\\n\\t\\t\\t\\treturn getIBLRadiance( viewDir, bentNormal, roughness );\\n\\t\\t\\t#else\\n\\t\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t\\t#endif\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\n\nvar lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\";\n\nvar lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\n\nvar lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\";\n\nvar lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\\nmaterial.roughness = min( material.roughness, 1.0 );\\n#ifdef IOR\\n\\tmaterial.ior = ior;\\n\\t#ifdef USE_SPECULAR\\n\\t\\tfloat specularIntensityFactor = specularIntensity;\\n\\t\\tvec3 specularColorFactor = specularColor;\\n\\t\\t#ifdef USE_SPECULAR_COLORMAP\\n\\t\\t\\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\\n\\t\\t#endif\\n\\t\\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\\t\\t\\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\\n\\t\\t#endif\\n\\t\\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\\n\\t#else\\n\\t\\tfloat specularIntensityFactor = 1.0;\\n\\t\\tvec3 specularColorFactor = vec3( 1.0 );\\n\\t\\tmaterial.specularF90 = 1.0;\\n\\t#endif\\n\\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.specularF90 = 1.0;\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\tmaterial.clearcoatF0 = vec3( 0.04 );\\n\\tmaterial.clearcoatF90 = 1.0;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tmaterial.iridescence = iridescence;\\n\\tmaterial.iridescenceIOR = iridescenceIOR;\\n\\t#ifdef USE_IRIDESCENCEMAP\\n\\t\\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\t\\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\\n\\t#else\\n\\t\\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\\n\\t#endif\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheenColor;\\n\\t#ifdef USE_SHEEN_COLORMAP\\n\\t\\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\\n\\t#endif\\n\\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\\n\\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\t\\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\\n\\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\\t#ifdef USE_ANISOTROPYMAP\\n\\t\\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\\n\\t\\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\\n\\t\\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\\n\\t#else\\n\\t\\tvec2 anisotropyV = anisotropyVector;\\n\\t#endif\\n\\tmaterial.anisotropy = length( anisotropyV );\\n\\tanisotropyV /= material.anisotropy;\\n\\tmaterial.anisotropy = saturate( material.anisotropy );\\n\\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\\n\\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\\n\\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\\n#endif\";\n\nvar lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat roughness;\\n\\tvec3 specularColor;\\n\\tfloat specularF90;\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat clearcoat;\\n\\t\\tfloat clearcoatRoughness;\\n\\t\\tvec3 clearcoatF0;\\n\\t\\tfloat clearcoatF90;\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tfloat iridescence;\\n\\t\\tfloat iridescenceIOR;\\n\\t\\tfloat iridescenceThickness;\\n\\t\\tvec3 iridescenceFresnel;\\n\\t\\tvec3 iridescenceF0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tvec3 sheenColor;\\n\\t\\tfloat sheenRoughness;\\n\\t#endif\\n\\t#ifdef IOR\\n\\t\\tfloat ior;\\n\\t#endif\\n\\t#ifdef USE_TRANSMISSION\\n\\t\\tfloat transmission;\\n\\t\\tfloat transmissionAlpha;\\n\\t\\tfloat thickness;\\n\\t\\tfloat attenuationDistance;\\n\\t\\tvec3 attenuationColor;\\n\\t#endif\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tfloat anisotropy;\\n\\t\\tfloat alphaT;\\n\\t\\tvec3 anisotropyT;\\n\\t\\tvec3 anisotropyB;\\n\\t#endif\\n};\\nvec3 clearcoatSpecular = vec3( 0.0 );\\nvec3 sheenSpecular = vec3( 0.0 );\\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\\n float x2 = x * x;\\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\\n}\\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\n#ifdef USE_ANISOTROPY\\n\\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\\n\\t\\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\\n\\t\\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\\n\\t\\tfloat v = 0.5 / ( gv + gl );\\n\\t\\treturn saturate(v);\\n\\t}\\n\\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\\n\\t\\tfloat a2 = alphaT * alphaB;\\n\\t\\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\\n\\t\\thighp float v2 = dot( v, v );\\n\\t\\tfloat w2 = a2 / v2;\\n\\t\\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\\n\\t}\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\\n\\t\\tvec3 f0 = material.clearcoatF0;\\n\\t\\tfloat f90 = material.clearcoatF90;\\n\\t\\tfloat roughness = material.clearcoatRoughness;\\n\\t\\tfloat alpha = pow2( roughness );\\n\\t\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\t\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\t\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\t\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\t\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\t\\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\\t\\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\t\\tfloat D = D_GGX( alpha, dotNH );\\n\\t\\treturn F * ( V * D );\\n\\t}\\n#endif\\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\\n\\tvec3 f0 = material.specularColor;\\n\\tfloat f90 = material.specularF90;\\n\\tfloat roughness = material.roughness;\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tF = mix( F, material.iridescenceFresnel, material.iridescence );\\n\\t#endif\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tfloat dotTL = dot( material.anisotropyT, lightDir );\\n\\t\\tfloat dotTV = dot( material.anisotropyT, viewDir );\\n\\t\\tfloat dotTH = dot( material.anisotropyT, halfDir );\\n\\t\\tfloat dotBL = dot( material.anisotropyB, lightDir );\\n\\t\\tfloat dotBV = dot( material.anisotropyB, viewDir );\\n\\t\\tfloat dotBH = dot( material.anisotropyB, halfDir );\\n\\t\\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\\n\\t\\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\\n\\t#else\\n\\t\\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\t\\tfloat D = D_GGX( alpha, dotNH );\\n\\t#endif\\n\\treturn F * ( V * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie( float roughness, float dotNH ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tfloat invAlpha = 1.0 / alpha;\\n\\tfloat cos2h = dotNH * dotNH;\\n\\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\\n\\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\\n}\\nfloat V_Neubelt( float dotNV, float dotNL ) {\\n\\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\\n}\\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat D = D_Charlie( sheenRoughness, dotNH );\\n\\tfloat V = V_Neubelt( dotNV, dotNL );\\n\\treturn sheenColor * ( D * V );\\n}\\n#endif\\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat r2 = roughness * roughness;\\n\\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\\n\\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\\n\\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\\n\\treturn saturate( DG * RECIPROCAL_PI );\\n}\\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\\n\\treturn fab;\\n}\\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\\n\\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\\treturn specularColor * fab.x + specularF90 * fab.y;\\n}\\n#ifdef USE_IRIDESCENCE\\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n#else\\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n#endif\\n\\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\\n\\t#else\\n\\t\\tvec3 Fr = specularColor;\\n\\t#endif\\n\\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\\n\\tfloat Ess = fab.x + fab.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.roughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3( 0, 1, 0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = dotNLcc * directLight.color;\\n\\t\\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\\n\\t#endif\\n\\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\\n\\t#endif\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\\n\\t#else\\n\\t\\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\\n\\t#endif\\n\\tvec3 totalScattering = singleScattering + multiScattering;\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\\n\\treflectedLight.indirectSpecular += radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\n\nvar lights_fragment_begin = \"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef USE_CLEARCOAT\\n\\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\\n\\tif ( material.iridescenceThickness == 0.0 ) {\\n\\t\\tmaterial.iridescence = 0.0;\\n\\t} else {\\n\\t\\tmaterial.iridescence = saturate( material.iridescence );\\n\\t}\\n\\tif ( material.iridescence > 0.0 ) {\\n\\t\\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\\n\\t\\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\\n\\t}\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointLightInfo( pointLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\tvec4 spotColor;\\n\\tvec3 spotLightCoord;\\n\\tbool inSpotLightMap;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotLightInfo( spotLight, geometry, directLight );\\n\\t\\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\\n\\t\\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\\n\\t\\t#else\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\\t\\t#endif\\n\\t\\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\\n\\t\\t\\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\\n\\t\\t\\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\\n\\t\\t\\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\\n\\t\\t\\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\\n\\t\\t#endif\\n\\t\\t#undef SPOT_LIGHT_MAP_INDEX\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\n\nvar lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getIBLIrradiance( geometry.normal );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\\n\\t#else\\n\\t\\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\\n\\t#endif\\n#endif\";\n\nvar lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\";\n\nvar logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\n\nvar logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\";\n\nvar logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\";\n\nvar logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar map_fragment = \"#ifdef USE_MAP\\n\\tdiffuseColor *= texture2D( map, vMapUv );\\n#endif\";\n\nvar map_pars_fragment = \"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\";\n\nvar map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\t#if defined( USE_POINTS_UV )\\n\\t\\tvec2 uv = vUv;\\n\\t#else\\n\\t\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\t#endif\\n#endif\\n#ifdef USE_MAP\\n\\tdiffuseColor *= texture2D( map, uv );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\n\nvar map_particle_pars_fragment = \"#if defined( USE_POINTS_UV )\\n\\tvarying vec2 vUv;\\n#else\\n\\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\t\\tuniform mat3 uvTransform;\\n\\t#endif\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\n\nvar metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\";\n\nvar morphcolor_vertex = \"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\\n\\tvColor *= morphTargetBaseInfluence;\\n\\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t#if defined( USE_COLOR_ALPHA )\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\\n\\t\\t#elif defined( USE_COLOR )\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\nvar morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\\n\\t\\t}\\n\\t#else\\n\\t\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\t\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\t\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\t\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n\\t#endif\\n#endif\";\n\nvar morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\\n\\t\\tuniform sampler2DArray morphTargetsTexture;\\n\\t\\tuniform ivec2 morphTargetsTextureSize;\\n\\t\\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\\n\\t\\t\\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\\n\\t\\t\\tint y = texelIndex / morphTargetsTextureSize.x;\\n\\t\\t\\tint x = texelIndex - y * morphTargetsTextureSize.x;\\n\\t\\t\\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\\n\\t\\t\\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\\n\\t\\t}\\n\\t#else\\n\\t\\t#ifndef USE_MORPHNORMALS\\n\\t\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t\\t#else\\n\\t\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\\n\\t\\t}\\n\\t#else\\n\\t\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\t\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\t\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\t\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t\\t#ifndef USE_MORPHNORMALS\\n\\t\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar normal_fragment_begin = \"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\\tvec3 fdx = dFdx( vViewPosition );\\n\\tvec3 fdy = dFdy( vViewPosition );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal *= faceDirection;\\n\\t#endif\\n#endif\\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\\n\\t#ifdef USE_TANGENT\\n\\t\\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\\t#else\\n\\t\\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\\n\\t\\t#if defined( USE_NORMALMAP )\\n\\t\\t\\tvNormalMapUv\\n\\t\\t#elif defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tvClearcoatNormalMapUv\\n\\t\\t#else\\n\\t\\t\\tvUv\\n\\t\\t#endif\\n\\t\\t);\\n\\t#endif\\n\\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\\t\\ttbn[0] *= faceDirection;\\n\\t\\ttbn[1] *= faceDirection;\\n\\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\t#ifdef USE_TANGENT\\n\\t\\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\\t#else\\n\\t\\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\\n\\t#endif\\n\\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\\t\\ttbn2[0] *= faceDirection;\\n\\t\\ttbn2[1] *= faceDirection;\\n\\t#endif\\n#endif\\nvec3 geometryNormal = normal;\";\n\nvar normal_fragment_maps = \"#ifdef USE_NORMALMAP_OBJECTSPACE\\n\\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\tnormal = normalize( tbn * mapN );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\";\n\nvar normal_pars_fragment = \"#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\";\n\nvar normal_pars_vertex = \"#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\";\n\nvar normal_vertex = \"#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\";\n\nvar normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef USE_NORMALMAP_OBJECTSPACE\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\\n\\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\\n\\t\\tvec3 q0 = dFdx( eye_pos.xyz );\\n\\t\\tvec3 q1 = dFdy( eye_pos.xyz );\\n\\t\\tvec2 st0 = dFdx( uv.st );\\n\\t\\tvec2 st1 = dFdy( uv.st );\\n\\t\\tvec3 N = surf_norm;\\n\\t\\tvec3 q1perp = cross( q1, N );\\n\\t\\tvec3 q0perp = cross( N, q0 );\\n\\t\\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\\t\\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\\t\\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\\t\\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\\n\\t\\treturn mat3( T * scale, B * scale, N );\\n\\t}\\n#endif\";\n\nvar clearcoat_normal_fragment_begin = \"#ifdef USE_CLEARCOAT\\n\\tvec3 clearcoatNormal = geometryNormal;\\n#endif\";\n\nvar clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\\n#endif\";\n\nvar clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\";\n\nvar iridescence_pars_fragment = \"#ifdef USE_IRIDESCENCEMAP\\n\\tuniform sampler2D iridescenceMap;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tuniform sampler2D iridescenceThicknessMap;\\n#endif\";\n\nvar opaque_fragment = \"#ifdef OPAQUE\\ndiffuseColor.a = 1.0;\\n#endif\\n#ifdef USE_TRANSMISSION\\ndiffuseColor.a *= material.transmissionAlpha;\\n#endif\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\";\n\nvar packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec2 packDepthToRG( in highp float v ) {\\n\\treturn packDepthToRGBA( v ).yx;\\n}\\nfloat unpackRGToDepth( const in highp vec2 v ) {\\n\\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\\treturn depth * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * depth - far );\\n}\";\n\nvar premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\n\nvar project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\n\nvar dithering_fragment = \"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\n\nvar dithering_pars_fragment = \"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\";\n\nvar roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\";\n\nvar roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\";\n\nvar shadowmap_pars_fragment = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#if NUM_SPOT_LIGHT_MAPS > 0\\n\\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\\n\\t\\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\nvar shadowmap_pars_vertex = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\\n\\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\";\n\nvar shadowmap_vertex = \"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\\n\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\tvec4 shadowWorldPosition;\\n#endif\\n#if defined( USE_SHADOWMAP )\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if NUM_SPOT_LIGHT_COORDS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition;\\n\\t\\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\t\\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\\n\\t\\t#endif\\n\\t\\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\";\n\nvar shadowmask_pars_fragment = \"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\";\n\nvar skinbase_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\n\nvar skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\tuniform highp sampler2D boneTexture;\\n\\tuniform int boneTextureSize;\\n\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\tfloat j = i * 4.0;\\n\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\ty = dy * ( y + 0.5 );\\n\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\treturn bone;\\n\\t}\\n#endif\";\n\nvar skinning_vertex = \"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\n\nvar skinnormal_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\";\n\nvar specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\";\n\nvar specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\";\n\nvar tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\n\nvar tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn saturate( toneMappingExposure * color );\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3( 1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605, 1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\n\nvar transmission_fragment = \"#ifdef USE_TRANSMISSION\\n\\tmaterial.transmission = transmission;\\n\\tmaterial.transmissionAlpha = 1.0;\\n\\tmaterial.thickness = thickness;\\n\\tmaterial.attenuationDistance = attenuationDistance;\\n\\tmaterial.attenuationColor = attenuationColor;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\\n\\t#endif\\n\\tvec3 pos = vWorldPosition;\\n\\tvec3 v = normalize( cameraPosition - pos );\\n\\tvec3 n = inverseTransformDirection( normal, viewMatrix );\\n\\tvec4 transmitted = getIBLVolumeRefraction(\\n\\t\\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\\n\\t\\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\\n\\t\\tmaterial.attenuationColor, material.attenuationDistance );\\n\\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\\n\\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\\n#endif\";\n\nvar transmission_pars_fragment = \"#ifdef USE_TRANSMISSION\\n\\tuniform float transmission;\\n\\tuniform float thickness;\\n\\tuniform float attenuationDistance;\\n\\tuniform vec3 attenuationColor;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tuniform sampler2D transmissionMap;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tuniform sampler2D thicknessMap;\\n\\t#endif\\n\\tuniform vec2 transmissionSamplerSize;\\n\\tuniform sampler2D transmissionSamplerMap;\\n\\tuniform mat4 modelMatrix;\\n\\tuniform mat4 projectionMatrix;\\n\\tvarying vec3 vWorldPosition;\\n\\tfloat w0( float a ) {\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\\n\\t}\\n\\tfloat w1( float a ) {\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\\n\\t}\\n\\tfloat w2( float a ){\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\\n\\t}\\n\\tfloat w3( float a ) {\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * a * a );\\n\\t}\\n\\tfloat g0( float a ) {\\n\\t\\treturn w0( a ) + w1( a );\\n\\t}\\n\\tfloat g1( float a ) {\\n\\t\\treturn w2( a ) + w3( a );\\n\\t}\\n\\tfloat h0( float a ) {\\n\\t\\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\\n\\t}\\n\\tfloat h1( float a ) {\\n\\t\\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\\n\\t}\\n\\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\\n\\t\\tuv = uv * texelSize.zw + 0.5;\\n\\t\\tvec2 iuv = floor( uv );\\n\\t\\tvec2 fuv = fract( uv );\\n\\t\\tfloat g0x = g0( fuv.x );\\n\\t\\tfloat g1x = g1( fuv.x );\\n\\t\\tfloat h0x = h0( fuv.x );\\n\\t\\tfloat h1x = h1( fuv.x );\\n\\t\\tfloat h0y = h0( fuv.y );\\n\\t\\tfloat h1y = h1( fuv.y );\\n\\t\\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\\t\\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\\t\\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\\t\\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\\t\\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\\n\\t\\t\\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\\n\\t}\\n\\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\\n\\t\\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\\n\\t\\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\\n\\t\\tvec2 fLodSizeInv = 1.0 / fLodSize;\\n\\t\\tvec2 cLodSizeInv = 1.0 / cLodSize;\\n\\t\\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\\n\\t\\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\\n\\t\\treturn mix( fSample, cSample, fract( lod ) );\\n\\t}\\n\\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\\n\\t\\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\\n\\t\\tvec3 modelScale;\\n\\t\\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\\n\\t\\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\\n\\t\\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\\n\\t\\treturn normalize( refractionVector ) * thickness * modelScale;\\n\\t}\\n\\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\\n\\t\\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\\n\\t}\\n\\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\\n\\t\\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\\n\\t\\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\\n\\t}\\n\\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\\n\\t\\tif ( isinf( attenuationDistance ) ) {\\n\\t\\t\\treturn vec3( 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\\n\\t\\t\\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\\t\\t\\treturn transmittance;\\n\\t\\t}\\n\\t}\\n\\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\\n\\t\\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\\n\\t\\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\\n\\t\\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\\n\\t\\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\\n\\t\\tvec3 refractedRayExit = position + transmissionRay;\\n\\t\\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\\n\\t\\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\\t\\trefractionCoords += 1.0;\\n\\t\\trefractionCoords /= 2.0;\\n\\t\\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\\n\\t\\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\\n\\t\\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\\n\\t\\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\\n\\t\\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\\n\\t\\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\\n\\t}\\n#endif\";\n\nvar uv_pars_fragment = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\\tuniform mat3 transmissionMapTransform;\\n\\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\\tuniform mat3 thicknessMapTransform;\\n\\tvarying vec2 vThicknessMapUv;\\n#endif\";\n\nvar uv_pars_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform mat3 mapTransform;\\n\\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform mat3 alphaMapTransform;\\n\\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\\tuniform mat3 lightMapTransform;\\n\\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\\tuniform mat3 aoMapTransform;\\n\\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\\tuniform mat3 bumpMapTransform;\\n\\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tuniform mat3 normalMapTransform;\\n\\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\\tuniform mat3 displacementMapTransform;\\n\\tvarying vec2 vDisplacementMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\\tuniform mat3 emissiveMapTransform;\\n\\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\\tuniform mat3 metalnessMapTransform;\\n\\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\\tuniform mat3 roughnessMapTransform;\\n\\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\\tuniform mat3 anisotropyMapTransform;\\n\\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\\tuniform mat3 clearcoatMapTransform;\\n\\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform mat3 clearcoatNormalMapTransform;\\n\\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform mat3 clearcoatRoughnessMapTransform;\\n\\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\\tuniform mat3 sheenColorMapTransform;\\n\\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\tuniform mat3 sheenRoughnessMapTransform;\\n\\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\\tuniform mat3 iridescenceMapTransform;\\n\\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tuniform mat3 iridescenceThicknessMapTransform;\\n\\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\\tuniform mat3 specularMapTransform;\\n\\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\\tuniform mat3 specularColorMapTransform;\\n\\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\\tuniform mat3 specularIntensityMapTransform;\\n\\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\\tuniform mat3 transmissionMapTransform;\\n\\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\\tuniform mat3 thicknessMapTransform;\\n\\tvarying vec2 vThicknessMapUv;\\n#endif\";\n\nvar uv_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\\tvUv = vec3( uv, 1 ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_AOMAP\\n\\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_BUMPMAP\\n\\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\";\n\nvar worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\n\nconst vertex$h = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\n\nconst fragment$h = \"uniform sampler2D t2D;\\nuniform float backgroundIntensity;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\ttexColor.rgb *= backgroundIntensity;\\n\\tgl_FragColor = texColor;\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$g = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\nconst fragment$g = \"#ifdef ENVMAP_TYPE_CUBE\\n\\tuniform samplerCube envMap;\\n#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\tuniform sampler2D envMap;\\n#endif\\nuniform float flipEnvMap;\\nuniform float backgroundBlurriness;\\nuniform float backgroundIntensity;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\\n\\t#else\\n\\t\\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t#endif\\n\\ttexColor.rgb *= backgroundIntensity;\\n\\tgl_FragColor = texColor;\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$f = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\nconst fragment$f = \"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\nvoid main() {\\n\\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\\n\\tgl_FragColor = texColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$e = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\";\n\nconst fragment$e = \"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\";\n\nconst vertex$d = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvWorldPosition = worldPosition.xyz;\\n}\";\n\nconst fragment$d = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main () {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\n\nconst vertex$c = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$c = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$b = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$b = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$a = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$a = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include \\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$9 = \"#define LAMBERT\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$9 = \"#define LAMBERT\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$8 = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n}\";\n\nconst fragment$8 = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$7 = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\n\nconst fragment$7 = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n\\t#ifdef OPAQUE\\n\\t\\tgl_FragColor.a = 1.0;\\n\\t#endif\\n}\";\n\nconst vertex$6 = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$6 = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$5 = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifdef USE_TRANSMISSION\\n\\tvarying vec3 vWorldPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n#ifdef USE_TRANSMISSION\\n\\tvWorldPosition = worldPosition.xyz;\\n#endif\\n}\";\n\nconst fragment$5 = \"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define IOR\\n\\t#define USE_SPECULAR\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef IOR\\n\\tuniform float ior;\\n#endif\\n#ifdef USE_SPECULAR\\n\\tuniform float specularIntensity;\\n\\tuniform vec3 specularColor;\\n\\t#ifdef USE_SPECULAR_COLORMAP\\n\\t\\tuniform sampler2D specularColorMap;\\n\\t#endif\\n\\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\\t\\tuniform sampler2D specularIntensityMap;\\n\\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tuniform float iridescence;\\n\\tuniform float iridescenceIOR;\\n\\tuniform float iridescenceThicknessMinimum;\\n\\tuniform float iridescenceThicknessMaximum;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheenColor;\\n\\tuniform float sheenRoughness;\\n\\t#ifdef USE_SHEEN_COLORMAP\\n\\t\\tuniform sampler2D sheenColorMap;\\n\\t#endif\\n\\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\t\\tuniform sampler2D sheenRoughnessMap;\\n\\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\\tuniform vec2 anisotropyVector;\\n\\t#ifdef USE_ANISOTROPYMAP\\n\\t\\tuniform sampler2D anisotropyMap;\\n\\t#endif\\n#endif\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\\t#include \\n\\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\\t#ifdef USE_SHEEN\\n\\t\\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\\n\\t\\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\\t\\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\\n\\t\\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$4 = \"#define TOON\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$4 = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$3 = \"uniform float size;\\nuniform float scale;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#ifdef USE_POINTS_UV\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\nvoid main() {\\n\\t#ifdef USE_POINTS_UV\\n\\t\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$3 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$2 = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$2 = \"uniform vec3 color;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$1 = \"uniform float rotation;\\nuniform vec2 center;\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$1 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst ShaderChunk = {\n\talphahash_fragment: alphahash_fragment,\n\talphahash_pars_fragment: alphahash_pars_fragment,\n\talphamap_fragment: alphamap_fragment,\n\talphamap_pars_fragment: alphamap_pars_fragment,\n\talphatest_fragment: alphatest_fragment,\n\talphatest_pars_fragment: alphatest_pars_fragment,\n\taomap_fragment: aomap_fragment,\n\taomap_pars_fragment: aomap_pars_fragment,\n\tbegin_vertex: begin_vertex,\n\tbeginnormal_vertex: beginnormal_vertex,\n\tbsdfs: bsdfs,\n\tiridescence_fragment: iridescence_fragment,\n\tbumpmap_pars_fragment: bumpmap_pars_fragment,\n\tclipping_planes_fragment: clipping_planes_fragment,\n\tclipping_planes_pars_fragment: clipping_planes_pars_fragment,\n\tclipping_planes_pars_vertex: clipping_planes_pars_vertex,\n\tclipping_planes_vertex: clipping_planes_vertex,\n\tcolor_fragment: color_fragment,\n\tcolor_pars_fragment: color_pars_fragment,\n\tcolor_pars_vertex: color_pars_vertex,\n\tcolor_vertex: color_vertex,\n\tcommon: common,\n\tcube_uv_reflection_fragment: cube_uv_reflection_fragment,\n\tdefaultnormal_vertex: defaultnormal_vertex,\n\tdisplacementmap_pars_vertex: displacementmap_pars_vertex,\n\tdisplacementmap_vertex: displacementmap_vertex,\n\temissivemap_fragment: emissivemap_fragment,\n\temissivemap_pars_fragment: emissivemap_pars_fragment,\n\tcolorspace_fragment: colorspace_fragment,\n\tcolorspace_pars_fragment: colorspace_pars_fragment,\n\tenvmap_fragment: envmap_fragment,\n\tenvmap_common_pars_fragment: envmap_common_pars_fragment,\n\tenvmap_pars_fragment: envmap_pars_fragment,\n\tenvmap_pars_vertex: envmap_pars_vertex,\n\tenvmap_physical_pars_fragment: envmap_physical_pars_fragment,\n\tenvmap_vertex: envmap_vertex,\n\tfog_vertex: fog_vertex,\n\tfog_pars_vertex: fog_pars_vertex,\n\tfog_fragment: fog_fragment,\n\tfog_pars_fragment: fog_pars_fragment,\n\tgradientmap_pars_fragment: gradientmap_pars_fragment,\n\tlightmap_fragment: lightmap_fragment,\n\tlightmap_pars_fragment: lightmap_pars_fragment,\n\tlights_lambert_fragment: lights_lambert_fragment,\n\tlights_lambert_pars_fragment: lights_lambert_pars_fragment,\n\tlights_pars_begin: lights_pars_begin,\n\tlights_toon_fragment: lights_toon_fragment,\n\tlights_toon_pars_fragment: lights_toon_pars_fragment,\n\tlights_phong_fragment: lights_phong_fragment,\n\tlights_phong_pars_fragment: lights_phong_pars_fragment,\n\tlights_physical_fragment: lights_physical_fragment,\n\tlights_physical_pars_fragment: lights_physical_pars_fragment,\n\tlights_fragment_begin: lights_fragment_begin,\n\tlights_fragment_maps: lights_fragment_maps,\n\tlights_fragment_end: lights_fragment_end,\n\tlogdepthbuf_fragment: logdepthbuf_fragment,\n\tlogdepthbuf_pars_fragment: logdepthbuf_pars_fragment,\n\tlogdepthbuf_pars_vertex: logdepthbuf_pars_vertex,\n\tlogdepthbuf_vertex: logdepthbuf_vertex,\n\tmap_fragment: map_fragment,\n\tmap_pars_fragment: map_pars_fragment,\n\tmap_particle_fragment: map_particle_fragment,\n\tmap_particle_pars_fragment: map_particle_pars_fragment,\n\tmetalnessmap_fragment: metalnessmap_fragment,\n\tmetalnessmap_pars_fragment: metalnessmap_pars_fragment,\n\tmorphcolor_vertex: morphcolor_vertex,\n\tmorphnormal_vertex: morphnormal_vertex,\n\tmorphtarget_pars_vertex: morphtarget_pars_vertex,\n\tmorphtarget_vertex: morphtarget_vertex,\n\tnormal_fragment_begin: normal_fragment_begin,\n\tnormal_fragment_maps: normal_fragment_maps,\n\tnormal_pars_fragment: normal_pars_fragment,\n\tnormal_pars_vertex: normal_pars_vertex,\n\tnormal_vertex: normal_vertex,\n\tnormalmap_pars_fragment: normalmap_pars_fragment,\n\tclearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin,\n\tclearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps,\n\tclearcoat_pars_fragment: clearcoat_pars_fragment,\n\tiridescence_pars_fragment: iridescence_pars_fragment,\n\topaque_fragment: opaque_fragment,\n\tpacking: packing,\n\tpremultiplied_alpha_fragment: premultiplied_alpha_fragment,\n\tproject_vertex: project_vertex,\n\tdithering_fragment: dithering_fragment,\n\tdithering_pars_fragment: dithering_pars_fragment,\n\troughnessmap_fragment: roughnessmap_fragment,\n\troughnessmap_pars_fragment: roughnessmap_pars_fragment,\n\tshadowmap_pars_fragment: shadowmap_pars_fragment,\n\tshadowmap_pars_vertex: shadowmap_pars_vertex,\n\tshadowmap_vertex: shadowmap_vertex,\n\tshadowmask_pars_fragment: shadowmask_pars_fragment,\n\tskinbase_vertex: skinbase_vertex,\n\tskinning_pars_vertex: skinning_pars_vertex,\n\tskinning_vertex: skinning_vertex,\n\tskinnormal_vertex: skinnormal_vertex,\n\tspecularmap_fragment: specularmap_fragment,\n\tspecularmap_pars_fragment: specularmap_pars_fragment,\n\ttonemapping_fragment: tonemapping_fragment,\n\ttonemapping_pars_fragment: tonemapping_pars_fragment,\n\ttransmission_fragment: transmission_fragment,\n\ttransmission_pars_fragment: transmission_pars_fragment,\n\tuv_pars_fragment: uv_pars_fragment,\n\tuv_pars_vertex: uv_pars_vertex,\n\tuv_vertex: uv_vertex,\n\tworldpos_vertex: worldpos_vertex,\n\n\tbackground_vert: vertex$h,\n\tbackground_frag: fragment$h,\n\tbackgroundCube_vert: vertex$g,\n\tbackgroundCube_frag: fragment$g,\n\tcube_vert: vertex$f,\n\tcube_frag: fragment$f,\n\tdepth_vert: vertex$e,\n\tdepth_frag: fragment$e,\n\tdistanceRGBA_vert: vertex$d,\n\tdistanceRGBA_frag: fragment$d,\n\tequirect_vert: vertex$c,\n\tequirect_frag: fragment$c,\n\tlinedashed_vert: vertex$b,\n\tlinedashed_frag: fragment$b,\n\tmeshbasic_vert: vertex$a,\n\tmeshbasic_frag: fragment$a,\n\tmeshlambert_vert: vertex$9,\n\tmeshlambert_frag: fragment$9,\n\tmeshmatcap_vert: vertex$8,\n\tmeshmatcap_frag: fragment$8,\n\tmeshnormal_vert: vertex$7,\n\tmeshnormal_frag: fragment$7,\n\tmeshphong_vert: vertex$6,\n\tmeshphong_frag: fragment$6,\n\tmeshphysical_vert: vertex$5,\n\tmeshphysical_frag: fragment$5,\n\tmeshtoon_vert: vertex$4,\n\tmeshtoon_frag: fragment$4,\n\tpoints_vert: vertex$3,\n\tpoints_frag: fragment$3,\n\tshadow_vert: vertex$2,\n\tshadow_frag: fragment$2,\n\tsprite_vert: vertex$1,\n\tsprite_frag: fragment$1\n};\n\n/**\n * Uniforms library for shared webgl shaders\n */\n\nconst UniformsLib = {\n\n\tcommon: {\n\n\t\tdiffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\n\t\tmap: { value: null },\n\t\tmapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\n\t\talphaMap: { value: null },\n\t\talphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\n\t\talphaTest: { value: 0 }\n\n\t},\n\n\tspecularmap: {\n\n\t\tspecularMap: { value: null },\n\t\tspecularMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tenvmap: {\n\n\t\tenvMap: { value: null },\n\t\tflipEnvMap: { value: - 1 },\n\t\treflectivity: { value: 1.0 }, // basic, lambert, phong\n\t\tior: { value: 1.5 }, // physical\n\t\trefractionRatio: { value: 0.98 }, // basic, lambert, phong\n\n\t},\n\n\taomap: {\n\n\t\taoMap: { value: null },\n\t\taoMapIntensity: { value: 1 },\n\t\taoMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tlightmap: {\n\n\t\tlightMap: { value: null },\n\t\tlightMapIntensity: { value: 1 },\n\t\tlightMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tbumpmap: {\n\n\t\tbumpMap: { value: null },\n\t\tbumpMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\tbumpScale: { value: 1 }\n\n\t},\n\n\tnormalmap: {\n\n\t\tnormalMap: { value: null },\n\t\tnormalMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\tnormalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) }\n\n\t},\n\n\tdisplacementmap: {\n\n\t\tdisplacementMap: { value: null },\n\t\tdisplacementMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\tdisplacementScale: { value: 1 },\n\t\tdisplacementBias: { value: 0 }\n\n\t},\n\n\temissivemap: {\n\n\t\temissiveMap: { value: null },\n\t\temissiveMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tmetalnessmap: {\n\n\t\tmetalnessMap: { value: null },\n\t\tmetalnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\troughnessmap: {\n\n\t\troughnessMap: { value: null },\n\t\troughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tgradientmap: {\n\n\t\tgradientMap: { value: null }\n\n\t},\n\n\tfog: {\n\n\t\tfogDensity: { value: 0.00025 },\n\t\tfogNear: { value: 1 },\n\t\tfogFar: { value: 2000 },\n\t\tfogColor: { value: /*@__PURE__*/ new Color( 0xffffff ) }\n\n\t},\n\n\tlights: {\n\n\t\tambientLightColor: { value: [] },\n\n\t\tlightProbe: { value: [] },\n\n\t\tdirectionalLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tcolor: {}\n\t\t} },\n\n\t\tdirectionalLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tdirectionalShadowMap: { value: [] },\n\t\tdirectionalShadowMatrix: { value: [] },\n\n\t\tspotLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdirection: {},\n\t\t\tdistance: {},\n\t\t\tconeCos: {},\n\t\t\tpenumbraCos: {},\n\t\t\tdecay: {}\n\t\t} },\n\n\t\tspotLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tspotLightMap: { value: [] },\n\t\tspotShadowMap: { value: [] },\n\t\tspotLightMatrix: { value: [] },\n\n\t\tpointLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdecay: {},\n\t\t\tdistance: {}\n\t\t} },\n\n\t\tpointLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {},\n\t\t\tshadowCameraNear: {},\n\t\t\tshadowCameraFar: {}\n\t\t} },\n\n\t\tpointShadowMap: { value: [] },\n\t\tpointShadowMatrix: { value: [] },\n\n\t\themisphereLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tskyColor: {},\n\t\t\tgroundColor: {}\n\t\t} },\n\n\t\t// TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n\t\trectAreaLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\twidth: {},\n\t\t\theight: {}\n\t\t} },\n\n\t\tltc_1: { value: null },\n\t\tltc_2: { value: null }\n\n\t},\n\n\tpoints: {\n\n\t\tdiffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tsize: { value: 1.0 },\n\t\tscale: { value: 1.0 },\n\t\tmap: { value: null },\n\t\talphaMap: { value: null },\n\t\talphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\talphaTest: { value: 0 },\n\t\tuvTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tsprite: {\n\n\t\tdiffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tcenter: { value: /*@__PURE__*/ new Vector2( 0.5, 0.5 ) },\n\t\trotation: { value: 0.0 },\n\t\tmap: { value: null },\n\t\tmapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\talphaMap: { value: null },\n\t\talphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\talphaTest: { value: 0 }\n\n\t}\n\n};\n\nconst ShaderLib = {\n\n\tbasic: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshbasic_vert,\n\t\tfragmentShader: ShaderChunk.meshbasic_frag\n\n\t},\n\n\tlambert: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshlambert_vert,\n\t\tfragmentShader: ShaderChunk.meshlambert_frag\n\n\t},\n\n\tphong: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\t\tspecular: { value: /*@__PURE__*/ new Color( 0x111111 ) },\n\t\t\t\tshininess: { value: 30 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphong_vert,\n\t\tfragmentShader: ShaderChunk.meshphong_frag\n\n\t},\n\n\tstandard: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.roughnessmap,\n\t\t\tUniformsLib.metalnessmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\t\troughness: { value: 1.0 },\n\t\t\t\tmetalness: { value: 0.0 },\n\t\t\t\tenvMapIntensity: { value: 1 } // temporary\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\n\t},\n\n\ttoon: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.gradientmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshtoon_vert,\n\t\tfragmentShader: ShaderChunk.meshtoon_frag\n\n\t},\n\n\tmatcap: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tmatcap: { value: null }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshmatcap_vert,\n\t\tfragmentShader: ShaderChunk.meshmatcap_frag\n\n\t},\n\n\tpoints: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.points,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.points_vert,\n\t\tfragmentShader: ShaderChunk.points_frag\n\n\t},\n\n\tdashed: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tscale: { value: 1 },\n\t\t\t\tdashSize: { value: 1 },\n\t\t\t\ttotalSize: { value: 2 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.linedashed_vert,\n\t\tfragmentShader: ShaderChunk.linedashed_frag\n\n\t},\n\n\tdepth: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.depth_vert,\n\t\tfragmentShader: ShaderChunk.depth_frag\n\n\t},\n\n\tnormal: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshnormal_vert,\n\t\tfragmentShader: ShaderChunk.meshnormal_frag\n\n\t},\n\n\tsprite: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.sprite,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.sprite_vert,\n\t\tfragmentShader: ShaderChunk.sprite_frag\n\n\t},\n\n\tbackground: {\n\n\t\tuniforms: {\n\t\t\tuvTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tt2D: { value: null },\n\t\t\tbackgroundIntensity: { value: 1 }\n\t\t},\n\n\t\tvertexShader: ShaderChunk.background_vert,\n\t\tfragmentShader: ShaderChunk.background_frag\n\n\t},\n\n\tbackgroundCube: {\n\n\t\tuniforms: {\n\t\t\tenvMap: { value: null },\n\t\t\tflipEnvMap: { value: - 1 },\n\t\t\tbackgroundBlurriness: { value: 0 },\n\t\t\tbackgroundIntensity: { value: 1 }\n\t\t},\n\n\t\tvertexShader: ShaderChunk.backgroundCube_vert,\n\t\tfragmentShader: ShaderChunk.backgroundCube_frag\n\n\t},\n\n\tcube: {\n\n\t\tuniforms: {\n\t\t\ttCube: { value: null },\n\t\t\ttFlip: { value: - 1 },\n\t\t\topacity: { value: 1.0 }\n\t\t},\n\n\t\tvertexShader: ShaderChunk.cube_vert,\n\t\tfragmentShader: ShaderChunk.cube_frag\n\n\t},\n\n\tequirect: {\n\n\t\tuniforms: {\n\t\t\ttEquirect: { value: null },\n\t\t},\n\n\t\tvertexShader: ShaderChunk.equirect_vert,\n\t\tfragmentShader: ShaderChunk.equirect_frag\n\n\t},\n\n\tdistanceRGBA: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\treferencePosition: { value: /*@__PURE__*/ new Vector3() },\n\t\t\t\tnearDistance: { value: 1 },\n\t\t\t\tfarDistance: { value: 1000 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.distanceRGBA_vert,\n\t\tfragmentShader: ShaderChunk.distanceRGBA_frag\n\n\t},\n\n\tshadow: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.lights,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tcolor: { value: /*@__PURE__*/ new Color( 0x00000 ) },\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t},\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.shadow_vert,\n\t\tfragmentShader: ShaderChunk.shadow_frag\n\n\t}\n\n};\n\nShaderLib.physical = {\n\n\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\tShaderLib.standard.uniforms,\n\t\t{\n\t\t\tclearcoat: { value: 0 },\n\t\t\tclearcoatMap: { value: null },\n\t\t\tclearcoatMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tclearcoatNormalMap: { value: null },\n\t\t\tclearcoatNormalMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tclearcoatNormalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) },\n\t\t\tclearcoatRoughness: { value: 0 },\n\t\t\tclearcoatRoughnessMap: { value: null },\n\t\t\tclearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tiridescence: { value: 0 },\n\t\t\tiridescenceMap: { value: null },\n\t\t\tiridescenceMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tiridescenceIOR: { value: 1.3 },\n\t\t\tiridescenceThicknessMinimum: { value: 100 },\n\t\t\tiridescenceThicknessMaximum: { value: 400 },\n\t\t\tiridescenceThicknessMap: { value: null },\n\t\t\tiridescenceThicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tsheen: { value: 0 },\n\t\t\tsheenColor: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\tsheenColorMap: { value: null },\n\t\t\tsheenColorMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tsheenRoughness: { value: 1 },\n\t\t\tsheenRoughnessMap: { value: null },\n\t\t\tsheenRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\ttransmission: { value: 0 },\n\t\t\ttransmissionMap: { value: null },\n\t\t\ttransmissionMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\ttransmissionSamplerSize: { value: /*@__PURE__*/ new Vector2() },\n\t\t\ttransmissionSamplerMap: { value: null },\n\t\t\tthickness: { value: 0 },\n\t\t\tthicknessMap: { value: null },\n\t\t\tthicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tattenuationDistance: { value: 0 },\n\t\t\tattenuationColor: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\tspecularColor: { value: /*@__PURE__*/ new Color( 1, 1, 1 ) },\n\t\t\tspecularColorMap: { value: null },\n\t\t\tspecularColorMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tspecularIntensity: { value: 1 },\n\t\t\tspecularIntensityMap: { value: null },\n\t\t\tspecularIntensityMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tanisotropyVector: { value: /*@__PURE__*/ new Vector2() },\n\t\t\tanisotropyMap: { value: null },\n\t\t\tanisotropyMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t}\n\t] ),\n\n\tvertexShader: ShaderChunk.meshphysical_vert,\n\tfragmentShader: ShaderChunk.meshphysical_frag\n\n};\n\nconst _rgb = { r: 0, b: 0, g: 0 };\n\nfunction WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) {\n\n\tconst clearColor = new Color( 0x000000 );\n\tlet clearAlpha = alpha === true ? 0 : 1;\n\n\tlet planeMesh;\n\tlet boxMesh;\n\n\tlet currentBackground = null;\n\tlet currentBackgroundVersion = 0;\n\tlet currentTonemapping = null;\n\n\tfunction render( renderList, scene ) {\n\n\t\tlet forceClear = false;\n\t\tlet background = scene.isScene === true ? scene.background : null;\n\n\t\tif ( background && background.isTexture ) {\n\n\t\t\tconst usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background\n\t\t\tbackground = ( usePMREM ? cubeuvmaps : cubemaps ).get( background );\n\n\t\t}\n\n\t\tif ( background === null ) {\n\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t} else if ( background && background.isColor ) {\n\n\t\t\tsetClear( background, 1 );\n\t\t\tforceClear = true;\n\n\t\t}\n\n\t\tconst xr = renderer.xr;\n\t\tconst environmentBlendMode = xr.getEnvironmentBlendMode();\n\n\t\tswitch ( environmentBlendMode ) {\n\n\t\t\tcase 'opaque':\n\t\t\t\tforceClear = true;\n\t\t\t\tbreak;\n\n\t\t\tcase 'additive':\n\t\t\t\tstate.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );\n\t\t\t\tforceClear = true;\n\t\t\t\tbreak;\n\n\t\t\tcase 'alpha-blend':\n\t\t\t\tstate.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );\n\t\t\t\tforceClear = true;\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tif ( renderer.autoClear || forceClear ) {\n\n\t\t\trenderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\n\t\t}\n\n\t\tif ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) {\n\n\t\t\tif ( boxMesh === undefined ) {\n\n\t\t\t\tboxMesh = new Mesh(\n\t\t\t\t\tnew BoxGeometry( 1, 1, 1 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundCubeMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.backgroundCube.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.backgroundCube.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.backgroundCube.fragmentShader,\n\t\t\t\t\t\tside: BackSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'normal' );\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'uv' );\n\n\t\t\t\tboxMesh.onBeforeRender = function ( renderer, scene, camera ) {\n\n\t\t\t\t\tthis.matrixWorld.copyPosition( camera.matrixWorld );\n\n\t\t\t\t};\n\n\t\t\t\t// add \"envMap\" material property so the renderer can evaluate it like for built-in materials\n\t\t\t\tObject.defineProperty( boxMesh.material, 'envMap', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.envMap.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( boxMesh );\n\n\t\t\t}\n\n\t\t\tboxMesh.material.uniforms.envMap.value = background;\n\t\t\tboxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? - 1 : 1;\n\t\t\tboxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;\n\t\t\tboxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n\t\t\tboxMesh.material.toneMapped = ( background.colorSpace === SRGBColorSpace ) ? false : true;\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tboxMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t\tboxMesh.layers.enableAll();\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null );\n\n\t\t} else if ( background && background.isTexture ) {\n\n\t\t\tif ( planeMesh === undefined ) {\n\n\t\t\t\tplaneMesh = new Mesh(\n\t\t\t\t\tnew PlaneGeometry( 2, 2 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.background.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.background.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.background.fragmentShader,\n\t\t\t\t\t\tside: FrontSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tplaneMesh.geometry.deleteAttribute( 'normal' );\n\n\t\t\t\t// add \"map\" material property so the renderer can evaluate it like for built-in materials\n\t\t\t\tObject.defineProperty( planeMesh.material, 'map', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.t2D.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( planeMesh );\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.t2D.value = background;\n\t\t\tplaneMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n\t\t\tplaneMesh.material.toneMapped = ( background.colorSpace === SRGBColorSpace ) ? false : true;\n\n\t\t\tif ( background.matrixAutoUpdate === true ) {\n\n\t\t\t\tbackground.updateMatrix();\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.uvTransform.value.copy( background.matrix );\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tplaneMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t\tplaneMesh.layers.enableAll();\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null );\n\n\t\t}\n\n\t}\n\n\tfunction setClear( color, alpha ) {\n\n\t\tcolor.getRGB( _rgb, getUnlitUniformColorSpace( renderer ) );\n\n\t\tstate.buffers.color.setClear( _rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha );\n\n\t}\n\n\treturn {\n\n\t\tgetClearColor: function () {\n\n\t\t\treturn clearColor;\n\n\t\t},\n\t\tsetClearColor: function ( color, alpha = 1 ) {\n\n\t\t\tclearColor.set( color );\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\tgetClearAlpha: function () {\n\n\t\t\treturn clearAlpha;\n\n\t\t},\n\t\tsetClearAlpha: function ( alpha ) {\n\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\trender: render\n\n\t};\n\n}\n\nfunction WebGLBindingStates( gl, extensions, attributes, capabilities ) {\n\n\tconst maxVertexAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS );\n\n\tconst extension = capabilities.isWebGL2 ? null : extensions.get( 'OES_vertex_array_object' );\n\tconst vaoAvailable = capabilities.isWebGL2 || extension !== null;\n\n\tconst bindingStates = {};\n\n\tconst defaultState = createBindingState( null );\n\tlet currentState = defaultState;\n\tlet forceUpdate = false;\n\n\tfunction setup( object, material, program, geometry, index ) {\n\n\t\tlet updateBuffers = false;\n\n\t\tif ( vaoAvailable ) {\n\n\t\t\tconst state = getBindingState( geometry, program, material );\n\n\t\t\tif ( currentState !== state ) {\n\n\t\t\t\tcurrentState = state;\n\t\t\t\tbindVertexArrayObject( currentState.object );\n\n\t\t\t}\n\n\t\t\tupdateBuffers = needsUpdate( object, geometry, program, index );\n\n\t\t\tif ( updateBuffers ) saveCache( object, geometry, program, index );\n\n\t\t} else {\n\n\t\t\tconst wireframe = ( material.wireframe === true );\n\n\t\t\tif ( currentState.geometry !== geometry.id ||\n\t\t\t\tcurrentState.program !== program.id ||\n\t\t\t\tcurrentState.wireframe !== wireframe ) {\n\n\t\t\t\tcurrentState.geometry = geometry.id;\n\t\t\t\tcurrentState.program = program.id;\n\t\t\t\tcurrentState.wireframe = wireframe;\n\n\t\t\t\tupdateBuffers = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( index !== null ) {\n\n\t\t\tattributes.update( index, gl.ELEMENT_ARRAY_BUFFER );\n\n\t\t}\n\n\t\tif ( updateBuffers || forceUpdate ) {\n\n\t\t\tforceUpdate = false;\n\n\t\t\tsetupVertexAttributes( object, material, program, geometry );\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tgl.bindBuffer( gl.ELEMENT_ARRAY_BUFFER, attributes.get( index ).buffer );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction createVertexArrayObject() {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.createVertexArray();\n\n\t\treturn extension.createVertexArrayOES();\n\n\t}\n\n\tfunction bindVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.bindVertexArray( vao );\n\n\t\treturn extension.bindVertexArrayOES( vao );\n\n\t}\n\n\tfunction deleteVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.deleteVertexArray( vao );\n\n\t\treturn extension.deleteVertexArrayOES( vao );\n\n\t}\n\n\tfunction getBindingState( geometry, program, material ) {\n\n\t\tconst wireframe = ( material.wireframe === true );\n\n\t\tlet programMap = bindingStates[ geometry.id ];\n\n\t\tif ( programMap === undefined ) {\n\n\t\t\tprogramMap = {};\n\t\t\tbindingStates[ geometry.id ] = programMap;\n\n\t\t}\n\n\t\tlet stateMap = programMap[ program.id ];\n\n\t\tif ( stateMap === undefined ) {\n\n\t\t\tstateMap = {};\n\t\t\tprogramMap[ program.id ] = stateMap;\n\n\t\t}\n\n\t\tlet state = stateMap[ wireframe ];\n\n\t\tif ( state === undefined ) {\n\n\t\t\tstate = createBindingState( createVertexArrayObject() );\n\t\t\tstateMap[ wireframe ] = state;\n\n\t\t}\n\n\t\treturn state;\n\n\t}\n\n\tfunction createBindingState( vao ) {\n\n\t\tconst newAttributes = [];\n\t\tconst enabledAttributes = [];\n\t\tconst attributeDivisors = [];\n\n\t\tfor ( let i = 0; i < maxVertexAttributes; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\t\t\tenabledAttributes[ i ] = 0;\n\t\t\tattributeDivisors[ i ] = 0;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\t// for backward compatibility on non-VAO support browser\n\t\t\tgeometry: null,\n\t\t\tprogram: null,\n\t\t\twireframe: false,\n\n\t\t\tnewAttributes: newAttributes,\n\t\t\tenabledAttributes: enabledAttributes,\n\t\t\tattributeDivisors: attributeDivisors,\n\t\t\tobject: vao,\n\t\t\tattributes: {},\n\t\t\tindex: null\n\n\t\t};\n\n\t}\n\n\tfunction needsUpdate( object, geometry, program, index ) {\n\n\t\tconst cachedAttributes = currentState.attributes;\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tlet attributesNum = 0;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute.location >= 0 ) {\n\n\t\t\t\tconst cachedAttribute = cachedAttributes[ name ];\n\t\t\t\tlet geometryAttribute = geometryAttributes[ name ];\n\n\t\t\t\tif ( geometryAttribute === undefined ) {\n\n\t\t\t\t\tif ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix;\n\t\t\t\t\tif ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor;\n\n\t\t\t\t}\n\n\t\t\t\tif ( cachedAttribute === undefined ) return true;\n\n\t\t\t\tif ( cachedAttribute.attribute !== geometryAttribute ) return true;\n\n\t\t\t\tif ( geometryAttribute && cachedAttribute.data !== geometryAttribute.data ) return true;\n\n\t\t\t\tattributesNum ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( currentState.attributesNum !== attributesNum ) return true;\n\n\t\tif ( currentState.index !== index ) return true;\n\n\t\treturn false;\n\n\t}\n\n\tfunction saveCache( object, geometry, program, index ) {\n\n\t\tconst cache = {};\n\t\tconst attributes = geometry.attributes;\n\t\tlet attributesNum = 0;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute.location >= 0 ) {\n\n\t\t\t\tlet attribute = attributes[ name ];\n\n\t\t\t\tif ( attribute === undefined ) {\n\n\t\t\t\t\tif ( name === 'instanceMatrix' && object.instanceMatrix ) attribute = object.instanceMatrix;\n\t\t\t\t\tif ( name === 'instanceColor' && object.instanceColor ) attribute = object.instanceColor;\n\n\t\t\t\t}\n\n\t\t\t\tconst data = {};\n\t\t\t\tdata.attribute = attribute;\n\n\t\t\t\tif ( attribute && attribute.data ) {\n\n\t\t\t\t\tdata.data = attribute.data;\n\n\t\t\t\t}\n\n\t\t\t\tcache[ name ] = data;\n\n\t\t\t\tattributesNum ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tcurrentState.attributes = cache;\n\t\tcurrentState.attributesNum = attributesNum;\n\n\t\tcurrentState.index = index;\n\n\t}\n\n\tfunction initAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\n\t\tfor ( let i = 0, il = newAttributes.length; i < il; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\tfunction enableAttribute( attribute ) {\n\n\t\tenableAttributeAndDivisor( attribute, 0 );\n\n\t}\n\n\tfunction enableAttributeAndDivisor( attribute, meshPerAttribute ) {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\t\tconst attributeDivisors = currentState.attributeDivisors;\n\n\t\tnewAttributes[ attribute ] = 1;\n\n\t\tif ( enabledAttributes[ attribute ] === 0 ) {\n\n\t\t\tgl.enableVertexAttribArray( attribute );\n\t\t\tenabledAttributes[ attribute ] = 1;\n\n\t\t}\n\n\t\tif ( attributeDivisors[ attribute ] !== meshPerAttribute ) {\n\n\t\t\tconst extension = capabilities.isWebGL2 ? gl : extensions.get( 'ANGLE_instanced_arrays' );\n\n\t\t\textension[ capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE' ]( attribute, meshPerAttribute );\n\t\t\tattributeDivisors[ attribute ] = meshPerAttribute;\n\n\t\t}\n\n\t}\n\n\tfunction disableUnusedAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\n\t\tfor ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) {\n\n\t\t\tif ( enabledAttributes[ i ] !== newAttributes[ i ] ) {\n\n\t\t\t\tgl.disableVertexAttribArray( i );\n\t\t\t\tenabledAttributes[ i ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction vertexAttribPointer( index, size, type, normalized, stride, offset, integer ) {\n\n\t\tif ( integer === true ) {\n\n\t\t\tgl.vertexAttribIPointer( index, size, type, stride, offset );\n\n\t\t} else {\n\n\t\t\tgl.vertexAttribPointer( index, size, type, normalized, stride, offset );\n\n\t\t}\n\n\t}\n\n\tfunction setupVertexAttributes( object, material, program, geometry ) {\n\n\t\tif ( capabilities.isWebGL2 === false && ( object.isInstancedMesh || geometry.isInstancedBufferGeometry ) ) {\n\n\t\t\tif ( extensions.get( 'ANGLE_instanced_arrays' ) === null ) return;\n\n\t\t}\n\n\t\tinitAttributes();\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tconst materialDefaultAttributeValues = material.defaultAttributeValues;\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute.location >= 0 ) {\n\n\t\t\t\tlet geometryAttribute = geometryAttributes[ name ];\n\n\t\t\t\tif ( geometryAttribute === undefined ) {\n\n\t\t\t\t\tif ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix;\n\t\t\t\t\tif ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor;\n\n\t\t\t\t}\n\n\t\t\t\tif ( geometryAttribute !== undefined ) {\n\n\t\t\t\t\tconst normalized = geometryAttribute.normalized;\n\t\t\t\t\tconst size = geometryAttribute.itemSize;\n\n\t\t\t\t\tconst attribute = attributes.get( geometryAttribute );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\t\t\t\t\tconst bytesPerElement = attribute.bytesPerElement;\n\n\t\t\t\t\t// check for integer attributes (WebGL 2 only)\n\n\t\t\t\t\tconst integer = ( capabilities.isWebGL2 === true && ( type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === IntType ) );\n\n\t\t\t\t\tif ( geometryAttribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst data = geometryAttribute.data;\n\t\t\t\t\t\tconst stride = data.stride;\n\t\t\t\t\t\tconst offset = geometryAttribute.offset;\n\n\t\t\t\t\t\tif ( data.isInstancedInterleavedBuffer ) {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute.location + i, data.meshPerAttribute );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = data.meshPerAttribute * data.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttribute( programAttribute.location + i );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( gl.ARRAY_BUFFER, buffer );\n\n\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\tvertexAttribPointer(\n\t\t\t\t\t\t\t\tprogramAttribute.location + i,\n\t\t\t\t\t\t\t\tsize / programAttribute.locationSize,\n\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\tnormalized,\n\t\t\t\t\t\t\t\tstride * bytesPerElement,\n\t\t\t\t\t\t\t\t( offset + ( size / programAttribute.locationSize ) * i ) * bytesPerElement,\n\t\t\t\t\t\t\t\tinteger\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( geometryAttribute.isInstancedBufferAttribute ) {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute.location + i, geometryAttribute.meshPerAttribute );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttribute( programAttribute.location + i );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( gl.ARRAY_BUFFER, buffer );\n\n\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\tvertexAttribPointer(\n\t\t\t\t\t\t\t\tprogramAttribute.location + i,\n\t\t\t\t\t\t\t\tsize / programAttribute.locationSize,\n\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\tnormalized,\n\t\t\t\t\t\t\t\tsize * bytesPerElement,\n\t\t\t\t\t\t\t\t( size / programAttribute.locationSize ) * i * bytesPerElement,\n\t\t\t\t\t\t\t\tinteger\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( materialDefaultAttributeValues !== undefined ) {\n\n\t\t\t\t\tconst value = materialDefaultAttributeValues[ name ];\n\n\t\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\t\tswitch ( value.length ) {\n\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tgl.vertexAttrib2fv( programAttribute.location, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tgl.vertexAttrib3fv( programAttribute.location, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tgl.vertexAttrib4fv( programAttribute.location, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tgl.vertexAttrib1fv( programAttribute.location, value );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tdisableUnusedAttributes();\n\n\t}\n\n\tfunction dispose() {\n\n\t\treset();\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tfor ( const programId in programMap ) {\n\n\t\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[ programId ];\n\n\t\t\t}\n\n\t\t\tdelete bindingStates[ geometryId ];\n\n\t\t}\n\n\t}\n\n\tfunction releaseStatesOfGeometry( geometry ) {\n\n\t\tif ( bindingStates[ geometry.id ] === undefined ) return;\n\n\t\tconst programMap = bindingStates[ geometry.id ];\n\n\t\tfor ( const programId in programMap ) {\n\n\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ programId ];\n\n\t\t}\n\n\t\tdelete bindingStates[ geometry.id ];\n\n\t}\n\n\tfunction releaseStatesOfProgram( program ) {\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tif ( programMap[ program.id ] === undefined ) continue;\n\n\t\t\tconst stateMap = programMap[ program.id ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ program.id ];\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\tresetDefaultState();\n\t\tforceUpdate = true;\n\n\t\tif ( currentState === defaultState ) return;\n\n\t\tcurrentState = defaultState;\n\t\tbindVertexArrayObject( currentState.object );\n\n\t}\n\n\t// for backward-compatibility\n\n\tfunction resetDefaultState() {\n\n\t\tdefaultState.geometry = null;\n\t\tdefaultState.program = null;\n\t\tdefaultState.wireframe = false;\n\n\t}\n\n\treturn {\n\n\t\tsetup: setup,\n\t\treset: reset,\n\t\tresetDefaultState: resetDefaultState,\n\t\tdispose: dispose,\n\t\treleaseStatesOfGeometry: releaseStatesOfGeometry,\n\t\treleaseStatesOfProgram: releaseStatesOfProgram,\n\n\t\tinitAttributes: initAttributes,\n\t\tenableAttribute: enableAttribute,\n\t\tdisableUnusedAttributes: disableUnusedAttributes\n\n\t};\n\n}\n\nfunction WebGLBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawArrays( mode, start, count );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawArraysInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawArraysInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, start, count, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLCapabilities( gl, extensions, parameters ) {\n\n\tlet maxAnisotropy;\n\n\tfunction getMaxAnisotropy() {\n\n\t\tif ( maxAnisotropy !== undefined ) return maxAnisotropy;\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tmaxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT );\n\n\t\t} else {\n\n\t\t\tmaxAnisotropy = 0;\n\n\t\t}\n\n\t\treturn maxAnisotropy;\n\n\t}\n\n\tfunction getMaxPrecision( precision ) {\n\n\t\tif ( precision === 'highp' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0 ) {\n\n\t\t\t\treturn 'highp';\n\n\t\t\t}\n\n\t\t\tprecision = 'mediump';\n\n\t\t}\n\n\t\tif ( precision === 'mediump' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0 ) {\n\n\t\t\t\treturn 'mediump';\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn 'lowp';\n\n\t}\n\n\tconst isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl.constructor.name === 'WebGL2RenderingContext';\n\n\tlet precision = parameters.precision !== undefined ? parameters.precision : 'highp';\n\tconst maxPrecision = getMaxPrecision( precision );\n\n\tif ( maxPrecision !== precision ) {\n\n\t\tconsole.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' );\n\t\tprecision = maxPrecision;\n\n\t}\n\n\tconst drawBuffers = isWebGL2 || extensions.has( 'WEBGL_draw_buffers' );\n\n\tconst logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n\n\tconst maxTextures = gl.getParameter( gl.MAX_TEXTURE_IMAGE_UNITS );\n\tconst maxVertexTextures = gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS );\n\tconst maxTextureSize = gl.getParameter( gl.MAX_TEXTURE_SIZE );\n\tconst maxCubemapSize = gl.getParameter( gl.MAX_CUBE_MAP_TEXTURE_SIZE );\n\n\tconst maxAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS );\n\tconst maxVertexUniforms = gl.getParameter( gl.MAX_VERTEX_UNIFORM_VECTORS );\n\tconst maxVaryings = gl.getParameter( gl.MAX_VARYING_VECTORS );\n\tconst maxFragmentUniforms = gl.getParameter( gl.MAX_FRAGMENT_UNIFORM_VECTORS );\n\n\tconst vertexTextures = maxVertexTextures > 0;\n\tconst floatFragmentTextures = isWebGL2 || extensions.has( 'OES_texture_float' );\n\tconst floatVertexTextures = vertexTextures && floatFragmentTextures;\n\n\tconst maxSamples = isWebGL2 ? gl.getParameter( gl.MAX_SAMPLES ) : 0;\n\n\treturn {\n\n\t\tisWebGL2: isWebGL2,\n\n\t\tdrawBuffers: drawBuffers,\n\n\t\tgetMaxAnisotropy: getMaxAnisotropy,\n\t\tgetMaxPrecision: getMaxPrecision,\n\n\t\tprecision: precision,\n\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\tmaxTextures: maxTextures,\n\t\tmaxVertexTextures: maxVertexTextures,\n\t\tmaxTextureSize: maxTextureSize,\n\t\tmaxCubemapSize: maxCubemapSize,\n\n\t\tmaxAttributes: maxAttributes,\n\t\tmaxVertexUniforms: maxVertexUniforms,\n\t\tmaxVaryings: maxVaryings,\n\t\tmaxFragmentUniforms: maxFragmentUniforms,\n\n\t\tvertexTextures: vertexTextures,\n\t\tfloatFragmentTextures: floatFragmentTextures,\n\t\tfloatVertexTextures: floatVertexTextures,\n\n\t\tmaxSamples: maxSamples\n\n\t};\n\n}\n\nfunction WebGLClipping( properties ) {\n\n\tconst scope = this;\n\n\tlet globalState = null,\n\t\tnumGlobalPlanes = 0,\n\t\tlocalClippingEnabled = false,\n\t\trenderingShadows = false;\n\n\tconst plane = new Plane(),\n\t\tviewNormalMatrix = new Matrix3(),\n\n\t\tuniform = { value: null, needsUpdate: false };\n\n\tthis.uniform = uniform;\n\tthis.numPlanes = 0;\n\tthis.numIntersection = 0;\n\n\tthis.init = function ( planes, enableLocalClipping ) {\n\n\t\tconst enabled =\n\t\t\tplanes.length !== 0 ||\n\t\t\tenableLocalClipping ||\n\t\t\t// enable state of previous frame - the clipping code has to\n\t\t\t// run another frame in order to reset the state:\n\t\t\tnumGlobalPlanes !== 0 ||\n\t\t\tlocalClippingEnabled;\n\n\t\tlocalClippingEnabled = enableLocalClipping;\n\n\t\tnumGlobalPlanes = planes.length;\n\n\t\treturn enabled;\n\n\t};\n\n\tthis.beginShadows = function () {\n\n\t\trenderingShadows = true;\n\t\tprojectPlanes( null );\n\n\t};\n\n\tthis.endShadows = function () {\n\n\t\trenderingShadows = false;\n\n\t};\n\n\tthis.setGlobalState = function ( planes, camera ) {\n\n\t\tglobalState = projectPlanes( planes, camera, 0 );\n\n\t};\n\n\tthis.setState = function ( material, camera, useCache ) {\n\n\t\tconst planes = material.clippingPlanes,\n\t\t\tclipIntersection = material.clipIntersection,\n\t\t\tclipShadows = material.clipShadows;\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tif ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) {\n\n\t\t\t// there's no local clipping\n\n\t\t\tif ( renderingShadows ) {\n\n\t\t\t\t// there's no global clipping\n\n\t\t\t\tprojectPlanes( null );\n\n\t\t\t} else {\n\n\t\t\t\tresetGlobalState();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst nGlobal = renderingShadows ? 0 : numGlobalPlanes,\n\t\t\t\tlGlobal = nGlobal * 4;\n\n\t\t\tlet dstArray = materialProperties.clippingState || null;\n\n\t\t\tuniform.value = dstArray; // ensure unique state\n\n\t\t\tdstArray = projectPlanes( planes, camera, lGlobal, useCache );\n\n\t\t\tfor ( let i = 0; i !== lGlobal; ++ i ) {\n\n\t\t\t\tdstArray[ i ] = globalState[ i ];\n\n\t\t\t}\n\n\t\t\tmaterialProperties.clippingState = dstArray;\n\t\t\tthis.numIntersection = clipIntersection ? this.numPlanes : 0;\n\t\t\tthis.numPlanes += nGlobal;\n\n\t\t}\n\n\n\t};\n\n\tfunction resetGlobalState() {\n\n\t\tif ( uniform.value !== globalState ) {\n\n\t\t\tuniform.value = globalState;\n\t\t\tuniform.needsUpdate = numGlobalPlanes > 0;\n\n\t\t}\n\n\t\tscope.numPlanes = numGlobalPlanes;\n\t\tscope.numIntersection = 0;\n\n\t}\n\n\tfunction projectPlanes( planes, camera, dstOffset, skipTransform ) {\n\n\t\tconst nPlanes = planes !== null ? planes.length : 0;\n\t\tlet dstArray = null;\n\n\t\tif ( nPlanes !== 0 ) {\n\n\t\t\tdstArray = uniform.value;\n\n\t\t\tif ( skipTransform !== true || dstArray === null ) {\n\n\t\t\t\tconst flatSize = dstOffset + nPlanes * 4,\n\t\t\t\t\tviewMatrix = camera.matrixWorldInverse;\n\n\t\t\t\tviewNormalMatrix.getNormalMatrix( viewMatrix );\n\n\t\t\t\tif ( dstArray === null || dstArray.length < flatSize ) {\n\n\t\t\t\t\tdstArray = new Float32Array( flatSize );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) {\n\n\t\t\t\t\tplane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix );\n\n\t\t\t\t\tplane.normal.toArray( dstArray, i4 );\n\t\t\t\t\tdstArray[ i4 + 3 ] = plane.constant;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tuniform.value = dstArray;\n\t\t\tuniform.needsUpdate = true;\n\n\t\t}\n\n\t\tscope.numPlanes = nPlanes;\n\t\tscope.numIntersection = 0;\n\n\t\treturn dstArray;\n\n\t}\n\n}\n\nfunction WebGLCubeMaps( renderer ) {\n\n\tlet cubemaps = new WeakMap();\n\n\tfunction mapTextureMapping( texture, mapping ) {\n\n\t\tif ( mapping === EquirectangularReflectionMapping ) {\n\n\t\t\ttexture.mapping = CubeReflectionMapping;\n\n\t\t} else if ( mapping === EquirectangularRefractionMapping ) {\n\n\t\t\ttexture.mapping = CubeRefractionMapping;\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction get( texture ) {\n\n\t\tif ( texture && texture.isTexture && texture.isRenderTargetTexture === false ) {\n\n\t\t\tconst mapping = texture.mapping;\n\n\t\t\tif ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) {\n\n\t\t\t\tif ( cubemaps.has( texture ) ) {\n\n\t\t\t\t\tconst cubemap = cubemaps.get( texture ).texture;\n\t\t\t\t\treturn mapTextureMapping( cubemap, texture.mapping );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst image = texture.image;\n\n\t\t\t\t\tif ( image && image.height > 0 ) {\n\n\t\t\t\t\t\tconst renderTarget = new WebGLCubeRenderTarget( image.height / 2 );\n\t\t\t\t\t\trenderTarget.fromEquirectangularTexture( renderer, texture );\n\t\t\t\t\t\tcubemaps.set( texture, renderTarget );\n\n\t\t\t\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\t\t\t\treturn mapTextureMapping( renderTarget.texture, texture.mapping );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tconst cubemap = cubemaps.get( texture );\n\n\t\tif ( cubemap !== undefined ) {\n\n\t\t\tcubemaps.delete( texture );\n\t\t\tcubemap.dispose();\n\n\t\t}\n\n\t}\n\n\tfunction dispose() {\n\n\t\tcubemaps = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nclass OrthographicCamera extends Camera {\n\n\tconstructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.isOrthographicCamera = true;\n\n\t\tthis.type = 'OrthographicCamera';\n\n\t\tthis.zoom = 1;\n\t\tthis.view = null;\n\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t\tthis.bottom = bottom;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.left = source.left;\n\t\tthis.right = source.right;\n\t\tthis.top = source.top;\n\t\tthis.bottom = source.bottom;\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\n\t\tthis.zoom = source.zoom;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\treturn this;\n\n\t}\n\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst dx = ( this.right - this.left ) / ( 2 * this.zoom );\n\t\tconst dy = ( this.top - this.bottom ) / ( 2 * this.zoom );\n\t\tconst cx = ( this.right + this.left ) / 2;\n\t\tconst cy = ( this.top + this.bottom ) / 2;\n\n\t\tlet left = cx - dx;\n\t\tlet right = cx + dx;\n\t\tlet top = cy + dy;\n\t\tlet bottom = cy - dy;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom;\n\t\t\tconst scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom;\n\n\t\t\tleft += scaleW * this.view.offsetX;\n\t\t\tright = left + scaleW * this.view.width;\n\t\t\ttop -= scaleH * this.view.offsetY;\n\t\t\tbottom = top - scaleH * this.view.height;\n\n\t\t}\n\n\t\tthis.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.zoom = this.zoom;\n\t\tdata.object.left = this.left;\n\t\tdata.object.right = this.right;\n\t\tdata.object.top = this.top;\n\t\tdata.object.bottom = this.bottom;\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst LOD_MIN = 4;\n\n// The standard deviations (radians) associated with the extra mips. These are\n// chosen to approximate a Trowbridge-Reitz distribution function times the\n// geometric shadowing function. These sigma values squared must match the\n// variance #defines in cube_uv_reflection_fragment.glsl.js.\nconst EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ];\n\n// The maximum length of the blur for loop. Smaller sigmas will use fewer\n// samples and exit early, but not recompile the shader.\nconst MAX_SAMPLES = 20;\n\nconst _flatCamera = /*@__PURE__*/ new OrthographicCamera();\nconst _clearColor = /*@__PURE__*/ new Color();\nlet _oldTarget = null;\n\n// Golden Ratio\nconst PHI = ( 1 + Math.sqrt( 5 ) ) / 2;\nconst INV_PHI = 1 / PHI;\n\n// Vertices of a dodecahedron (except the opposites, which represent the\n// same axis), used as axis directions evenly spread on a sphere.\nconst _axisDirections = [\n\t/*@__PURE__*/ new Vector3( 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),\n\t/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ),\n\t/*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ) ];\n\n/**\n * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n * (PMREM) from a cubeMap environment texture. This allows different levels of\n * blur to be quickly accessed based on material roughness. It is packed into a\n * special CubeUV format that allows us to perform custom interpolation so that\n * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n * higher roughness levels. In this way we maintain resolution to smoothly\n * interpolate diffuse lighting while limiting sampling computation.\n *\n * Paper: Fast, Accurate Image-Based Lighting\n * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view\n*/\n\nclass PMREMGenerator {\n\n\tconstructor( renderer ) {\n\n\t\tthis._renderer = renderer;\n\t\tthis._pingPongRenderTarget = null;\n\n\t\tthis._lodMax = 0;\n\t\tthis._cubeSize = 0;\n\t\tthis._lodPlanes = [];\n\t\tthis._sizeLods = [];\n\t\tthis._sigmas = [];\n\n\t\tthis._blurMaterial = null;\n\t\tthis._cubemapMaterial = null;\n\t\tthis._equirectMaterial = null;\n\n\t\tthis._compileMaterial( this._blurMaterial );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t * is placed at the origin).\n\t */\n\tfromScene( scene, sigma = 0, near = 0.1, far = 100 ) {\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\n\t\tthis._setSize( 256 );\n\n\t\tconst cubeUVRenderTarget = this._allocateTargets();\n\t\tcubeUVRenderTarget.depthBuffer = true;\n\n\t\tthis._sceneToCubeUV( scene, near, far, cubeUVRenderTarget );\n\n\t\tif ( sigma > 0 ) {\n\n\t\t\tthis._blur( cubeUVRenderTarget, 0, 0, sigma );\n\n\t\t}\n\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t * or HDR. The ideal input image size is 1k (1024 x 512),\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromEquirectangular( equirectangular, renderTarget = null ) {\n\n\t\treturn this._fromTexture( equirectangular, renderTarget );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t * or HDR. The ideal input cube size is 256 x 256,\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromCubemap( cubemap, renderTarget = null ) {\n\n\t\treturn this._fromTexture( cubemap, renderTarget );\n\n\t}\n\n\t/**\n\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileCubemapShader() {\n\n\t\tif ( this._cubemapMaterial === null ) {\n\n\t\t\tthis._cubemapMaterial = _getCubemapMaterial();\n\t\t\tthis._compileMaterial( this._cubemapMaterial );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileEquirectangularShader() {\n\n\t\tif ( this._equirectMaterial === null ) {\n\n\t\t\tthis._equirectMaterial = _getEquirectMaterial();\n\t\t\tthis._compileMaterial( this._equirectMaterial );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t * one of them will cause any others to also become unusable.\n\t */\n\tdispose() {\n\n\t\tthis._dispose();\n\n\t\tif ( this._cubemapMaterial !== null ) this._cubemapMaterial.dispose();\n\t\tif ( this._equirectMaterial !== null ) this._equirectMaterial.dispose();\n\n\t}\n\n\t// private interface\n\n\t_setSize( cubeSize ) {\n\n\t\tthis._lodMax = Math.floor( Math.log2( cubeSize ) );\n\t\tthis._cubeSize = Math.pow( 2, this._lodMax );\n\n\t}\n\n\t_dispose() {\n\n\t\tif ( this._blurMaterial !== null ) this._blurMaterial.dispose();\n\n\t\tif ( this._pingPongRenderTarget !== null ) this._pingPongRenderTarget.dispose();\n\n\t\tfor ( let i = 0; i < this._lodPlanes.length; i ++ ) {\n\n\t\t\tthis._lodPlanes[ i ].dispose();\n\n\t\t}\n\n\t}\n\n\t_cleanup( outputTarget ) {\n\n\t\tthis._renderer.setRenderTarget( _oldTarget );\n\t\toutputTarget.scissorTest = false;\n\t\t_setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height );\n\n\t}\n\n\t_fromTexture( texture, renderTarget ) {\n\n\t\tif ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ) {\n\n\t\t\tthis._setSize( texture.image.length === 0 ? 16 : ( texture.image[ 0 ].width || texture.image[ 0 ].image.width ) );\n\n\t\t} else { // Equirectangular\n\n\t\t\tthis._setSize( texture.image.width / 4 );\n\n\t\t}\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\n\t\tconst cubeUVRenderTarget = renderTarget || this._allocateTargets();\n\t\tthis._textureToCubeUV( texture, cubeUVRenderTarget );\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_allocateTargets() {\n\n\t\tconst width = 3 * Math.max( this._cubeSize, 16 * 7 );\n\t\tconst height = 4 * this._cubeSize;\n\n\t\tconst params = {\n\t\t\tmagFilter: LinearFilter,\n\t\t\tminFilter: LinearFilter,\n\t\t\tgenerateMipmaps: false,\n\t\t\ttype: HalfFloatType,\n\t\t\tformat: RGBAFormat,\n\t\t\tcolorSpace: LinearSRGBColorSpace,\n\t\t\tdepthBuffer: false\n\t\t};\n\n\t\tconst cubeUVRenderTarget = _createRenderTarget( width, height, params );\n\n\t\tif ( this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width || this._pingPongRenderTarget.height !== height ) {\n\n\t\t\tif ( this._pingPongRenderTarget !== null ) {\n\n\t\t\t\tthis._dispose();\n\n\t\t\t}\n\n\t\t\tthis._pingPongRenderTarget = _createRenderTarget( width, height, params );\n\n\t\t\tconst { _lodMax } = this;\n\t\t\t( { sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = _createPlanes( _lodMax ) );\n\n\t\t\tthis._blurMaterial = _getBlurShader( _lodMax, width, height );\n\n\t\t}\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_compileMaterial( material ) {\n\n\t\tconst tmpMesh = new Mesh( this._lodPlanes[ 0 ], material );\n\t\tthis._renderer.compile( tmpMesh, _flatCamera );\n\n\t}\n\n\t_sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) {\n\n\t\tconst fov = 90;\n\t\tconst aspect = 1;\n\t\tconst cubeCamera = new PerspectiveCamera( fov, aspect, near, far );\n\t\tconst upSign = [ 1, - 1, 1, 1, 1, 1 ];\n\t\tconst forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ];\n\t\tconst renderer = this._renderer;\n\n\t\tconst originalAutoClear = renderer.autoClear;\n\t\tconst toneMapping = renderer.toneMapping;\n\t\trenderer.getClearColor( _clearColor );\n\n\t\trenderer.toneMapping = NoToneMapping;\n\t\trenderer.autoClear = false;\n\n\t\tconst backgroundMaterial = new MeshBasicMaterial( {\n\t\t\tname: 'PMREM.Background',\n\t\t\tside: BackSide,\n\t\t\tdepthWrite: false,\n\t\t\tdepthTest: false,\n\t\t} );\n\n\t\tconst backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial );\n\n\t\tlet useSolidColor = false;\n\t\tconst background = scene.background;\n\n\t\tif ( background ) {\n\n\t\t\tif ( background.isColor ) {\n\n\t\t\t\tbackgroundMaterial.color.copy( background );\n\t\t\t\tscene.background = null;\n\t\t\t\tuseSolidColor = true;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tbackgroundMaterial.color.copy( _clearColor );\n\t\t\tuseSolidColor = true;\n\n\t\t}\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst col = i % 3;\n\n\t\t\tif ( col === 0 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( forwardSign[ i ], 0, 0 );\n\n\t\t\t} else if ( col === 1 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, 0, upSign[ i ] );\n\t\t\t\tcubeCamera.lookAt( 0, forwardSign[ i ], 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( 0, 0, forwardSign[ i ] );\n\n\t\t\t}\n\n\t\t\tconst size = this._cubeSize;\n\n\t\t\t_setViewport( cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size );\n\n\t\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\n\t\t\tif ( useSolidColor ) {\n\n\t\t\t\trenderer.render( backgroundBox, cubeCamera );\n\n\t\t\t}\n\n\t\t\trenderer.render( scene, cubeCamera );\n\n\t\t}\n\n\t\tbackgroundBox.geometry.dispose();\n\t\tbackgroundBox.material.dispose();\n\n\t\trenderer.toneMapping = toneMapping;\n\t\trenderer.autoClear = originalAutoClear;\n\t\tscene.background = background;\n\n\t}\n\n\t_textureToCubeUV( texture, cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\n\t\tconst isCubeTexture = ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping );\n\n\t\tif ( isCubeTexture ) {\n\n\t\t\tif ( this._cubemapMaterial === null ) {\n\n\t\t\t\tthis._cubemapMaterial = _getCubemapMaterial();\n\n\t\t\t}\n\n\t\t\tthis._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1;\n\n\t\t} else {\n\n\t\t\tif ( this._equirectMaterial === null ) {\n\n\t\t\t\tthis._equirectMaterial = _getEquirectMaterial();\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst material = isCubeTexture ? this._cubemapMaterial : this._equirectMaterial;\n\t\tconst mesh = new Mesh( this._lodPlanes[ 0 ], material );\n\n\t\tconst uniforms = material.uniforms;\n\n\t\tuniforms[ 'envMap' ].value = texture;\n\n\t\tconst size = this._cubeSize;\n\n\t\t_setViewport( cubeUVRenderTarget, 0, 0, 3 * size, 2 * size );\n\n\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\t\trenderer.render( mesh, _flatCamera );\n\n\t}\n\n\t_applyPMREM( cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst autoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tfor ( let i = 1; i < this._lodPlanes.length; i ++ ) {\n\n\t\t\tconst sigma = Math.sqrt( this._sigmas[ i ] * this._sigmas[ i ] - this._sigmas[ i - 1 ] * this._sigmas[ i - 1 ] );\n\n\t\t\tconst poleAxis = _axisDirections[ ( i - 1 ) % _axisDirections.length ];\n\n\t\t\tthis._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis );\n\n\t\t}\n\n\t\trenderer.autoClear = autoClear;\n\n\t}\n\n\t/**\n\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t * accurate at the poles, but still does a decent job.\n\t */\n\t_blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) {\n\n\t\tconst pingPongRenderTarget = this._pingPongRenderTarget;\n\n\t\tthis._halfBlur(\n\t\t\tcubeUVRenderTarget,\n\t\t\tpingPongRenderTarget,\n\t\t\tlodIn,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'latitudinal',\n\t\t\tpoleAxis );\n\n\t\tthis._halfBlur(\n\t\t\tpingPongRenderTarget,\n\t\t\tcubeUVRenderTarget,\n\t\t\tlodOut,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'longitudinal',\n\t\t\tpoleAxis );\n\n\t}\n\n\t_halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst blurMaterial = this._blurMaterial;\n\n\t\tif ( direction !== 'latitudinal' && direction !== 'longitudinal' ) {\n\n\t\t\tconsole.error(\n\t\t\t\t'blur direction must be either latitudinal or longitudinal!' );\n\n\t\t}\n\n\t\t// Number of standard deviations at which to cut off the discrete approximation.\n\t\tconst STANDARD_DEVIATIONS = 3;\n\n\t\tconst blurMesh = new Mesh( this._lodPlanes[ lodOut ], blurMaterial );\n\t\tconst blurUniforms = blurMaterial.uniforms;\n\n\t\tconst pixels = this._sizeLods[ lodIn ] - 1;\n\t\tconst radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 );\n\t\tconst sigmaPixels = sigmaRadians / radiansPerPixel;\n\t\tconst samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES;\n\n\t\tif ( samples > MAX_SAMPLES ) {\n\n\t\t\tconsole.warn( `sigmaRadians, ${\n\t\t\t\tsigmaRadians}, is too large and will clip, as it requested ${\n\t\t\t\tsamples} samples when the maximum is set to ${MAX_SAMPLES}` );\n\n\t\t}\n\n\t\tconst weights = [];\n\t\tlet sum = 0;\n\n\t\tfor ( let i = 0; i < MAX_SAMPLES; ++ i ) {\n\n\t\t\tconst x = i / sigmaPixels;\n\t\t\tconst weight = Math.exp( - x * x / 2 );\n\t\t\tweights.push( weight );\n\n\t\t\tif ( i === 0 ) {\n\n\t\t\t\tsum += weight;\n\n\t\t\t} else if ( i < samples ) {\n\n\t\t\t\tsum += 2 * weight;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let i = 0; i < weights.length; i ++ ) {\n\n\t\t\tweights[ i ] = weights[ i ] / sum;\n\n\t\t}\n\n\t\tblurUniforms[ 'envMap' ].value = targetIn.texture;\n\t\tblurUniforms[ 'samples' ].value = samples;\n\t\tblurUniforms[ 'weights' ].value = weights;\n\t\tblurUniforms[ 'latitudinal' ].value = direction === 'latitudinal';\n\n\t\tif ( poleAxis ) {\n\n\t\t\tblurUniforms[ 'poleAxis' ].value = poleAxis;\n\n\t\t}\n\n\t\tconst { _lodMax } = this;\n\t\tblurUniforms[ 'dTheta' ].value = radiansPerPixel;\n\t\tblurUniforms[ 'mipInt' ].value = _lodMax - lodIn;\n\n\t\tconst outputSize = this._sizeLods[ lodOut ];\n\t\tconst x = 3 * outputSize * ( lodOut > _lodMax - LOD_MIN ? lodOut - _lodMax + LOD_MIN : 0 );\n\t\tconst y = 4 * ( this._cubeSize - outputSize );\n\n\t\t_setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize );\n\t\trenderer.setRenderTarget( targetOut );\n\t\trenderer.render( blurMesh, _flatCamera );\n\n\t}\n\n}\n\n\n\nfunction _createPlanes( lodMax ) {\n\n\tconst lodPlanes = [];\n\tconst sizeLods = [];\n\tconst sigmas = [];\n\n\tlet lod = lodMax;\n\n\tconst totalLods = lodMax - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length;\n\n\tfor ( let i = 0; i < totalLods; i ++ ) {\n\n\t\tconst sizeLod = Math.pow( 2, lod );\n\t\tsizeLods.push( sizeLod );\n\t\tlet sigma = 1.0 / sizeLod;\n\n\t\tif ( i > lodMax - LOD_MIN ) {\n\n\t\t\tsigma = EXTRA_LOD_SIGMA[ i - lodMax + LOD_MIN - 1 ];\n\n\t\t} else if ( i === 0 ) {\n\n\t\t\tsigma = 0;\n\n\t\t}\n\n\t\tsigmas.push( sigma );\n\n\t\tconst texelSize = 1.0 / ( sizeLod - 2 );\n\t\tconst min = - texelSize;\n\t\tconst max = 1 + texelSize;\n\t\tconst uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ];\n\n\t\tconst cubeFaces = 6;\n\t\tconst vertices = 6;\n\t\tconst positionSize = 3;\n\t\tconst uvSize = 2;\n\t\tconst faceIndexSize = 1;\n\n\t\tconst position = new Float32Array( positionSize * vertices * cubeFaces );\n\t\tconst uv = new Float32Array( uvSize * vertices * cubeFaces );\n\t\tconst faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces );\n\n\t\tfor ( let face = 0; face < cubeFaces; face ++ ) {\n\n\t\t\tconst x = ( face % 3 ) * 2 / 3 - 1;\n\t\t\tconst y = face > 2 ? 0 : - 1;\n\t\t\tconst coordinates = [\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y + 1, 0\n\t\t\t];\n\t\t\tposition.set( coordinates, positionSize * vertices * face );\n\t\t\tuv.set( uv1, uvSize * vertices * face );\n\t\t\tconst fill = [ face, face, face, face, face, face ];\n\t\t\tfaceIndex.set( fill, faceIndexSize * vertices * face );\n\n\t\t}\n\n\t\tconst planes = new BufferGeometry();\n\t\tplanes.setAttribute( 'position', new BufferAttribute( position, positionSize ) );\n\t\tplanes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) );\n\t\tplanes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) );\n\t\tlodPlanes.push( planes );\n\n\t\tif ( lod > LOD_MIN ) {\n\n\t\t\tlod --;\n\n\t\t}\n\n\t}\n\n\treturn { lodPlanes, sizeLods, sigmas };\n\n}\n\nfunction _createRenderTarget( width, height, params ) {\n\n\tconst cubeUVRenderTarget = new WebGLRenderTarget( width, height, params );\n\tcubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;\n\tcubeUVRenderTarget.texture.name = 'PMREM.cubeUv';\n\tcubeUVRenderTarget.scissorTest = true;\n\treturn cubeUVRenderTarget;\n\n}\n\nfunction _setViewport( target, x, y, width, height ) {\n\n\ttarget.viewport.set( x, y, width, height );\n\ttarget.scissor.set( x, y, width, height );\n\n}\n\nfunction _getBlurShader( lodMax, width, height ) {\n\n\tconst weights = new Float32Array( MAX_SAMPLES );\n\tconst poleAxis = new Vector3( 0, 1, 0 );\n\tconst shaderMaterial = new ShaderMaterial( {\n\n\t\tname: 'SphericalGaussianBlur',\n\n\t\tdefines: {\n\t\t\t'n': MAX_SAMPLES,\n\t\t\t'CUBEUV_TEXEL_WIDTH': 1.0 / width,\n\t\t\t'CUBEUV_TEXEL_HEIGHT': 1.0 / height,\n\t\t\t'CUBEUV_MAX_MIP': `${lodMax}.0`,\n\t\t},\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'samples': { value: 1 },\n\t\t\t'weights': { value: weights },\n\t\t\t'latitudinal': { value: false },\n\t\t\t'dTheta': { value: 0 },\n\t\t\t'mipInt': { value: 0 },\n\t\t\t'poleAxis': { value: poleAxis }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getEquirectMaterial() {\n\n\treturn new ShaderMaterial( {\n\n\t\tname: 'EquirectangularToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n}\n\nfunction _getCubemapMaterial() {\n\n\treturn new ShaderMaterial( {\n\n\t\tname: 'CubemapToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'flipEnvMap': { value: - 1 }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n}\n\nfunction _getCommonVertexShader() {\n\n\treturn /* glsl */`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`;\n\n}\n\nfunction WebGLCubeUVMaps( renderer ) {\n\n\tlet cubeUVmaps = new WeakMap();\n\n\tlet pmremGenerator = null;\n\n\tfunction get( texture ) {\n\n\t\tif ( texture && texture.isTexture ) {\n\n\t\t\tconst mapping = texture.mapping;\n\n\t\t\tconst isEquirectMap = ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping );\n\t\t\tconst isCubeMap = ( mapping === CubeReflectionMapping || mapping === CubeRefractionMapping );\n\n\t\t\t// equirect/cube map to cubeUV conversion\n\n\t\t\tif ( isEquirectMap || isCubeMap ) {\n\n\t\t\t\tif ( texture.isRenderTargetTexture && texture.needsPMREMUpdate === true ) {\n\n\t\t\t\t\ttexture.needsPMREMUpdate = false;\n\n\t\t\t\t\tlet renderTarget = cubeUVmaps.get( texture );\n\n\t\t\t\t\tif ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer );\n\n\t\t\t\t\trenderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture, renderTarget ) : pmremGenerator.fromCubemap( texture, renderTarget );\n\t\t\t\t\tcubeUVmaps.set( texture, renderTarget );\n\n\t\t\t\t\treturn renderTarget.texture;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( cubeUVmaps.has( texture ) ) {\n\n\t\t\t\t\t\treturn cubeUVmaps.get( texture ).texture;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst image = texture.image;\n\n\t\t\t\t\t\tif ( ( isEquirectMap && image && image.height > 0 ) || ( isCubeMap && image && isCubeTextureComplete( image ) ) ) {\n\n\t\t\t\t\t\t\tif ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer );\n\n\t\t\t\t\t\t\tconst renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture ) : pmremGenerator.fromCubemap( texture );\n\t\t\t\t\t\t\tcubeUVmaps.set( texture, renderTarget );\n\n\t\t\t\t\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\t\t\t\t\treturn renderTarget.texture;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\n\t\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction isCubeTextureComplete( image ) {\n\n\t\tlet count = 0;\n\t\tconst length = 6;\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tif ( image[ i ] !== undefined ) count ++;\n\n\t\t}\n\n\t\treturn count === length;\n\n\n\t}\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tconst cubemapUV = cubeUVmaps.get( texture );\n\n\t\tif ( cubemapUV !== undefined ) {\n\n\t\t\tcubeUVmaps.delete( texture );\n\t\t\tcubemapUV.dispose();\n\n\t\t}\n\n\t}\n\n\tfunction dispose() {\n\n\t\tcubeUVmaps = new WeakMap();\n\n\t\tif ( pmremGenerator !== null ) {\n\n\t\t\tpmremGenerator.dispose();\n\t\t\tpmremGenerator = null;\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction WebGLExtensions( gl ) {\n\n\tconst extensions = {};\n\n\tfunction getExtension( name ) {\n\n\t\tif ( extensions[ name ] !== undefined ) {\n\n\t\t\treturn extensions[ name ];\n\n\t\t}\n\n\t\tlet extension;\n\n\t\tswitch ( name ) {\n\n\t\t\tcase 'WEBGL_depth_texture':\n\t\t\t\textension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'EXT_texture_filter_anisotropic':\n\t\t\t\textension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_s3tc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_pvrtc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\textension = gl.getExtension( name );\n\n\t\t}\n\n\t\textensions[ name ] = extension;\n\n\t\treturn extension;\n\n\t}\n\n\treturn {\n\n\t\thas: function ( name ) {\n\n\t\t\treturn getExtension( name ) !== null;\n\n\t\t},\n\n\t\tinit: function ( capabilities ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\tgetExtension( 'EXT_color_buffer_float' );\n\n\t\t\t} else {\n\n\t\t\t\tgetExtension( 'WEBGL_depth_texture' );\n\t\t\t\tgetExtension( 'OES_texture_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float_linear' );\n\t\t\t\tgetExtension( 'OES_standard_derivatives' );\n\t\t\t\tgetExtension( 'OES_element_index_uint' );\n\t\t\t\tgetExtension( 'OES_vertex_array_object' );\n\t\t\t\tgetExtension( 'ANGLE_instanced_arrays' );\n\n\t\t\t}\n\n\t\t\tgetExtension( 'OES_texture_float_linear' );\n\t\t\tgetExtension( 'EXT_color_buffer_half_float' );\n\t\t\tgetExtension( 'WEBGL_multisampled_render_to_texture' );\n\n\t\t},\n\n\t\tget: function ( name ) {\n\n\t\t\tconst extension = getExtension( name );\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' );\n\n\t\t\t}\n\n\t\t\treturn extension;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLGeometries( gl, attributes, info, bindingStates ) {\n\n\tconst geometries = {};\n\tconst wireframeAttributes = new WeakMap();\n\n\tfunction onGeometryDispose( event ) {\n\n\t\tconst geometry = event.target;\n\n\t\tif ( geometry.index !== null ) {\n\n\t\t\tattributes.remove( geometry.index );\n\n\t\t}\n\n\t\tfor ( const name in geometry.attributes ) {\n\n\t\t\tattributes.remove( geometry.attributes[ name ] );\n\n\t\t}\n\n\t\tfor ( const name in geometry.morphAttributes ) {\n\n\t\t\tconst array = geometry.morphAttributes[ name ];\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tattributes.remove( array[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.removeEventListener( 'dispose', onGeometryDispose );\n\n\t\tdelete geometries[ geometry.id ];\n\n\t\tconst attribute = wireframeAttributes.get( geometry );\n\n\t\tif ( attribute ) {\n\n\t\t\tattributes.remove( attribute );\n\t\t\twireframeAttributes.delete( geometry );\n\n\t\t}\n\n\t\tbindingStates.releaseStatesOfGeometry( geometry );\n\n\t\tif ( geometry.isInstancedBufferGeometry === true ) {\n\n\t\t\tdelete geometry._maxInstanceCount;\n\n\t\t}\n\n\t\t//\n\n\t\tinfo.memory.geometries --;\n\n\t}\n\n\tfunction get( object, geometry ) {\n\n\t\tif ( geometries[ geometry.id ] === true ) return geometry;\n\n\t\tgeometry.addEventListener( 'dispose', onGeometryDispose );\n\n\t\tgeometries[ geometry.id ] = true;\n\n\t\tinfo.memory.geometries ++;\n\n\t\treturn geometry;\n\n\t}\n\n\tfunction update( geometry ) {\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates.\n\n\t\tfor ( const name in geometryAttributes ) {\n\n\t\t\tattributes.update( geometryAttributes[ name ], gl.ARRAY_BUFFER );\n\n\t\t}\n\n\t\t// morph targets\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = morphAttributes[ name ];\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tattributes.update( array[ i ], gl.ARRAY_BUFFER );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateWireframeAttribute( geometry ) {\n\n\t\tconst indices = [];\n\n\t\tconst geometryIndex = geometry.index;\n\t\tconst geometryPosition = geometry.attributes.position;\n\t\tlet version = 0;\n\n\t\tif ( geometryIndex !== null ) {\n\n\t\t\tconst array = geometryIndex.array;\n\t\t\tversion = geometryIndex.version;\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i += 3 ) {\n\n\t\t\t\tconst a = array[ i + 0 ];\n\t\t\t\tconst b = array[ i + 1 ];\n\t\t\t\tconst c = array[ i + 2 ];\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t} else if ( geometryPosition !== undefined ) {\n\n\t\t\tconst array = geometryPosition.array;\n\t\t\tversion = geometryPosition.version;\n\n\t\t\tfor ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) {\n\n\t\t\t\tconst a = i + 0;\n\t\t\t\tconst b = i + 1;\n\t\t\t\tconst c = i + 2;\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );\n\t\tattribute.version = version;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates\n\n\t\t//\n\n\t\tconst previousAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( previousAttribute ) attributes.remove( previousAttribute );\n\n\t\t//\n\n\t\twireframeAttributes.set( geometry, attribute );\n\n\t}\n\n\tfunction getWireframeAttribute( geometry ) {\n\n\t\tconst currentAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( currentAttribute ) {\n\n\t\t\tconst geometryIndex = geometry.index;\n\n\t\t\tif ( geometryIndex !== null ) {\n\n\t\t\t\t// if the attribute is obsolete, create a new one\n\n\t\t\t\tif ( currentAttribute.version < geometryIndex.version ) {\n\n\t\t\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t}\n\n\t\treturn wireframeAttributes.get( geometry );\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tupdate: update,\n\n\t\tgetWireframeAttribute: getWireframeAttribute\n\n\t};\n\n}\n\nfunction WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tlet type, bytesPerElement;\n\n\tfunction setIndex( value ) {\n\n\t\ttype = value.type;\n\t\tbytesPerElement = value.bytesPerElement;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawElements( mode, count, type, start * bytesPerElement );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawElementsInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawElementsInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, count, type, start * bytesPerElement, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.setIndex = setIndex;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLInfo( gl ) {\n\n\tconst memory = {\n\t\tgeometries: 0,\n\t\ttextures: 0\n\t};\n\n\tconst render = {\n\t\tframe: 0,\n\t\tcalls: 0,\n\t\ttriangles: 0,\n\t\tpoints: 0,\n\t\tlines: 0\n\t};\n\n\tfunction update( count, mode, instanceCount ) {\n\n\t\trender.calls ++;\n\n\t\tswitch ( mode ) {\n\n\t\t\tcase gl.TRIANGLES:\n\t\t\t\trender.triangles += instanceCount * ( count / 3 );\n\t\t\t\tbreak;\n\n\t\t\tcase gl.LINES:\n\t\t\t\trender.lines += instanceCount * ( count / 2 );\n\t\t\t\tbreak;\n\n\t\t\tcase gl.LINE_STRIP:\n\t\t\t\trender.lines += instanceCount * ( count - 1 );\n\t\t\t\tbreak;\n\n\t\t\tcase gl.LINE_LOOP:\n\t\t\t\trender.lines += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tcase gl.POINTS:\n\t\t\t\trender.points += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.error( 'THREE.WebGLInfo: Unknown draw mode:', mode );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\trender.calls = 0;\n\t\trender.triangles = 0;\n\t\trender.points = 0;\n\t\trender.lines = 0;\n\n\t}\n\n\treturn {\n\t\tmemory: memory,\n\t\trender: render,\n\t\tprograms: null,\n\t\tautoReset: true,\n\t\treset: reset,\n\t\tupdate: update\n\t};\n\n}\n\nfunction numericalSort( a, b ) {\n\n\treturn a[ 0 ] - b[ 0 ];\n\n}\n\nfunction absNumericalSort( a, b ) {\n\n\treturn Math.abs( b[ 1 ] ) - Math.abs( a[ 1 ] );\n\n}\n\nfunction WebGLMorphtargets( gl, capabilities, textures ) {\n\n\tconst influencesList = {};\n\tconst morphInfluences = new Float32Array( 8 );\n\tconst morphTextures = new WeakMap();\n\tconst morph = new Vector4();\n\n\tconst workInfluences = [];\n\n\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\tworkInfluences[ i ] = [ i, 0 ];\n\n\t}\n\n\tfunction update( object, geometry, program ) {\n\n\t\tconst objectInfluences = object.morphTargetInfluences;\n\n\t\tif ( capabilities.isWebGL2 === true ) {\n\n\t\t\t// instead of using attributes, the WebGL 2 code path encodes morph targets\n\t\t\t// into an array of data textures. Each layer represents a single morph target.\n\n\t\t\tconst morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n\t\t\tconst morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;\n\n\t\t\tlet entry = morphTextures.get( geometry );\n\n\t\t\tif ( entry === undefined || entry.count !== morphTargetsCount ) {\n\n\t\t\t\tif ( entry !== undefined ) entry.texture.dispose();\n\n\t\t\t\tconst hasMorphPosition = geometry.morphAttributes.position !== undefined;\n\t\t\t\tconst hasMorphNormals = geometry.morphAttributes.normal !== undefined;\n\t\t\t\tconst hasMorphColors = geometry.morphAttributes.color !== undefined;\n\n\t\t\t\tconst morphTargets = geometry.morphAttributes.position || [];\n\t\t\t\tconst morphNormals = geometry.morphAttributes.normal || [];\n\t\t\t\tconst morphColors = geometry.morphAttributes.color || [];\n\n\t\t\t\tlet vertexDataCount = 0;\n\n\t\t\t\tif ( hasMorphPosition === true ) vertexDataCount = 1;\n\t\t\t\tif ( hasMorphNormals === true ) vertexDataCount = 2;\n\t\t\t\tif ( hasMorphColors === true ) vertexDataCount = 3;\n\n\t\t\t\tlet width = geometry.attributes.position.count * vertexDataCount;\n\t\t\t\tlet height = 1;\n\n\t\t\t\tif ( width > capabilities.maxTextureSize ) {\n\n\t\t\t\t\theight = Math.ceil( width / capabilities.maxTextureSize );\n\t\t\t\t\twidth = capabilities.maxTextureSize;\n\n\t\t\t\t}\n\n\t\t\t\tconst buffer = new Float32Array( width * height * 4 * morphTargetsCount );\n\n\t\t\t\tconst texture = new DataArrayTexture( buffer, width, height, morphTargetsCount );\n\t\t\t\ttexture.type = FloatType;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t// fill buffer\n\n\t\t\t\tconst vertexDataStride = vertexDataCount * 4;\n\n\t\t\t\tfor ( let i = 0; i < morphTargetsCount; i ++ ) {\n\n\t\t\t\t\tconst morphTarget = morphTargets[ i ];\n\t\t\t\t\tconst morphNormal = morphNormals[ i ];\n\t\t\t\t\tconst morphColor = morphColors[ i ];\n\n\t\t\t\t\tconst offset = width * height * 4 * i;\n\n\t\t\t\t\tfor ( let j = 0; j < morphTarget.count; j ++ ) {\n\n\t\t\t\t\t\tconst stride = j * vertexDataStride;\n\n\t\t\t\t\t\tif ( hasMorphPosition === true ) {\n\n\t\t\t\t\t\t\tmorph.fromBufferAttribute( morphTarget, j );\n\n\t\t\t\t\t\t\tbuffer[ offset + stride + 0 ] = morph.x;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 1 ] = morph.y;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 2 ] = morph.z;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 3 ] = 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( hasMorphNormals === true ) {\n\n\t\t\t\t\t\t\tmorph.fromBufferAttribute( morphNormal, j );\n\n\t\t\t\t\t\t\tbuffer[ offset + stride + 4 ] = morph.x;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 5 ] = morph.y;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 6 ] = morph.z;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 7 ] = 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( hasMorphColors === true ) {\n\n\t\t\t\t\t\t\tmorph.fromBufferAttribute( morphColor, j );\n\n\t\t\t\t\t\t\tbuffer[ offset + stride + 8 ] = morph.x;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 9 ] = morph.y;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 10 ] = morph.z;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 11 ] = ( morphColor.itemSize === 4 ) ? morph.w : 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tentry = {\n\t\t\t\t\tcount: morphTargetsCount,\n\t\t\t\t\ttexture: texture,\n\t\t\t\t\tsize: new Vector2( width, height )\n\t\t\t\t};\n\n\t\t\t\tmorphTextures.set( geometry, entry );\n\n\t\t\t\tfunction disposeTexture() {\n\n\t\t\t\t\ttexture.dispose();\n\n\t\t\t\t\tmorphTextures.delete( geometry );\n\n\t\t\t\t\tgeometry.removeEventListener( 'dispose', disposeTexture );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.addEventListener( 'dispose', disposeTexture );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet morphInfluencesSum = 0;\n\n\t\t\tfor ( let i = 0; i < objectInfluences.length; i ++ ) {\n\n\t\t\t\tmorphInfluencesSum += objectInfluences[ i ];\n\n\t\t\t}\n\n\t\t\tconst morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence );\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetInfluences', objectInfluences );\n\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetsTexture', entry.texture, textures );\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetsTextureSize', entry.size );\n\n\n\t\t} else {\n\n\t\t\t// When object doesn't have morph target influences defined, we treat it as a 0-length array\n\t\t\t// This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n\n\t\t\tconst length = objectInfluences === undefined ? 0 : objectInfluences.length;\n\n\t\t\tlet influences = influencesList[ geometry.id ];\n\n\t\t\tif ( influences === undefined || influences.length !== length ) {\n\n\t\t\t\t// initialise list\n\n\t\t\t\tinfluences = [];\n\n\t\t\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\t\t\tinfluences[ i ] = [ i, 0 ];\n\n\t\t\t\t}\n\n\t\t\t\tinfluencesList[ geometry.id ] = influences;\n\n\t\t\t}\n\n\t\t\t// Collect influences\n\n\t\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\t\tconst influence = influences[ i ];\n\n\t\t\t\tinfluence[ 0 ] = i;\n\t\t\t\tinfluence[ 1 ] = objectInfluences[ i ];\n\n\t\t\t}\n\n\t\t\tinfluences.sort( absNumericalSort );\n\n\t\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\t\tif ( i < length && influences[ i ][ 1 ] ) {\n\n\t\t\t\t\tworkInfluences[ i ][ 0 ] = influences[ i ][ 0 ];\n\t\t\t\t\tworkInfluences[ i ][ 1 ] = influences[ i ][ 1 ];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tworkInfluences[ i ][ 0 ] = Number.MAX_SAFE_INTEGER;\n\t\t\t\t\tworkInfluences[ i ][ 1 ] = 0;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tworkInfluences.sort( numericalSort );\n\n\t\t\tconst morphTargets = geometry.morphAttributes.position;\n\t\t\tconst morphNormals = geometry.morphAttributes.normal;\n\n\t\t\tlet morphInfluencesSum = 0;\n\n\t\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\t\tconst influence = workInfluences[ i ];\n\t\t\t\tconst index = influence[ 0 ];\n\t\t\t\tconst value = influence[ 1 ];\n\n\t\t\t\tif ( index !== Number.MAX_SAFE_INTEGER && value ) {\n\n\t\t\t\t\tif ( morphTargets && geometry.getAttribute( 'morphTarget' + i ) !== morphTargets[ index ] ) {\n\n\t\t\t\t\t\tgeometry.setAttribute( 'morphTarget' + i, morphTargets[ index ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( morphNormals && geometry.getAttribute( 'morphNormal' + i ) !== morphNormals[ index ] ) {\n\n\t\t\t\t\t\tgeometry.setAttribute( 'morphNormal' + i, morphNormals[ index ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[ i ] = value;\n\t\t\t\t\tmorphInfluencesSum += value;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( morphTargets && geometry.hasAttribute( 'morphTarget' + i ) === true ) {\n\n\t\t\t\t\t\tgeometry.deleteAttribute( 'morphTarget' + i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( morphNormals && geometry.hasAttribute( 'morphNormal' + i ) === true ) {\n\n\t\t\t\t\t\tgeometry.deleteAttribute( 'morphNormal' + i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[ i ] = 0;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// GLSL shader uses formula baseinfluence * base + sum(target * influence)\n\t\t\t// This allows us to switch between absolute morphs and relative morphs without changing shader code\n\t\t\t// When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n\t\t\tconst morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence );\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetInfluences', morphInfluences );\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\tupdate: update\n\n\t};\n\n}\n\nfunction WebGLObjects( gl, geometries, attributes, info ) {\n\n\tlet updateMap = new WeakMap();\n\n\tfunction update( object ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\tconst geometry = object.geometry;\n\t\tconst buffergeometry = geometries.get( object, geometry );\n\n\t\t// Update once per frame\n\n\t\tif ( updateMap.get( buffergeometry ) !== frame ) {\n\n\t\t\tgeometries.update( buffergeometry );\n\n\t\t\tupdateMap.set( buffergeometry, frame );\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh ) {\n\n\t\t\tif ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) {\n\n\t\t\t\tobject.addEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\t\t}\n\n\t\t\tif ( updateMap.get( object ) !== frame ) {\n\n\t\t\t\tattributes.update( object.instanceMatrix, gl.ARRAY_BUFFER );\n\n\t\t\t\tif ( object.instanceColor !== null ) {\n\n\t\t\t\t\tattributes.update( object.instanceColor, gl.ARRAY_BUFFER );\n\n\t\t\t\t}\n\n\t\t\t\tupdateMap.set( object, frame );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\tconst skeleton = object.skeleton;\n\n\t\t\tif ( updateMap.get( skeleton ) !== frame ) {\n\n\t\t\t\tskeleton.update();\n\n\t\t\t\tupdateMap.set( skeleton, frame );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn buffergeometry;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tupdateMap = new WeakMap();\n\n\t}\n\n\tfunction onInstancedMeshDispose( event ) {\n\n\t\tconst instancedMesh = event.target;\n\n\t\tinstancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\tattributes.remove( instancedMesh.instanceMatrix );\n\n\t\tif ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor );\n\n\t}\n\n\treturn {\n\n\t\tupdate: update,\n\t\tdispose: dispose\n\n\t};\n\n}\n\n/**\n * Uniforms of a program.\n * Those form a tree structure with a special top-level container for the root,\n * which you get by calling 'new WebGLUniforms( gl, program )'.\n *\n *\n * Properties of inner nodes including the top-level container:\n *\n * .seq - array of nested uniforms\n * .map - nested uniforms by name\n *\n *\n * Methods of all nodes except the top-level container:\n *\n * .setValue( gl, value, [textures] )\n *\n * \t\tuploads a uniform value(s)\n * \tthe 'textures' parameter is needed for sampler uniforms\n *\n *\n * Static methods of the top-level container (textures factorizations):\n *\n * .upload( gl, seq, values, textures )\n *\n * \t\tsets uniforms in 'seq' to 'values[id].value'\n *\n * .seqWithValue( seq, values ) : filteredSeq\n *\n * \t\tfilters 'seq' entries with corresponding entry in values\n *\n *\n * Methods of the top-level container (textures factorizations):\n *\n * .setValue( gl, name, value, textures )\n *\n * \t\tsets uniform with name 'name' to 'value'\n *\n * .setOptional( gl, obj, prop )\n *\n * \t\tlike .set for an optional property of the object\n *\n */\n\n\nconst emptyTexture = /*@__PURE__*/ new Texture();\nconst emptyArrayTexture = /*@__PURE__*/ new DataArrayTexture();\nconst empty3dTexture = /*@__PURE__*/ new Data3DTexture();\nconst emptyCubeTexture = /*@__PURE__*/ new CubeTexture();\n\n// --- Utilities ---\n\n// Array Caches (provide typed arrays for temporary by size)\n\nconst arrayCacheF32 = [];\nconst arrayCacheI32 = [];\n\n// Float32Array caches used for uploading Matrix uniforms\n\nconst mat4array = new Float32Array( 16 );\nconst mat3array = new Float32Array( 9 );\nconst mat2array = new Float32Array( 4 );\n\n// Flattening for arrays of vectors and matrices\n\nfunction flatten( array, nBlocks, blockSize ) {\n\n\tconst firstElem = array[ 0 ];\n\n\tif ( firstElem <= 0 || firstElem > 0 ) return array;\n\t// unoptimized: ! isNaN( firstElem )\n\t// see http://jacksondunstan.com/articles/983\n\n\tconst n = nBlocks * blockSize;\n\tlet r = arrayCacheF32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Float32Array( n );\n\t\tarrayCacheF32[ n ] = r;\n\n\t}\n\n\tif ( nBlocks !== 0 ) {\n\n\t\tfirstElem.toArray( r, 0 );\n\n\t\tfor ( let i = 1, offset = 0; i !== nBlocks; ++ i ) {\n\n\t\t\toffset += blockSize;\n\t\t\tarray[ i ].toArray( r, offset );\n\n\t\t}\n\n\t}\n\n\treturn r;\n\n}\n\nfunction arraysEqual( a, b ) {\n\n\tif ( a.length !== b.length ) return false;\n\n\tfor ( let i = 0, l = a.length; i < l; i ++ ) {\n\n\t\tif ( a[ i ] !== b[ i ] ) return false;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction copyArray( a, b ) {\n\n\tfor ( let i = 0, l = b.length; i < l; i ++ ) {\n\n\t\ta[ i ] = b[ i ];\n\n\t}\n\n}\n\n// Texture unit allocation\n\nfunction allocTexUnits( textures, n ) {\n\n\tlet r = arrayCacheI32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Int32Array( n );\n\t\tarrayCacheI32[ n ] = r;\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\tr[ i ] = textures.allocateTextureUnit();\n\n\t}\n\n\treturn r;\n\n}\n\n// --- Setters ---\n\n// Note: Defining these methods externally, because they come in a bunch\n// and this way their names minify.\n\n// Single scalar\n\nfunction setValueV1f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1f( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single float vector (from flat array or THREE.VectorN)\n\nfunction setValueV2f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2f( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3f( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else if ( v.r !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) {\n\n\t\t\tgl.uniform3f( this.addr, v.r, v.g, v.b );\n\n\t\t\tcache[ 0 ] = v.r;\n\t\t\tcache[ 1 ] = v.g;\n\t\t\tcache[ 2 ] = v.b;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4f( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n// Single matrix (from flat array or THREE.MatrixN)\n\nfunction setValueM2( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix2fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat2array.set( elements );\n\n\t\tgl.uniformMatrix2fv( this.addr, false, mat2array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM3( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix3fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat3array.set( elements );\n\n\t\tgl.uniformMatrix3fv( this.addr, false, mat3array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM4( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix4fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat4array.set( elements );\n\n\t\tgl.uniformMatrix4fv( this.addr, false, mat4array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\n// Single integer / boolean\n\nfunction setValueV1i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1i( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single integer / boolean vector (from flat array or THREE.VectorN)\n\nfunction setValueV2i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2i( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2iv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3i( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3iv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4i( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4iv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n// Single unsigned integer\n\nfunction setValueV1ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1ui( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single unsigned integer vector (from flat array or THREE.VectorN)\n\nfunction setValueV2ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2ui( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2uiv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3ui( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3uiv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4ui( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4uiv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n\n// Single texture (2D / Cube)\n\nfunction setValueT1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture2D( v || emptyTexture, unit );\n\n}\n\nfunction setValueT3D1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture3D( v || empty3dTexture, unit );\n\n}\n\nfunction setValueT6( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTextureCube( v || emptyCubeTexture, unit );\n\n}\n\nfunction setValueT2DArray1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture2DArray( v || emptyArrayTexture, unit );\n\n}\n\n// Helper to pick the right setter for the singular case\n\nfunction getSingularSetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1f; // FLOAT\n\t\tcase 0x8b50: return setValueV2f; // _VEC2\n\t\tcase 0x8b51: return setValueV3f; // _VEC3\n\t\tcase 0x8b52: return setValueV4f; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2; // _MAT2\n\t\tcase 0x8b5b: return setValueM3; // _MAT3\n\t\tcase 0x8b5c: return setValueM4; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2i; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3i; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4i; // _VEC4\n\n\t\tcase 0x1405: return setValueV1ui; // UINT\n\t\tcase 0x8dc6: return setValueV2ui; // _VEC2\n\t\tcase 0x8dc7: return setValueV3ui; // _VEC3\n\t\tcase 0x8dc8: return setValueV4ui; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1;\n\n\t\tcase 0x8b5f: // SAMPLER_3D\n\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\t\tcase 0x8dd3: // UNSIGNED_INT_SAMPLER_3D\n\t\t\treturn setValueT3D1;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6;\n\n\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW\n\t\t\treturn setValueT2DArray1;\n\n\t}\n\n}\n\n\n// Array of scalars\n\nfunction setValueV1fArray( gl, v ) {\n\n\tgl.uniform1fv( this.addr, v );\n\n}\n\n// Array of vectors (from flat array or array of THREE.VectorN)\n\nfunction setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}\n\nfunction setValueV3fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 3 );\n\n\tgl.uniform3fv( this.addr, data );\n\n}\n\nfunction setValueV4fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniform4fv( this.addr, data );\n\n}\n\n// Array of matrices (from flat array or array of THREE.MatrixN)\n\nfunction setValueM2Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniformMatrix2fv( this.addr, false, data );\n\n}\n\nfunction setValueM3Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 9 );\n\n\tgl.uniformMatrix3fv( this.addr, false, data );\n\n}\n\nfunction setValueM4Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 16 );\n\n\tgl.uniformMatrix4fv( this.addr, false, data );\n\n}\n\n// Array of integer / boolean\n\nfunction setValueV1iArray( gl, v ) {\n\n\tgl.uniform1iv( this.addr, v );\n\n}\n\n// Array of integer / boolean vectors (from flat array)\n\nfunction setValueV2iArray( gl, v ) {\n\n\tgl.uniform2iv( this.addr, v );\n\n}\n\nfunction setValueV3iArray( gl, v ) {\n\n\tgl.uniform3iv( this.addr, v );\n\n}\n\nfunction setValueV4iArray( gl, v ) {\n\n\tgl.uniform4iv( this.addr, v );\n\n}\n\n// Array of unsigned integer\n\nfunction setValueV1uiArray( gl, v ) {\n\n\tgl.uniform1uiv( this.addr, v );\n\n}\n\n// Array of unsigned integer vectors (from flat array)\n\nfunction setValueV2uiArray( gl, v ) {\n\n\tgl.uniform2uiv( this.addr, v );\n\n}\n\nfunction setValueV3uiArray( gl, v ) {\n\n\tgl.uniform3uiv( this.addr, v );\n\n}\n\nfunction setValueV4uiArray( gl, v ) {\n\n\tgl.uniform4uiv( this.addr, v );\n\n}\n\n\n// Array of textures (2D / 3D / Cube / 2DArray)\n\nfunction setValueT1Array( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTexture2D( v[ i ] || emptyTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT3DArray( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTexture3D( v[ i ] || empty3dTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT6Array( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT2DArrayArray( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTexture2DArray( v[ i ] || emptyArrayTexture, units[ i ] );\n\n\t}\n\n}\n\n\n// Helper to pick the right setter for a pure (bottom-level) array\n\nfunction getPureArraySetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1fArray; // FLOAT\n\t\tcase 0x8b50: return setValueV2fArray; // _VEC2\n\t\tcase 0x8b51: return setValueV3fArray; // _VEC3\n\t\tcase 0x8b52: return setValueV4fArray; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2Array; // _MAT2\n\t\tcase 0x8b5b: return setValueM3Array; // _MAT3\n\t\tcase 0x8b5c: return setValueM4Array; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4\n\n\t\tcase 0x1405: return setValueV1uiArray; // UINT\n\t\tcase 0x8dc6: return setValueV2uiArray; // _VEC2\n\t\tcase 0x8dc7: return setValueV3uiArray; // _VEC3\n\t\tcase 0x8dc8: return setValueV4uiArray; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1Array;\n\n\t\tcase 0x8b5f: // SAMPLER_3D\n\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\t\tcase 0x8dd3: // UNSIGNED_INT_SAMPLER_3D\n\t\t\treturn setValueT3DArray;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6Array;\n\n\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW\n\t\t\treturn setValueT2DArrayArray;\n\n\t}\n\n}\n\n// --- Uniform Classes ---\n\nclass SingleUniform {\n\n\tconstructor( id, activeInfo, addr ) {\n\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.setValue = getSingularSetter( activeInfo.type );\n\n\t\t// this.path = activeInfo.name; // DEBUG\n\n\t}\n\n}\n\nclass PureArrayUniform {\n\n\tconstructor( id, activeInfo, addr ) {\n\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.size = activeInfo.size;\n\t\tthis.setValue = getPureArraySetter( activeInfo.type );\n\n\t\t// this.path = activeInfo.name; // DEBUG\n\n\t}\n\n}\n\nclass StructuredUniform {\n\n\tconstructor( id ) {\n\n\t\tthis.id = id;\n\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\n\t}\n\n\tsetValue( gl, value, textures ) {\n\n\t\tconst seq = this.seq;\n\n\t\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\t\tconst u = seq[ i ];\n\t\t\tu.setValue( gl, value[ u.id ], textures );\n\n\t\t}\n\n\t}\n\n}\n\n// --- Top-level ---\n\n// Parser - builds up the property tree from the path strings\n\nconst RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g;\n\n// extracts\n// \t- the identifier (member name or array index)\n// - followed by an optional right bracket (found when array index)\n// - followed by an optional left bracket or dot (type of subscript)\n//\n// Note: These portions can be read in a non-overlapping fashion and\n// allow straightforward parsing of the hierarchy that WebGL encodes\n// in the uniform names.\n\nfunction addUniform( container, uniformObject ) {\n\n\tcontainer.seq.push( uniformObject );\n\tcontainer.map[ uniformObject.id ] = uniformObject;\n\n}\n\nfunction parseUniform( activeInfo, addr, container ) {\n\n\tconst path = activeInfo.name,\n\t\tpathLength = path.length;\n\n\t// reset RegExp object, because of the early exit of a previous run\n\tRePathPart.lastIndex = 0;\n\n\twhile ( true ) {\n\n\t\tconst match = RePathPart.exec( path ),\n\t\t\tmatchEnd = RePathPart.lastIndex;\n\n\t\tlet id = match[ 1 ];\n\t\tconst idIsIndex = match[ 2 ] === ']',\n\t\t\tsubscript = match[ 3 ];\n\n\t\tif ( idIsIndex ) id = id | 0; // convert to integer\n\n\t\tif ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) {\n\n\t\t\t// bare name or \"pure\" bottom-level array \"[0]\" suffix\n\n\t\t\taddUniform( container, subscript === undefined ?\n\t\t\t\tnew SingleUniform( id, activeInfo, addr ) :\n\t\t\t\tnew PureArrayUniform( id, activeInfo, addr ) );\n\n\t\t\tbreak;\n\n\t\t} else {\n\n\t\t\t// step into inner node / create it in case it doesn't exist\n\n\t\t\tconst map = container.map;\n\t\t\tlet next = map[ id ];\n\n\t\t\tif ( next === undefined ) {\n\n\t\t\t\tnext = new StructuredUniform( id );\n\t\t\t\taddUniform( container, next );\n\n\t\t\t}\n\n\t\t\tcontainer = next;\n\n\t\t}\n\n\t}\n\n}\n\n// Root Container\n\nclass WebGLUniforms {\n\n\tconstructor( gl, program ) {\n\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\n\t\tconst n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS );\n\n\t\tfor ( let i = 0; i < n; ++ i ) {\n\n\t\t\tconst info = gl.getActiveUniform( program, i ),\n\t\t\t\taddr = gl.getUniformLocation( program, info.name );\n\n\t\t\tparseUniform( info, addr, this );\n\n\t\t}\n\n\t}\n\n\tsetValue( gl, name, value, textures ) {\n\n\t\tconst u = this.map[ name ];\n\n\t\tif ( u !== undefined ) u.setValue( gl, value, textures );\n\n\t}\n\n\tsetOptional( gl, object, name ) {\n\n\t\tconst v = object[ name ];\n\n\t\tif ( v !== undefined ) this.setValue( gl, name, v );\n\n\t}\n\n\tstatic upload( gl, seq, values, textures ) {\n\n\t\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\t\tconst u = seq[ i ],\n\t\t\t\tv = values[ u.id ];\n\n\t\t\tif ( v.needsUpdate !== false ) {\n\n\t\t\t\t// note: always updating when .needsUpdate is undefined\n\t\t\t\tu.setValue( gl, v.value, textures );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tstatic seqWithValue( seq, values ) {\n\n\t\tconst r = [];\n\n\t\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\t\tconst u = seq[ i ];\n\t\t\tif ( u.id in values ) r.push( u );\n\n\t\t}\n\n\t\treturn r;\n\n\t}\n\n}\n\nfunction WebGLShader( gl, type, string ) {\n\n\tconst shader = gl.createShader( type );\n\n\tgl.shaderSource( shader, string );\n\tgl.compileShader( shader );\n\n\treturn shader;\n\n}\n\nlet programIdCount = 0;\n\nfunction handleSource( string, errorLine ) {\n\n\tconst lines = string.split( '\\n' );\n\tconst lines2 = [];\n\n\tconst from = Math.max( errorLine - 6, 0 );\n\tconst to = Math.min( errorLine + 6, lines.length );\n\n\tfor ( let i = from; i < to; i ++ ) {\n\n\t\tconst line = i + 1;\n\t\tlines2.push( `${line === errorLine ? '>' : ' '} ${line}: ${lines[ i ]}` );\n\n\t}\n\n\treturn lines2.join( '\\n' );\n\n}\n\nfunction getEncodingComponents( colorSpace ) {\n\n\tswitch ( colorSpace ) {\n\n\t\tcase LinearSRGBColorSpace:\n\t\t\treturn [ 'Linear', '( value )' ];\n\t\tcase SRGBColorSpace:\n\t\t\treturn [ 'sRGB', '( value )' ];\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported color space:', colorSpace );\n\t\t\treturn [ 'Linear', '( value )' ];\n\n\t}\n\n}\n\nfunction getShaderErrors( gl, shader, type ) {\n\n\tconst status = gl.getShaderParameter( shader, gl.COMPILE_STATUS );\n\tconst errors = gl.getShaderInfoLog( shader ).trim();\n\n\tif ( status && errors === '' ) return '';\n\n\tconst errorMatches = /ERROR: 0:(\\d+)/.exec( errors );\n\tif ( errorMatches ) {\n\n\t\t// --enable-privileged-webgl-extension\n\t\t// console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n\n\t\tconst errorLine = parseInt( errorMatches[ 1 ] );\n\t\treturn type.toUpperCase() + '\\n\\n' + errors + '\\n\\n' + handleSource( gl.getShaderSource( shader ), errorLine );\n\n\t} else {\n\n\t\treturn errors;\n\n\t}\n\n}\n\nfunction getTexelEncodingFunction( functionName, colorSpace ) {\n\n\tconst components = getEncodingComponents( colorSpace );\n\treturn 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[ 0 ] + components[ 1 ] + '; }';\n\n}\n\nfunction getToneMappingFunction( functionName, toneMapping ) {\n\n\tlet toneMappingName;\n\n\tswitch ( toneMapping ) {\n\n\t\tcase LinearToneMapping:\n\t\t\ttoneMappingName = 'Linear';\n\t\t\tbreak;\n\n\t\tcase ReinhardToneMapping:\n\t\t\ttoneMappingName = 'Reinhard';\n\t\t\tbreak;\n\n\t\tcase CineonToneMapping:\n\t\t\ttoneMappingName = 'OptimizedCineon';\n\t\t\tbreak;\n\n\t\tcase ACESFilmicToneMapping:\n\t\t\ttoneMappingName = 'ACESFilmic';\n\t\t\tbreak;\n\n\t\tcase CustomToneMapping:\n\t\t\ttoneMappingName = 'Custom';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping );\n\t\t\ttoneMappingName = 'Linear';\n\n\t}\n\n\treturn 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }';\n\n}\n\nfunction generateExtensions( parameters ) {\n\n\tconst chunks = [\n\t\t( parameters.extensionDerivatives || !! parameters.envMapCubeUVHeight || parameters.bumpMap || parameters.normalMapTangentSpace || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ) ? '#extension GL_OES_standard_derivatives : enable' : '',\n\t\t( parameters.extensionFragDepth || parameters.logarithmicDepthBuffer ) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '',\n\t\t( parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ) ? '#extension GL_EXT_draw_buffers : require' : '',\n\t\t( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''\n\t];\n\n\treturn chunks.filter( filterEmptyLine ).join( '\\n' );\n\n}\n\nfunction generateDefines( defines ) {\n\n\tconst chunks = [];\n\n\tfor ( const name in defines ) {\n\n\t\tconst value = defines[ name ];\n\n\t\tif ( value === false ) continue;\n\n\t\tchunks.push( '#define ' + name + ' ' + value );\n\n\t}\n\n\treturn chunks.join( '\\n' );\n\n}\n\nfunction fetchAttributeLocations( gl, program ) {\n\n\tconst attributes = {};\n\n\tconst n = gl.getProgramParameter( program, gl.ACTIVE_ATTRIBUTES );\n\n\tfor ( let i = 0; i < n; i ++ ) {\n\n\t\tconst info = gl.getActiveAttrib( program, i );\n\t\tconst name = info.name;\n\n\t\tlet locationSize = 1;\n\t\tif ( info.type === gl.FLOAT_MAT2 ) locationSize = 2;\n\t\tif ( info.type === gl.FLOAT_MAT3 ) locationSize = 3;\n\t\tif ( info.type === gl.FLOAT_MAT4 ) locationSize = 4;\n\n\t\t// console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n\n\t\tattributes[ name ] = {\n\t\t\ttype: info.type,\n\t\t\tlocation: gl.getAttribLocation( program, name ),\n\t\t\tlocationSize: locationSize\n\t\t};\n\n\t}\n\n\treturn attributes;\n\n}\n\nfunction filterEmptyLine( string ) {\n\n\treturn string !== '';\n\n}\n\nfunction replaceLightNums( string, parameters ) {\n\n\tconst numSpotLightCoords = parameters.numSpotLightShadows + parameters.numSpotLightMaps - parameters.numSpotLightShadowsWithMaps;\n\n\treturn string\n\t\t.replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights )\n\t\t.replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights )\n\t\t.replace( /NUM_SPOT_LIGHT_MAPS/g, parameters.numSpotLightMaps )\n\t\t.replace( /NUM_SPOT_LIGHT_COORDS/g, numSpotLightCoords )\n\t\t.replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights )\n\t\t.replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights )\n\t\t.replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights )\n\t\t.replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows )\n\t\t.replace( /NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, parameters.numSpotLightShadowsWithMaps )\n\t\t.replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows )\n\t\t.replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows );\n\n}\n\nfunction replaceClippingPlaneNums( string, parameters ) {\n\n\treturn string\n\t\t.replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes )\n\t\t.replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) );\n\n}\n\n// Resolve Includes\n\nconst includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n\nfunction resolveIncludes( string ) {\n\n\treturn string.replace( includePattern, includeReplacer );\n\n}\n\nconst shaderChunkMap = new Map( [\n\t[ 'encodings_fragment', 'colorspace_fragment' ], // @deprecated, r154\n\t[ 'encodings_pars_fragment', 'colorspace_pars_fragment' ], // @deprecated, r154\n\t[ 'output_fragment', 'opaque_fragment' ], // @deprecated, r154\n] );\n\nfunction includeReplacer( match, include ) {\n\n\tlet string = ShaderChunk[ include ];\n\n\tif ( string === undefined ) {\n\n\t\tconst newInclude = shaderChunkMap.get( include );\n\n\t\tif ( newInclude !== undefined ) {\n\n\t\t\tstring = ShaderChunk[ newInclude ];\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.', include, newInclude );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Can not resolve #include <' + include + '>' );\n\n\t\t}\n\n\t}\n\n\treturn resolveIncludes( string );\n\n}\n\n// Unroll Loops\n\nconst unrollLoopPattern = /#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*<\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;\n\nfunction unrollLoops( string ) {\n\n\treturn string.replace( unrollLoopPattern, loopReplacer );\n\n}\n\nfunction loopReplacer( match, start, end, snippet ) {\n\n\tlet string = '';\n\n\tfor ( let i = parseInt( start ); i < parseInt( end ); i ++ ) {\n\n\t\tstring += snippet\n\t\t\t.replace( /\\[\\s*i\\s*\\]/g, '[ ' + i + ' ]' )\n\t\t\t.replace( /UNROLLED_LOOP_INDEX/g, i );\n\n\t}\n\n\treturn string;\n\n}\n\n//\n\nfunction generatePrecision( parameters ) {\n\n\tlet precisionstring = 'precision ' + parameters.precision + ' float;\\nprecision ' + parameters.precision + ' int;';\n\n\tif ( parameters.precision === 'highp' ) {\n\n\t\tprecisionstring += '\\n#define HIGH_PRECISION';\n\n\t} else if ( parameters.precision === 'mediump' ) {\n\n\t\tprecisionstring += '\\n#define MEDIUM_PRECISION';\n\n\t} else if ( parameters.precision === 'lowp' ) {\n\n\t\tprecisionstring += '\\n#define LOW_PRECISION';\n\n\t}\n\n\treturn precisionstring;\n\n}\n\nfunction generateShadowMapTypeDefine( parameters ) {\n\n\tlet shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';\n\n\tif ( parameters.shadowMapType === PCFShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF';\n\n\t} else if ( parameters.shadowMapType === PCFSoftShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT';\n\n\t} else if ( parameters.shadowMapType === VSMShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM';\n\n\t}\n\n\treturn shadowMapTypeDefine;\n\n}\n\nfunction generateEnvMapTypeDefine( parameters ) {\n\n\tlet envMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeReflectionMapping:\n\t\t\tcase CubeRefractionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\t\t\t\tbreak;\n\n\t\t\tcase CubeUVReflectionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapTypeDefine;\n\n}\n\nfunction generateEnvMapModeDefine( parameters ) {\n\n\tlet envMapModeDefine = 'ENVMAP_MODE_REFLECTION';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeRefractionMapping:\n\n\t\t\t\tenvMapModeDefine = 'ENVMAP_MODE_REFRACTION';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapModeDefine;\n\n}\n\nfunction generateEnvMapBlendingDefine( parameters ) {\n\n\tlet envMapBlendingDefine = 'ENVMAP_BLENDING_NONE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.combine ) {\n\n\t\t\tcase MultiplyOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY';\n\t\t\t\tbreak;\n\n\t\t\tcase MixOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MIX';\n\t\t\t\tbreak;\n\n\t\t\tcase AddOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_ADD';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapBlendingDefine;\n\n}\n\nfunction generateCubeUVSize( parameters ) {\n\n\tconst imageHeight = parameters.envMapCubeUVHeight;\n\n\tif ( imageHeight === null ) return null;\n\n\tconst maxMip = Math.log2( imageHeight ) - 2;\n\n\tconst texelHeight = 1.0 / imageHeight;\n\n\tconst texelWidth = 1.0 / ( 3 * Math.max( Math.pow( 2, maxMip ), 7 * 16 ) );\n\n\treturn { texelWidth, texelHeight, maxMip };\n\n}\n\nfunction WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {\n\n\t// TODO Send this event to Three.js DevTools\n\t// console.log( 'WebGLProgram', cacheKey );\n\n\tconst gl = renderer.getContext();\n\n\tconst defines = parameters.defines;\n\n\tlet vertexShader = parameters.vertexShader;\n\tlet fragmentShader = parameters.fragmentShader;\n\n\tconst shadowMapTypeDefine = generateShadowMapTypeDefine( parameters );\n\tconst envMapTypeDefine = generateEnvMapTypeDefine( parameters );\n\tconst envMapModeDefine = generateEnvMapModeDefine( parameters );\n\tconst envMapBlendingDefine = generateEnvMapBlendingDefine( parameters );\n\tconst envMapCubeUVSize = generateCubeUVSize( parameters );\n\n\tconst customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters );\n\n\tconst customDefines = generateDefines( defines );\n\n\tconst program = gl.createProgram();\n\n\tlet prefixVertex, prefixFragment;\n\tlet versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\\n' : '';\n\n\tif ( parameters.isRawShaderMaterial ) {\n\n\t\tprefixVertex = [\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixVertex.length > 0 ) {\n\n\t\t\tprefixVertex += '\\n';\n\n\t\t}\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixFragment.length > 0 ) {\n\n\t\t\tprefixFragment += '\\n';\n\n\t\t}\n\n\t} else {\n\n\t\tprefixVertex = [\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.instancing ? '#define USE_INSTANCING' : '',\n\t\t\tparameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '',\n\n\t\t\tparameters.useFog && parameters.fog ? '#define USE_FOG' : '',\n\t\t\tparameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\tparameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '',\n\t\t\tparameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '',\n\t\t\tparameters.displacementMap ? '#define USE_DISPLACEMENTMAP' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\n\t\t\tparameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '',\n\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\n\t\t\tparameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '',\n\t\t\tparameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '',\n\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '',\n\t\t\tparameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '',\n\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\t\t\tparameters.alphaHash ? '#define USE_ALPHAHASH' : '',\n\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '',\n\t\t\tparameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '',\n\n\t\t\t//\n\n\t\t\tparameters.mapUv ? '#define MAP_UV ' + parameters.mapUv : '',\n\t\t\tparameters.alphaMapUv ? '#define ALPHAMAP_UV ' + parameters.alphaMapUv : '',\n\t\t\tparameters.lightMapUv ? '#define LIGHTMAP_UV ' + parameters.lightMapUv : '',\n\t\t\tparameters.aoMapUv ? '#define AOMAP_UV ' + parameters.aoMapUv : '',\n\t\t\tparameters.emissiveMapUv ? '#define EMISSIVEMAP_UV ' + parameters.emissiveMapUv : '',\n\t\t\tparameters.bumpMapUv ? '#define BUMPMAP_UV ' + parameters.bumpMapUv : '',\n\t\t\tparameters.normalMapUv ? '#define NORMALMAP_UV ' + parameters.normalMapUv : '',\n\t\t\tparameters.displacementMapUv ? '#define DISPLACEMENTMAP_UV ' + parameters.displacementMapUv : '',\n\n\t\t\tparameters.metalnessMapUv ? '#define METALNESSMAP_UV ' + parameters.metalnessMapUv : '',\n\t\t\tparameters.roughnessMapUv ? '#define ROUGHNESSMAP_UV ' + parameters.roughnessMapUv : '',\n\n\t\t\tparameters.anisotropyMapUv ? '#define ANISOTROPYMAP_UV ' + parameters.anisotropyMapUv : '',\n\n\t\t\tparameters.clearcoatMapUv ? '#define CLEARCOATMAP_UV ' + parameters.clearcoatMapUv : '',\n\t\t\tparameters.clearcoatNormalMapUv ? '#define CLEARCOAT_NORMALMAP_UV ' + parameters.clearcoatNormalMapUv : '',\n\t\t\tparameters.clearcoatRoughnessMapUv ? '#define CLEARCOAT_ROUGHNESSMAP_UV ' + parameters.clearcoatRoughnessMapUv : '',\n\n\t\t\tparameters.iridescenceMapUv ? '#define IRIDESCENCEMAP_UV ' + parameters.iridescenceMapUv : '',\n\t\t\tparameters.iridescenceThicknessMapUv ? '#define IRIDESCENCE_THICKNESSMAP_UV ' + parameters.iridescenceThicknessMapUv : '',\n\n\t\t\tparameters.sheenColorMapUv ? '#define SHEEN_COLORMAP_UV ' + parameters.sheenColorMapUv : '',\n\t\t\tparameters.sheenRoughnessMapUv ? '#define SHEEN_ROUGHNESSMAP_UV ' + parameters.sheenRoughnessMapUv : '',\n\n\t\t\tparameters.specularMapUv ? '#define SPECULARMAP_UV ' + parameters.specularMapUv : '',\n\t\t\tparameters.specularColorMapUv ? '#define SPECULAR_COLORMAP_UV ' + parameters.specularColorMapUv : '',\n\t\t\tparameters.specularIntensityMapUv ? '#define SPECULAR_INTENSITYMAP_UV ' + parameters.specularIntensityMapUv : '',\n\n\t\t\tparameters.transmissionMapUv ? '#define TRANSMISSIONMAP_UV ' + parameters.transmissionMapUv : '',\n\t\t\tparameters.thicknessMapUv ? '#define THICKNESSMAP_UV ' + parameters.thicknessMapUv : '',\n\n\t\t\t//\n\n\t\t\tparameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUv1s ? '#define USE_UV1' : '',\n\t\t\tparameters.vertexUv2s ? '#define USE_UV2' : '',\n\t\t\tparameters.vertexUv3s ? '#define USE_UV3' : '',\n\n\t\t\tparameters.pointsUvs ? '#define USE_POINTS_UV' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.skinning ? '#define USE_SKINNING' : '',\n\n\t\t\tparameters.morphTargets ? '#define USE_MORPHTARGETS' : '',\n\t\t\tparameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '',\n\t\t\t( parameters.morphColors && parameters.isWebGL2 ) ? '#define USE_MORPHCOLORS' : '',\n\t\t\t( parameters.morphTargetsCount > 0 && parameters.isWebGL2 ) ? '#define MORPHTARGETS_TEXTURE' : '',\n\t\t\t( parameters.morphTargetsCount > 0 && parameters.isWebGL2 ) ? '#define MORPHTARGETS_TEXTURE_STRIDE ' + parameters.morphTextureStride : '',\n\t\t\t( parameters.morphTargetsCount > 0 && parameters.isWebGL2 ) ? '#define MORPHTARGETS_COUNT ' + parameters.morphTargetsCount : '',\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '',\n\n\t\t\tparameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t'uniform mat4 modelMatrix;',\n\t\t\t'uniform mat4 modelViewMatrix;',\n\t\t\t'uniform mat4 projectionMatrix;',\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform mat3 normalMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t'#ifdef USE_INSTANCING',\n\n\t\t\t'\tattribute mat4 instanceMatrix;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_INSTANCING_COLOR',\n\n\t\t\t'\tattribute vec3 instanceColor;',\n\n\t\t\t'#endif',\n\n\t\t\t'attribute vec3 position;',\n\t\t\t'attribute vec3 normal;',\n\t\t\t'attribute vec2 uv;',\n\n\t\t\t'#ifdef USE_UV1',\n\n\t\t\t'\tattribute vec2 uv1;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_UV2',\n\n\t\t\t'\tattribute vec2 uv2;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_UV3',\n\n\t\t\t'\tattribute vec2 uv3;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_TANGENT',\n\n\t\t\t'\tattribute vec4 tangent;',\n\n\t\t\t'#endif',\n\n\t\t\t'#if defined( USE_COLOR_ALPHA )',\n\n\t\t\t'\tattribute vec4 color;',\n\n\t\t\t'#elif defined( USE_COLOR )',\n\n\t\t\t'\tattribute vec3 color;',\n\n\t\t\t'#endif',\n\n\t\t\t'#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )',\n\n\t\t\t'\tattribute vec3 morphTarget0;',\n\t\t\t'\tattribute vec3 morphTarget1;',\n\t\t\t'\tattribute vec3 morphTarget2;',\n\t\t\t'\tattribute vec3 morphTarget3;',\n\n\t\t\t'\t#ifdef USE_MORPHNORMALS',\n\n\t\t\t'\t\tattribute vec3 morphNormal0;',\n\t\t\t'\t\tattribute vec3 morphNormal1;',\n\t\t\t'\t\tattribute vec3 morphNormal2;',\n\t\t\t'\t\tattribute vec3 morphNormal3;',\n\n\t\t\t'\t#else',\n\n\t\t\t'\t\tattribute vec3 morphTarget4;',\n\t\t\t'\t\tattribute vec3 morphTarget5;',\n\t\t\t'\t\tattribute vec3 morphTarget6;',\n\t\t\t'\t\tattribute vec3 morphTarget7;',\n\n\t\t\t'\t#endif',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_SKINNING',\n\n\t\t\t'\tattribute vec4 skinIndex;',\n\t\t\t'\tattribute vec4 skinWeight;',\n\n\t\t\t'#endif',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.useFog && parameters.fog ? '#define USE_FOG' : '',\n\t\t\tparameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.matcap ? '#define USE_MATCAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapTypeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapBlendingDefine : '',\n\t\t\tenvMapCubeUVSize ? '#define CUBEUV_TEXEL_WIDTH ' + envMapCubeUVSize.texelWidth : '',\n\t\t\tenvMapCubeUVSize ? '#define CUBEUV_TEXEL_HEIGHT ' + envMapCubeUVSize.texelHeight : '',\n\t\t\tenvMapCubeUVSize ? '#define CUBEUV_MAX_MIP ' + envMapCubeUVSize.maxMip + '.0' : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\tparameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '',\n\t\t\tparameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\n\t\t\tparameters.anisotropy ? '#define USE_ANISOTROPY' : '',\n\t\t\tparameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '',\n\n\t\t\tparameters.clearcoat ? '#define USE_CLEARCOAT' : '',\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\n\t\t\tparameters.iridescence ? '#define USE_IRIDESCENCE' : '',\n\t\t\tparameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '',\n\t\t\tparameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '',\n\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '',\n\t\t\tparameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '',\n\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\t\t\tparameters.alphaTest ? '#define USE_ALPHATEST' : '',\n\t\t\tparameters.alphaHash ? '#define USE_ALPHAHASH' : '',\n\n\t\t\tparameters.sheen ? '#define USE_SHEEN' : '',\n\t\t\tparameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '',\n\t\t\tparameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '',\n\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUv1s ? '#define USE_UV1' : '',\n\t\t\tparameters.vertexUv2s ? '#define USE_UV2' : '',\n\t\t\tparameters.vertexUv3s ? '#define USE_UV3' : '',\n\n\t\t\tparameters.pointsUvs ? '#define USE_POINTS_UV' : '',\n\n\t\t\tparameters.gradientMap ? '#define USE_GRADIENTMAP' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '',\n\n\t\t\tparameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '',\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '',\n\n\t\t\tparameters.dithering ? '#define DITHERING' : '',\n\t\t\tparameters.opaque ? '#define OPAQUE' : '',\n\n\t\t\tShaderChunk[ 'colorspace_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below\n\t\t\tgetTexelEncodingFunction( 'linearToOutputTexel', parameters.outputColorSpace ),\n\n\t\t\tparameters.useDepthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t}\n\n\tvertexShader = resolveIncludes( vertexShader );\n\tvertexShader = replaceLightNums( vertexShader, parameters );\n\tvertexShader = replaceClippingPlaneNums( vertexShader, parameters );\n\n\tfragmentShader = resolveIncludes( fragmentShader );\n\tfragmentShader = replaceLightNums( fragmentShader, parameters );\n\tfragmentShader = replaceClippingPlaneNums( fragmentShader, parameters );\n\n\tvertexShader = unrollLoops( vertexShader );\n\tfragmentShader = unrollLoops( fragmentShader );\n\n\tif ( parameters.isWebGL2 && parameters.isRawShaderMaterial !== true ) {\n\n\t\t// GLSL 3.0 conversion for built-in materials and ShaderMaterial\n\n\t\tversionString = '#version 300 es\\n';\n\n\t\tprefixVertex = [\n\t\t\t'precision mediump sampler2DArray;',\n\t\t\t'#define attribute in',\n\t\t\t'#define varying out',\n\t\t\t'#define texture2D texture'\n\t\t].join( '\\n' ) + '\\n' + prefixVertex;\n\n\t\tprefixFragment = [\n\t\t\t'#define varying in',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : 'layout(location = 0) out highp vec4 pc_fragColor;',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor',\n\t\t\t'#define gl_FragDepthEXT gl_FragDepth',\n\t\t\t'#define texture2D texture',\n\t\t\t'#define textureCube texture',\n\t\t\t'#define texture2DProj textureProj',\n\t\t\t'#define texture2DLodEXT textureLod',\n\t\t\t'#define texture2DProjLodEXT textureProjLod',\n\t\t\t'#define textureCubeLodEXT textureLod',\n\t\t\t'#define texture2DGradEXT textureGrad',\n\t\t\t'#define texture2DProjGradEXT textureProjGrad',\n\t\t\t'#define textureCubeGradEXT textureGrad'\n\t\t].join( '\\n' ) + '\\n' + prefixFragment;\n\n\t}\n\n\tconst vertexGlsl = versionString + prefixVertex + vertexShader;\n\tconst fragmentGlsl = versionString + prefixFragment + fragmentShader;\n\n\t// console.log( '*VERTEX*', vertexGlsl );\n\t// console.log( '*FRAGMENT*', fragmentGlsl );\n\n\tconst glVertexShader = WebGLShader( gl, gl.VERTEX_SHADER, vertexGlsl );\n\tconst glFragmentShader = WebGLShader( gl, gl.FRAGMENT_SHADER, fragmentGlsl );\n\n\tgl.attachShader( program, glVertexShader );\n\tgl.attachShader( program, glFragmentShader );\n\n\t// Force a particular attribute to index 0.\n\n\tif ( parameters.index0AttributeName !== undefined ) {\n\n\t\tgl.bindAttribLocation( program, 0, parameters.index0AttributeName );\n\n\t} else if ( parameters.morphTargets === true ) {\n\n\t\t// programs with morphTargets displace position out of attribute 0\n\t\tgl.bindAttribLocation( program, 0, 'position' );\n\n\t}\n\n\tgl.linkProgram( program );\n\n\t// check for link errors\n\tif ( renderer.debug.checkShaderErrors ) {\n\n\t\tconst programLog = gl.getProgramInfoLog( program ).trim();\n\t\tconst vertexLog = gl.getShaderInfoLog( glVertexShader ).trim();\n\t\tconst fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim();\n\n\t\tlet runnable = true;\n\t\tlet haveDiagnostics = true;\n\n\t\tif ( gl.getProgramParameter( program, gl.LINK_STATUS ) === false ) {\n\n\t\t\trunnable = false;\n\n\t\t\tif ( typeof renderer.debug.onShaderError === 'function' ) {\n\n\t\t\t\trenderer.debug.onShaderError( gl, program, glVertexShader, glFragmentShader );\n\n\t\t\t} else {\n\n\t\t\t\t// default error reporting\n\n\t\t\t\tconst vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' );\n\t\t\t\tconst fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' );\n\n\t\t\t\tconsole.error(\n\t\t\t\t\t'THREE.WebGLProgram: Shader Error ' + gl.getError() + ' - ' +\n\t\t\t\t\t'VALIDATE_STATUS ' + gl.getProgramParameter( program, gl.VALIDATE_STATUS ) + '\\n\\n' +\n\t\t\t\t\t'Program Info Log: ' + programLog + '\\n' +\n\t\t\t\t\tvertexErrors + '\\n' +\n\t\t\t\t\tfragmentErrors\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t} else if ( programLog !== '' ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Program Info Log:', programLog );\n\n\t\t} else if ( vertexLog === '' || fragmentLog === '' ) {\n\n\t\t\thaveDiagnostics = false;\n\n\t\t}\n\n\t\tif ( haveDiagnostics ) {\n\n\t\t\tthis.diagnostics = {\n\n\t\t\t\trunnable: runnable,\n\n\t\t\t\tprogramLog: programLog,\n\n\t\t\t\tvertexShader: {\n\n\t\t\t\t\tlog: vertexLog,\n\t\t\t\t\tprefix: prefixVertex\n\n\t\t\t\t},\n\n\t\t\t\tfragmentShader: {\n\n\t\t\t\t\tlog: fragmentLog,\n\t\t\t\t\tprefix: prefixFragment\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}\n\n\t}\n\n\t// Clean up\n\n\t// Crashes in iOS9 and iOS10. #18402\n\t// gl.detachShader( program, glVertexShader );\n\t// gl.detachShader( program, glFragmentShader );\n\n\tgl.deleteShader( glVertexShader );\n\tgl.deleteShader( glFragmentShader );\n\n\t// set up caching for uniform locations\n\n\tlet cachedUniforms;\n\n\tthis.getUniforms = function () {\n\n\t\tif ( cachedUniforms === undefined ) {\n\n\t\t\tcachedUniforms = new WebGLUniforms( gl, program );\n\n\t\t}\n\n\t\treturn cachedUniforms;\n\n\t};\n\n\t// set up caching for attribute locations\n\n\tlet cachedAttributes;\n\n\tthis.getAttributes = function () {\n\n\t\tif ( cachedAttributes === undefined ) {\n\n\t\t\tcachedAttributes = fetchAttributeLocations( gl, program );\n\n\t\t}\n\n\t\treturn cachedAttributes;\n\n\t};\n\n\t// free resource\n\n\tthis.destroy = function () {\n\n\t\tbindingStates.releaseStatesOfProgram( this );\n\n\t\tgl.deleteProgram( program );\n\t\tthis.program = undefined;\n\n\t};\n\n\t//\n\n\tthis.type = parameters.shaderType;\n\tthis.name = parameters.shaderName;\n\tthis.id = programIdCount ++;\n\tthis.cacheKey = cacheKey;\n\tthis.usedTimes = 1;\n\tthis.program = program;\n\tthis.vertexShader = glVertexShader;\n\tthis.fragmentShader = glFragmentShader;\n\n\treturn this;\n\n}\n\nlet _id = 0;\n\nclass WebGLShaderCache {\n\n\tconstructor() {\n\n\t\tthis.shaderCache = new Map();\n\t\tthis.materialCache = new Map();\n\n\t}\n\n\tupdate( material ) {\n\n\t\tconst vertexShader = material.vertexShader;\n\t\tconst fragmentShader = material.fragmentShader;\n\n\t\tconst vertexShaderStage = this._getShaderStage( vertexShader );\n\t\tconst fragmentShaderStage = this._getShaderStage( fragmentShader );\n\n\t\tconst materialShaders = this._getShaderCacheForMaterial( material );\n\n\t\tif ( materialShaders.has( vertexShaderStage ) === false ) {\n\n\t\t\tmaterialShaders.add( vertexShaderStage );\n\t\t\tvertexShaderStage.usedTimes ++;\n\n\t\t}\n\n\t\tif ( materialShaders.has( fragmentShaderStage ) === false ) {\n\n\t\t\tmaterialShaders.add( fragmentShaderStage );\n\t\t\tfragmentShaderStage.usedTimes ++;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremove( material ) {\n\n\t\tconst materialShaders = this.materialCache.get( material );\n\n\t\tfor ( const shaderStage of materialShaders ) {\n\n\t\t\tshaderStage.usedTimes --;\n\n\t\t\tif ( shaderStage.usedTimes === 0 ) this.shaderCache.delete( shaderStage.code );\n\n\t\t}\n\n\t\tthis.materialCache.delete( material );\n\n\t\treturn this;\n\n\t}\n\n\tgetVertexShaderID( material ) {\n\n\t\treturn this._getShaderStage( material.vertexShader ).id;\n\n\t}\n\n\tgetFragmentShaderID( material ) {\n\n\t\treturn this._getShaderStage( material.fragmentShader ).id;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shaderCache.clear();\n\t\tthis.materialCache.clear();\n\n\t}\n\n\t_getShaderCacheForMaterial( material ) {\n\n\t\tconst cache = this.materialCache;\n\t\tlet set = cache.get( material );\n\n\t\tif ( set === undefined ) {\n\n\t\t\tset = new Set();\n\t\t\tcache.set( material, set );\n\n\t\t}\n\n\t\treturn set;\n\n\t}\n\n\t_getShaderStage( code ) {\n\n\t\tconst cache = this.shaderCache;\n\t\tlet stage = cache.get( code );\n\n\t\tif ( stage === undefined ) {\n\n\t\t\tstage = new WebGLShaderStage( code );\n\t\t\tcache.set( code, stage );\n\n\t\t}\n\n\t\treturn stage;\n\n\t}\n\n}\n\nclass WebGLShaderStage {\n\n\tconstructor( code ) {\n\n\t\tthis.id = _id ++;\n\n\t\tthis.code = code;\n\t\tthis.usedTimes = 0;\n\n\t}\n\n}\n\nfunction WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ) {\n\n\tconst _programLayers = new Layers();\n\tconst _customShaders = new WebGLShaderCache();\n\tconst programs = [];\n\n\tconst IS_WEBGL2 = capabilities.isWebGL2;\n\tconst logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n\tconst SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures;\n\n\tlet precision = capabilities.precision;\n\n\tconst shaderIDs = {\n\t\tMeshDepthMaterial: 'depth',\n\t\tMeshDistanceMaterial: 'distanceRGBA',\n\t\tMeshNormalMaterial: 'normal',\n\t\tMeshBasicMaterial: 'basic',\n\t\tMeshLambertMaterial: 'lambert',\n\t\tMeshPhongMaterial: 'phong',\n\t\tMeshToonMaterial: 'toon',\n\t\tMeshStandardMaterial: 'physical',\n\t\tMeshPhysicalMaterial: 'physical',\n\t\tMeshMatcapMaterial: 'matcap',\n\t\tLineBasicMaterial: 'basic',\n\t\tLineDashedMaterial: 'dashed',\n\t\tPointsMaterial: 'points',\n\t\tShadowMaterial: 'shadow',\n\t\tSpriteMaterial: 'sprite'\n\t};\n\n\tfunction getChannel( value ) {\n\n\t\tif ( value === 0 ) return 'uv';\n\n\t\treturn `uv${ value }`;\n\n\t}\n\n\tfunction getParameters( material, lights, shadows, scene, object ) {\n\n\t\tconst fog = scene.fog;\n\t\tconst geometry = object.geometry;\n\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\n\t\tconst envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment );\n\t\tconst envMapCubeUVHeight = ( !! envMap ) && ( envMap.mapping === CubeUVReflectionMapping ) ? envMap.image.height : null;\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\n\t\t// heuristics to create shader parameters according to lights in the scene\n\t\t// (not to blow over maxLights budget)\n\n\t\tif ( material.precision !== null ) {\n\n\t\t\tprecision = capabilities.getMaxPrecision( material.precision );\n\n\t\t\tif ( precision !== material.precision ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tconst morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n\t\tconst morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;\n\n\t\tlet morphTextureStride = 0;\n\n\t\tif ( geometry.morphAttributes.position !== undefined ) morphTextureStride = 1;\n\t\tif ( geometry.morphAttributes.normal !== undefined ) morphTextureStride = 2;\n\t\tif ( geometry.morphAttributes.color !== undefined ) morphTextureStride = 3;\n\n\t\t//\n\n\t\tlet vertexShader, fragmentShader;\n\t\tlet customVertexShaderID, customFragmentShaderID;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\n\t\t\tvertexShader = shader.vertexShader;\n\t\t\tfragmentShader = shader.fragmentShader;\n\n\t\t} else {\n\n\t\t\tvertexShader = material.vertexShader;\n\t\t\tfragmentShader = material.fragmentShader;\n\n\t\t\t_customShaders.update( material );\n\n\t\t\tcustomVertexShaderID = _customShaders.getVertexShaderID( material );\n\t\t\tcustomFragmentShaderID = _customShaders.getFragmentShaderID( material );\n\n\t\t}\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tconst IS_INSTANCEDMESH = object.isInstancedMesh === true;\n\n\t\tconst HAS_MAP = !! material.map;\n\t\tconst HAS_MATCAP = !! material.matcap;\n\t\tconst HAS_ENVMAP = !! envMap;\n\t\tconst HAS_AOMAP = !! material.aoMap;\n\t\tconst HAS_LIGHTMAP = !! material.lightMap;\n\t\tconst HAS_BUMPMAP = !! material.bumpMap;\n\t\tconst HAS_NORMALMAP = !! material.normalMap;\n\t\tconst HAS_DISPLACEMENTMAP = !! material.displacementMap;\n\t\tconst HAS_EMISSIVEMAP = !! material.emissiveMap;\n\n\t\tconst HAS_METALNESSMAP = !! material.metalnessMap;\n\t\tconst HAS_ROUGHNESSMAP = !! material.roughnessMap;\n\n\t\tconst HAS_ANISOTROPY = material.anisotropy > 0;\n\t\tconst HAS_CLEARCOAT = material.clearcoat > 0;\n\t\tconst HAS_IRIDESCENCE = material.iridescence > 0;\n\t\tconst HAS_SHEEN = material.sheen > 0;\n\t\tconst HAS_TRANSMISSION = material.transmission > 0;\n\n\t\tconst HAS_ANISOTROPYMAP = HAS_ANISOTROPY && !! material.anisotropyMap;\n\n\t\tconst HAS_CLEARCOATMAP = HAS_CLEARCOAT && !! material.clearcoatMap;\n\t\tconst HAS_CLEARCOAT_NORMALMAP = HAS_CLEARCOAT && !! material.clearcoatNormalMap;\n\t\tconst HAS_CLEARCOAT_ROUGHNESSMAP = HAS_CLEARCOAT && !! material.clearcoatRoughnessMap;\n\n\t\tconst HAS_IRIDESCENCEMAP = HAS_IRIDESCENCE && !! material.iridescenceMap;\n\t\tconst HAS_IRIDESCENCE_THICKNESSMAP = HAS_IRIDESCENCE && !! material.iridescenceThicknessMap;\n\n\t\tconst HAS_SHEEN_COLORMAP = HAS_SHEEN && !! material.sheenColorMap;\n\t\tconst HAS_SHEEN_ROUGHNESSMAP = HAS_SHEEN && !! material.sheenRoughnessMap;\n\n\t\tconst HAS_SPECULARMAP = !! material.specularMap;\n\t\tconst HAS_SPECULAR_COLORMAP = !! material.specularColorMap;\n\t\tconst HAS_SPECULAR_INTENSITYMAP = !! material.specularIntensityMap;\n\n\t\tconst HAS_TRANSMISSIONMAP = HAS_TRANSMISSION && !! material.transmissionMap;\n\t\tconst HAS_THICKNESSMAP = HAS_TRANSMISSION && !! material.thicknessMap;\n\n\t\tconst HAS_GRADIENTMAP = !! material.gradientMap;\n\n\t\tconst HAS_ALPHAMAP = !! material.alphaMap;\n\n\t\tconst HAS_ALPHATEST = material.alphaTest > 0;\n\n\t\tconst HAS_ALPHAHASH = !! material.alphaHash;\n\n\t\tconst HAS_EXTENSIONS = !! material.extensions;\n\n\t\tconst HAS_ATTRIBUTE_UV1 = !! geometry.attributes.uv1;\n\t\tconst HAS_ATTRIBUTE_UV2 = !! geometry.attributes.uv2;\n\t\tconst HAS_ATTRIBUTE_UV3 = !! geometry.attributes.uv3;\n\n\t\tlet toneMapping = NoToneMapping;\n\n\t\tif ( material.toneMapped ) {\n\n\t\t\tif ( currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true ) {\n\n\t\t\t\ttoneMapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst parameters = {\n\n\t\t\tisWebGL2: IS_WEBGL2,\n\n\t\t\tshaderID: shaderID,\n\t\t\tshaderType: material.type,\n\t\t\tshaderName: material.name,\n\n\t\t\tvertexShader: vertexShader,\n\t\t\tfragmentShader: fragmentShader,\n\t\t\tdefines: material.defines,\n\n\t\t\tcustomVertexShaderID: customVertexShaderID,\n\t\t\tcustomFragmentShaderID: customFragmentShaderID,\n\n\t\t\tisRawShaderMaterial: material.isRawShaderMaterial === true,\n\t\t\tglslVersion: material.glslVersion,\n\n\t\t\tprecision: precision,\n\n\t\t\tinstancing: IS_INSTANCEDMESH,\n\t\t\tinstancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,\n\n\t\t\tsupportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,\n\t\t\toutputColorSpace: ( currentRenderTarget === null ) ? renderer.outputColorSpace : ( currentRenderTarget.isXRRenderTarget === true ? currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace ),\n\n\t\t\tmap: HAS_MAP,\n\t\t\tmatcap: HAS_MATCAP,\n\t\t\tenvMap: HAS_ENVMAP,\n\t\t\tenvMapMode: HAS_ENVMAP && envMap.mapping,\n\t\t\tenvMapCubeUVHeight: envMapCubeUVHeight,\n\t\t\taoMap: HAS_AOMAP,\n\t\t\tlightMap: HAS_LIGHTMAP,\n\t\t\tbumpMap: HAS_BUMPMAP,\n\t\t\tnormalMap: HAS_NORMALMAP,\n\t\t\tdisplacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP,\n\t\t\temissiveMap: HAS_EMISSIVEMAP,\n\n\t\t\tnormalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === ObjectSpaceNormalMap,\n\t\t\tnormalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === TangentSpaceNormalMap,\n\n\t\t\tmetalnessMap: HAS_METALNESSMAP,\n\t\t\troughnessMap: HAS_ROUGHNESSMAP,\n\n\t\t\tanisotropy: HAS_ANISOTROPY,\n\t\t\tanisotropyMap: HAS_ANISOTROPYMAP,\n\n\t\t\tclearcoat: HAS_CLEARCOAT,\n\t\t\tclearcoatMap: HAS_CLEARCOATMAP,\n\t\t\tclearcoatNormalMap: HAS_CLEARCOAT_NORMALMAP,\n\t\t\tclearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP,\n\n\t\t\tiridescence: HAS_IRIDESCENCE,\n\t\t\tiridescenceMap: HAS_IRIDESCENCEMAP,\n\t\t\tiridescenceThicknessMap: HAS_IRIDESCENCE_THICKNESSMAP,\n\n\t\t\tsheen: HAS_SHEEN,\n\t\t\tsheenColorMap: HAS_SHEEN_COLORMAP,\n\t\t\tsheenRoughnessMap: HAS_SHEEN_ROUGHNESSMAP,\n\n\t\t\tspecularMap: HAS_SPECULARMAP,\n\t\t\tspecularColorMap: HAS_SPECULAR_COLORMAP,\n\t\t\tspecularIntensityMap: HAS_SPECULAR_INTENSITYMAP,\n\n\t\t\ttransmission: HAS_TRANSMISSION,\n\t\t\ttransmissionMap: HAS_TRANSMISSIONMAP,\n\t\t\tthicknessMap: HAS_THICKNESSMAP,\n\n\t\t\tgradientMap: HAS_GRADIENTMAP,\n\n\t\t\topaque: material.transparent === false && material.blending === NormalBlending,\n\n\t\t\talphaMap: HAS_ALPHAMAP,\n\t\t\talphaTest: HAS_ALPHATEST,\n\t\t\talphaHash: HAS_ALPHAHASH,\n\n\t\t\tcombine: material.combine,\n\n\t\t\t//\n\n\t\t\tmapUv: HAS_MAP && getChannel( material.map.channel ),\n\t\t\taoMapUv: HAS_AOMAP && getChannel( material.aoMap.channel ),\n\t\t\tlightMapUv: HAS_LIGHTMAP && getChannel( material.lightMap.channel ),\n\t\t\tbumpMapUv: HAS_BUMPMAP && getChannel( material.bumpMap.channel ),\n\t\t\tnormalMapUv: HAS_NORMALMAP && getChannel( material.normalMap.channel ),\n\t\t\tdisplacementMapUv: HAS_DISPLACEMENTMAP && getChannel( material.displacementMap.channel ),\n\t\t\temissiveMapUv: HAS_EMISSIVEMAP && getChannel( material.emissiveMap.channel ),\n\n\t\t\tmetalnessMapUv: HAS_METALNESSMAP && getChannel( material.metalnessMap.channel ),\n\t\t\troughnessMapUv: HAS_ROUGHNESSMAP && getChannel( material.roughnessMap.channel ),\n\n\t\t\tanisotropyMapUv: HAS_ANISOTROPYMAP && getChannel( material.anisotropyMap.channel ),\n\n\t\t\tclearcoatMapUv: HAS_CLEARCOATMAP && getChannel( material.clearcoatMap.channel ),\n\t\t\tclearcoatNormalMapUv: HAS_CLEARCOAT_NORMALMAP && getChannel( material.clearcoatNormalMap.channel ),\n\t\t\tclearcoatRoughnessMapUv: HAS_CLEARCOAT_ROUGHNESSMAP && getChannel( material.clearcoatRoughnessMap.channel ),\n\n\t\t\tiridescenceMapUv: HAS_IRIDESCENCEMAP && getChannel( material.iridescenceMap.channel ),\n\t\t\tiridescenceThicknessMapUv: HAS_IRIDESCENCE_THICKNESSMAP && getChannel( material.iridescenceThicknessMap.channel ),\n\n\t\t\tsheenColorMapUv: HAS_SHEEN_COLORMAP && getChannel( material.sheenColorMap.channel ),\n\t\t\tsheenRoughnessMapUv: HAS_SHEEN_ROUGHNESSMAP && getChannel( material.sheenRoughnessMap.channel ),\n\n\t\t\tspecularMapUv: HAS_SPECULARMAP && getChannel( material.specularMap.channel ),\n\t\t\tspecularColorMapUv: HAS_SPECULAR_COLORMAP && getChannel( material.specularColorMap.channel ),\n\t\t\tspecularIntensityMapUv: HAS_SPECULAR_INTENSITYMAP && getChannel( material.specularIntensityMap.channel ),\n\n\t\t\ttransmissionMapUv: HAS_TRANSMISSIONMAP && getChannel( material.transmissionMap.channel ),\n\t\t\tthicknessMapUv: HAS_THICKNESSMAP && getChannel( material.thicknessMap.channel ),\n\n\t\t\talphaMapUv: HAS_ALPHAMAP && getChannel( material.alphaMap.channel ),\n\n\t\t\t//\n\n\t\t\tvertexTangents: !! geometry.attributes.tangent && ( HAS_NORMALMAP || HAS_ANISOTROPY ),\n\t\t\tvertexColors: material.vertexColors,\n\t\t\tvertexAlphas: material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4,\n\t\t\tvertexUv1s: HAS_ATTRIBUTE_UV1,\n\t\t\tvertexUv2s: HAS_ATTRIBUTE_UV2,\n\t\t\tvertexUv3s: HAS_ATTRIBUTE_UV3,\n\n\t\t\tpointsUvs: object.isPoints === true && !! geometry.attributes.uv && ( HAS_MAP || HAS_ALPHAMAP ),\n\n\t\t\tfog: !! fog,\n\t\t\tuseFog: material.fog === true,\n\t\t\tfogExp2: ( fog && fog.isFogExp2 ),\n\n\t\t\tflatShading: material.flatShading === true,\n\n\t\t\tsizeAttenuation: material.sizeAttenuation === true,\n\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\t\tskinning: object.isSkinnedMesh === true,\n\n\t\t\tmorphTargets: geometry.morphAttributes.position !== undefined,\n\t\t\tmorphNormals: geometry.morphAttributes.normal !== undefined,\n\t\t\tmorphColors: geometry.morphAttributes.color !== undefined,\n\t\t\tmorphTargetsCount: morphTargetsCount,\n\t\t\tmorphTextureStride: morphTextureStride,\n\n\t\t\tnumDirLights: lights.directional.length,\n\t\t\tnumPointLights: lights.point.length,\n\t\t\tnumSpotLights: lights.spot.length,\n\t\t\tnumSpotLightMaps: lights.spotLightMap.length,\n\t\t\tnumRectAreaLights: lights.rectArea.length,\n\t\t\tnumHemiLights: lights.hemi.length,\n\n\t\t\tnumDirLightShadows: lights.directionalShadowMap.length,\n\t\t\tnumPointLightShadows: lights.pointShadowMap.length,\n\t\t\tnumSpotLightShadows: lights.spotShadowMap.length,\n\t\t\tnumSpotLightShadowsWithMaps: lights.numSpotLightShadowsWithMaps,\n\n\t\t\tnumClippingPlanes: clipping.numPlanes,\n\t\t\tnumClipIntersection: clipping.numIntersection,\n\n\t\t\tdithering: material.dithering,\n\n\t\t\tshadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n\t\t\tshadowMapType: renderer.shadowMap.type,\n\n\t\t\ttoneMapping: toneMapping,\n\t\t\tuseLegacyLights: renderer._useLegacyLights,\n\n\t\t\tpremultipliedAlpha: material.premultipliedAlpha,\n\n\t\t\tdoubleSided: material.side === DoubleSide,\n\t\t\tflipSided: material.side === BackSide,\n\n\t\t\tuseDepthPacking: material.depthPacking >= 0,\n\t\t\tdepthPacking: material.depthPacking || 0,\n\n\t\t\tindex0AttributeName: material.index0AttributeName,\n\n\t\t\textensionDerivatives: HAS_EXTENSIONS && material.extensions.derivatives === true,\n\t\t\textensionFragDepth: HAS_EXTENSIONS && material.extensions.fragDepth === true,\n\t\t\textensionDrawBuffers: HAS_EXTENSIONS && material.extensions.drawBuffers === true,\n\t\t\textensionShaderTextureLOD: HAS_EXTENSIONS && material.extensions.shaderTextureLOD === true,\n\n\t\t\trendererExtensionFragDepth: IS_WEBGL2 || extensions.has( 'EXT_frag_depth' ),\n\t\t\trendererExtensionDrawBuffers: IS_WEBGL2 || extensions.has( 'WEBGL_draw_buffers' ),\n\t\t\trendererExtensionShaderTextureLod: IS_WEBGL2 || extensions.has( 'EXT_shader_texture_lod' ),\n\n\t\t\tcustomProgramCacheKey: material.customProgramCacheKey()\n\n\t\t};\n\n\t\treturn parameters;\n\n\t}\n\n\tfunction getProgramCacheKey( parameters ) {\n\n\t\tconst array = [];\n\n\t\tif ( parameters.shaderID ) {\n\n\t\t\tarray.push( parameters.shaderID );\n\n\t\t} else {\n\n\t\t\tarray.push( parameters.customVertexShaderID );\n\t\t\tarray.push( parameters.customFragmentShaderID );\n\n\t\t}\n\n\t\tif ( parameters.defines !== undefined ) {\n\n\t\t\tfor ( const name in parameters.defines ) {\n\n\t\t\t\tarray.push( name );\n\t\t\t\tarray.push( parameters.defines[ name ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( parameters.isRawShaderMaterial === false ) {\n\n\t\t\tgetProgramCacheKeyParameters( array, parameters );\n\t\t\tgetProgramCacheKeyBooleans( array, parameters );\n\t\t\tarray.push( renderer.outputColorSpace );\n\n\t\t}\n\n\t\tarray.push( parameters.customProgramCacheKey );\n\n\t\treturn array.join();\n\n\t}\n\n\tfunction getProgramCacheKeyParameters( array, parameters ) {\n\n\t\tarray.push( parameters.precision );\n\t\tarray.push( parameters.outputColorSpace );\n\t\tarray.push( parameters.envMapMode );\n\t\tarray.push( parameters.envMapCubeUVHeight );\n\t\tarray.push( parameters.mapUv );\n\t\tarray.push( parameters.alphaMapUv );\n\t\tarray.push( parameters.lightMapUv );\n\t\tarray.push( parameters.aoMapUv );\n\t\tarray.push( parameters.bumpMapUv );\n\t\tarray.push( parameters.normalMapUv );\n\t\tarray.push( parameters.displacementMapUv );\n\t\tarray.push( parameters.emissiveMapUv );\n\t\tarray.push( parameters.metalnessMapUv );\n\t\tarray.push( parameters.roughnessMapUv );\n\t\tarray.push( parameters.anisotropyMapUv );\n\t\tarray.push( parameters.clearcoatMapUv );\n\t\tarray.push( parameters.clearcoatNormalMapUv );\n\t\tarray.push( parameters.clearcoatRoughnessMapUv );\n\t\tarray.push( parameters.iridescenceMapUv );\n\t\tarray.push( parameters.iridescenceThicknessMapUv );\n\t\tarray.push( parameters.sheenColorMapUv );\n\t\tarray.push( parameters.sheenRoughnessMapUv );\n\t\tarray.push( parameters.specularMapUv );\n\t\tarray.push( parameters.specularColorMapUv );\n\t\tarray.push( parameters.specularIntensityMapUv );\n\t\tarray.push( parameters.transmissionMapUv );\n\t\tarray.push( parameters.thicknessMapUv );\n\t\tarray.push( parameters.combine );\n\t\tarray.push( parameters.fogExp2 );\n\t\tarray.push( parameters.sizeAttenuation );\n\t\tarray.push( parameters.morphTargetsCount );\n\t\tarray.push( parameters.morphAttributeCount );\n\t\tarray.push( parameters.numDirLights );\n\t\tarray.push( parameters.numPointLights );\n\t\tarray.push( parameters.numSpotLights );\n\t\tarray.push( parameters.numSpotLightMaps );\n\t\tarray.push( parameters.numHemiLights );\n\t\tarray.push( parameters.numRectAreaLights );\n\t\tarray.push( parameters.numDirLightShadows );\n\t\tarray.push( parameters.numPointLightShadows );\n\t\tarray.push( parameters.numSpotLightShadows );\n\t\tarray.push( parameters.numSpotLightShadowsWithMaps );\n\t\tarray.push( parameters.shadowMapType );\n\t\tarray.push( parameters.toneMapping );\n\t\tarray.push( parameters.numClippingPlanes );\n\t\tarray.push( parameters.numClipIntersection );\n\t\tarray.push( parameters.depthPacking );\n\n\t}\n\n\tfunction getProgramCacheKeyBooleans( array, parameters ) {\n\n\t\t_programLayers.disableAll();\n\n\t\tif ( parameters.isWebGL2 )\n\t\t\t_programLayers.enable( 0 );\n\t\tif ( parameters.supportsVertexTextures )\n\t\t\t_programLayers.enable( 1 );\n\t\tif ( parameters.instancing )\n\t\t\t_programLayers.enable( 2 );\n\t\tif ( parameters.instancingColor )\n\t\t\t_programLayers.enable( 3 );\n\t\tif ( parameters.matcap )\n\t\t\t_programLayers.enable( 4 );\n\t\tif ( parameters.envMap )\n\t\t\t_programLayers.enable( 5 );\n\t\tif ( parameters.normalMapObjectSpace )\n\t\t\t_programLayers.enable( 6 );\n\t\tif ( parameters.normalMapTangentSpace )\n\t\t\t_programLayers.enable( 7 );\n\t\tif ( parameters.clearcoat )\n\t\t\t_programLayers.enable( 8 );\n\t\tif ( parameters.iridescence )\n\t\t\t_programLayers.enable( 9 );\n\t\tif ( parameters.alphaTest )\n\t\t\t_programLayers.enable( 10 );\n\t\tif ( parameters.vertexColors )\n\t\t\t_programLayers.enable( 11 );\n\t\tif ( parameters.vertexAlphas )\n\t\t\t_programLayers.enable( 12 );\n\t\tif ( parameters.vertexUv1s )\n\t\t\t_programLayers.enable( 13 );\n\t\tif ( parameters.vertexUv2s )\n\t\t\t_programLayers.enable( 14 );\n\t\tif ( parameters.vertexUv3s )\n\t\t\t_programLayers.enable( 15 );\n\t\tif ( parameters.vertexTangents )\n\t\t\t_programLayers.enable( 16 );\n\t\tif ( parameters.anisotropy )\n\t\t\t_programLayers.enable( 17 );\n\n\t\tarray.push( _programLayers.mask );\n\t\t_programLayers.disableAll();\n\n\t\tif ( parameters.fog )\n\t\t\t_programLayers.enable( 0 );\n\t\tif ( parameters.useFog )\n\t\t\t_programLayers.enable( 1 );\n\t\tif ( parameters.flatShading )\n\t\t\t_programLayers.enable( 2 );\n\t\tif ( parameters.logarithmicDepthBuffer )\n\t\t\t_programLayers.enable( 3 );\n\t\tif ( parameters.skinning )\n\t\t\t_programLayers.enable( 4 );\n\t\tif ( parameters.morphTargets )\n\t\t\t_programLayers.enable( 5 );\n\t\tif ( parameters.morphNormals )\n\t\t\t_programLayers.enable( 6 );\n\t\tif ( parameters.morphColors )\n\t\t\t_programLayers.enable( 7 );\n\t\tif ( parameters.premultipliedAlpha )\n\t\t\t_programLayers.enable( 8 );\n\t\tif ( parameters.shadowMapEnabled )\n\t\t\t_programLayers.enable( 9 );\n\t\tif ( parameters.useLegacyLights )\n\t\t\t_programLayers.enable( 10 );\n\t\tif ( parameters.doubleSided )\n\t\t\t_programLayers.enable( 11 );\n\t\tif ( parameters.flipSided )\n\t\t\t_programLayers.enable( 12 );\n\t\tif ( parameters.useDepthPacking )\n\t\t\t_programLayers.enable( 13 );\n\t\tif ( parameters.dithering )\n\t\t\t_programLayers.enable( 14 );\n\t\tif ( parameters.transmission )\n\t\t\t_programLayers.enable( 15 );\n\t\tif ( parameters.sheen )\n\t\t\t_programLayers.enable( 16 );\n\t\tif ( parameters.opaque )\n\t\t\t_programLayers.enable( 17 );\n\t\tif ( parameters.pointsUvs )\n\t\t\t_programLayers.enable( 18 );\n\n\t\tarray.push( _programLayers.mask );\n\n\t}\n\n\tfunction getUniforms( material ) {\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\t\tlet uniforms;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\t\t\tuniforms = UniformsUtils.clone( shader.uniforms );\n\n\t\t} else {\n\n\t\t\tuniforms = material.uniforms;\n\n\t\t}\n\n\t\treturn uniforms;\n\n\t}\n\n\tfunction acquireProgram( parameters, cacheKey ) {\n\n\t\tlet program;\n\n\t\t// Check if code has been already compiled\n\t\tfor ( let p = 0, pl = programs.length; p < pl; p ++ ) {\n\n\t\t\tconst preexistingProgram = programs[ p ];\n\n\t\t\tif ( preexistingProgram.cacheKey === cacheKey ) {\n\n\t\t\t\tprogram = preexistingProgram;\n\t\t\t\t++ program.usedTimes;\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( program === undefined ) {\n\n\t\t\tprogram = new WebGLProgram( renderer, cacheKey, parameters, bindingStates );\n\t\t\tprograms.push( program );\n\n\t\t}\n\n\t\treturn program;\n\n\t}\n\n\tfunction releaseProgram( program ) {\n\n\t\tif ( -- program.usedTimes === 0 ) {\n\n\t\t\t// Remove from unordered set\n\t\t\tconst i = programs.indexOf( program );\n\t\t\tprograms[ i ] = programs[ programs.length - 1 ];\n\t\t\tprograms.pop();\n\n\t\t\t// Free WebGL resources\n\t\t\tprogram.destroy();\n\n\t\t}\n\n\t}\n\n\tfunction releaseShaderCache( material ) {\n\n\t\t_customShaders.remove( material );\n\n\t}\n\n\tfunction dispose() {\n\n\t\t_customShaders.dispose();\n\n\t}\n\n\treturn {\n\t\tgetParameters: getParameters,\n\t\tgetProgramCacheKey: getProgramCacheKey,\n\t\tgetUniforms: getUniforms,\n\t\tacquireProgram: acquireProgram,\n\t\treleaseProgram: releaseProgram,\n\t\treleaseShaderCache: releaseShaderCache,\n\t\t// Exposed for resource monitoring & error feedback via renderer.info:\n\t\tprograms: programs,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction WebGLProperties() {\n\n\tlet properties = new WeakMap();\n\n\tfunction get( object ) {\n\n\t\tlet map = properties.get( object );\n\n\t\tif ( map === undefined ) {\n\n\t\t\tmap = {};\n\t\t\tproperties.set( object, map );\n\n\t\t}\n\n\t\treturn map;\n\n\t}\n\n\tfunction remove( object ) {\n\n\t\tproperties.delete( object );\n\n\t}\n\n\tfunction update( object, key, value ) {\n\n\t\tproperties.get( object )[ key ] = value;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tproperties = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction painterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.material.id !== b.material.id ) {\n\n\t\treturn a.material.id - b.material.id;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn a.z - b.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\nfunction reversePainterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn b.z - a.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\n\nfunction WebGLRenderList() {\n\n\tconst renderItems = [];\n\tlet renderItemsIndex = 0;\n\n\tconst opaque = [];\n\tconst transmissive = [];\n\tconst transparent = [];\n\n\tfunction init() {\n\n\t\trenderItemsIndex = 0;\n\n\t\topaque.length = 0;\n\t\ttransmissive.length = 0;\n\t\ttransparent.length = 0;\n\n\t}\n\n\tfunction getNextRenderItem( object, geometry, material, groupOrder, z, group ) {\n\n\t\tlet renderItem = renderItems[ renderItemsIndex ];\n\n\t\tif ( renderItem === undefined ) {\n\n\t\t\trenderItem = {\n\t\t\t\tid: object.id,\n\t\t\t\tobject: object,\n\t\t\t\tgeometry: geometry,\n\t\t\t\tmaterial: material,\n\t\t\t\tgroupOrder: groupOrder,\n\t\t\t\trenderOrder: object.renderOrder,\n\t\t\t\tz: z,\n\t\t\t\tgroup: group\n\t\t\t};\n\n\t\t\trenderItems[ renderItemsIndex ] = renderItem;\n\n\t\t} else {\n\n\t\t\trenderItem.id = object.id;\n\t\t\trenderItem.object = object;\n\t\t\trenderItem.geometry = geometry;\n\t\t\trenderItem.material = material;\n\t\t\trenderItem.groupOrder = groupOrder;\n\t\t\trenderItem.renderOrder = object.renderOrder;\n\t\t\trenderItem.z = z;\n\t\t\trenderItem.group = group;\n\n\t\t}\n\n\t\trenderItemsIndex ++;\n\n\t\treturn renderItem;\n\n\t}\n\n\tfunction push( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.push( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.push( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.push( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction unshift( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.unshift( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.unshift( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.unshift( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction sort( customOpaqueSort, customTransparentSort ) {\n\n\t\tif ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable );\n\t\tif ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable );\n\t\tif ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable );\n\n\t}\n\n\tfunction finish() {\n\n\t\t// Clear references from inactive renderItems in the list\n\n\t\tfor ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) {\n\n\t\t\tconst renderItem = renderItems[ i ];\n\n\t\t\tif ( renderItem.id === null ) break;\n\n\t\t\trenderItem.id = null;\n\t\t\trenderItem.object = null;\n\t\t\trenderItem.geometry = null;\n\t\t\trenderItem.material = null;\n\t\t\trenderItem.group = null;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\topaque: opaque,\n\t\ttransmissive: transmissive,\n\t\ttransparent: transparent,\n\n\t\tinit: init,\n\t\tpush: push,\n\t\tunshift: unshift,\n\t\tfinish: finish,\n\n\t\tsort: sort\n\t};\n\n}\n\nfunction WebGLRenderLists() {\n\n\tlet lists = new WeakMap();\n\n\tfunction get( scene, renderCallDepth ) {\n\n\t\tconst listArray = lists.get( scene );\n\t\tlet list;\n\n\t\tif ( listArray === undefined ) {\n\n\t\t\tlist = new WebGLRenderList();\n\t\t\tlists.set( scene, [ list ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= listArray.length ) {\n\n\t\t\t\tlist = new WebGLRenderList();\n\t\t\t\tlistArray.push( list );\n\n\t\t\t} else {\n\n\t\t\t\tlist = listArray[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn list;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tlists = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction UniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tconeCos: 0,\n\t\t\t\t\t\tpenumbraCos: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tskyColor: new Color(),\n\t\t\t\t\t\tgroundColor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\thalfWidth: new Vector3(),\n\t\t\t\t\t\thalfHeight: new Vector3()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\nfunction ShadowUniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2(),\n\t\t\t\t\t\tshadowCameraNear: 1,\n\t\t\t\t\t\tshadowCameraFar: 1000\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\t// TODO (abelnation): set RectAreaLight shadow uniforms\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\n\n\nlet nextVersion = 0;\n\nfunction shadowCastingAndTexturingLightsFirst( lightA, lightB ) {\n\n\treturn ( lightB.castShadow ? 2 : 0 ) - ( lightA.castShadow ? 2 : 0 ) + ( lightB.map ? 1 : 0 ) - ( lightA.map ? 1 : 0 );\n\n}\n\nfunction WebGLLights( extensions, capabilities ) {\n\n\tconst cache = new UniformsCache();\n\n\tconst shadowCache = ShadowUniformsCache();\n\n\tconst state = {\n\n\t\tversion: 0,\n\n\t\thash: {\n\t\t\tdirectionalLength: - 1,\n\t\t\tpointLength: - 1,\n\t\t\tspotLength: - 1,\n\t\t\trectAreaLength: - 1,\n\t\t\themiLength: - 1,\n\n\t\t\tnumDirectionalShadows: - 1,\n\t\t\tnumPointShadows: - 1,\n\t\t\tnumSpotShadows: - 1,\n\t\t\tnumSpotMaps: - 1\n\t\t},\n\n\t\tambient: [ 0, 0, 0 ],\n\t\tprobe: [],\n\t\tdirectional: [],\n\t\tdirectionalShadow: [],\n\t\tdirectionalShadowMap: [],\n\t\tdirectionalShadowMatrix: [],\n\t\tspot: [],\n\t\tspotLightMap: [],\n\t\tspotShadow: [],\n\t\tspotShadowMap: [],\n\t\tspotLightMatrix: [],\n\t\trectArea: [],\n\t\trectAreaLTC1: null,\n\t\trectAreaLTC2: null,\n\t\tpoint: [],\n\t\tpointShadow: [],\n\t\tpointShadowMap: [],\n\t\tpointShadowMatrix: [],\n\t\themi: [],\n\t\tnumSpotLightShadowsWithMaps: 0\n\n\t};\n\n\tfor ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() );\n\n\tconst vector3 = new Vector3();\n\tconst matrix4 = new Matrix4();\n\tconst matrix42 = new Matrix4();\n\n\tfunction setup( lights, useLegacyLights ) {\n\n\t\tlet r = 0, g = 0, b = 0;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 );\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tlet numDirectionalShadows = 0;\n\t\tlet numPointShadows = 0;\n\t\tlet numSpotShadows = 0;\n\t\tlet numSpotMaps = 0;\n\t\tlet numSpotShadowsWithMaps = 0;\n\n\t\t// ordering : [shadow casting + map texturing, map texturing, shadow casting, none ]\n\t\tlights.sort( shadowCastingAndTexturingLightsFirst );\n\n\t\t// artist-friendly light intensity scaling factor\n\t\tconst scaleFactor = ( useLegacyLights === true ) ? Math.PI : 1;\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tconst color = light.color;\n\t\t\tconst intensity = light.intensity;\n\t\t\tconst distance = light.distance;\n\n\t\t\tconst shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null;\n\n\t\t\tif ( light.isAmbientLight ) {\n\n\t\t\t\tr += color.r * intensity * scaleFactor;\n\t\t\t\tg += color.g * intensity * scaleFactor;\n\t\t\t\tb += color.b * intensity * scaleFactor;\n\n\t\t\t} else if ( light.isLightProbe ) {\n\n\t\t\t\tfor ( let j = 0; j < 9; j ++ ) {\n\n\t\t\t\t\tstate.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity );\n\n\t\t\t\t}\n\n\t\t\t} else if ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor );\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.directionalShadow[ directionalLength ] = shadowUniforms;\n\t\t\t\t\tstate.directionalShadowMap[ directionalLength ] = shadowMap;\n\t\t\t\t\tstate.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumDirectionalShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.directional[ directionalLength ] = uniforms;\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity * scaleFactor );\n\t\t\t\tuniforms.distance = distance;\n\n\t\t\t\tuniforms.coneCos = Math.cos( light.angle );\n\t\t\t\tuniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) );\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tstate.spot[ spotLength ] = uniforms;\n\n\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\tif ( light.map ) {\n\n\t\t\t\t\tstate.spotLightMap[ numSpotMaps ] = light.map;\n\t\t\t\t\tnumSpotMaps ++;\n\n\t\t\t\t\t// make sure the lightMatrix is up to date\n\t\t\t\t\t// TODO : do it if required only\n\t\t\t\t\tshadow.updateMatrices( light );\n\n\t\t\t\t\tif ( light.castShadow ) numSpotShadowsWithMaps ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.spotLightMatrix[ spotLength ] = shadow.matrix;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.spotShadow[ spotLength ] = shadowUniforms;\n\t\t\t\t\tstate.spotShadowMap[ spotLength ] = shadowMap;\n\n\t\t\t\t\tnumSpotShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tstate.rectArea[ rectAreaLength ] = uniforms;\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor );\n\t\t\t\tuniforms.distance = light.distance;\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\t\t\t\t\tshadowUniforms.shadowCameraNear = shadow.camera.near;\n\t\t\t\t\tshadowUniforms.shadowCameraFar = shadow.camera.far;\n\n\t\t\t\t\tstate.pointShadow[ pointLength ] = shadowUniforms;\n\t\t\t\t\tstate.pointShadowMap[ pointLength ] = shadowMap;\n\t\t\t\t\tstate.pointShadowMatrix[ pointLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumPointShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.point[ pointLength ] = uniforms;\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.skyColor.copy( light.color ).multiplyScalar( intensity * scaleFactor );\n\t\t\t\tuniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity * scaleFactor );\n\n\t\t\t\tstate.hemi[ hemiLength ] = uniforms;\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( rectAreaLength > 0 ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t// WebGL 2\n\n\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t} else {\n\n\t\t\t\t// WebGL 1\n\n\t\t\t\tif ( extensions.has( 'OES_texture_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t\t} else if ( extensions.has( 'OES_texture_half_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_HALF_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_HALF_2;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.ambient[ 0 ] = r;\n\t\tstate.ambient[ 1 ] = g;\n\t\tstate.ambient[ 2 ] = b;\n\n\t\tconst hash = state.hash;\n\n\t\tif ( hash.directionalLength !== directionalLength ||\n\t\t\thash.pointLength !== pointLength ||\n\t\t\thash.spotLength !== spotLength ||\n\t\t\thash.rectAreaLength !== rectAreaLength ||\n\t\t\thash.hemiLength !== hemiLength ||\n\t\t\thash.numDirectionalShadows !== numDirectionalShadows ||\n\t\t\thash.numPointShadows !== numPointShadows ||\n\t\t\thash.numSpotShadows !== numSpotShadows ||\n\t\t\thash.numSpotMaps !== numSpotMaps ) {\n\n\t\t\tstate.directional.length = directionalLength;\n\t\t\tstate.spot.length = spotLength;\n\t\t\tstate.rectArea.length = rectAreaLength;\n\t\t\tstate.point.length = pointLength;\n\t\t\tstate.hemi.length = hemiLength;\n\n\t\t\tstate.directionalShadow.length = numDirectionalShadows;\n\t\t\tstate.directionalShadowMap.length = numDirectionalShadows;\n\t\t\tstate.pointShadow.length = numPointShadows;\n\t\t\tstate.pointShadowMap.length = numPointShadows;\n\t\t\tstate.spotShadow.length = numSpotShadows;\n\t\t\tstate.spotShadowMap.length = numSpotShadows;\n\t\t\tstate.directionalShadowMatrix.length = numDirectionalShadows;\n\t\t\tstate.pointShadowMatrix.length = numPointShadows;\n\t\t\tstate.spotLightMatrix.length = numSpotShadows + numSpotMaps - numSpotShadowsWithMaps;\n\t\t\tstate.spotLightMap.length = numSpotMaps;\n\t\t\tstate.numSpotLightShadowsWithMaps = numSpotShadowsWithMaps;\n\n\t\t\thash.directionalLength = directionalLength;\n\t\t\thash.pointLength = pointLength;\n\t\t\thash.spotLength = spotLength;\n\t\t\thash.rectAreaLength = rectAreaLength;\n\t\t\thash.hemiLength = hemiLength;\n\n\t\t\thash.numDirectionalShadows = numDirectionalShadows;\n\t\t\thash.numPointShadows = numPointShadows;\n\t\t\thash.numSpotShadows = numSpotShadows;\n\t\t\thash.numSpotMaps = numSpotMaps;\n\n\t\t\tstate.version = nextVersion ++;\n\n\t\t}\n\n\t}\n\n\tfunction setupView( lights, camera ) {\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tconst viewMatrix = camera.matrixWorldInverse;\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tif ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = state.directional[ directionalLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = state.spot[ spotLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = state.rectArea[ rectAreaLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\t// extract local rotation of light to derive width/height half vectors\n\t\t\t\tmatrix42.identity();\n\t\t\t\tmatrix4.copy( light.matrixWorld );\n\t\t\t\tmatrix4.premultiply( viewMatrix );\n\t\t\t\tmatrix42.extractRotation( matrix4 );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tuniforms.halfWidth.applyMatrix4( matrix42 );\n\t\t\t\tuniforms.halfHeight.applyMatrix4( matrix42 );\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = state.point[ pointLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = state.hemi[ hemiLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tsetup: setup,\n\t\tsetupView: setupView,\n\t\tstate: state\n\t};\n\n}\n\nfunction WebGLRenderState( extensions, capabilities ) {\n\n\tconst lights = new WebGLLights( extensions, capabilities );\n\n\tconst lightsArray = [];\n\tconst shadowsArray = [];\n\n\tfunction init() {\n\n\t\tlightsArray.length = 0;\n\t\tshadowsArray.length = 0;\n\n\t}\n\n\tfunction pushLight( light ) {\n\n\t\tlightsArray.push( light );\n\n\t}\n\n\tfunction pushShadow( shadowLight ) {\n\n\t\tshadowsArray.push( shadowLight );\n\n\t}\n\n\tfunction setupLights( useLegacyLights ) {\n\n\t\tlights.setup( lightsArray, useLegacyLights );\n\n\t}\n\n\tfunction setupLightsView( camera ) {\n\n\t\tlights.setupView( lightsArray, camera );\n\n\t}\n\n\tconst state = {\n\t\tlightsArray: lightsArray,\n\t\tshadowsArray: shadowsArray,\n\n\t\tlights: lights\n\t};\n\n\treturn {\n\t\tinit: init,\n\t\tstate: state,\n\t\tsetupLights: setupLights,\n\t\tsetupLightsView: setupLightsView,\n\n\t\tpushLight: pushLight,\n\t\tpushShadow: pushShadow\n\t};\n\n}\n\nfunction WebGLRenderStates( extensions, capabilities ) {\n\n\tlet renderStates = new WeakMap();\n\n\tfunction get( scene, renderCallDepth = 0 ) {\n\n\t\tconst renderStateArray = renderStates.get( scene );\n\t\tlet renderState;\n\n\t\tif ( renderStateArray === undefined ) {\n\n\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\trenderStates.set( scene, [ renderState ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= renderStateArray.length ) {\n\n\t\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\t\trenderStateArray.push( renderState );\n\n\t\t\t} else {\n\n\t\t\t\trenderState = renderStateArray[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn renderState;\n\n\t}\n\n\tfunction dispose() {\n\n\t\trenderStates = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nclass MeshDepthMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshDepthMaterial = true;\n\n\t\tthis.type = 'MeshDepthMaterial';\n\n\t\tthis.depthPacking = BasicDepthPacking;\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.depthPacking = source.depthPacking;\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshDistanceMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshDistanceMaterial = true;\n\n\t\tthis.type = 'MeshDistanceMaterial';\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst vertex = \"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\";\n\nconst fragment = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include \\nvoid main() {\\n\\tconst float samples = float( VSM_SAMPLES );\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\\n\\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\\n\\tfor ( float i = 0.0; i < samples; i ++ ) {\\n\\t\\tfloat uvOffset = uvStart + i * uvStride;\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean / samples;\\n\\tsquared_mean = squared_mean / samples;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\n\nfunction WebGLShadowMap( _renderer, _objects, _capabilities ) {\n\n\tlet _frustum = new Frustum();\n\n\tconst _shadowMapSize = new Vector2(),\n\t\t_viewportSize = new Vector2(),\n\n\t\t_viewport = new Vector4(),\n\n\t\t_depthMaterial = new MeshDepthMaterial( { depthPacking: RGBADepthPacking } ),\n\t\t_distanceMaterial = new MeshDistanceMaterial(),\n\n\t\t_materialCache = {},\n\n\t\t_maxTextureSize = _capabilities.maxTextureSize;\n\n\tconst shadowSide = { [ FrontSide ]: BackSide, [ BackSide ]: FrontSide, [ DoubleSide ]: DoubleSide };\n\n\tconst shadowMaterialVertical = new ShaderMaterial( {\n\t\tdefines: {\n\t\t\tVSM_SAMPLES: 8\n\t\t},\n\t\tuniforms: {\n\t\t\tshadow_pass: { value: null },\n\t\t\tresolution: { value: new Vector2() },\n\t\t\tradius: { value: 4.0 }\n\t\t},\n\n\t\tvertexShader: vertex,\n\t\tfragmentShader: fragment\n\n\t} );\n\n\tconst shadowMaterialHorizontal = shadowMaterialVertical.clone();\n\tshadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n\n\tconst fullScreenTri = new BufferGeometry();\n\tfullScreenTri.setAttribute(\n\t\t'position',\n\t\tnew BufferAttribute(\n\t\t\tnew Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ),\n\t\t\t3\n\t\t)\n\t);\n\n\tconst fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical );\n\n\tconst scope = this;\n\n\tthis.enabled = false;\n\n\tthis.autoUpdate = true;\n\tthis.needsUpdate = false;\n\n\tthis.type = PCFShadowMap;\n\tlet _previousType = this.type;\n\n\tthis.render = function ( lights, scene, camera ) {\n\n\t\tif ( scope.enabled === false ) return;\n\t\tif ( scope.autoUpdate === false && scope.needsUpdate === false ) return;\n\n\t\tif ( lights.length === 0 ) return;\n\n\t\tconst currentRenderTarget = _renderer.getRenderTarget();\n\t\tconst activeCubeFace = _renderer.getActiveCubeFace();\n\t\tconst activeMipmapLevel = _renderer.getActiveMipmapLevel();\n\n\t\tconst _state = _renderer.state;\n\n\t\t// Set GL state for depth map.\n\t\t_state.setBlending( NoBlending );\n\t\t_state.buffers.color.setClear( 1, 1, 1, 1 );\n\t\t_state.buffers.depth.setTest( true );\n\t\t_state.setScissorTest( false );\n\n\t\t// check for shadow map type changes\n\n\t\tconst toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap );\n\t\tconst fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap );\n\n\t\t// render depth map\n\n\t\tfor ( let i = 0, il = lights.length; i < il; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\t\t\tconst shadow = light.shadow;\n\n\t\t\tif ( shadow === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;\n\n\t\t\t_shadowMapSize.copy( shadow.mapSize );\n\n\t\t\tconst shadowFrameExtents = shadow.getFrameExtents();\n\n\t\t\t_shadowMapSize.multiply( shadowFrameExtents );\n\n\t\t\t_viewportSize.copy( shadow.mapSize );\n\n\t\t\tif ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\tif ( _shadowMapSize.x > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x );\n\t\t\t\t\t_shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n\t\t\t\t\tshadow.mapSize.x = _viewportSize.x;\n\n\t\t\t\t}\n\n\t\t\t\tif ( _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y );\n\t\t\t\t\t_shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n\t\t\t\t\tshadow.mapSize.y = _viewportSize.y;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( shadow.map === null || toVSM === true || fromVSM === true ) {\n\n\t\t\t\tconst pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};\n\n\t\t\t\tif ( shadow.map !== null ) {\n\n\t\t\t\t\tshadow.map.dispose();\n\n\t\t\t\t}\n\n\t\t\t\tshadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\n\t\t\t\tshadow.camera.updateProjectionMatrix();\n\n\t\t\t}\n\n\t\t\t_renderer.setRenderTarget( shadow.map );\n\t\t\t_renderer.clear();\n\n\t\t\tconst viewportCount = shadow.getViewportCount();\n\n\t\t\tfor ( let vp = 0; vp < viewportCount; vp ++ ) {\n\n\t\t\t\tconst viewport = shadow.getViewport( vp );\n\n\t\t\t\t_viewport.set(\n\t\t\t\t\t_viewportSize.x * viewport.x,\n\t\t\t\t\t_viewportSize.y * viewport.y,\n\t\t\t\t\t_viewportSize.x * viewport.z,\n\t\t\t\t\t_viewportSize.y * viewport.w\n\t\t\t\t);\n\n\t\t\t\t_state.viewport( _viewport );\n\n\t\t\t\tshadow.updateMatrices( light, vp );\n\n\t\t\t\t_frustum = shadow.getFrustum();\n\n\t\t\t\trenderObject( scene, camera, shadow.camera, light, this.type );\n\n\t\t\t}\n\n\t\t\t// do blur pass for VSM\n\n\t\t\tif ( shadow.isPointLightShadow !== true && this.type === VSMShadowMap ) {\n\n\t\t\t\tVSMPass( shadow, camera );\n\n\t\t\t}\n\n\t\t\tshadow.needsUpdate = false;\n\n\t\t}\n\n\t\t_previousType = this.type;\n\n\t\tscope.needsUpdate = false;\n\n\t\t_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );\n\n\t};\n\n\tfunction VSMPass( shadow, camera ) {\n\n\t\tconst geometry = _objects.update( fullScreenMesh );\n\n\t\tif ( shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples ) {\n\n\t\t\tshadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples;\n\t\t\tshadowMaterialHorizontal.defines.VSM_SAMPLES = shadow.blurSamples;\n\n\t\t\tshadowMaterialVertical.needsUpdate = true;\n\t\t\tshadowMaterialHorizontal.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( shadow.mapPass === null ) {\n\n\t\t\tshadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y );\n\n\t\t}\n\n\t\t// vertical pass\n\n\t\tshadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n\t\tshadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialVertical.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.mapPass );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null );\n\n\t\t// horizontal pass\n\n\t\tshadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n\t\tshadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.map );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null );\n\n\t}\n\n\tfunction getDepthMaterial( object, material, light, type ) {\n\n\t\tlet result = null;\n\n\t\tconst customMaterial = ( light.isPointLight === true ) ? object.customDistanceMaterial : object.customDepthMaterial;\n\n\t\tif ( customMaterial !== undefined ) {\n\n\t\t\tresult = customMaterial;\n\n\t\t} else {\n\n\t\t\tresult = ( light.isPointLight === true ) ? _distanceMaterial : _depthMaterial;\n\n\t\t\tif ( ( _renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) ||\n\t\t\t\t( material.displacementMap && material.displacementScale !== 0 ) ||\n\t\t\t\t( material.alphaMap && material.alphaTest > 0 ) ||\n\t\t\t\t( material.map && material.alphaTest > 0 ) ) {\n\n\t\t\t\t// in this case we need a unique material instance reflecting the\n\t\t\t\t// appropriate state\n\n\t\t\t\tconst keyA = result.uuid, keyB = material.uuid;\n\n\t\t\t\tlet materialsForVariant = _materialCache[ keyA ];\n\n\t\t\t\tif ( materialsForVariant === undefined ) {\n\n\t\t\t\t\tmaterialsForVariant = {};\n\t\t\t\t\t_materialCache[ keyA ] = materialsForVariant;\n\n\t\t\t\t}\n\n\t\t\t\tlet cachedMaterial = materialsForVariant[ keyB ];\n\n\t\t\t\tif ( cachedMaterial === undefined ) {\n\n\t\t\t\t\tcachedMaterial = result.clone();\n\t\t\t\t\tmaterialsForVariant[ keyB ] = cachedMaterial;\n\n\t\t\t\t}\n\n\t\t\t\tresult = cachedMaterial;\n\n\t\t\t}\n\n\t\t}\n\n\t\tresult.visible = material.visible;\n\t\tresult.wireframe = material.wireframe;\n\n\t\tif ( type === VSMShadowMap ) {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side;\n\n\t\t} else {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ];\n\n\t\t}\n\n\t\tresult.alphaMap = material.alphaMap;\n\t\tresult.alphaTest = material.alphaTest;\n\t\tresult.map = material.map;\n\n\t\tresult.clipShadows = material.clipShadows;\n\t\tresult.clippingPlanes = material.clippingPlanes;\n\t\tresult.clipIntersection = material.clipIntersection;\n\n\t\tresult.displacementMap = material.displacementMap;\n\t\tresult.displacementScale = material.displacementScale;\n\t\tresult.displacementBias = material.displacementBias;\n\n\t\tresult.wireframeLinewidth = material.wireframeLinewidth;\n\t\tresult.linewidth = material.linewidth;\n\n\t\tif ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) {\n\n\t\t\tconst materialProperties = _renderer.properties.get( result );\n\t\t\tmaterialProperties.light = light;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tfunction renderObject( object, camera, shadowCamera, light, type ) {\n\n\t\tif ( object.visible === false ) return;\n\n\t\tconst visible = object.layers.test( camera.layers );\n\n\t\tif ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) {\n\n\t\t\tif ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {\n\n\t\t\t\tobject.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );\n\n\t\t\t\tconst geometry = _objects.update( object );\n\t\t\t\tconst material = object.material;\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\tfor ( let k = 0, kl = groups.length; k < kl; k ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ k ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, groupMaterial, light, type );\n\n\t\t\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, material, light, type );\n\n\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\trenderObject( children[ i ], camera, shadowCamera, light, type );\n\n\t\t}\n\n\t}\n\n}\n\nfunction WebGLState( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction ColorBuffer() {\n\n\t\tlet locked = false;\n\n\t\tconst color = new Vector4();\n\t\tlet currentColorMask = null;\n\t\tconst currentColorClear = new Vector4( 0, 0, 0, 0 );\n\n\t\treturn {\n\n\t\t\tsetMask: function ( colorMask ) {\n\n\t\t\t\tif ( currentColorMask !== colorMask && ! locked ) {\n\n\t\t\t\t\tgl.colorMask( colorMask, colorMask, colorMask, colorMask );\n\t\t\t\t\tcurrentColorMask = colorMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( r, g, b, a, premultipliedAlpha ) {\n\n\t\t\t\tif ( premultipliedAlpha === true ) {\n\n\t\t\t\t\tr *= a; g *= a; b *= a;\n\n\t\t\t\t}\n\n\t\t\t\tcolor.set( r, g, b, a );\n\n\t\t\t\tif ( currentColorClear.equals( color ) === false ) {\n\n\t\t\t\t\tgl.clearColor( r, g, b, a );\n\t\t\t\t\tcurrentColorClear.copy( color );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentColorMask = null;\n\t\t\t\tcurrentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction DepthBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentDepthMask = null;\n\t\tlet currentDepthFunc = null;\n\t\tlet currentDepthClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( depthTest ) {\n\n\t\t\t\tif ( depthTest ) {\n\n\t\t\t\t\tenable( gl.DEPTH_TEST );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tdisable( gl.DEPTH_TEST );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( depthMask ) {\n\n\t\t\t\tif ( currentDepthMask !== depthMask && ! locked ) {\n\n\t\t\t\t\tgl.depthMask( depthMask );\n\t\t\t\t\tcurrentDepthMask = depthMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( depthFunc ) {\n\n\t\t\t\tif ( currentDepthFunc !== depthFunc ) {\n\n\t\t\t\t\tswitch ( depthFunc ) {\n\n\t\t\t\t\t\tcase NeverDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.NEVER );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AlwaysDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.ALWAYS );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase LessDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.LESS );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase LessEqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.LEQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.EQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase GreaterEqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.GEQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase GreaterDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.GREATER );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase NotEqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.NOTEQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.LEQUAL );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentDepthFunc = depthFunc;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( depth ) {\n\n\t\t\t\tif ( currentDepthClear !== depth ) {\n\n\t\t\t\t\tgl.clearDepth( depth );\n\t\t\t\t\tcurrentDepthClear = depth;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentDepthMask = null;\n\t\t\t\tcurrentDepthFunc = null;\n\t\t\t\tcurrentDepthClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction StencilBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentStencilMask = null;\n\t\tlet currentStencilFunc = null;\n\t\tlet currentStencilRef = null;\n\t\tlet currentStencilFuncMask = null;\n\t\tlet currentStencilFail = null;\n\t\tlet currentStencilZFail = null;\n\t\tlet currentStencilZPass = null;\n\t\tlet currentStencilClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( stencilTest ) {\n\n\t\t\t\tif ( ! locked ) {\n\n\t\t\t\t\tif ( stencilTest ) {\n\n\t\t\t\t\t\tenable( gl.STENCIL_TEST );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdisable( gl.STENCIL_TEST );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( stencilMask ) {\n\n\t\t\t\tif ( currentStencilMask !== stencilMask && ! locked ) {\n\n\t\t\t\t\tgl.stencilMask( stencilMask );\n\t\t\t\t\tcurrentStencilMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( stencilFunc, stencilRef, stencilMask ) {\n\n\t\t\t\tif ( currentStencilFunc !== stencilFunc ||\n\t\t\t\t currentStencilRef !== stencilRef ||\n\t\t\t\t currentStencilFuncMask !== stencilMask ) {\n\n\t\t\t\t\tgl.stencilFunc( stencilFunc, stencilRef, stencilMask );\n\n\t\t\t\t\tcurrentStencilFunc = stencilFunc;\n\t\t\t\t\tcurrentStencilRef = stencilRef;\n\t\t\t\t\tcurrentStencilFuncMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetOp: function ( stencilFail, stencilZFail, stencilZPass ) {\n\n\t\t\t\tif ( currentStencilFail !== stencilFail ||\n\t\t\t\t currentStencilZFail !== stencilZFail ||\n\t\t\t\t currentStencilZPass !== stencilZPass ) {\n\n\t\t\t\t\tgl.stencilOp( stencilFail, stencilZFail, stencilZPass );\n\n\t\t\t\t\tcurrentStencilFail = stencilFail;\n\t\t\t\t\tcurrentStencilZFail = stencilZFail;\n\t\t\t\t\tcurrentStencilZPass = stencilZPass;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( stencil ) {\n\n\t\t\t\tif ( currentStencilClear !== stencil ) {\n\n\t\t\t\t\tgl.clearStencil( stencil );\n\t\t\t\t\tcurrentStencilClear = stencil;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentStencilMask = null;\n\t\t\t\tcurrentStencilFunc = null;\n\t\t\t\tcurrentStencilRef = null;\n\t\t\t\tcurrentStencilFuncMask = null;\n\t\t\t\tcurrentStencilFail = null;\n\t\t\t\tcurrentStencilZFail = null;\n\t\t\t\tcurrentStencilZPass = null;\n\t\t\t\tcurrentStencilClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t//\n\n\tconst colorBuffer = new ColorBuffer();\n\tconst depthBuffer = new DepthBuffer();\n\tconst stencilBuffer = new StencilBuffer();\n\n\tconst uboBindings = new WeakMap();\n\tconst uboProgramMap = new WeakMap();\n\n\tlet enabledCapabilities = {};\n\n\tlet currentBoundFramebuffers = {};\n\tlet currentDrawbuffers = new WeakMap();\n\tlet defaultDrawbuffers = [];\n\n\tlet currentProgram = null;\n\n\tlet currentBlendingEnabled = false;\n\tlet currentBlending = null;\n\tlet currentBlendEquation = null;\n\tlet currentBlendSrc = null;\n\tlet currentBlendDst = null;\n\tlet currentBlendEquationAlpha = null;\n\tlet currentBlendSrcAlpha = null;\n\tlet currentBlendDstAlpha = null;\n\tlet currentPremultipledAlpha = false;\n\n\tlet currentFlipSided = null;\n\tlet currentCullFace = null;\n\n\tlet currentLineWidth = null;\n\n\tlet currentPolygonOffsetFactor = null;\n\tlet currentPolygonOffsetUnits = null;\n\n\tconst maxTextures = gl.getParameter( gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS );\n\n\tlet lineWidthAvailable = false;\n\tlet version = 0;\n\tconst glVersion = gl.getParameter( gl.VERSION );\n\n\tif ( glVersion.indexOf( 'WebGL' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^WebGL (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 1.0 );\n\n\t} else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^OpenGL ES (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 2.0 );\n\n\t}\n\n\tlet currentTextureSlot = null;\n\tlet currentBoundTextures = {};\n\n\tconst scissorParam = gl.getParameter( gl.SCISSOR_BOX );\n\tconst viewportParam = gl.getParameter( gl.VIEWPORT );\n\n\tconst currentScissor = new Vector4().fromArray( scissorParam );\n\tconst currentViewport = new Vector4().fromArray( viewportParam );\n\n\tfunction createTexture( type, target, count, dimensions ) {\n\n\t\tconst data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4.\n\t\tconst texture = gl.createTexture();\n\n\t\tgl.bindTexture( type, texture );\n\t\tgl.texParameteri( type, gl.TEXTURE_MIN_FILTER, gl.NEAREST );\n\t\tgl.texParameteri( type, gl.TEXTURE_MAG_FILTER, gl.NEAREST );\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tif ( isWebGL2 && ( type === gl.TEXTURE_3D || type === gl.TEXTURE_2D_ARRAY ) ) {\n\n\t\t\t\tgl.texImage3D( target, 0, gl.RGBA, 1, 1, dimensions, 0, gl.RGBA, gl.UNSIGNED_BYTE, data );\n\n\t\t\t} else {\n\n\t\t\t\tgl.texImage2D( target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tconst emptyTextures = {};\n\temptyTextures[ gl.TEXTURE_2D ] = createTexture( gl.TEXTURE_2D, gl.TEXTURE_2D, 1 );\n\temptyTextures[ gl.TEXTURE_CUBE_MAP ] = createTexture( gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6 );\n\n\tif ( isWebGL2 ) {\n\n\t\temptyTextures[ gl.TEXTURE_2D_ARRAY ] = createTexture( gl.TEXTURE_2D_ARRAY, gl.TEXTURE_2D_ARRAY, 1, 1 );\n\t\temptyTextures[ gl.TEXTURE_3D ] = createTexture( gl.TEXTURE_3D, gl.TEXTURE_3D, 1, 1 );\n\n\t}\n\n\t// init\n\n\tcolorBuffer.setClear( 0, 0, 0, 1 );\n\tdepthBuffer.setClear( 1 );\n\tstencilBuffer.setClear( 0 );\n\n\tenable( gl.DEPTH_TEST );\n\tdepthBuffer.setFunc( LessEqualDepth );\n\n\tsetFlipSided( false );\n\tsetCullFace( CullFaceBack );\n\tenable( gl.CULL_FACE );\n\n\tsetBlending( NoBlending );\n\n\t//\n\n\tfunction enable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== true ) {\n\n\t\t\tgl.enable( id );\n\t\t\tenabledCapabilities[ id ] = true;\n\n\t\t}\n\n\t}\n\n\tfunction disable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== false ) {\n\n\t\t\tgl.disable( id );\n\t\t\tenabledCapabilities[ id ] = false;\n\n\t\t}\n\n\t}\n\n\tfunction bindFramebuffer( target, framebuffer ) {\n\n\t\tif ( currentBoundFramebuffers[ target ] !== framebuffer ) {\n\n\t\t\tgl.bindFramebuffer( target, framebuffer );\n\n\t\t\tcurrentBoundFramebuffers[ target ] = framebuffer;\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t// gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER\n\n\t\t\t\tif ( target === gl.DRAW_FRAMEBUFFER ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ gl.FRAMEBUFFER ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t\tif ( target === gl.FRAMEBUFFER ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ gl.DRAW_FRAMEBUFFER ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tfunction drawBuffers( renderTarget, framebuffer ) {\n\n\t\tlet drawBuffers = defaultDrawbuffers;\n\n\t\tlet needsUpdate = false;\n\n\t\tif ( renderTarget ) {\n\n\t\t\tdrawBuffers = currentDrawbuffers.get( framebuffer );\n\n\t\t\tif ( drawBuffers === undefined ) {\n\n\t\t\t\tdrawBuffers = [];\n\t\t\t\tcurrentDrawbuffers.set( framebuffer, drawBuffers );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\tif ( drawBuffers.length !== textures.length || drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) {\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tdrawBuffers[ i ] = gl.COLOR_ATTACHMENT0 + i;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tdrawBuffers.length = textures.length;\n\n\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) {\n\n\t\t\t\t\tdrawBuffers[ 0 ] = gl.COLOR_ATTACHMENT0;\n\n\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( drawBuffers[ 0 ] !== gl.BACK ) {\n\n\t\t\t\tdrawBuffers[ 0 ] = gl.BACK;\n\n\t\t\t\tneedsUpdate = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( needsUpdate ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\tgl.drawBuffers( drawBuffers );\n\n\t\t\t} else {\n\n\t\t\t\textensions.get( 'WEBGL_draw_buffers' ).drawBuffersWEBGL( drawBuffers );\n\n\t\t\t}\n\n\t\t}\n\n\n\t}\n\n\tfunction useProgram( program ) {\n\n\t\tif ( currentProgram !== program ) {\n\n\t\t\tgl.useProgram( program );\n\n\t\t\tcurrentProgram = program;\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tconst equationToGL = {\n\t\t[ AddEquation ]: gl.FUNC_ADD,\n\t\t[ SubtractEquation ]: gl.FUNC_SUBTRACT,\n\t\t[ ReverseSubtractEquation ]: gl.FUNC_REVERSE_SUBTRACT\n\t};\n\n\tif ( isWebGL2 ) {\n\n\t\tequationToGL[ MinEquation ] = gl.MIN;\n\t\tequationToGL[ MaxEquation ] = gl.MAX;\n\n\t} else {\n\n\t\tconst extension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tequationToGL[ MinEquation ] = extension.MIN_EXT;\n\t\t\tequationToGL[ MaxEquation ] = extension.MAX_EXT;\n\n\t\t}\n\n\t}\n\n\tconst factorToGL = {\n\t\t[ ZeroFactor ]: gl.ZERO,\n\t\t[ OneFactor ]: gl.ONE,\n\t\t[ SrcColorFactor ]: gl.SRC_COLOR,\n\t\t[ SrcAlphaFactor ]: gl.SRC_ALPHA,\n\t\t[ SrcAlphaSaturateFactor ]: gl.SRC_ALPHA_SATURATE,\n\t\t[ DstColorFactor ]: gl.DST_COLOR,\n\t\t[ DstAlphaFactor ]: gl.DST_ALPHA,\n\t\t[ OneMinusSrcColorFactor ]: gl.ONE_MINUS_SRC_COLOR,\n\t\t[ OneMinusSrcAlphaFactor ]: gl.ONE_MINUS_SRC_ALPHA,\n\t\t[ OneMinusDstColorFactor ]: gl.ONE_MINUS_DST_COLOR,\n\t\t[ OneMinusDstAlphaFactor ]: gl.ONE_MINUS_DST_ALPHA\n\t};\n\n\tfunction setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha ) {\n\n\t\tif ( blending === NoBlending ) {\n\n\t\t\tif ( currentBlendingEnabled === true ) {\n\n\t\t\t\tdisable( gl.BLEND );\n\t\t\t\tcurrentBlendingEnabled = false;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( currentBlendingEnabled === false ) {\n\n\t\t\tenable( gl.BLEND );\n\t\t\tcurrentBlendingEnabled = true;\n\n\t\t}\n\n\t\tif ( blending !== CustomBlending ) {\n\n\t\t\tif ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) {\n\n\t\t\t\tif ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) {\n\n\t\t\t\t\tgl.blendEquation( gl.FUNC_ADD );\n\n\t\t\t\t\tcurrentBlendEquation = AddEquation;\n\t\t\t\t\tcurrentBlendEquationAlpha = AddEquation;\n\n\t\t\t\t}\n\n\t\t\t\tif ( premultipliedAlpha ) {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( gl.ONE, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( gl.SRC_ALPHA, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFunc( gl.ZERO, gl.SRC_COLOR );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tcurrentBlendSrc = null;\n\t\t\t\tcurrentBlendDst = null;\n\t\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\t\tcurrentBlendDstAlpha = null;\n\n\t\t\t\tcurrentBlending = blending;\n\t\t\t\tcurrentPremultipledAlpha = premultipliedAlpha;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// custom blending\n\n\t\tblendEquationAlpha = blendEquationAlpha || blendEquation;\n\t\tblendSrcAlpha = blendSrcAlpha || blendSrc;\n\t\tblendDstAlpha = blendDstAlpha || blendDst;\n\n\t\tif ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) {\n\n\t\t\tgl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] );\n\n\t\t\tcurrentBlendEquation = blendEquation;\n\t\t\tcurrentBlendEquationAlpha = blendEquationAlpha;\n\n\t\t}\n\n\t\tif ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) {\n\n\t\t\tgl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] );\n\n\t\t\tcurrentBlendSrc = blendSrc;\n\t\t\tcurrentBlendDst = blendDst;\n\t\t\tcurrentBlendSrcAlpha = blendSrcAlpha;\n\t\t\tcurrentBlendDstAlpha = blendDstAlpha;\n\n\t\t}\n\n\t\tcurrentBlending = blending;\n\t\tcurrentPremultipledAlpha = false;\n\n\t}\n\n\tfunction setMaterial( material, frontFaceCW ) {\n\n\t\tmaterial.side === DoubleSide\n\t\t\t? disable( gl.CULL_FACE )\n\t\t\t: enable( gl.CULL_FACE );\n\n\t\tlet flipSided = ( material.side === BackSide );\n\t\tif ( frontFaceCW ) flipSided = ! flipSided;\n\n\t\tsetFlipSided( flipSided );\n\n\t\t( material.blending === NormalBlending && material.transparent === false )\n\t\t\t? setBlending( NoBlending )\n\t\t\t: setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha );\n\n\t\tdepthBuffer.setFunc( material.depthFunc );\n\t\tdepthBuffer.setTest( material.depthTest );\n\t\tdepthBuffer.setMask( material.depthWrite );\n\t\tcolorBuffer.setMask( material.colorWrite );\n\n\t\tconst stencilWrite = material.stencilWrite;\n\t\tstencilBuffer.setTest( stencilWrite );\n\t\tif ( stencilWrite ) {\n\n\t\t\tstencilBuffer.setMask( material.stencilWriteMask );\n\t\t\tstencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask );\n\t\t\tstencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass );\n\n\t\t}\n\n\t\tsetPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits );\n\n\t\tmaterial.alphaToCoverage === true\n\t\t\t? enable( gl.SAMPLE_ALPHA_TO_COVERAGE )\n\t\t\t: disable( gl.SAMPLE_ALPHA_TO_COVERAGE );\n\n\t}\n\n\t//\n\n\tfunction setFlipSided( flipSided ) {\n\n\t\tif ( currentFlipSided !== flipSided ) {\n\n\t\t\tif ( flipSided ) {\n\n\t\t\t\tgl.frontFace( gl.CW );\n\n\t\t\t} else {\n\n\t\t\t\tgl.frontFace( gl.CCW );\n\n\t\t\t}\n\n\t\t\tcurrentFlipSided = flipSided;\n\n\t\t}\n\n\t}\n\n\tfunction setCullFace( cullFace ) {\n\n\t\tif ( cullFace !== CullFaceNone ) {\n\n\t\t\tenable( gl.CULL_FACE );\n\n\t\t\tif ( cullFace !== currentCullFace ) {\n\n\t\t\t\tif ( cullFace === CullFaceBack ) {\n\n\t\t\t\t\tgl.cullFace( gl.BACK );\n\n\t\t\t\t} else if ( cullFace === CullFaceFront ) {\n\n\t\t\t\t\tgl.cullFace( gl.FRONT );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgl.cullFace( gl.FRONT_AND_BACK );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( gl.CULL_FACE );\n\n\t\t}\n\n\t\tcurrentCullFace = cullFace;\n\n\t}\n\n\tfunction setLineWidth( width ) {\n\n\t\tif ( width !== currentLineWidth ) {\n\n\t\t\tif ( lineWidthAvailable ) gl.lineWidth( width );\n\n\t\t\tcurrentLineWidth = width;\n\n\t\t}\n\n\t}\n\n\tfunction setPolygonOffset( polygonOffset, factor, units ) {\n\n\t\tif ( polygonOffset ) {\n\n\t\t\tenable( gl.POLYGON_OFFSET_FILL );\n\n\t\t\tif ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) {\n\n\t\t\t\tgl.polygonOffset( factor, units );\n\n\t\t\t\tcurrentPolygonOffsetFactor = factor;\n\t\t\t\tcurrentPolygonOffsetUnits = units;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( gl.POLYGON_OFFSET_FILL );\n\n\t\t}\n\n\t}\n\n\tfunction setScissorTest( scissorTest ) {\n\n\t\tif ( scissorTest ) {\n\n\t\t\tenable( gl.SCISSOR_TEST );\n\n\t\t} else {\n\n\t\t\tdisable( gl.SCISSOR_TEST );\n\n\t\t}\n\n\t}\n\n\t// texture\n\n\tfunction activeTexture( webglSlot ) {\n\n\t\tif ( webglSlot === undefined ) webglSlot = gl.TEXTURE0 + maxTextures - 1;\n\n\t\tif ( currentTextureSlot !== webglSlot ) {\n\n\t\t\tgl.activeTexture( webglSlot );\n\t\t\tcurrentTextureSlot = webglSlot;\n\n\t\t}\n\n\t}\n\n\tfunction bindTexture( webglType, webglTexture, webglSlot ) {\n\n\t\tif ( webglSlot === undefined ) {\n\n\t\t\tif ( currentTextureSlot === null ) {\n\n\t\t\t\twebglSlot = gl.TEXTURE0 + maxTextures - 1;\n\n\t\t\t} else {\n\n\t\t\t\twebglSlot = currentTextureSlot;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet boundTexture = currentBoundTextures[ webglSlot ];\n\n\t\tif ( boundTexture === undefined ) {\n\n\t\t\tboundTexture = { type: undefined, texture: undefined };\n\t\t\tcurrentBoundTextures[ webglSlot ] = boundTexture;\n\n\t\t}\n\n\t\tif ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) {\n\n\t\t\tif ( currentTextureSlot !== webglSlot ) {\n\n\t\t\t\tgl.activeTexture( webglSlot );\n\t\t\t\tcurrentTextureSlot = webglSlot;\n\n\t\t\t}\n\n\t\t\tgl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] );\n\n\t\t\tboundTexture.type = webglType;\n\t\t\tboundTexture.texture = webglTexture;\n\n\t\t}\n\n\t}\n\n\tfunction unbindTexture() {\n\n\t\tconst boundTexture = currentBoundTextures[ currentTextureSlot ];\n\n\t\tif ( boundTexture !== undefined && boundTexture.type !== undefined ) {\n\n\t\t\tgl.bindTexture( boundTexture.type, null );\n\n\t\t\tboundTexture.type = undefined;\n\t\t\tboundTexture.texture = undefined;\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texSubImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texSubImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texSubImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texSubImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexSubImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexSubImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexSubImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexSubImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texStorage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texStorage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texStorage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texStorage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction scissor( scissor ) {\n\n\t\tif ( currentScissor.equals( scissor ) === false ) {\n\n\t\t\tgl.scissor( scissor.x, scissor.y, scissor.z, scissor.w );\n\t\t\tcurrentScissor.copy( scissor );\n\n\t\t}\n\n\t}\n\n\tfunction viewport( viewport ) {\n\n\t\tif ( currentViewport.equals( viewport ) === false ) {\n\n\t\t\tgl.viewport( viewport.x, viewport.y, viewport.z, viewport.w );\n\t\t\tcurrentViewport.copy( viewport );\n\n\t\t}\n\n\t}\n\n\tfunction updateUBOMapping( uniformsGroup, program ) {\n\n\t\tlet mapping = uboProgramMap.get( program );\n\n\t\tif ( mapping === undefined ) {\n\n\t\t\tmapping = new WeakMap();\n\n\t\t\tuboProgramMap.set( program, mapping );\n\n\t\t}\n\n\t\tlet blockIndex = mapping.get( uniformsGroup );\n\n\t\tif ( blockIndex === undefined ) {\n\n\t\t\tblockIndex = gl.getUniformBlockIndex( program, uniformsGroup.name );\n\n\t\t\tmapping.set( uniformsGroup, blockIndex );\n\n\t\t}\n\n\t}\n\n\tfunction uniformBlockBinding( uniformsGroup, program ) {\n\n\t\tconst mapping = uboProgramMap.get( program );\n\t\tconst blockIndex = mapping.get( uniformsGroup );\n\n\t\tif ( uboBindings.get( program ) !== blockIndex ) {\n\n\t\t\t// bind shader specific block index to global block point\n\t\t\tgl.uniformBlockBinding( program, blockIndex, uniformsGroup.__bindingPointIndex );\n\n\t\t\tuboBindings.set( program, blockIndex );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction reset() {\n\n\t\t// reset state\n\n\t\tgl.disable( gl.BLEND );\n\t\tgl.disable( gl.CULL_FACE );\n\t\tgl.disable( gl.DEPTH_TEST );\n\t\tgl.disable( gl.POLYGON_OFFSET_FILL );\n\t\tgl.disable( gl.SCISSOR_TEST );\n\t\tgl.disable( gl.STENCIL_TEST );\n\t\tgl.disable( gl.SAMPLE_ALPHA_TO_COVERAGE );\n\n\t\tgl.blendEquation( gl.FUNC_ADD );\n\t\tgl.blendFunc( gl.ONE, gl.ZERO );\n\t\tgl.blendFuncSeparate( gl.ONE, gl.ZERO, gl.ONE, gl.ZERO );\n\n\t\tgl.colorMask( true, true, true, true );\n\t\tgl.clearColor( 0, 0, 0, 0 );\n\n\t\tgl.depthMask( true );\n\t\tgl.depthFunc( gl.LESS );\n\t\tgl.clearDepth( 1 );\n\n\t\tgl.stencilMask( 0xffffffff );\n\t\tgl.stencilFunc( gl.ALWAYS, 0, 0xffffffff );\n\t\tgl.stencilOp( gl.KEEP, gl.KEEP, gl.KEEP );\n\t\tgl.clearStencil( 0 );\n\n\t\tgl.cullFace( gl.BACK );\n\t\tgl.frontFace( gl.CCW );\n\n\t\tgl.polygonOffset( 0, 0 );\n\n\t\tgl.activeTexture( gl.TEXTURE0 );\n\n\t\tgl.bindFramebuffer( gl.FRAMEBUFFER, null );\n\n\t\tif ( isWebGL2 === true ) {\n\n\t\t\tgl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null );\n\t\t\tgl.bindFramebuffer( gl.READ_FRAMEBUFFER, null );\n\n\t\t}\n\n\t\tgl.useProgram( null );\n\n\t\tgl.lineWidth( 1 );\n\n\t\tgl.scissor( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tgl.viewport( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\t// reset internals\n\n\t\tenabledCapabilities = {};\n\n\t\tcurrentTextureSlot = null;\n\t\tcurrentBoundTextures = {};\n\n\t\tcurrentBoundFramebuffers = {};\n\t\tcurrentDrawbuffers = new WeakMap();\n\t\tdefaultDrawbuffers = [];\n\n\t\tcurrentProgram = null;\n\n\t\tcurrentBlendingEnabled = false;\n\t\tcurrentBlending = null;\n\t\tcurrentBlendEquation = null;\n\t\tcurrentBlendSrc = null;\n\t\tcurrentBlendDst = null;\n\t\tcurrentBlendEquationAlpha = null;\n\t\tcurrentBlendSrcAlpha = null;\n\t\tcurrentBlendDstAlpha = null;\n\t\tcurrentPremultipledAlpha = false;\n\n\t\tcurrentFlipSided = null;\n\t\tcurrentCullFace = null;\n\n\t\tcurrentLineWidth = null;\n\n\t\tcurrentPolygonOffsetFactor = null;\n\t\tcurrentPolygonOffsetUnits = null;\n\n\t\tcurrentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tcurrentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\tcolorBuffer.reset();\n\t\tdepthBuffer.reset();\n\t\tstencilBuffer.reset();\n\n\t}\n\n\treturn {\n\n\t\tbuffers: {\n\t\t\tcolor: colorBuffer,\n\t\t\tdepth: depthBuffer,\n\t\t\tstencil: stencilBuffer\n\t\t},\n\n\t\tenable: enable,\n\t\tdisable: disable,\n\n\t\tbindFramebuffer: bindFramebuffer,\n\t\tdrawBuffers: drawBuffers,\n\n\t\tuseProgram: useProgram,\n\n\t\tsetBlending: setBlending,\n\t\tsetMaterial: setMaterial,\n\n\t\tsetFlipSided: setFlipSided,\n\t\tsetCullFace: setCullFace,\n\n\t\tsetLineWidth: setLineWidth,\n\t\tsetPolygonOffset: setPolygonOffset,\n\n\t\tsetScissorTest: setScissorTest,\n\n\t\tactiveTexture: activeTexture,\n\t\tbindTexture: bindTexture,\n\t\tunbindTexture: unbindTexture,\n\t\tcompressedTexImage2D: compressedTexImage2D,\n\t\tcompressedTexImage3D: compressedTexImage3D,\n\t\ttexImage2D: texImage2D,\n\t\ttexImage3D: texImage3D,\n\n\t\tupdateUBOMapping: updateUBOMapping,\n\t\tuniformBlockBinding: uniformBlockBinding,\n\n\t\ttexStorage2D: texStorage2D,\n\t\ttexStorage3D: texStorage3D,\n\t\ttexSubImage2D: texSubImage2D,\n\t\ttexSubImage3D: texSubImage3D,\n\t\tcompressedTexSubImage2D: compressedTexSubImage2D,\n\t\tcompressedTexSubImage3D: compressedTexSubImage3D,\n\n\t\tscissor: scissor,\n\t\tviewport: viewport,\n\n\t\treset: reset\n\n\t};\n\n}\n\nfunction WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\tconst maxTextures = capabilities.maxTextures;\n\tconst maxCubemapSize = capabilities.maxCubemapSize;\n\tconst maxTextureSize = capabilities.maxTextureSize;\n\tconst maxSamples = capabilities.maxSamples;\n\tconst multisampledRTTExt = extensions.has( 'WEBGL_multisampled_render_to_texture' ) ? extensions.get( 'WEBGL_multisampled_render_to_texture' ) : null;\n\tconst supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent );\n\n\tconst _videoTextures = new WeakMap();\n\tlet _canvas;\n\n\tconst _sources = new WeakMap(); // maps WebglTexture objects to instances of Source\n\n\t// cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n\t// also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n\t// Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n\n\tlet useOffscreenCanvas = false;\n\n\ttry {\n\n\t\tuseOffscreenCanvas = typeof OffscreenCanvas !== 'undefined'\n\t\t\t// eslint-disable-next-line compat/compat\n\t\t\t&& ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null;\n\n\t} catch ( err ) {\n\n\t\t// Ignore any errors\n\n\t}\n\n\tfunction createCanvas( width, height ) {\n\n\t\t// Use OffscreenCanvas when available. Specially needed in web workers\n\n\t\treturn useOffscreenCanvas ?\n\t\t\t// eslint-disable-next-line compat/compat\n\t\t\tnew OffscreenCanvas( width, height ) : createElementNS( 'canvas' );\n\n\t}\n\n\tfunction resizeImage( image, needsPowerOfTwo, needsNewCanvas, maxSize ) {\n\n\t\tlet scale = 1;\n\n\t\t// handle case if texture exceeds max size\n\n\t\tif ( image.width > maxSize || image.height > maxSize ) {\n\n\t\t\tscale = maxSize / Math.max( image.width, image.height );\n\n\t\t}\n\n\t\t// only perform resize if necessary\n\n\t\tif ( scale < 1 || needsPowerOfTwo === true ) {\n\n\t\t\t// only perform resize for certain image types\n\n\t\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\t\tconst floor = needsPowerOfTwo ? floorPowerOfTwo : Math.floor;\n\n\t\t\t\tconst width = floor( scale * image.width );\n\t\t\t\tconst height = floor( scale * image.height );\n\n\t\t\t\tif ( _canvas === undefined ) _canvas = createCanvas( width, height );\n\n\t\t\t\t// cube textures can't reuse the same canvas\n\n\t\t\t\tconst canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas;\n\n\t\t\t\tcanvas.width = width;\n\t\t\t\tcanvas.height = height;\n\n\t\t\t\tconst context = canvas.getContext( '2d' );\n\t\t\t\tcontext.drawImage( image, 0, 0, width, height );\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' );\n\n\t\t\t\treturn canvas;\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'data' in image ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').' );\n\n\t\t\t\t}\n\n\t\t\t\treturn image;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn image;\n\n\t}\n\n\tfunction isPowerOfTwo$1( image ) {\n\n\t\treturn isPowerOfTwo( image.width ) && isPowerOfTwo( image.height );\n\n\t}\n\n\tfunction textureNeedsPowerOfTwo( texture ) {\n\n\t\tif ( isWebGL2 ) return false;\n\n\t\treturn ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) ||\n\t\t\t( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter );\n\n\t}\n\n\tfunction textureNeedsGenerateMipmaps( texture, supportsMips ) {\n\n\t\treturn texture.generateMipmaps && supportsMips &&\n\t\t\ttexture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\n\t}\n\n\tfunction generateMipmap( target ) {\n\n\t\t_gl.generateMipmap( target );\n\n\t}\n\n\tfunction getInternalFormat( internalFormatName, glFormat, glType, colorSpace, forceLinearTransfer = false ) {\n\n\t\tif ( isWebGL2 === false ) return glFormat;\n\n\t\tif ( internalFormatName !== null ) {\n\n\t\t\tif ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ];\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \\'' + internalFormatName + '\\'' );\n\n\t\t}\n\n\t\tlet internalFormat = glFormat;\n\n\t\tif ( glFormat === _gl.RED ) {\n\n\t\t\tif ( glType === _gl.FLOAT ) internalFormat = _gl.R32F;\n\t\t\tif ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.R16F;\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8;\n\n\t\t}\n\n\t\tif ( glFormat === _gl.RED_INTEGER ) {\n\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI;\n\t\t\tif ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI;\n\t\t\tif ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI;\n\t\t\tif ( glType === _gl.BYTE ) internalFormat = _gl.R8I;\n\t\t\tif ( glType === _gl.SHORT ) internalFormat = _gl.R16I;\n\t\t\tif ( glType === _gl.INT ) internalFormat = _gl.R32I;\n\n\t\t}\n\n\t\tif ( glFormat === _gl.RG ) {\n\n\t\t\tif ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F;\n\t\t\tif ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RG16F;\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8;\n\n\t\t}\n\n\t\tif ( glFormat === _gl.RGBA ) {\n\n\t\t\tif ( glType === _gl.FLOAT ) internalFormat = _gl.RGBA32F;\n\t\t\tif ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RGBA16F;\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = ( colorSpace === SRGBColorSpace && forceLinearTransfer === false ) ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;\n\t\t\tif ( glType === _gl.UNSIGNED_SHORT_4_4_4_4 ) internalFormat = _gl.RGBA4;\n\t\t\tif ( glType === _gl.UNSIGNED_SHORT_5_5_5_1 ) internalFormat = _gl.RGB5_A1;\n\n\t\t}\n\n\t\tif ( internalFormat === _gl.R16F || internalFormat === _gl.R32F ||\n\t\t\tinternalFormat === _gl.RG16F || internalFormat === _gl.RG32F ||\n\t\t\tinternalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F ) {\n\n\t\t\textensions.get( 'EXT_color_buffer_float' );\n\n\t\t}\n\n\t\treturn internalFormat;\n\n\t}\n\n\tfunction getMipLevels( texture, image, supportsMips ) {\n\n\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) === true || ( texture.isFramebufferTexture && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) ) {\n\n\t\t\treturn Math.log2( Math.max( image.width, image.height ) ) + 1;\n\n\t\t} else if ( texture.mipmaps !== undefined && texture.mipmaps.length > 0 ) {\n\n\t\t\t// user-defined mipmaps\n\n\t\t\treturn texture.mipmaps.length;\n\n\t\t} else if ( texture.isCompressedTexture && Array.isArray( texture.image ) ) {\n\n\t\t\treturn image.mipmaps.length;\n\n\t\t} else {\n\n\t\t\t// texture without mipmaps (only base level)\n\n\t\t\treturn 1;\n\n\t\t}\n\n\t}\n\n\t// Fallback filters for non-power-of-2 textures\n\n\tfunction filterFallback( f ) {\n\n\t\tif ( f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter ) {\n\n\t\t\treturn _gl.NEAREST;\n\n\t\t}\n\n\t\treturn _gl.LINEAR;\n\n\t}\n\n\t//\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tdeallocateTexture( texture );\n\n\t\tif ( texture.isVideoTexture ) {\n\n\t\t\t_videoTextures.delete( texture );\n\n\t\t}\n\n\t}\n\n\tfunction onRenderTargetDispose( event ) {\n\n\t\tconst renderTarget = event.target;\n\n\t\trenderTarget.removeEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tdeallocateRenderTarget( renderTarget );\n\n\t}\n\n\t//\n\n\tfunction deallocateTexture( texture ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( textureProperties.__webglInit === undefined ) return;\n\n\t\t// check if it's necessary to remove the WebGLTexture object\n\n\t\tconst source = texture.source;\n\t\tconst webglTextures = _sources.get( source );\n\n\t\tif ( webglTextures ) {\n\n\t\t\tconst webglTexture = webglTextures[ textureProperties.__cacheKey ];\n\t\t\twebglTexture.usedTimes --;\n\n\t\t\t// the WebGLTexture object is not used anymore, remove it\n\n\t\t\tif ( webglTexture.usedTimes === 0 ) {\n\n\t\t\t\tdeleteTexture( texture );\n\n\t\t\t}\n\n\t\t\t// remove the weak map entry if no WebGLTexture uses the source anymore\n\n\t\t\tif ( Object.keys( webglTextures ).length === 0 ) {\n\n\t\t\t\t_sources.delete( source );\n\n\t\t\t}\n\n\t\t}\n\n\t\tproperties.remove( texture );\n\n\t}\n\n\tfunction deleteTexture( texture ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\tconst source = texture.source;\n\t\tconst webglTextures = _sources.get( source );\n\t\tdelete webglTextures[ textureProperties.__cacheKey ];\n\n\t\tinfo.memory.textures --;\n\n\t}\n\n\tfunction deallocateRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( textureProperties.__webglTexture !== undefined ) {\n\n\t\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\t\tinfo.memory.textures --;\n\n\t\t}\n\n\t\tif ( renderTarget.depthTexture ) {\n\n\t\t\trenderTarget.depthTexture.dispose();\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( Array.isArray( renderTargetProperties.__webglFramebuffer[ i ] ) ) {\n\n\t\t\t\t\tfor ( let level = 0; level < renderTargetProperties.__webglFramebuffer[ i ].length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ][ level ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( Array.isArray( renderTargetProperties.__webglFramebuffer ) ) {\n\n\t\t\t\tfor ( let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ level ] );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer );\n\n\t\t\t}\n\n\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer );\n\t\t\tif ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\tif ( renderTargetProperties.__webglColorRenderbuffer ) {\n\n\t\t\t\tfor ( let i = 0; i < renderTargetProperties.__webglColorRenderbuffer.length; i ++ ) {\n\n\t\t\t\t\tif ( renderTargetProperties.__webglColorRenderbuffer[ i ] ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer );\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\tfor ( let i = 0, il = texture.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachmentProperties = properties.get( texture[ i ] );\n\n\t\t\t\tif ( attachmentProperties.__webglTexture ) {\n\n\t\t\t\t\t_gl.deleteTexture( attachmentProperties.__webglTexture );\n\n\t\t\t\t\tinfo.memory.textures --;\n\n\t\t\t\t}\n\n\t\t\t\tproperties.remove( texture[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tproperties.remove( texture );\n\t\tproperties.remove( renderTarget );\n\n\t}\n\n\t//\n\n\tlet textureUnits = 0;\n\n\tfunction resetTextureUnits() {\n\n\t\ttextureUnits = 0;\n\n\t}\n\n\tfunction allocateTextureUnit() {\n\n\t\tconst textureUnit = textureUnits;\n\n\t\tif ( textureUnit >= maxTextures ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures );\n\n\t\t}\n\n\t\ttextureUnits += 1;\n\n\t\treturn textureUnit;\n\n\t}\n\n\tfunction getTextureCacheKey( texture ) {\n\n\t\tconst array = [];\n\n\t\tarray.push( texture.wrapS );\n\t\tarray.push( texture.wrapT );\n\t\tarray.push( texture.wrapR || 0 );\n\t\tarray.push( texture.magFilter );\n\t\tarray.push( texture.minFilter );\n\t\tarray.push( texture.anisotropy );\n\t\tarray.push( texture.internalFormat );\n\t\tarray.push( texture.format );\n\t\tarray.push( texture.type );\n\t\tarray.push( texture.generateMipmaps );\n\t\tarray.push( texture.premultiplyAlpha );\n\t\tarray.push( texture.flipY );\n\t\tarray.push( texture.unpackAlignment );\n\t\tarray.push( texture.colorSpace );\n\n\t\treturn array.join();\n\n\t}\n\n\t//\n\n\tfunction setTexture2D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.isVideoTexture ) updateVideoTexture( texture );\n\n\t\tif ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tconst image = texture.image;\n\n\t\t\tif ( image === null ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but no image data found.' );\n\n\t\t\t} else if ( image.complete === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' );\n\n\t\t\t} else {\n\n\t\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tfunction setTexture2DArray( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tfunction setTexture3D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tfunction setTextureCube( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadCubeTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tconst wrappingToGL = {\n\t\t[ RepeatWrapping ]: _gl.REPEAT,\n\t\t[ ClampToEdgeWrapping ]: _gl.CLAMP_TO_EDGE,\n\t\t[ MirroredRepeatWrapping ]: _gl.MIRRORED_REPEAT\n\t};\n\n\tconst filterToGL = {\n\t\t[ NearestFilter ]: _gl.NEAREST,\n\t\t[ NearestMipmapNearestFilter ]: _gl.NEAREST_MIPMAP_NEAREST,\n\t\t[ NearestMipmapLinearFilter ]: _gl.NEAREST_MIPMAP_LINEAR,\n\n\t\t[ LinearFilter ]: _gl.LINEAR,\n\t\t[ LinearMipmapNearestFilter ]: _gl.LINEAR_MIPMAP_NEAREST,\n\t\t[ LinearMipmapLinearFilter ]: _gl.LINEAR_MIPMAP_LINEAR\n\t};\n\n\tconst compareToGL = {\n\t\t[ NeverCompare ]: _gl.NEVER,\n\t\t[ AlwaysCompare ]: _gl.ALWAYS,\n\t\t[ LessCompare ]: _gl.LESS,\n\t\t[ LessEqualCompare ]: _gl.LEQUAL,\n\t\t[ EqualCompare ]: _gl.EQUAL,\n\t\t[ GreaterEqualCompare ]: _gl.GEQUAL,\n\t\t[ GreaterCompare ]: _gl.GREATER,\n\t\t[ NotEqualCompare ]: _gl.NOTEQUAL\n\t};\n\n\tfunction setTextureParameters( textureType, texture, supportsMips ) {\n\n\t\tif ( supportsMips ) {\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[ texture.wrapS ] );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[ texture.wrapT ] );\n\n\t\t\tif ( textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[ texture.wrapR ] );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[ texture.magFilter ] );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[ texture.minFilter ] );\n\n\t\t} else {\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE );\n\n\t\t\tif ( textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, _gl.CLAMP_TO_EDGE );\n\n\t\t\t}\n\n\t\t\tif ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.' );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, filterFallback( texture.magFilter ) );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, filterFallback( texture.minFilter ) );\n\n\t\t\tif ( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( texture.compareFunction ) {\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_MODE, _gl.COMPARE_REF_TO_TEXTURE );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[ texture.compareFunction ] );\n\n\t\t}\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tif ( texture.magFilter === NearestFilter ) return;\n\t\t\tif ( texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter ) return;\n\t\t\tif ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2\n\t\t\tif ( isWebGL2 === false && ( texture.type === HalfFloatType && extensions.has( 'OES_texture_half_float_linear' ) === false ) ) return; // verify extension for WebGL 1 only\n\n\t\t\tif ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) {\n\n\t\t\t\t_gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) );\n\t\t\t\tproperties.get( texture ).__currentAnisotropy = texture.anisotropy;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction initTexture( textureProperties, texture ) {\n\n\t\tlet forceUpload = false;\n\n\t\tif ( textureProperties.__webglInit === undefined ) {\n\n\t\t\ttextureProperties.__webglInit = true;\n\n\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t}\n\n\t\t// create Source <-> WebGLTextures mapping if necessary\n\n\t\tconst source = texture.source;\n\t\tlet webglTextures = _sources.get( source );\n\n\t\tif ( webglTextures === undefined ) {\n\n\t\t\twebglTextures = {};\n\t\t\t_sources.set( source, webglTextures );\n\n\t\t}\n\n\t\t// check if there is already a WebGLTexture object for the given texture parameters\n\n\t\tconst textureCacheKey = getTextureCacheKey( texture );\n\n\t\tif ( textureCacheKey !== textureProperties.__cacheKey ) {\n\n\t\t\t// if not, create a new instance of WebGLTexture\n\n\t\t\tif ( webglTextures[ textureCacheKey ] === undefined ) {\n\n\t\t\t\t// create new entry\n\n\t\t\t\twebglTextures[ textureCacheKey ] = {\n\t\t\t\t\ttexture: _gl.createTexture(),\n\t\t\t\t\tusedTimes: 0\n\t\t\t\t};\n\n\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t// when a new instance of WebGLTexture was created, a texture upload is required\n\t\t\t\t// even if the image contents are identical\n\n\t\t\t\tforceUpload = true;\n\n\t\t\t}\n\n\t\t\twebglTextures[ textureCacheKey ].usedTimes ++;\n\n\t\t\t// every time the texture cache key changes, it's necessary to check if an instance of\n\t\t\t// WebGLTexture can be deleted in order to avoid a memory leak.\n\n\t\t\tconst webglTexture = webglTextures[ textureProperties.__cacheKey ];\n\n\t\t\tif ( webglTexture !== undefined ) {\n\n\t\t\t\twebglTextures[ textureProperties.__cacheKey ].usedTimes --;\n\n\t\t\t\tif ( webglTexture.usedTimes === 0 ) {\n\n\t\t\t\t\tdeleteTexture( texture );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// store references to cache key and WebGLTexture object\n\n\t\t\ttextureProperties.__cacheKey = textureCacheKey;\n\t\t\ttextureProperties.__webglTexture = webglTextures[ textureCacheKey ].texture;\n\n\t\t}\n\n\t\treturn forceUpload;\n\n\t}\n\n\tfunction uploadTexture( textureProperties, texture, slot ) {\n\n\t\tlet textureType = _gl.TEXTURE_2D;\n\n\t\tif ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) textureType = _gl.TEXTURE_2D_ARRAY;\n\t\tif ( texture.isData3DTexture ) textureType = _gl.TEXTURE_3D;\n\n\t\tconst forceUpload = initTexture( textureProperties, texture );\n\t\tconst source = texture.source;\n\n\t\tstate.bindTexture( textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t\tconst sourceProperties = properties.get( source );\n\n\t\tif ( source.version !== sourceProperties.__version || forceUpload === true ) {\n\n\t\t\tstate.activeTexture( _gl.TEXTURE0 + slot );\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE );\n\n\t\t\tconst needsPowerOfTwo = textureNeedsPowerOfTwo( texture ) && isPowerOfTwo$1( texture.image ) === false;\n\t\t\tlet image = resizeImage( texture.image, needsPowerOfTwo, false, maxTextureSize );\n\t\t\timage = verifyColorSpace( texture, image );\n\n\t\t\tconst supportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\t\tglFormat = utils.convert( texture.format, texture.colorSpace );\n\n\t\t\tlet glType = utils.convert( texture.type ),\n\t\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\n\t\t\tsetTextureParameters( textureType, texture, supportsMips );\n\n\t\t\tlet mipmap;\n\t\t\tconst mipmaps = texture.mipmaps;\n\n\t\t\tconst useTexStorage = ( isWebGL2 && texture.isVideoTexture !== true );\n\t\t\tconst allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true );\n\t\t\tconst levels = getMipLevels( texture, image, supportsMips );\n\n\t\t\tif ( texture.isDepthTexture ) {\n\n\t\t\t\t// populate depth texture with dummy data\n\n\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT;\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT32F;\n\n\t\t\t\t\t} else if ( texture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT24;\n\n\t\t\t\t\t} else if ( texture.type === UnsignedInt248Type ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH24_STENCIL8;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT16; // WebGL2 requires sized internalformat for glTexImage2D\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\t\tconsole.error( 'WebGLRenderer: Floating point depth texture requires WebGL2.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// validation checks for WebGL 1\n\n\t\t\t\tif ( texture.format === DepthFormat && glInternalFormat === _gl.DEPTH_COMPONENT ) {\n\n\t\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tif ( texture.type !== UnsignedShortType && texture.type !== UnsignedIntType ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.' );\n\n\t\t\t\t\t\ttexture.type = UnsignedIntType;\n\t\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( texture.format === DepthStencilFormat && glInternalFormat === _gl.DEPTH_COMPONENT ) {\n\n\t\t\t\t\t// Depth stencil textures need the DEPTH_STENCIL internal format\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tglInternalFormat = _gl.DEPTH_STENCIL;\n\n\t\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tif ( texture.type !== UnsignedInt248Type ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.' );\n\n\t\t\t\t\t\ttexture.type = UnsignedInt248Type;\n\t\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//\n\n\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, 1, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isDataTexture ) {\n\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isCompressedTexture ) {\n\n\t\t\t\tif ( texture.isCompressedArrayTexture ) {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height, image.depth );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( texture.format !== RGBAFormat ) {\n\n\t\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0 );\n\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0 );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( texture.format !== RGBAFormat ) {\n\n\t\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data );\n\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isDataArrayTexture ) {\n\n\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, image.width, image.height, image.depth );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.texSubImage3D( _gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage3D( _gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isData3DTexture ) {\n\n\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage3D( _gl.TEXTURE_3D, levels, glInternalFormat, image.width, image.height, image.depth );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.texSubImage3D( _gl.TEXTURE_3D, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isFramebufferTexture ) {\n\n\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tlet width = image.width, height = image.height;\n\n\t\t\t\t\t\tfor ( let i = 0; i < levels; i ++ ) {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, width, height, 0, glFormat, glType, null );\n\n\t\t\t\t\t\t\twidth >>= 1;\n\t\t\t\t\t\t\theight >>= 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// regular Texture (image, video, canvas)\n\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, glFormat, glType, mipmap );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( textureType );\n\n\t\t\t}\n\n\t\t\tsourceProperties.__version = source.version;\n\n\t\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t}\n\n\tfunction uploadCubeTexture( textureProperties, texture, slot ) {\n\n\t\tif ( texture.image.length !== 6 ) return;\n\n\t\tconst forceUpload = initTexture( textureProperties, texture );\n\t\tconst source = texture.source;\n\n\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t\tconst sourceProperties = properties.get( source );\n\n\t\tif ( source.version !== sourceProperties.__version || forceUpload === true ) {\n\n\t\t\tstate.activeTexture( _gl.TEXTURE0 + slot );\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE );\n\n\t\t\tconst isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture );\n\t\t\tconst isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );\n\n\t\t\tconst cubeImage = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( ! isCompressed && ! isDataTexture ) {\n\n\t\t\t\t\tcubeImage[ i ] = resizeImage( texture.image[ i ], false, true, maxCubemapSize );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tcubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ];\n\n\t\t\t\t}\n\n\t\t\t\tcubeImage[ i ] = verifyColorSpace( texture, cubeImage[ i ] );\n\n\t\t\t}\n\n\t\t\tconst image = cubeImage[ 0 ],\n\t\t\t\tsupportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\t\tglFormat = utils.convert( texture.format, texture.colorSpace ),\n\t\t\t\tglType = utils.convert( texture.type ),\n\t\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\n\t\t\tconst useTexStorage = ( isWebGL2 && texture.isVideoTexture !== true );\n\t\t\tconst allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true );\n\t\t\tlet levels = getMipLevels( texture, image, supportsMips );\n\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, supportsMips );\n\n\t\t\tlet mipmaps;\n\n\t\t\tif ( isCompressed ) {\n\n\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tmipmaps = cubeImage[ i ].mipmaps;\n\n\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\t\tif ( texture.format !== RGBAFormat ) {\n\n\t\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data );\n\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tmipmaps = texture.mipmaps;\n\n\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t// TODO: Uniformly handle mipmap definitions\n\t\t\t\t\t// Normal textures and compressed cube textures define base level + mips with their mipmap array\n\t\t\t\t\t// Uncompressed cube textures use their mipmap array only for mips (no base level)\n\n\t\t\t\t\tif ( mipmaps.length > 0 ) levels ++;\n\n\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, cubeImage[ 0 ].width, cubeImage[ 0 ].height );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tif ( isDataTexture ) {\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, cubeImage[ i ].width, cubeImage[ i ].height, glFormat, glType, cubeImage[ i ].data );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\t\t\t\t\t\t\tconst mipmapImage = mipmap.image[ i ].image;\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, mipmapImage.width, mipmapImage.height, glFormat, glType, mipmapImage.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, glFormat, glType, cubeImage[ i ] );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, glFormat, glType, mipmap.image[ i ] );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\t// We assume images for cube map have the same size.\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP );\n\n\t\t\t}\n\n\t\t\tsourceProperties.__version = source.version;\n\n\t\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t}\n\n\t// Render targets\n\n\t// Setup storage for target texture and bind it to correct framebuffer\n\tfunction setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) {\n\n\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\tconst glType = utils.convert( texture.type );\n\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tif ( ! renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\tconst width = Math.max( 1, renderTarget.width >> level );\n\t\t\tconst height = Math.max( 1, renderTarget.height >> level );\n\n\t\t\tif ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\tstate.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) );\n\n\t\t} else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753\n\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level );\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}\n\n\n\t// Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n\tfunction setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\tlet glInternalFormat = _gl.DEPTH_COMPONENT16;\n\n\t\t\tif ( isMultisample || useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tconst depthTexture = renderTarget.depthTexture;\n\n\t\t\t\tif ( depthTexture && depthTexture.isDepthTexture ) {\n\n\t\t\t\t\tif ( depthTexture.type === FloatType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT32F;\n\n\t\t\t\t\t} else if ( depthTexture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT24;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\t\tmultisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\n\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\tif ( isMultisample && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height );\n\n\t\t\t} else if ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\n\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\n\t\t} else {\n\n\t\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ];\n\n\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\tconst texture = textures[ i ];\n\n\t\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\tif ( isMultisample && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else if ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\t\tmultisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t}\n\n\t// Setup resources for a Depth Texture for a FBO (needs an extension)\n\tfunction setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tconst isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget );\n\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tconst webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t}\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}\n\n\t// Setup GL resources for a non-texture depth buffer\n\tfunction setupDepthRenderbuffer( renderTarget ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\n\t\tif ( renderTarget.depthTexture && ! renderTargetProperties.__autoAllocateDepthBuffer ) {\n\n\t\t\tif ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' );\n\n\t\t\tsetupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget );\n\n\t\t} else {\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = [];\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[ i ] );\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}\n\n\t// rebind framebuffer with external textures\n\tfunction rebindTextures( renderTarget, colorTexture, depthTexture ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tif ( colorTexture !== undefined ) {\n\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 );\n\n\t\t}\n\n\t\tif ( depthTexture !== undefined ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}\n\n\t// Set up GL resources for the render target\n\tfunction setupRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets !== true ) {\n\n\t\t\tif ( textureProperties.__webglTexture === undefined ) {\n\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = [];\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tif ( capabilities.drawBuffers ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst attachmentProperties = properties.get( textures[ i ] );\n\n\t\t\t\t\t\tif ( attachmentProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\t\t\tattachmentProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ( isWebGL2 && renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\tconst textures = isMultipleRenderTargets ? texture : [ texture ];\n\n\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = [];\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tconst texture = textures[ i ];\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer[ i ] = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true );\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, supportsMips );\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t} else if ( isMultipleRenderTargets ) {\n\n\t\t\tconst textures = renderTarget.texture;\n\n\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachment = textures[ i ];\n\t\t\t\tconst attachmentProperties = properties.get( attachment );\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, attachment, supportsMips );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t} else {\n\n\t\t\tlet glTextureType = _gl.TEXTURE_2D;\n\n\t\t\tif ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tglTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( glTextureType, texture, supportsMips );\n\n\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( glTextureType );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}\n\n\tfunction updateRenderTargetMipmap( renderTarget ) {\n\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ];\n\n\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\tconst texture = textures[ i ];\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tconst target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D;\n\t\t\t\tconst webglTexture = properties.get( texture ).__webglTexture;\n\n\t\t\t\tstate.bindTexture( target, webglTexture );\n\t\t\t\tgenerateMipmap( target );\n\t\t\t\tstate.unbindTexture();\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateMultisampleRenderTarget( renderTarget ) {\n\n\t\tif ( ( isWebGL2 && renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets ? renderTarget.texture : [ renderTarget.texture ];\n\t\t\tconst width = renderTarget.width;\n\t\t\tconst height = renderTarget.height;\n\t\t\tlet mask = _gl.COLOR_BUFFER_BIT;\n\t\t\tconst invalidationArray = [];\n\t\t\tconst depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT;\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\n\t\t\t// If MRT we need to remove FBO attachments\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, null );\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, null, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\tstate.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\n\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\tinvalidationArray.push( _gl.COLOR_ATTACHMENT0 + i );\n\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\tinvalidationArray.push( depthStyle );\n\n\t\t\t\t}\n\n\t\t\t\tconst ignoreDepthValues = ( renderTargetProperties.__ignoreDepthValues !== undefined ) ? renderTargetProperties.__ignoreDepthValues : false;\n\n\t\t\t\tif ( ignoreDepthValues === false ) {\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) mask |= _gl.DEPTH_BUFFER_BIT;\n\t\t\t\t\tif ( renderTarget.stencilBuffer ) mask |= _gl.STENCIL_BUFFER_BIT;\n\n\t\t\t\t}\n\n\t\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.READ_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( ignoreDepthValues === true ) {\n\n\t\t\t\t\t_gl.invalidateFramebuffer( _gl.READ_FRAMEBUFFER, [ depthStyle ] );\n\t\t\t\t\t_gl.invalidateFramebuffer( _gl.DRAW_FRAMEBUFFER, [ depthStyle ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\t\tconst webglTexture = properties.get( textures[ i ] ).__webglTexture;\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0 );\n\n\t\t\t\t}\n\n\t\t\t\t_gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST );\n\n\t\t\t\tif ( supportsInvalidateFramebuffer ) {\n\n\t\t\t\t\t_gl.invalidateFramebuffer( _gl.READ_FRAMEBUFFER, invalidationArray );\n\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.READ_FRAMEBUFFER, null );\n\t\t\tstate.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, null );\n\n\t\t\t// If MRT since pre-blit we removed the FBO we need to reconstruct the attachments\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\tconst webglTexture = properties.get( textures[ i ] ).__webglTexture;\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, webglTexture, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t}\n\n\t}\n\n\tfunction getRenderTargetSamples( renderTarget ) {\n\n\t\treturn Math.min( maxSamples, renderTarget.samples );\n\n\t}\n\n\tfunction useMultisampledRTT( renderTarget ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\treturn isWebGL2 && renderTarget.samples > 0 && extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true && renderTargetProperties.__useRenderToTexture !== false;\n\n\t}\n\n\tfunction updateVideoTexture( texture ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\t// Check the last frame we updated the VideoTexture\n\n\t\tif ( _videoTextures.get( texture ) !== frame ) {\n\n\t\t\t_videoTextures.set( texture, frame );\n\t\t\ttexture.update();\n\n\t\t}\n\n\t}\n\n\tfunction verifyColorSpace( texture, image ) {\n\n\t\tconst colorSpace = texture.colorSpace;\n\t\tconst format = texture.format;\n\t\tconst type = texture.type;\n\n\t\tif ( texture.isCompressedTexture === true || texture.format === _SRGBAFormat ) return image;\n\n\t\tif ( colorSpace !== LinearSRGBColorSpace && colorSpace !== NoColorSpace ) {\n\n\t\t\t// sRGB\n\n\t\t\tif ( colorSpace === SRGBColorSpace ) {\n\n\t\t\t\tif ( isWebGL2 === false ) {\n\n\t\t\t\t\t// in WebGL 1, try to use EXT_sRGB extension and unsized formats\n\n\t\t\t\t\tif ( extensions.has( 'EXT_sRGB' ) === true && format === RGBAFormat ) {\n\n\t\t\t\t\t\ttexture.format = _SRGBAFormat;\n\n\t\t\t\t\t\t// it's not possible to generate mips in WebGL 1 with this extension\n\n\t\t\t\t\t\ttexture.minFilter = LinearFilter;\n\t\t\t\t\t\ttexture.generateMipmaps = false;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// slow fallback (CPU decode)\n\n\t\t\t\t\t\timage = ImageUtils.sRGBToLinear( image );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// in WebGL 2 uncompressed textures can only be sRGB encoded if they have the RGBA8 format\n\n\t\t\t\t\tif ( format !== RGBAFormat || type !== UnsignedByteType ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconsole.error( 'THREE.WebGLTextures: Unsupported texture color space:', colorSpace );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn image;\n\n\t}\n\n\t//\n\n\tthis.allocateTextureUnit = allocateTextureUnit;\n\tthis.resetTextureUnits = resetTextureUnits;\n\n\tthis.setTexture2D = setTexture2D;\n\tthis.setTexture2DArray = setTexture2DArray;\n\tthis.setTexture3D = setTexture3D;\n\tthis.setTextureCube = setTextureCube;\n\tthis.rebindTextures = rebindTextures;\n\tthis.setupRenderTarget = setupRenderTarget;\n\tthis.updateRenderTargetMipmap = updateRenderTargetMipmap;\n\tthis.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n\tthis.setupDepthRenderbuffer = setupDepthRenderbuffer;\n\tthis.setupFrameBufferTexture = setupFrameBufferTexture;\n\tthis.useMultisampledRTT = useMultisampledRTT;\n\n}\n\nfunction WebGLUtils( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction convert( p, colorSpace = NoColorSpace ) {\n\n\t\tlet extension;\n\n\t\tif ( p === UnsignedByteType ) return gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return gl.UNSIGNED_SHORT_5_5_5_1;\n\n\t\tif ( p === ByteType ) return gl.BYTE;\n\t\tif ( p === ShortType ) return gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return gl.INT;\n\t\tif ( p === UnsignedIntType ) return gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\tif ( isWebGL2 ) return gl.HALF_FLOAT;\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.HALF_FLOAT_OES;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return gl.ALPHA;\n\t\tif ( p === RGBAFormat ) return gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return gl.DEPTH_STENCIL;\n\n\t\t// WebGL 1 sRGB fallback\n\n\t\tif ( p === _SRGBAFormat ) {\n\n\t\t\textension = extensions.get( 'EXT_sRGB' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.SRGB_ALPHA_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// WebGL2 formats.\n\n\t\tif ( p === RedFormat ) return gl.RED;\n\t\tif ( p === RedIntegerFormat ) return gl.RED_INTEGER;\n\t\tif ( p === RGFormat ) return gl.RG;\n\t\tif ( p === RGIntegerFormat ) return gl.RG_INTEGER;\n\t\tif ( p === RGBAIntegerFormat ) return gl.RGBA_INTEGER;\n\n\t\t// S3TC\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\tif ( colorSpace === SRGBColorSpace ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc_srgb' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// PVRTC\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// ETC1\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// ETC2\n\n\t\tif ( p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_ETC2_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;\n\t\t\t\tif ( p === RGBA_ETC2_EAC_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// ASTC\n\n\t\tif ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format ||\n\t\t\tp === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format ||\n\t\t\tp === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format ||\n\t\t\tp === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format ||\n\t\t\tp === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_astc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGBA_ASTC_4x4_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_5x4_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_5x5_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_6x5_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_6x6_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_8x5_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_8x6_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_8x8_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x5_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x6_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x8_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x10_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_12x10_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_12x12_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// BPTC\n\n\t\tif ( p === RGBA_BPTC_Format ) {\n\n\t\t\textension = extensions.get( 'EXT_texture_compression_bptc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGBA_BPTC_Format ) return ( colorSpace === SRGBColorSpace ) ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// RGTC\n\n\t\tif ( p === RED_RGTC1_Format || p === SIGNED_RED_RGTC1_Format || p === RED_GREEN_RGTC2_Format || p === SIGNED_RED_GREEN_RGTC2_Format ) {\n\n\t\t\textension = extensions.get( 'EXT_texture_compression_rgtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;\n\t\t\t\tif ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;\n\t\t\t\tif ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;\n\t\t\t\tif ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\tif ( isWebGL2 ) return gl.UNSIGNED_INT_24_8;\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// if \"p\" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats)\n\n\t\treturn ( gl[ p ] !== undefined ) ? gl[ p ] : null;\n\n\t}\n\n\treturn { convert: convert };\n\n}\n\nclass ArrayCamera extends PerspectiveCamera {\n\n\tconstructor( array = [] ) {\n\n\t\tsuper();\n\n\t\tthis.isArrayCamera = true;\n\n\t\tthis.cameras = array;\n\n\t}\n\n}\n\nclass Group extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isGroup = true;\n\n\t\tthis.type = 'Group';\n\n\t}\n\n}\n\nconst _moveEvent = { type: 'move' };\n\nclass WebXRController {\n\n\tconstructor() {\n\n\t\tthis._targetRay = null;\n\t\tthis._grip = null;\n\t\tthis._hand = null;\n\n\t}\n\n\tgetHandSpace() {\n\n\t\tif ( this._hand === null ) {\n\n\t\t\tthis._hand = new Group();\n\t\t\tthis._hand.matrixAutoUpdate = false;\n\t\t\tthis._hand.visible = false;\n\n\t\t\tthis._hand.joints = {};\n\t\t\tthis._hand.inputState = { pinching: false };\n\n\t\t}\n\n\t\treturn this._hand;\n\n\t}\n\n\tgetTargetRaySpace() {\n\n\t\tif ( this._targetRay === null ) {\n\n\t\t\tthis._targetRay = new Group();\n\t\t\tthis._targetRay.matrixAutoUpdate = false;\n\t\t\tthis._targetRay.visible = false;\n\t\t\tthis._targetRay.hasLinearVelocity = false;\n\t\t\tthis._targetRay.linearVelocity = new Vector3();\n\t\t\tthis._targetRay.hasAngularVelocity = false;\n\t\t\tthis._targetRay.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._targetRay;\n\n\t}\n\n\tgetGripSpace() {\n\n\t\tif ( this._grip === null ) {\n\n\t\t\tthis._grip = new Group();\n\t\t\tthis._grip.matrixAutoUpdate = false;\n\t\t\tthis._grip.visible = false;\n\t\t\tthis._grip.hasLinearVelocity = false;\n\t\t\tthis._grip.linearVelocity = new Vector3();\n\t\t\tthis._grip.hasAngularVelocity = false;\n\t\t\tthis._grip.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._grip;\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.dispatchEvent( event );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tconnect( inputSource ) {\n\n\t\tif ( inputSource && inputSource.hand ) {\n\n\t\t\tconst hand = this._hand;\n\n\t\t\tif ( hand ) {\n\n\t\t\t\tfor ( const inputjoint of inputSource.hand.values() ) {\n\n\t\t\t\t\t// Initialize hand with joints when connected\n\t\t\t\t\tthis._getHandJoint( hand, inputjoint );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.dispatchEvent( { type: 'connected', data: inputSource } );\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect( inputSource ) {\n\n\t\tthis.dispatchEvent( { type: 'disconnected', data: inputSource } );\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.visible = false;\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.visible = false;\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.visible = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tupdate( inputSource, frame, referenceSpace ) {\n\n\t\tlet inputPose = null;\n\t\tlet gripPose = null;\n\t\tlet handPose = null;\n\n\t\tconst targetRay = this._targetRay;\n\t\tconst grip = this._grip;\n\t\tconst hand = this._hand;\n\n\t\tif ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {\n\n\t\t\tif ( hand && inputSource.hand ) {\n\n\t\t\t\thandPose = true;\n\n\t\t\t\tfor ( const inputjoint of inputSource.hand.values() ) {\n\n\t\t\t\t\t// Update the joints groups with the XRJoint poses\n\t\t\t\t\tconst jointPose = frame.getJointPose( inputjoint, referenceSpace );\n\n\t\t\t\t\t// The transform of this joint will be updated with the joint pose on each frame\n\t\t\t\t\tconst joint = this._getHandJoint( hand, inputjoint );\n\n\t\t\t\t\tif ( jointPose !== null ) {\n\n\t\t\t\t\t\tjoint.matrix.fromArray( jointPose.transform.matrix );\n\t\t\t\t\t\tjoint.matrix.decompose( joint.position, joint.rotation, joint.scale );\n\t\t\t\t\t\tjoint.matrixWorldNeedsUpdate = true;\n\t\t\t\t\t\tjoint.jointRadius = jointPose.radius;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tjoint.visible = jointPose !== null;\n\n\t\t\t\t}\n\n\t\t\t\t// Custom events\n\n\t\t\t\t// Check pinchz\n\t\t\t\tconst indexTip = hand.joints[ 'index-finger-tip' ];\n\t\t\t\tconst thumbTip = hand.joints[ 'thumb-tip' ];\n\t\t\t\tconst distance = indexTip.position.distanceTo( thumbTip.position );\n\n\t\t\t\tconst distanceToPinch = 0.02;\n\t\t\t\tconst threshold = 0.005;\n\n\t\t\t\tif ( hand.inputState.pinching && distance > distanceToPinch + threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = false;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchend',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t} else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = true;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchstart',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( grip !== null && inputSource.gripSpace ) {\n\n\t\t\t\t\tgripPose = frame.getPose( inputSource.gripSpace, referenceSpace );\n\n\t\t\t\t\tif ( gripPose !== null ) {\n\n\t\t\t\t\t\tgrip.matrix.fromArray( gripPose.transform.matrix );\n\t\t\t\t\t\tgrip.matrix.decompose( grip.position, grip.rotation, grip.scale );\n\t\t\t\t\t\tgrip.matrixWorldNeedsUpdate = true;\n\n\t\t\t\t\t\tif ( gripPose.linearVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = true;\n\t\t\t\t\t\t\tgrip.linearVelocity.copy( gripPose.linearVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( gripPose.angularVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = true;\n\t\t\t\t\t\t\tgrip.angularVelocity.copy( gripPose.angularVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( targetRay !== null ) {\n\n\t\t\t\tinputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );\n\n\t\t\t\t// Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it\n\t\t\t\tif ( inputPose === null && gripPose !== null ) {\n\n\t\t\t\t\tinputPose = gripPose;\n\n\t\t\t\t}\n\n\t\t\t\tif ( inputPose !== null ) {\n\n\t\t\t\t\ttargetRay.matrix.fromArray( inputPose.transform.matrix );\n\t\t\t\t\ttargetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );\n\t\t\t\t\ttargetRay.matrixWorldNeedsUpdate = true;\n\n\t\t\t\t\tif ( inputPose.linearVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = true;\n\t\t\t\t\t\ttargetRay.linearVelocity.copy( inputPose.linearVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( inputPose.angularVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = true;\n\t\t\t\t\t\ttargetRay.angularVelocity.copy( inputPose.angularVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.dispatchEvent( _moveEvent );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tif ( targetRay !== null ) {\n\n\t\t\ttargetRay.visible = ( inputPose !== null );\n\n\t\t}\n\n\t\tif ( grip !== null ) {\n\n\t\t\tgrip.visible = ( gripPose !== null );\n\n\t\t}\n\n\t\tif ( hand !== null ) {\n\n\t\t\thand.visible = ( handPose !== null );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// private method\n\n\t_getHandJoint( hand, inputjoint ) {\n\n\t\tif ( hand.joints[ inputjoint.jointName ] === undefined ) {\n\n\t\t\tconst joint = new Group();\n\t\t\tjoint.matrixAutoUpdate = false;\n\t\t\tjoint.visible = false;\n\t\t\thand.joints[ inputjoint.jointName ] = joint;\n\n\t\t\thand.add( joint );\n\n\t\t}\n\n\t\treturn hand.joints[ inputjoint.jointName ];\n\n\t}\n\n}\n\nclass DepthTexture extends Texture {\n\n\tconstructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {\n\n\t\tformat = format !== undefined ? format : DepthFormat;\n\n\t\tif ( format !== DepthFormat && format !== DepthStencilFormat ) {\n\n\t\t\tthrow new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' );\n\n\t\t}\n\n\t\tif ( type === undefined && format === DepthFormat ) type = UnsignedIntType;\n\t\tif ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type;\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.isDepthTexture = true;\n\n\t\tthis.image = { width: width, height: height };\n\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\n\t\tthis.flipY = false;\n\t\tthis.generateMipmaps = false;\n\n\t\tthis.compareFunction = null;\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.compareFunction = source.compareFunction;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.compareFunction !== null ) data.compareFunction = this.compareFunction;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass WebXRManager extends EventDispatcher {\n\n\tconstructor( renderer, gl ) {\n\n\t\tsuper();\n\n\t\tconst scope = this;\n\n\t\tlet session = null;\n\n\t\tlet framebufferScaleFactor = 1.0;\n\n\t\tlet referenceSpace = null;\n\t\tlet referenceSpaceType = 'local-floor';\n\t\t// Set default foveation to maximum.\n\t\tlet foveation = 1.0;\n\t\tlet customReferenceSpace = null;\n\n\t\tlet pose = null;\n\t\tlet glBinding = null;\n\t\tlet glProjLayer = null;\n\t\tlet glBaseLayer = null;\n\t\tlet xrFrame = null;\n\t\tconst attributes = gl.getContextAttributes();\n\t\tlet initialRenderTarget = null;\n\t\tlet newRenderTarget = null;\n\n\t\tconst controllers = [];\n\t\tconst controllerInputSources = [];\n\n\t\t//\n\n\t\tconst cameraL = new PerspectiveCamera();\n\t\tcameraL.layers.enable( 1 );\n\t\tcameraL.viewport = new Vector4();\n\n\t\tconst cameraR = new PerspectiveCamera();\n\t\tcameraR.layers.enable( 2 );\n\t\tcameraR.viewport = new Vector4();\n\n\t\tconst cameras = [ cameraL, cameraR ];\n\n\t\tconst cameraXR = new ArrayCamera();\n\t\tcameraXR.layers.enable( 1 );\n\t\tcameraXR.layers.enable( 2 );\n\n\t\tlet _currentDepthNear = null;\n\t\tlet _currentDepthFar = null;\n\n\t\t//\n\n\t\tthis.cameraAutoUpdate = true;\n\t\tthis.enabled = false;\n\n\t\tthis.isPresenting = false;\n\n\t\tthis.getController = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getTargetRaySpace();\n\n\t\t};\n\n\t\tthis.getControllerGrip = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getGripSpace();\n\n\t\t};\n\n\t\tthis.getHand = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getHandSpace();\n\n\t\t};\n\n\t\t//\n\n\t\tfunction onSessionEvent( event ) {\n\n\t\t\tconst controllerIndex = controllerInputSources.indexOf( event.inputSource );\n\n\t\t\tif ( controllerIndex === - 1 ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst controller = controllers[ controllerIndex ];\n\n\t\t\tif ( controller !== undefined ) {\n\n\t\t\t\tcontroller.update( event.inputSource, event.frame, customReferenceSpace || referenceSpace );\n\t\t\t\tcontroller.dispatchEvent( { type: event.type, data: event.inputSource } );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onSessionEnd() {\n\n\t\t\tsession.removeEventListener( 'select', onSessionEvent );\n\t\t\tsession.removeEventListener( 'selectstart', onSessionEvent );\n\t\t\tsession.removeEventListener( 'selectend', onSessionEvent );\n\t\t\tsession.removeEventListener( 'squeeze', onSessionEvent );\n\t\t\tsession.removeEventListener( 'squeezestart', onSessionEvent );\n\t\t\tsession.removeEventListener( 'squeezeend', onSessionEvent );\n\t\t\tsession.removeEventListener( 'end', onSessionEnd );\n\t\t\tsession.removeEventListener( 'inputsourceschange', onInputSourcesChange );\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tconst inputSource = controllerInputSources[ i ];\n\n\t\t\t\tif ( inputSource === null ) continue;\n\n\t\t\t\tcontrollerInputSources[ i ] = null;\n\n\t\t\t\tcontrollers[ i ].disconnect( inputSource );\n\n\t\t\t}\n\n\t\t\t_currentDepthNear = null;\n\t\t\t_currentDepthFar = null;\n\n\t\t\t// restore framebuffer/rendering state\n\n\t\t\trenderer.setRenderTarget( initialRenderTarget );\n\n\t\t\tglBaseLayer = null;\n\t\t\tglProjLayer = null;\n\t\t\tglBinding = null;\n\t\t\tsession = null;\n\t\t\tnewRenderTarget = null;\n\n\t\t\t//\n\n\t\t\tanimation.stop();\n\n\t\t\tscope.isPresenting = false;\n\n\t\t\tscope.dispatchEvent( { type: 'sessionend' } );\n\n\t\t}\n\n\t\tthis.setFramebufferScaleFactor = function ( value ) {\n\n\t\t\tframebufferScaleFactor = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function ( value ) {\n\n\t\t\treferenceSpaceType = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getReferenceSpace = function () {\n\n\t\t\treturn customReferenceSpace || referenceSpace;\n\n\t\t};\n\n\t\tthis.setReferenceSpace = function ( space ) {\n\n\t\t\tcustomReferenceSpace = space;\n\n\t\t};\n\n\t\tthis.getBaseLayer = function () {\n\n\t\t\treturn glProjLayer !== null ? glProjLayer : glBaseLayer;\n\n\t\t};\n\n\t\tthis.getBinding = function () {\n\n\t\t\treturn glBinding;\n\n\t\t};\n\n\t\tthis.getFrame = function () {\n\n\t\t\treturn xrFrame;\n\n\t\t};\n\n\t\tthis.getSession = function () {\n\n\t\t\treturn session;\n\n\t\t};\n\n\t\tthis.setSession = async function ( value ) {\n\n\t\t\tsession = value;\n\n\t\t\tif ( session !== null ) {\n\n\t\t\t\tinitialRenderTarget = renderer.getRenderTarget();\n\n\t\t\t\tsession.addEventListener( 'select', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectstart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeeze', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezestart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezeend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'end', onSessionEnd );\n\t\t\t\tsession.addEventListener( 'inputsourceschange', onInputSourcesChange );\n\n\t\t\t\tif ( attributes.xrCompatible !== true ) {\n\n\t\t\t\t\tawait gl.makeXRCompatible();\n\n\t\t\t\t}\n\n\t\t\t\tif ( ( session.renderState.layers === undefined ) || ( renderer.capabilities.isWebGL2 === false ) ) {\n\n\t\t\t\t\tconst layerInit = {\n\t\t\t\t\t\tantialias: ( session.renderState.layers === undefined ) ? attributes.antialias : true,\n\t\t\t\t\t\talpha: true,\n\t\t\t\t\t\tdepth: attributes.depth,\n\t\t\t\t\t\tstencil: attributes.stencil,\n\t\t\t\t\t\tframebufferScaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\tglBaseLayer = new XRWebGLLayer( session, gl, layerInit );\n\n\t\t\t\t\tsession.updateRenderState( { baseLayer: glBaseLayer } );\n\n\t\t\t\t\tnewRenderTarget = new WebGLRenderTarget(\n\t\t\t\t\t\tglBaseLayer.framebufferWidth,\n\t\t\t\t\t\tglBaseLayer.framebufferHeight,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tformat: RGBAFormat,\n\t\t\t\t\t\t\ttype: UnsignedByteType,\n\t\t\t\t\t\t\tcolorSpace: renderer.outputColorSpace,\n\t\t\t\t\t\t\tstencilBuffer: attributes.stencil\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tlet depthFormat = null;\n\t\t\t\t\tlet depthType = null;\n\t\t\t\t\tlet glDepthFormat = null;\n\n\t\t\t\t\tif ( attributes.depth ) {\n\n\t\t\t\t\t\tglDepthFormat = attributes.stencil ? gl.DEPTH24_STENCIL8 : gl.DEPTH_COMPONENT24;\n\t\t\t\t\t\tdepthFormat = attributes.stencil ? DepthStencilFormat : DepthFormat;\n\t\t\t\t\t\tdepthType = attributes.stencil ? UnsignedInt248Type : UnsignedIntType;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst projectionlayerInit = {\n\t\t\t\t\t\tcolorFormat: gl.RGBA8,\n\t\t\t\t\t\tdepthFormat: glDepthFormat,\n\t\t\t\t\t\tscaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\tglBinding = new XRWebGLBinding( session, gl );\n\n\t\t\t\t\tglProjLayer = glBinding.createProjectionLayer( projectionlayerInit );\n\n\t\t\t\t\tsession.updateRenderState( { layers: [ glProjLayer ] } );\n\n\t\t\t\t\tnewRenderTarget = new WebGLRenderTarget(\n\t\t\t\t\t\tglProjLayer.textureWidth,\n\t\t\t\t\t\tglProjLayer.textureHeight,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tformat: RGBAFormat,\n\t\t\t\t\t\t\ttype: UnsignedByteType,\n\t\t\t\t\t\t\tdepthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ),\n\t\t\t\t\t\t\tstencilBuffer: attributes.stencil,\n\t\t\t\t\t\t\tcolorSpace: renderer.outputColorSpace,\n\t\t\t\t\t\t\tsamples: attributes.antialias ? 4 : 0\n\t\t\t\t\t\t} );\n\n\t\t\t\t\tconst renderTargetProperties = renderer.properties.get( newRenderTarget );\n\t\t\t\t\trenderTargetProperties.__ignoreDepthValues = glProjLayer.ignoreDepthValues;\n\n\t\t\t\t}\n\n\t\t\t\tnewRenderTarget.isXRRenderTarget = true; // TODO Remove this when possible, see #23278\n\n\t\t\t\tthis.setFoveation( foveation );\n\n\t\t\t\tcustomReferenceSpace = null;\n\t\t\t\treferenceSpace = await session.requestReferenceSpace( referenceSpaceType );\n\n\t\t\t\tanimation.setContext( session );\n\t\t\t\tanimation.start();\n\n\t\t\t\tscope.isPresenting = true;\n\n\t\t\t\tscope.dispatchEvent( { type: 'sessionstart' } );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getEnvironmentBlendMode = function () {\n\n\t\t\tif ( session !== null ) {\n\n\t\t\t\treturn session.environmentBlendMode;\n\n\t\t\t}\n\n\t\t};\n\n\t\tfunction onInputSourcesChange( event ) {\n\n\t\t\t// Notify disconnected\n\n\t\t\tfor ( let i = 0; i < event.removed.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.removed[ i ];\n\t\t\t\tconst index = controllerInputSources.indexOf( inputSource );\n\n\t\t\t\tif ( index >= 0 ) {\n\n\t\t\t\t\tcontrollerInputSources[ index ] = null;\n\t\t\t\t\tcontrollers[ index ].disconnect( inputSource );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Notify connected\n\n\t\t\tfor ( let i = 0; i < event.added.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.added[ i ];\n\n\t\t\t\tlet controllerIndex = controllerInputSources.indexOf( inputSource );\n\n\t\t\t\tif ( controllerIndex === - 1 ) {\n\n\t\t\t\t\t// Assign input source a controller that currently has no input source\n\n\t\t\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\t\t\tif ( i >= controllerInputSources.length ) {\n\n\t\t\t\t\t\t\tcontrollerInputSources.push( inputSource );\n\t\t\t\t\t\t\tcontrollerIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t} else if ( controllerInputSources[ i ] === null ) {\n\n\t\t\t\t\t\t\tcontrollerInputSources[ i ] = inputSource;\n\t\t\t\t\t\t\tcontrollerIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// If all controllers do currently receive input we ignore new ones\n\n\t\t\t\t\tif ( controllerIndex === - 1 ) break;\n\n\t\t\t\t}\n\n\t\t\t\tconst controller = controllers[ controllerIndex ];\n\n\t\t\t\tif ( controller ) {\n\n\t\t\t\t\tcontroller.connect( inputSource );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tconst cameraLPos = new Vector3();\n\t\tconst cameraRPos = new Vector3();\n\n\t\t/**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */\n\t\tfunction setProjectionFromUnion( camera, cameraL, cameraR ) {\n\n\t\t\tcameraLPos.setFromMatrixPosition( cameraL.matrixWorld );\n\t\t\tcameraRPos.setFromMatrixPosition( cameraR.matrixWorld );\n\n\t\t\tconst ipd = cameraLPos.distanceTo( cameraRPos );\n\n\t\t\tconst projL = cameraL.projectionMatrix.elements;\n\t\t\tconst projR = cameraR.projectionMatrix.elements;\n\n\t\t\t// VR systems will have identical far and near planes, and\n\t\t\t// most likely identical top and bottom frustum extents.\n\t\t\t// Use the left camera for these values.\n\t\t\tconst near = projL[ 14 ] / ( projL[ 10 ] - 1 );\n\t\t\tconst far = projL[ 14 ] / ( projL[ 10 ] + 1 );\n\t\t\tconst topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ];\n\t\t\tconst bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ];\n\n\t\t\tconst leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ];\n\t\t\tconst rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ];\n\t\t\tconst left = near * leftFov;\n\t\t\tconst right = near * rightFov;\n\n\t\t\t// Calculate the new camera's position offset from the\n\t\t\t// left camera. xOffset should be roughly half `ipd`.\n\t\t\tconst zOffset = ipd / ( - leftFov + rightFov );\n\t\t\tconst xOffset = zOffset * - leftFov;\n\n\t\t\t// TODO: Better way to apply this offset?\n\t\t\tcameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.translateX( xOffset );\n\t\t\tcamera.translateZ( zOffset );\n\t\t\tcamera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t\t// Find the union of the frustum values of the cameras and scale\n\t\t\t// the values so that the near plane's position does not change in world space,\n\t\t\t// although must now be relative to the new union camera.\n\t\t\tconst near2 = near + zOffset;\n\t\t\tconst far2 = far + zOffset;\n\t\t\tconst left2 = left - xOffset;\n\t\t\tconst right2 = right + ( ipd - xOffset );\n\t\t\tconst top2 = topFov * far / far2 * near2;\n\t\t\tconst bottom2 = bottomFov * far / far2 * near2;\n\n\t\t\tcamera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 );\n\t\t\tcamera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert();\n\n\t\t}\n\n\t\tfunction updateCamera( camera, parent ) {\n\n\t\t\tif ( parent === null ) {\n\n\t\t\t\tcamera.matrixWorld.copy( camera.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tcamera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix );\n\n\t\t\t}\n\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t}\n\n\t\tthis.updateCamera = function ( camera ) {\n\n\t\t\tif ( session === null ) return;\n\n\t\t\tcameraXR.near = cameraR.near = cameraL.near = camera.near;\n\t\t\tcameraXR.far = cameraR.far = cameraL.far = camera.far;\n\n\t\t\tif ( _currentDepthNear !== cameraXR.near || _currentDepthFar !== cameraXR.far ) {\n\n\t\t\t\t// Note that the new renderState won't apply until the next frame. See #18320\n\n\t\t\t\tsession.updateRenderState( {\n\t\t\t\t\tdepthNear: cameraXR.near,\n\t\t\t\t\tdepthFar: cameraXR.far\n\t\t\t\t} );\n\n\t\t\t\t_currentDepthNear = cameraXR.near;\n\t\t\t\t_currentDepthFar = cameraXR.far;\n\n\t\t\t}\n\n\t\t\tconst parent = camera.parent;\n\t\t\tconst cameras = cameraXR.cameras;\n\n\t\t\tupdateCamera( cameraXR, parent );\n\n\t\t\tfor ( let i = 0; i < cameras.length; i ++ ) {\n\n\t\t\t\tupdateCamera( cameras[ i ], parent );\n\n\t\t\t}\n\n\t\t\t// update projection matrix for proper view frustum culling\n\n\t\t\tif ( cameras.length === 2 ) {\n\n\t\t\t\tsetProjectionFromUnion( cameraXR, cameraL, cameraR );\n\n\t\t\t} else {\n\n\t\t\t\t// assume single camera setup (AR)\n\n\t\t\t\tcameraXR.projectionMatrix.copy( cameraL.projectionMatrix );\n\n\t\t\t}\n\n\t\t\t// update user camera and its children\n\n\t\t\tupdateUserCamera( camera, cameraXR, parent );\n\n\t\t};\n\n\t\tfunction updateUserCamera( camera, cameraXR, parent ) {\n\n\t\t\tif ( parent === null ) {\n\n\t\t\t\tcamera.matrix.copy( cameraXR.matrixWorld );\n\n\t\t\t} else {\n\n\t\t\t\tcamera.matrix.copy( parent.matrixWorld );\n\t\t\t\tcamera.matrix.invert();\n\t\t\t\tcamera.matrix.multiply( cameraXR.matrixWorld );\n\n\t\t\t}\n\n\t\t\tcamera.matrix.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.updateMatrixWorld( true );\n\n\t\t\tconst children = camera.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tchildren[ i ].updateMatrixWorld( true );\n\n\t\t\t}\n\n\t\t\tcamera.projectionMatrix.copy( cameraXR.projectionMatrix );\n\t\t\tcamera.projectionMatrixInverse.copy( cameraXR.projectionMatrixInverse );\n\n\t\t\tif ( camera.isPerspectiveCamera ) {\n\n\t\t\t\tcamera.fov = RAD2DEG * 2 * Math.atan( 1 / camera.projectionMatrix.elements[ 5 ] );\n\t\t\t\tcamera.zoom = 1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.getCamera = function () {\n\n\t\t\treturn cameraXR;\n\n\t\t};\n\n\t\tthis.getFoveation = function () {\n\n\t\t\tif ( glProjLayer === null && glBaseLayer === null ) {\n\n\t\t\t\treturn undefined;\n\n\t\t\t}\n\n\t\t\treturn foveation;\n\n\t\t};\n\n\t\tthis.setFoveation = function ( value ) {\n\n\t\t\t// 0 = no foveation = full resolution\n\t\t\t// 1 = maximum foveation = the edges render at lower resolution\n\n\t\t\tfoveation = value;\n\n\t\t\tif ( glProjLayer !== null ) {\n\n\t\t\t\tglProjLayer.fixedFoveation = value;\n\n\t\t\t}\n\n\t\t\tif ( glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined ) {\n\n\t\t\t\tglBaseLayer.fixedFoveation = value;\n\n\t\t\t}\n\n\t\t};\n\n\t\t// Animation Loop\n\n\t\tlet onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame( time, frame ) {\n\n\t\t\tpose = frame.getViewerPose( customReferenceSpace || referenceSpace );\n\t\t\txrFrame = frame;\n\n\t\t\tif ( pose !== null ) {\n\n\t\t\t\tconst views = pose.views;\n\n\t\t\t\tif ( glBaseLayer !== null ) {\n\n\t\t\t\t\trenderer.setRenderTargetFramebuffer( newRenderTarget, glBaseLayer.framebuffer );\n\t\t\t\t\trenderer.setRenderTarget( newRenderTarget );\n\n\t\t\t\t}\n\n\t\t\t\tlet cameraXRNeedsUpdate = false;\n\n\t\t\t\t// check if it's necessary to rebuild cameraXR's camera list\n\n\t\t\t\tif ( views.length !== cameraXR.cameras.length ) {\n\n\t\t\t\t\tcameraXR.cameras.length = 0;\n\t\t\t\t\tcameraXRNeedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < views.length; i ++ ) {\n\n\t\t\t\t\tconst view = views[ i ];\n\n\t\t\t\t\tlet viewport = null;\n\n\t\t\t\t\tif ( glBaseLayer !== null ) {\n\n\t\t\t\t\t\tviewport = glBaseLayer.getViewport( view );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst glSubImage = glBinding.getViewSubImage( glProjLayer, view );\n\t\t\t\t\t\tviewport = glSubImage.viewport;\n\n\t\t\t\t\t\t// For side-by-side projection, we only produce a single texture for both eyes.\n\t\t\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\t\t\trenderer.setRenderTargetTextures(\n\t\t\t\t\t\t\t\tnewRenderTarget,\n\t\t\t\t\t\t\t\tglSubImage.colorTexture,\n\t\t\t\t\t\t\t\tglProjLayer.ignoreDepthValues ? undefined : glSubImage.depthStencilTexture );\n\n\t\t\t\t\t\t\trenderer.setRenderTarget( newRenderTarget );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlet camera = cameras[ i ];\n\n\t\t\t\t\tif ( camera === undefined ) {\n\n\t\t\t\t\t\tcamera = new PerspectiveCamera();\n\t\t\t\t\t\tcamera.layers.enable( i );\n\t\t\t\t\t\tcamera.viewport = new Vector4();\n\t\t\t\t\t\tcameras[ i ] = camera;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcamera.matrix.fromArray( view.transform.matrix );\n\t\t\t\t\tcamera.matrix.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\t\t\tcamera.projectionMatrix.fromArray( view.projectionMatrix );\n\t\t\t\t\tcamera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert();\n\t\t\t\t\tcamera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height );\n\n\t\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\t\tcameraXR.matrix.copy( camera.matrix );\n\t\t\t\t\t\tcameraXR.matrix.decompose( cameraXR.position, cameraXR.quaternion, cameraXR.scale );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( cameraXRNeedsUpdate === true ) {\n\n\t\t\t\t\t\tcameraXR.cameras.push( camera );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tconst inputSource = controllerInputSources[ i ];\n\t\t\t\tconst controller = controllers[ i ];\n\n\t\t\t\tif ( inputSource !== null && controller !== undefined ) {\n\n\t\t\t\t\tcontroller.update( inputSource, frame, customReferenceSpace || referenceSpace );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame );\n\n\t\t\tif ( frame.detectedPlanes ) {\n\n\t\t\t\tscope.dispatchEvent( { type: 'planesdetected', data: frame } );\n\n\t\t\t}\n\n\t\t\txrFrame = null;\n\n\t\t}\n\n\t\tconst animation = new WebGLAnimation();\n\n\t\tanimation.setAnimationLoop( onAnimationFrame );\n\n\t\tthis.setAnimationLoop = function ( callback ) {\n\n\t\t\tonAnimationFrameCallback = callback;\n\n\t\t};\n\n\t\tthis.dispose = function () {};\n\n\t}\n\n}\n\nfunction WebGLMaterials( renderer, properties ) {\n\n\tfunction refreshTransformUniform( map, uniform ) {\n\n\t\tif ( map.matrixAutoUpdate === true ) {\n\n\t\t\tmap.updateMatrix();\n\n\t\t}\n\n\t\tuniform.value.copy( map.matrix );\n\n\t}\n\n\tfunction refreshFogUniforms( uniforms, fog ) {\n\n\t\tfog.color.getRGB( uniforms.fogColor.value, getUnlitUniformColorSpace( renderer ) );\n\n\t\tif ( fog.isFog ) {\n\n\t\t\tuniforms.fogNear.value = fog.near;\n\t\t\tuniforms.fogFar.value = fog.far;\n\n\t\t} else if ( fog.isFogExp2 ) {\n\n\t\t\tuniforms.fogDensity.value = fog.density;\n\n\t\t}\n\n\t}\n\n\tfunction refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) {\n\n\t\tif ( material.isMeshBasicMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshLambertMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshToonMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsToon( uniforms, material );\n\n\t\t} else if ( material.isMeshPhongMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsPhong( uniforms, material );\n\n\t\t} else if ( material.isMeshStandardMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsStandard( uniforms, material );\n\n\t\t\tif ( material.isMeshPhysicalMaterial ) {\n\n\t\t\t\trefreshUniformsPhysical( uniforms, material, transmissionRenderTarget );\n\n\t\t\t}\n\n\t\t} else if ( material.isMeshMatcapMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsMatcap( uniforms, material );\n\n\t\t} else if ( material.isMeshDepthMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshDistanceMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsDistance( uniforms, material );\n\n\t\t} else if ( material.isMeshNormalMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isLineBasicMaterial ) {\n\n\t\t\trefreshUniformsLine( uniforms, material );\n\n\t\t\tif ( material.isLineDashedMaterial ) {\n\n\t\t\t\trefreshUniformsDash( uniforms, material );\n\n\t\t\t}\n\n\t\t} else if ( material.isPointsMaterial ) {\n\n\t\t\trefreshUniformsPoints( uniforms, material, pixelRatio, height );\n\n\t\t} else if ( material.isSpriteMaterial ) {\n\n\t\t\trefreshUniformsSprites( uniforms, material );\n\n\t\t} else if ( material.isShadowMaterial ) {\n\n\t\t\tuniforms.color.value.copy( material.color );\n\t\t\tuniforms.opacity.value = material.opacity;\n\n\t\t} else if ( material.isShaderMaterial ) {\n\n\t\t\tmaterial.uniformsNeedUpdate = false; // #15581\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsCommon( uniforms, material ) {\n\n\t\tuniforms.opacity.value = material.opacity;\n\n\t\tif ( material.color ) {\n\n\t\t\tuniforms.diffuse.value.copy( material.color );\n\n\t\t}\n\n\t\tif ( material.emissive ) {\n\n\t\t\tuniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity );\n\n\t\t}\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.mapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t\trefreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform );\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\n\t\t\trefreshTransformUniform( material.bumpMap, uniforms.bumpMapTransform );\n\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\n\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\tuniforms.bumpScale.value *= - 1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\n\t\t\trefreshTransformUniform( material.normalMap, uniforms.normalMapTransform );\n\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\n\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\tuniforms.normalScale.value.negate();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\n\t\t\trefreshTransformUniform( material.displacementMap, uniforms.displacementMapTransform );\n\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t\trefreshTransformUniform( material.emissiveMap, uniforms.emissiveMapTransform );\n\n\t\t}\n\n\t\tif ( material.specularMap ) {\n\n\t\t\tuniforms.specularMap.value = material.specularMap;\n\n\t\t\trefreshTransformUniform( material.specularMap, uniforms.specularMapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaTest > 0 ) {\n\n\t\t\tuniforms.alphaTest.value = material.alphaTest;\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\tuniforms.envMap.value = envMap;\n\n\t\t\tuniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1;\n\n\t\t\tuniforms.reflectivity.value = material.reflectivity;\n\t\t\tuniforms.ior.value = material.ior;\n\t\t\tuniforms.refractionRatio.value = material.refractionRatio;\n\n\t\t}\n\n\t\tif ( material.lightMap ) {\n\n\t\t\tuniforms.lightMap.value = material.lightMap;\n\n\t\t\t// artist-friendly light intensity scaling factor\n\t\t\tconst scaleFactor = ( renderer._useLegacyLights === true ) ? Math.PI : 1;\n\n\t\t\tuniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor;\n\n\t\t\trefreshTransformUniform( material.lightMap, uniforms.lightMapTransform );\n\n\t\t}\n\n\t\tif ( material.aoMap ) {\n\n\t\t\tuniforms.aoMap.value = material.aoMap;\n\t\t\tuniforms.aoMapIntensity.value = material.aoMapIntensity;\n\n\t\t\trefreshTransformUniform( material.aoMap, uniforms.aoMapTransform );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsLine( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.mapTransform );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDash( uniforms, material ) {\n\n\t\tuniforms.dashSize.value = material.dashSize;\n\t\tuniforms.totalSize.value = material.dashSize + material.gapSize;\n\t\tuniforms.scale.value = material.scale;\n\n\t}\n\n\tfunction refreshUniformsPoints( uniforms, material, pixelRatio, height ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.size.value = material.size * pixelRatio;\n\t\tuniforms.scale.value = height * 0.5;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.uvTransform );\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t\trefreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaTest > 0 ) {\n\n\t\t\tuniforms.alphaTest.value = material.alphaTest;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsSprites( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.rotation.value = material.rotation;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.mapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t\trefreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaTest > 0 ) {\n\n\t\t\tuniforms.alphaTest.value = material.alphaTest;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhong( uniforms, material ) {\n\n\t\tuniforms.specular.value.copy( material.specular );\n\t\tuniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 )\n\n\t}\n\n\tfunction refreshUniformsToon( uniforms, material ) {\n\n\t\tif ( material.gradientMap ) {\n\n\t\t\tuniforms.gradientMap.value = material.gradientMap;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsStandard( uniforms, material ) {\n\n\t\tuniforms.metalness.value = material.metalness;\n\n\t\tif ( material.metalnessMap ) {\n\n\t\t\tuniforms.metalnessMap.value = material.metalnessMap;\n\n\t\t\trefreshTransformUniform( material.metalnessMap, uniforms.metalnessMapTransform );\n\n\t\t}\n\n\t\tuniforms.roughness.value = material.roughness;\n\n\t\tif ( material.roughnessMap ) {\n\n\t\t\tuniforms.roughnessMap.value = material.roughnessMap;\n\n\t\t\trefreshTransformUniform( material.roughnessMap, uniforms.roughnessMapTransform );\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\t//uniforms.envMap.value = material.envMap; // part of uniforms common\n\t\t\tuniforms.envMapIntensity.value = material.envMapIntensity;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) {\n\n\t\tuniforms.ior.value = material.ior; // also part of uniforms common\n\n\t\tif ( material.sheen > 0 ) {\n\n\t\t\tuniforms.sheenColor.value.copy( material.sheenColor ).multiplyScalar( material.sheen );\n\n\t\t\tuniforms.sheenRoughness.value = material.sheenRoughness;\n\n\t\t\tif ( material.sheenColorMap ) {\n\n\t\t\t\tuniforms.sheenColorMap.value = material.sheenColorMap;\n\n\t\t\t\trefreshTransformUniform( material.sheenColorMap, uniforms.sheenColorMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.sheenRoughnessMap ) {\n\n\t\t\t\tuniforms.sheenRoughnessMap.value = material.sheenRoughnessMap;\n\n\t\t\t\trefreshTransformUniform( material.sheenRoughnessMap, uniforms.sheenRoughnessMapTransform );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.clearcoat > 0 ) {\n\n\t\t\tuniforms.clearcoat.value = material.clearcoat;\n\t\t\tuniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n\n\t\t\tif ( material.clearcoatMap ) {\n\n\t\t\t\tuniforms.clearcoatMap.value = material.clearcoatMap;\n\n\t\t\t\trefreshTransformUniform( material.clearcoatMap, uniforms.clearcoatMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.clearcoatRoughnessMap ) {\n\n\t\t\t\tuniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n\n\t\t\t\trefreshTransformUniform( material.clearcoatRoughnessMap, uniforms.clearcoatRoughnessMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.clearcoatNormalMap ) {\n\n\t\t\t\tuniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n\n\t\t\t\trefreshTransformUniform( material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform );\n\n\t\t\t\tuniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale );\n\n\t\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\t\tuniforms.clearcoatNormalScale.value.negate();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.iridescence > 0 ) {\n\n\t\t\tuniforms.iridescence.value = material.iridescence;\n\t\t\tuniforms.iridescenceIOR.value = material.iridescenceIOR;\n\t\t\tuniforms.iridescenceThicknessMinimum.value = material.iridescenceThicknessRange[ 0 ];\n\t\t\tuniforms.iridescenceThicknessMaximum.value = material.iridescenceThicknessRange[ 1 ];\n\n\t\t\tif ( material.iridescenceMap ) {\n\n\t\t\t\tuniforms.iridescenceMap.value = material.iridescenceMap;\n\n\t\t\t\trefreshTransformUniform( material.iridescenceMap, uniforms.iridescenceMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.iridescenceThicknessMap ) {\n\n\t\t\t\tuniforms.iridescenceThicknessMap.value = material.iridescenceThicknessMap;\n\n\t\t\t\trefreshTransformUniform( material.iridescenceThicknessMap, uniforms.iridescenceThicknessMapTransform );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.transmission > 0 ) {\n\n\t\t\tuniforms.transmission.value = material.transmission;\n\t\t\tuniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;\n\t\t\tuniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height );\n\n\t\t\tif ( material.transmissionMap ) {\n\n\t\t\t\tuniforms.transmissionMap.value = material.transmissionMap;\n\n\t\t\t\trefreshTransformUniform( material.transmissionMap, uniforms.transmissionMapTransform );\n\n\t\t\t}\n\n\t\t\tuniforms.thickness.value = material.thickness;\n\n\t\t\tif ( material.thicknessMap ) {\n\n\t\t\t\tuniforms.thicknessMap.value = material.thicknessMap;\n\n\t\t\t\trefreshTransformUniform( material.thicknessMap, uniforms.thicknessMapTransform );\n\n\t\t\t}\n\n\t\t\tuniforms.attenuationDistance.value = material.attenuationDistance;\n\t\t\tuniforms.attenuationColor.value.copy( material.attenuationColor );\n\n\t\t}\n\n\t\tif ( material.anisotropy > 0 ) {\n\n\t\t\tuniforms.anisotropyVector.value.set( material.anisotropy * Math.cos( material.anisotropyRotation ), material.anisotropy * Math.sin( material.anisotropyRotation ) );\n\n\t\t\tif ( material.anisotropyMap ) {\n\n\t\t\t\tuniforms.anisotropyMap.value = material.anisotropyMap;\n\n\t\t\t\trefreshTransformUniform( material.anisotropyMap, uniforms.anisotropyMapTransform );\n\n\t\t\t}\n\n\t\t}\n\n\t\tuniforms.specularIntensity.value = material.specularIntensity;\n\t\tuniforms.specularColor.value.copy( material.specularColor );\n\n\t\tif ( material.specularColorMap ) {\n\n\t\t\tuniforms.specularColorMap.value = material.specularColorMap;\n\n\t\t\trefreshTransformUniform( material.specularColorMap, uniforms.specularColorMapTransform );\n\n\t\t}\n\n\t\tif ( material.specularIntensityMap ) {\n\n\t\t\tuniforms.specularIntensityMap.value = material.specularIntensityMap;\n\n\t\t\trefreshTransformUniform( material.specularIntensityMap, uniforms.specularIntensityMapTransform );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsMatcap( uniforms, material ) {\n\n\t\tif ( material.matcap ) {\n\n\t\t\tuniforms.matcap.value = material.matcap;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDistance( uniforms, material ) {\n\n\t\tconst light = properties.get( material ).light;\n\n\t\tuniforms.referencePosition.value.setFromMatrixPosition( light.matrixWorld );\n\t\tuniforms.nearDistance.value = light.shadow.camera.near;\n\t\tuniforms.farDistance.value = light.shadow.camera.far;\n\n\t}\n\n\treturn {\n\t\trefreshFogUniforms: refreshFogUniforms,\n\t\trefreshMaterialUniforms: refreshMaterialUniforms\n\t};\n\n}\n\nfunction WebGLUniformsGroups( gl, info, capabilities, state ) {\n\n\tlet buffers = {};\n\tlet updateList = {};\n\tlet allocatedBindingPoints = [];\n\n\tconst maxBindingPoints = ( capabilities.isWebGL2 ) ? gl.getParameter( gl.MAX_UNIFORM_BUFFER_BINDINGS ) : 0; // binding points are global whereas block indices are per shader program\n\n\tfunction bind( uniformsGroup, program ) {\n\n\t\tconst webglProgram = program.program;\n\t\tstate.uniformBlockBinding( uniformsGroup, webglProgram );\n\n\t}\n\n\tfunction update( uniformsGroup, program ) {\n\n\t\tlet buffer = buffers[ uniformsGroup.id ];\n\n\t\tif ( buffer === undefined ) {\n\n\t\t\tprepareUniformsGroup( uniformsGroup );\n\n\t\t\tbuffer = createBuffer( uniformsGroup );\n\t\t\tbuffers[ uniformsGroup.id ] = buffer;\n\n\t\t\tuniformsGroup.addEventListener( 'dispose', onUniformsGroupsDispose );\n\n\t\t}\n\n\t\t// ensure to update the binding points/block indices mapping for this program\n\n\t\tconst webglProgram = program.program;\n\t\tstate.updateUBOMapping( uniformsGroup, webglProgram );\n\n\t\t// update UBO once per frame\n\n\t\tconst frame = info.render.frame;\n\n\t\tif ( updateList[ uniformsGroup.id ] !== frame ) {\n\n\t\t\tupdateBufferData( uniformsGroup );\n\n\t\t\tupdateList[ uniformsGroup.id ] = frame;\n\n\t\t}\n\n\t}\n\n\tfunction createBuffer( uniformsGroup ) {\n\n\t\t// the setup of an UBO is independent of a particular shader program but global\n\n\t\tconst bindingPointIndex = allocateBindingPointIndex();\n\t\tuniformsGroup.__bindingPointIndex = bindingPointIndex;\n\n\t\tconst buffer = gl.createBuffer();\n\t\tconst size = uniformsGroup.__size;\n\t\tconst usage = uniformsGroup.usage;\n\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, buffer );\n\t\tgl.bufferData( gl.UNIFORM_BUFFER, size, usage );\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, null );\n\t\tgl.bindBufferBase( gl.UNIFORM_BUFFER, bindingPointIndex, buffer );\n\n\t\treturn buffer;\n\n\t}\n\n\tfunction allocateBindingPointIndex() {\n\n\t\tfor ( let i = 0; i < maxBindingPoints; i ++ ) {\n\n\t\t\tif ( allocatedBindingPoints.indexOf( i ) === - 1 ) {\n\n\t\t\t\tallocatedBindingPoints.push( i );\n\t\t\t\treturn i;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconsole.error( 'THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.' );\n\n\t\treturn 0;\n\n\t}\n\n\tfunction updateBufferData( uniformsGroup ) {\n\n\t\tconst buffer = buffers[ uniformsGroup.id ];\n\t\tconst uniforms = uniformsGroup.uniforms;\n\t\tconst cache = uniformsGroup.__cache;\n\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, buffer );\n\n\t\tfor ( let i = 0, il = uniforms.length; i < il; i ++ ) {\n\n\t\t\tconst uniform = uniforms[ i ];\n\n\t\t\t// partly update the buffer if necessary\n\n\t\t\tif ( hasUniformChanged( uniform, i, cache ) === true ) {\n\n\t\t\t\tconst offset = uniform.__offset;\n\n\t\t\t\tconst values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ];\n\n\t\t\t\tlet arrayOffset = 0;\n\n\t\t\t\tfor ( let i = 0; i < values.length; i ++ ) {\n\n\t\t\t\t\tconst value = values[ i ];\n\n\t\t\t\t\tconst info = getUniformSize( value );\n\n\t\t\t\t\tif ( typeof value === 'number' ) {\n\n\t\t\t\t\t\tuniform.__data[ 0 ] = value;\n\t\t\t\t\t\tgl.bufferSubData( gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data );\n\n\t\t\t\t\t} else if ( value.isMatrix3 ) {\n\n\t\t\t\t\t\t// manually converting 3x3 to 3x4\n\n\t\t\t\t\t\tuniform.__data[ 0 ] = value.elements[ 0 ];\n\t\t\t\t\t\tuniform.__data[ 1 ] = value.elements[ 1 ];\n\t\t\t\t\t\tuniform.__data[ 2 ] = value.elements[ 2 ];\n\t\t\t\t\t\tuniform.__data[ 3 ] = value.elements[ 0 ];\n\t\t\t\t\t\tuniform.__data[ 4 ] = value.elements[ 3 ];\n\t\t\t\t\t\tuniform.__data[ 5 ] = value.elements[ 4 ];\n\t\t\t\t\t\tuniform.__data[ 6 ] = value.elements[ 5 ];\n\t\t\t\t\t\tuniform.__data[ 7 ] = value.elements[ 0 ];\n\t\t\t\t\t\tuniform.__data[ 8 ] = value.elements[ 6 ];\n\t\t\t\t\t\tuniform.__data[ 9 ] = value.elements[ 7 ];\n\t\t\t\t\t\tuniform.__data[ 10 ] = value.elements[ 8 ];\n\t\t\t\t\t\tuniform.__data[ 11 ] = value.elements[ 0 ];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tvalue.toArray( uniform.__data, arrayOffset );\n\n\t\t\t\t\t\tarrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tgl.bufferSubData( gl.UNIFORM_BUFFER, offset, uniform.__data );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, null );\n\n\t}\n\n\tfunction hasUniformChanged( uniform, index, cache ) {\n\n\t\tconst value = uniform.value;\n\n\t\tif ( cache[ index ] === undefined ) {\n\n\t\t\t// cache entry does not exist so far\n\n\t\t\tif ( typeof value === 'number' ) {\n\n\t\t\t\tcache[ index ] = value;\n\n\t\t\t} else {\n\n\t\t\t\tconst values = Array.isArray( value ) ? value : [ value ];\n\n\t\t\t\tconst tempValues = [];\n\n\t\t\t\tfor ( let i = 0; i < values.length; i ++ ) {\n\n\t\t\t\t\ttempValues.push( values[ i ].clone() );\n\n\t\t\t\t}\n\n\t\t\t\tcache[ index ] = tempValues;\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\t// compare current value with cached entry\n\n\t\t\tif ( typeof value === 'number' ) {\n\n\t\t\t\tif ( cache[ index ] !== value ) {\n\n\t\t\t\t\tcache[ index ] = value;\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst cachedObjects = Array.isArray( cache[ index ] ) ? cache[ index ] : [ cache[ index ] ];\n\t\t\t\tconst values = Array.isArray( value ) ? value : [ value ];\n\n\t\t\t\tfor ( let i = 0; i < cachedObjects.length; i ++ ) {\n\n\t\t\t\t\tconst cachedObject = cachedObjects[ i ];\n\n\t\t\t\t\tif ( cachedObject.equals( values[ i ] ) === false ) {\n\n\t\t\t\t\t\tcachedObject.copy( values[ i ] );\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tfunction prepareUniformsGroup( uniformsGroup ) {\n\n\t\t// determine total buffer size according to the STD140 layout\n\t\t// Hint: STD140 is the only supported layout in WebGL 2\n\n\t\tconst uniforms = uniformsGroup.uniforms;\n\n\t\tlet offset = 0; // global buffer offset in bytes\n\t\tconst chunkSize = 16; // size of a chunk in bytes\n\t\tlet chunkOffset = 0; // offset within a single chunk in bytes\n\n\t\tfor ( let i = 0, l = uniforms.length; i < l; i ++ ) {\n\n\t\t\tconst uniform = uniforms[ i ];\n\n\t\t\tconst infos = {\n\t\t\t\tboundary: 0, // bytes\n\t\t\t\tstorage: 0 // bytes\n\t\t\t};\n\n\t\t\tconst values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ];\n\n\t\t\tfor ( let j = 0, jl = values.length; j < jl; j ++ ) {\n\n\t\t\t\tconst value = values[ j ];\n\n\t\t\t\tconst info = getUniformSize( value );\n\n\t\t\t\tinfos.boundary += info.boundary;\n\t\t\t\tinfos.storage += info.storage;\n\n\t\t\t}\n\n\t\t\t// the following two properties will be used for partial buffer updates\n\n\t\t\tuniform.__data = new Float32Array( infos.storage / Float32Array.BYTES_PER_ELEMENT );\n\t\t\tuniform.__offset = offset;\n\n\t\t\t//\n\n\t\t\tif ( i > 0 ) {\n\n\t\t\t\tchunkOffset = offset % chunkSize;\n\n\t\t\t\tconst remainingSizeInChunk = chunkSize - chunkOffset;\n\n\t\t\t\t// check for chunk overflow\n\n\t\t\t\tif ( chunkOffset !== 0 && ( remainingSizeInChunk - infos.boundary ) < 0 ) {\n\n\t\t\t\t\t// add padding and adjust offset\n\n\t\t\t\t\toffset += ( chunkSize - chunkOffset );\n\t\t\t\t\tuniform.__offset = offset;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\toffset += infos.storage;\n\n\t\t}\n\n\t\t// ensure correct final padding\n\n\t\tchunkOffset = offset % chunkSize;\n\n\t\tif ( chunkOffset > 0 ) offset += ( chunkSize - chunkOffset );\n\n\t\t//\n\n\t\tuniformsGroup.__size = offset;\n\t\tuniformsGroup.__cache = {};\n\n\t\treturn this;\n\n\t}\n\n\tfunction getUniformSize( value ) {\n\n\t\tconst info = {\n\t\t\tboundary: 0, // bytes\n\t\t\tstorage: 0 // bytes\n\t\t};\n\n\t\t// determine sizes according to STD140\n\n\t\tif ( typeof value === 'number' ) {\n\n\t\t\t// float/int\n\n\t\t\tinfo.boundary = 4;\n\t\t\tinfo.storage = 4;\n\n\t\t} else if ( value.isVector2 ) {\n\n\t\t\t// vec2\n\n\t\t\tinfo.boundary = 8;\n\t\t\tinfo.storage = 8;\n\n\t\t} else if ( value.isVector3 || value.isColor ) {\n\n\t\t\t// vec3\n\n\t\t\tinfo.boundary = 16;\n\t\t\tinfo.storage = 12; // evil: vec3 must start on a 16-byte boundary but it only consumes 12 bytes\n\n\t\t} else if ( value.isVector4 ) {\n\n\t\t\t// vec4\n\n\t\t\tinfo.boundary = 16;\n\t\t\tinfo.storage = 16;\n\n\t\t} else if ( value.isMatrix3 ) {\n\n\t\t\t// mat3 (in STD140 a 3x3 matrix is represented as 3x4)\n\n\t\t\tinfo.boundary = 48;\n\t\t\tinfo.storage = 48;\n\n\t\t} else if ( value.isMatrix4 ) {\n\n\t\t\t// mat4\n\n\t\t\tinfo.boundary = 64;\n\t\t\tinfo.storage = 64;\n\n\t\t} else if ( value.isTexture ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.' );\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Unsupported uniform value type.', value );\n\n\t\t}\n\n\t\treturn info;\n\n\t}\n\n\tfunction onUniformsGroupsDispose( event ) {\n\n\t\tconst uniformsGroup = event.target;\n\n\t\tuniformsGroup.removeEventListener( 'dispose', onUniformsGroupsDispose );\n\n\t\tconst index = allocatedBindingPoints.indexOf( uniformsGroup.__bindingPointIndex );\n\t\tallocatedBindingPoints.splice( index, 1 );\n\n\t\tgl.deleteBuffer( buffers[ uniformsGroup.id ] );\n\n\t\tdelete buffers[ uniformsGroup.id ];\n\t\tdelete updateList[ uniformsGroup.id ];\n\n\t}\n\n\tfunction dispose() {\n\n\t\tfor ( const id in buffers ) {\n\n\t\t\tgl.deleteBuffer( buffers[ id ] );\n\n\t\t}\n\n\t\tallocatedBindingPoints = [];\n\t\tbuffers = {};\n\t\tupdateList = {};\n\n\t}\n\n\treturn {\n\n\t\tbind: bind,\n\t\tupdate: update,\n\n\t\tdispose: dispose\n\n\t};\n\n}\n\nfunction createCanvasElement() {\n\n\tconst canvas = createElementNS( 'canvas' );\n\tcanvas.style.display = 'block';\n\treturn canvas;\n\n}\n\nclass WebGLRenderer {\n\n\tconstructor( parameters = {} ) {\n\n\t\tconst {\n\t\t\tcanvas = createCanvasElement(),\n\t\t\tcontext = null,\n\t\t\tdepth = true,\n\t\t\tstencil = true,\n\t\t\talpha = false,\n\t\t\tantialias = false,\n\t\t\tpremultipliedAlpha = true,\n\t\t\tpreserveDrawingBuffer = false,\n\t\t\tpowerPreference = 'default',\n\t\t\tfailIfMajorPerformanceCaveat = false,\n\t\t} = parameters;\n\n\t\tthis.isWebGLRenderer = true;\n\n\t\tlet _alpha;\n\n\t\tif ( context !== null ) {\n\n\t\t\t_alpha = context.getContextAttributes().alpha;\n\n\t\t} else {\n\n\t\t\t_alpha = alpha;\n\n\t\t}\n\n\t\tconst uintClearColor = new Uint32Array( 4 );\n\t\tconst intClearColor = new Int32Array( 4 );\n\n\t\tlet currentRenderList = null;\n\t\tlet currentRenderState = null;\n\n\t\t// render() can be called from within a callback triggered by another render.\n\t\t// We track this so that the nested render call gets its list and state isolated from the parent render call.\n\n\t\tconst renderListStack = [];\n\t\tconst renderStateStack = [];\n\n\t\t// public properties\n\n\t\tthis.domElement = canvas;\n\n\t\t// Debug configuration container\n\t\tthis.debug = {\n\n\t\t\t/**\n\t\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tcheckShaderErrors: true,\n\t\t\t/**\n\t\t\t * Callback for custom error reporting.\n\t\t\t * @type {?Function}\n\t\t\t */\n\t\t\tonShaderError: null\n\t\t};\n\n\t\t// clearing\n\n\t\tthis.autoClear = true;\n\t\tthis.autoClearColor = true;\n\t\tthis.autoClearDepth = true;\n\t\tthis.autoClearStencil = true;\n\n\t\t// scene graph\n\n\t\tthis.sortObjects = true;\n\n\t\t// user-defined clipping\n\n\t\tthis.clippingPlanes = [];\n\t\tthis.localClippingEnabled = false;\n\n\t\t// physically based shading\n\n\t\tthis.outputColorSpace = SRGBColorSpace;\n\n\t\t// physical lights\n\n\t\tthis._useLegacyLights = false;\n\n\t\t// tone mapping\n\n\t\tthis.toneMapping = NoToneMapping;\n\t\tthis.toneMappingExposure = 1.0;\n\n\t\t// internal properties\n\n\t\tconst _this = this;\n\n\t\tlet _isContextLost = false;\n\n\t\t// internal state cache\n\n\t\tlet _currentActiveCubeFace = 0;\n\t\tlet _currentActiveMipmapLevel = 0;\n\t\tlet _currentRenderTarget = null;\n\t\tlet _currentMaterialId = - 1;\n\n\t\tlet _currentCamera = null;\n\n\t\tconst _currentViewport = new Vector4();\n\t\tconst _currentScissor = new Vector4();\n\t\tlet _currentScissorTest = null;\n\n\t\tconst _currentClearColor = new Color( 0x000000 );\n\t\tlet _currentClearAlpha = 0;\n\n\t\t//\n\n\t\tlet _width = canvas.width;\n\t\tlet _height = canvas.height;\n\n\t\tlet _pixelRatio = 1;\n\t\tlet _opaqueSort = null;\n\t\tlet _transparentSort = null;\n\n\t\tconst _viewport = new Vector4( 0, 0, _width, _height );\n\t\tconst _scissor = new Vector4( 0, 0, _width, _height );\n\t\tlet _scissorTest = false;\n\n\t\t// frustum\n\n\t\tconst _frustum = new Frustum();\n\n\t\t// clipping\n\n\t\tlet _clippingEnabled = false;\n\t\tlet _localClippingEnabled = false;\n\n\t\t// transmission\n\n\t\tlet _transmissionRenderTarget = null;\n\n\t\t// camera matrices cache\n\n\t\tconst _projScreenMatrix = new Matrix4();\n\n\t\tconst _vector2 = new Vector2();\n\t\tconst _vector3 = new Vector3();\n\n\t\tconst _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };\n\n\t\tfunction getTargetPixelRatio() {\n\n\t\t\treturn _currentRenderTarget === null ? _pixelRatio : 1;\n\n\t\t}\n\n\t\t// initialize\n\n\t\tlet _gl = context;\n\n\t\tfunction getContext( contextNames, contextAttributes ) {\n\n\t\t\tfor ( let i = 0; i < contextNames.length; i ++ ) {\n\n\t\t\t\tconst contextName = contextNames[ i ];\n\t\t\t\tconst context = canvas.getContext( contextName, contextAttributes );\n\t\t\t\tif ( context !== null ) return context;\n\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tconst contextAttributes = {\n\t\t\t\talpha: true,\n\t\t\t\tdepth,\n\t\t\t\tstencil,\n\t\t\t\tantialias,\n\t\t\t\tpremultipliedAlpha,\n\t\t\t\tpreserveDrawingBuffer,\n\t\t\t\tpowerPreference,\n\t\t\t\tfailIfMajorPerformanceCaveat,\n\t\t\t};\n\n\t\t\t// OffscreenCanvas does not have setAttribute, see #22811\n\t\t\tif ( 'setAttribute' in canvas ) canvas.setAttribute( 'data-engine', `three.js r${REVISION}` );\n\n\t\t\t// event listeners must be registered before WebGL context is created, see #12753\n\t\t\tcanvas.addEventListener( 'webglcontextlost', onContextLost, false );\n\t\t\tcanvas.addEventListener( 'webglcontextrestored', onContextRestore, false );\n\t\t\tcanvas.addEventListener( 'webglcontextcreationerror', onContextCreationError, false );\n\n\t\t\tif ( _gl === null ) {\n\n\t\t\t\tconst contextNames = [ 'webgl2', 'webgl', 'experimental-webgl' ];\n\n\t\t\t\tif ( _this.isWebGL1Renderer === true ) {\n\n\t\t\t\t\tcontextNames.shift();\n\n\t\t\t\t}\n\n\t\t\t\t_gl = getContext( contextNames, contextAttributes );\n\n\t\t\t\tif ( _gl === null ) {\n\n\t\t\t\t\tif ( getContext( contextNames ) ) {\n\n\t\t\t\t\t\tthrow new Error( 'Error creating WebGL context with your selected attributes.' );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthrow new Error( 'Error creating WebGL context.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( typeof WebGLRenderingContext !== 'undefined' && _gl instanceof WebGLRenderingContext ) { // @deprecated, r153\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163.' );\n\n\t\t\t}\n\n\t\t\t// Some experimental-webgl implementations do not have getShaderPrecisionFormat\n\n\t\t\tif ( _gl.getShaderPrecisionFormat === undefined ) {\n\n\t\t\t\t_gl.getShaderPrecisionFormat = function () {\n\n\t\t\t\t\treturn { 'rangeMin': 1, 'rangeMax': 1, 'precision': 1 };\n\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer: ' + error.message );\n\t\t\tthrow error;\n\n\t\t}\n\n\t\tlet extensions, capabilities, state, info;\n\t\tlet properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects;\n\t\tlet programCache, materials, renderLists, renderStates, clipping, shadowMap;\n\n\t\tlet background, morphtargets, bufferRenderer, indexedBufferRenderer;\n\n\t\tlet utils, bindingStates, uniformsGroups;\n\n\t\tfunction initGLContext() {\n\n\t\t\textensions = new WebGLExtensions( _gl );\n\n\t\t\tcapabilities = new WebGLCapabilities( _gl, extensions, parameters );\n\n\t\t\textensions.init( capabilities );\n\n\t\t\tutils = new WebGLUtils( _gl, extensions, capabilities );\n\n\t\t\tstate = new WebGLState( _gl, extensions, capabilities );\n\n\t\t\tinfo = new WebGLInfo( _gl );\n\t\t\tproperties = new WebGLProperties();\n\t\t\ttextures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );\n\t\t\tcubemaps = new WebGLCubeMaps( _this );\n\t\t\tcubeuvmaps = new WebGLCubeUVMaps( _this );\n\t\t\tattributes = new WebGLAttributes( _gl, capabilities );\n\t\t\tbindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities );\n\t\t\tgeometries = new WebGLGeometries( _gl, attributes, info, bindingStates );\n\t\t\tobjects = new WebGLObjects( _gl, geometries, attributes, info );\n\t\t\tmorphtargets = new WebGLMorphtargets( _gl, capabilities, textures );\n\t\t\tclipping = new WebGLClipping( properties );\n\t\t\tprogramCache = new WebGLPrograms( _this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping );\n\t\t\tmaterials = new WebGLMaterials( _this, properties );\n\t\t\trenderLists = new WebGLRenderLists();\n\t\t\trenderStates = new WebGLRenderStates( extensions, capabilities );\n\t\t\tbackground = new WebGLBackground( _this, cubemaps, cubeuvmaps, state, objects, _alpha, premultipliedAlpha );\n\t\t\tshadowMap = new WebGLShadowMap( _this, objects, capabilities );\n\t\t\tuniformsGroups = new WebGLUniformsGroups( _gl, info, capabilities, state );\n\n\t\t\tbufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities );\n\t\t\tindexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info, capabilities );\n\n\t\t\tinfo.programs = programCache.programs;\n\n\t\t\t_this.capabilities = capabilities;\n\t\t\t_this.extensions = extensions;\n\t\t\t_this.properties = properties;\n\t\t\t_this.renderLists = renderLists;\n\t\t\t_this.shadowMap = shadowMap;\n\t\t\t_this.state = state;\n\t\t\t_this.info = info;\n\n\t\t}\n\n\t\tinitGLContext();\n\n\t\t// xr\n\n\t\tconst xr = new WebXRManager( _this, _gl );\n\n\t\tthis.xr = xr;\n\n\t\t// API\n\n\t\tthis.getContext = function () {\n\n\t\t\treturn _gl;\n\n\t\t};\n\n\t\tthis.getContextAttributes = function () {\n\n\t\t\treturn _gl.getContextAttributes();\n\n\t\t};\n\n\t\tthis.forceContextLoss = function () {\n\n\t\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\t\tif ( extension ) extension.loseContext();\n\n\t\t};\n\n\t\tthis.forceContextRestore = function () {\n\n\t\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\t\tif ( extension ) extension.restoreContext();\n\n\t\t};\n\n\t\tthis.getPixelRatio = function () {\n\n\t\t\treturn _pixelRatio;\n\n\t\t};\n\n\t\tthis.setPixelRatio = function ( value ) {\n\n\t\t\tif ( value === undefined ) return;\n\n\t\t\t_pixelRatio = value;\n\n\t\t\tthis.setSize( _width, _height, false );\n\n\t\t};\n\n\t\tthis.getSize = function ( target ) {\n\n\t\t\treturn target.set( _width, _height );\n\n\t\t};\n\n\t\tthis.setSize = function ( width, height, updateStyle = true ) {\n\n\t\t\tif ( xr.isPresenting ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Can\\'t change size while VR device is presenting.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\n\t\t\tcanvas.width = Math.floor( width * _pixelRatio );\n\t\t\tcanvas.height = Math.floor( height * _pixelRatio );\n\n\t\t\tif ( updateStyle === true ) {\n\n\t\t\t\tcanvas.style.width = width + 'px';\n\t\t\t\tcanvas.style.height = height + 'px';\n\n\t\t\t}\n\n\t\t\tthis.setViewport( 0, 0, width, height );\n\n\t\t};\n\n\t\tthis.getDrawingBufferSize = function ( target ) {\n\n\t\t\treturn target.set( _width * _pixelRatio, _height * _pixelRatio ).floor();\n\n\t\t};\n\n\t\tthis.setDrawingBufferSize = function ( width, height, pixelRatio ) {\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\n\t\t\t_pixelRatio = pixelRatio;\n\n\t\t\tcanvas.width = Math.floor( width * pixelRatio );\n\t\t\tcanvas.height = Math.floor( height * pixelRatio );\n\n\t\t\tthis.setViewport( 0, 0, width, height );\n\n\t\t};\n\n\t\tthis.getCurrentViewport = function ( target ) {\n\n\t\t\treturn target.copy( _currentViewport );\n\n\t\t};\n\n\t\tthis.getViewport = function ( target ) {\n\n\t\t\treturn target.copy( _viewport );\n\n\t\t};\n\n\t\tthis.setViewport = function ( x, y, width, height ) {\n\n\t\t\tif ( x.isVector4 ) {\n\n\t\t\t\t_viewport.set( x.x, x.y, x.z, x.w );\n\n\t\t\t} else {\n\n\t\t\t\t_viewport.set( x, y, width, height );\n\n\t\t\t}\n\n\t\t\tstate.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );\n\n\t\t};\n\n\t\tthis.getScissor = function ( target ) {\n\n\t\t\treturn target.copy( _scissor );\n\n\t\t};\n\n\t\tthis.setScissor = function ( x, y, width, height ) {\n\n\t\t\tif ( x.isVector4 ) {\n\n\t\t\t\t_scissor.set( x.x, x.y, x.z, x.w );\n\n\t\t\t} else {\n\n\t\t\t\t_scissor.set( x, y, width, height );\n\n\t\t\t}\n\n\t\t\tstate.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );\n\n\t\t};\n\n\t\tthis.getScissorTest = function () {\n\n\t\t\treturn _scissorTest;\n\n\t\t};\n\n\t\tthis.setScissorTest = function ( boolean ) {\n\n\t\t\tstate.setScissorTest( _scissorTest = boolean );\n\n\t\t};\n\n\t\tthis.setOpaqueSort = function ( method ) {\n\n\t\t\t_opaqueSort = method;\n\n\t\t};\n\n\t\tthis.setTransparentSort = function ( method ) {\n\n\t\t\t_transparentSort = method;\n\n\t\t};\n\n\t\t// Clearing\n\n\t\tthis.getClearColor = function ( target ) {\n\n\t\t\treturn target.copy( background.getClearColor() );\n\n\t\t};\n\n\t\tthis.setClearColor = function () {\n\n\t\t\tbackground.setClearColor.apply( background, arguments );\n\n\t\t};\n\n\t\tthis.getClearAlpha = function () {\n\n\t\t\treturn background.getClearAlpha();\n\n\t\t};\n\n\t\tthis.setClearAlpha = function () {\n\n\t\t\tbackground.setClearAlpha.apply( background, arguments );\n\n\t\t};\n\n\t\tthis.clear = function ( color = true, depth = true, stencil = true ) {\n\n\t\t\tlet bits = 0;\n\n\t\t\tif ( color ) {\n\n\t\t\t\t// check if we're trying to clear an integer target\n\t\t\t\tlet isIntegerFormat = false;\n\t\t\t\tif ( _currentRenderTarget !== null ) {\n\n\t\t\t\t\tconst targetFormat = _currentRenderTarget.texture.format;\n\t\t\t\t\tisIntegerFormat = targetFormat === RGBAIntegerFormat ||\n\t\t\t\t\t\ttargetFormat === RGIntegerFormat ||\n\t\t\t\t\t\ttargetFormat === RedIntegerFormat;\n\n\t\t\t\t}\n\n\t\t\t\t// use the appropriate clear functions to clear the target if it's a signed\n\t\t\t\t// or unsigned integer target\n\t\t\t\tif ( isIntegerFormat ) {\n\n\t\t\t\t\tconst targetType = _currentRenderTarget.texture.type;\n\t\t\t\t\tconst isUnsignedType = targetType === UnsignedByteType ||\n\t\t\t\t\t\ttargetType === UnsignedIntType ||\n\t\t\t\t\t\ttargetType === UnsignedShortType ||\n\t\t\t\t\t\ttargetType === UnsignedInt248Type ||\n\t\t\t\t\t\ttargetType === UnsignedShort4444Type ||\n\t\t\t\t\t\ttargetType === UnsignedShort5551Type;\n\n\t\t\t\t\tconst clearColor = background.getClearColor();\n\t\t\t\t\tconst a = background.getClearAlpha();\n\t\t\t\t\tconst r = clearColor.r;\n\t\t\t\t\tconst g = clearColor.g;\n\t\t\t\t\tconst b = clearColor.b;\n\n\t\t\t\t\tif ( isUnsignedType ) {\n\n\t\t\t\t\t\tuintClearColor[ 0 ] = r;\n\t\t\t\t\t\tuintClearColor[ 1 ] = g;\n\t\t\t\t\t\tuintClearColor[ 2 ] = b;\n\t\t\t\t\t\tuintClearColor[ 3 ] = a;\n\t\t\t\t\t\t_gl.clearBufferuiv( _gl.COLOR, 0, uintClearColor );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tintClearColor[ 0 ] = r;\n\t\t\t\t\t\tintClearColor[ 1 ] = g;\n\t\t\t\t\t\tintClearColor[ 2 ] = b;\n\t\t\t\t\t\tintClearColor[ 3 ] = a;\n\t\t\t\t\t\t_gl.clearBufferiv( _gl.COLOR, 0, intClearColor );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbits |= _gl.COLOR_BUFFER_BIT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( depth ) bits |= _gl.DEPTH_BUFFER_BIT;\n\t\t\tif ( stencil ) bits |= _gl.STENCIL_BUFFER_BIT;\n\n\t\t\t_gl.clear( bits );\n\n\t\t};\n\n\t\tthis.clearColor = function () {\n\n\t\t\tthis.clear( true, false, false );\n\n\t\t};\n\n\t\tthis.clearDepth = function () {\n\n\t\t\tthis.clear( false, true, false );\n\n\t\t};\n\n\t\tthis.clearStencil = function () {\n\n\t\t\tthis.clear( false, false, true );\n\n\t\t};\n\n\t\t//\n\n\t\tthis.dispose = function () {\n\n\t\t\tcanvas.removeEventListener( 'webglcontextlost', onContextLost, false );\n\t\t\tcanvas.removeEventListener( 'webglcontextrestored', onContextRestore, false );\n\t\t\tcanvas.removeEventListener( 'webglcontextcreationerror', onContextCreationError, false );\n\n\t\t\trenderLists.dispose();\n\t\t\trenderStates.dispose();\n\t\t\tproperties.dispose();\n\t\t\tcubemaps.dispose();\n\t\t\tcubeuvmaps.dispose();\n\t\t\tobjects.dispose();\n\t\t\tbindingStates.dispose();\n\t\t\tuniformsGroups.dispose();\n\t\t\tprogramCache.dispose();\n\n\t\t\txr.dispose();\n\n\t\t\txr.removeEventListener( 'sessionstart', onXRSessionStart );\n\t\t\txr.removeEventListener( 'sessionend', onXRSessionEnd );\n\n\t\t\tif ( _transmissionRenderTarget ) {\n\n\t\t\t\t_transmissionRenderTarget.dispose();\n\t\t\t\t_transmissionRenderTarget = null;\n\n\t\t\t}\n\n\t\t\tanimation.stop();\n\n\t\t};\n\n\t\t// Events\n\n\t\tfunction onContextLost( event ) {\n\n\t\t\tevent.preventDefault();\n\n\t\t\tconsole.log( 'THREE.WebGLRenderer: Context Lost.' );\n\n\t\t\t_isContextLost = true;\n\n\t\t}\n\n\t\tfunction onContextRestore( /* event */ ) {\n\n\t\t\tconsole.log( 'THREE.WebGLRenderer: Context Restored.' );\n\n\t\t\t_isContextLost = false;\n\n\t\t\tconst infoAutoReset = info.autoReset;\n\t\t\tconst shadowMapEnabled = shadowMap.enabled;\n\t\t\tconst shadowMapAutoUpdate = shadowMap.autoUpdate;\n\t\t\tconst shadowMapNeedsUpdate = shadowMap.needsUpdate;\n\t\t\tconst shadowMapType = shadowMap.type;\n\n\t\t\tinitGLContext();\n\n\t\t\tinfo.autoReset = infoAutoReset;\n\t\t\tshadowMap.enabled = shadowMapEnabled;\n\t\t\tshadowMap.autoUpdate = shadowMapAutoUpdate;\n\t\t\tshadowMap.needsUpdate = shadowMapNeedsUpdate;\n\t\t\tshadowMap.type = shadowMapType;\n\n\t\t}\n\n\t\tfunction onContextCreationError( event ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer: A WebGL context could not be created. Reason: ', event.statusMessage );\n\n\t\t}\n\n\t\tfunction onMaterialDispose( event ) {\n\n\t\t\tconst material = event.target;\n\n\t\t\tmaterial.removeEventListener( 'dispose', onMaterialDispose );\n\n\t\t\tdeallocateMaterial( material );\n\n\t\t}\n\n\t\t// Buffer deallocation\n\n\t\tfunction deallocateMaterial( material ) {\n\n\t\t\treleaseMaterialProgramReferences( material );\n\n\t\t\tproperties.remove( material );\n\n\t\t}\n\n\n\t\tfunction releaseMaterialProgramReferences( material ) {\n\n\t\t\tconst programs = properties.get( material ).programs;\n\n\t\t\tif ( programs !== undefined ) {\n\n\t\t\t\tprograms.forEach( function ( program ) {\n\n\t\t\t\t\tprogramCache.releaseProgram( program );\n\n\t\t\t\t} );\n\n\t\t\t\tif ( material.isShaderMaterial ) {\n\n\t\t\t\t\tprogramCache.releaseShaderCache( material );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Buffer rendering\n\n\t\tthis.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) {\n\n\t\t\tif ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n\n\t\t\tconst frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );\n\n\t\t\tconst program = setProgram( camera, scene, geometry, material, object );\n\n\t\t\tstate.setMaterial( material, frontFaceCW );\n\n\t\t\t//\n\n\t\t\tlet index = geometry.index;\n\t\t\tlet rangeFactor = 1;\n\n\t\t\tif ( material.wireframe === true ) {\n\n\t\t\t\tindex = geometries.getWireframeAttribute( geometry );\n\n\t\t\t\tif ( index === undefined ) return;\n\n\t\t\t\trangeFactor = 2;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tconst drawRange = geometry.drawRange;\n\t\t\tconst position = geometry.attributes.position;\n\n\t\t\tlet drawStart = drawRange.start * rangeFactor;\n\t\t\tlet drawEnd = ( drawRange.start + drawRange.count ) * rangeFactor;\n\n\t\t\tif ( group !== null ) {\n\n\t\t\t\tdrawStart = Math.max( drawStart, group.start * rangeFactor );\n\t\t\t\tdrawEnd = Math.min( drawEnd, ( group.start + group.count ) * rangeFactor );\n\n\t\t\t}\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tdrawStart = Math.max( drawStart, 0 );\n\t\t\t\tdrawEnd = Math.min( drawEnd, index.count );\n\n\t\t\t} else if ( position !== undefined && position !== null ) {\n\n\t\t\t\tdrawStart = Math.max( drawStart, 0 );\n\t\t\t\tdrawEnd = Math.min( drawEnd, position.count );\n\n\t\t\t}\n\n\t\t\tconst drawCount = drawEnd - drawStart;\n\n\t\t\tif ( drawCount < 0 || drawCount === Infinity ) return;\n\n\t\t\t//\n\n\t\t\tbindingStates.setup( object, material, program, geometry, index );\n\n\t\t\tlet attribute;\n\t\t\tlet renderer = bufferRenderer;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tattribute = attributes.get( index );\n\n\t\t\t\trenderer = indexedBufferRenderer;\n\t\t\t\trenderer.setIndex( attribute );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tif ( object.isMesh ) {\n\n\t\t\t\tif ( material.wireframe === true ) {\n\n\t\t\t\t\tstate.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() );\n\t\t\t\t\trenderer.setMode( _gl.LINES );\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderer.setMode( _gl.TRIANGLES );\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isLine ) {\n\n\t\t\t\tlet lineWidth = material.linewidth;\n\n\t\t\t\tif ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material\n\n\t\t\t\tstate.setLineWidth( lineWidth * getTargetPixelRatio() );\n\n\t\t\t\tif ( object.isLineSegments ) {\n\n\t\t\t\t\trenderer.setMode( _gl.LINES );\n\n\t\t\t\t} else if ( object.isLineLoop ) {\n\n\t\t\t\t\trenderer.setMode( _gl.LINE_LOOP );\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderer.setMode( _gl.LINE_STRIP );\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isPoints ) {\n\n\t\t\t\trenderer.setMode( _gl.POINTS );\n\n\t\t\t} else if ( object.isSprite ) {\n\n\t\t\t\trenderer.setMode( _gl.TRIANGLES );\n\n\t\t\t}\n\n\t\t\tif ( object.isInstancedMesh ) {\n\n\t\t\t\trenderer.renderInstances( drawStart, drawCount, object.count );\n\n\t\t\t} else if ( geometry.isInstancedBufferGeometry ) {\n\n\t\t\t\tconst maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;\n\t\t\t\tconst instanceCount = Math.min( geometry.instanceCount, maxInstanceCount );\n\n\t\t\t\trenderer.renderInstances( drawStart, drawCount, instanceCount );\n\n\t\t\t} else {\n\n\t\t\t\trenderer.render( drawStart, drawCount );\n\n\t\t\t}\n\n\t\t};\n\n\t\t// Compile\n\n\t\tthis.compile = function ( scene, camera ) {\n\n\t\t\tfunction prepare( material, scene, object ) {\n\n\t\t\t\tif ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) {\n\n\t\t\t\t\tmaterial.side = BackSide;\n\t\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\t\tmaterial.side = FrontSide;\n\t\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\t\tmaterial.side = DoubleSide;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tcurrentRenderState = renderStates.get( scene );\n\t\t\tcurrentRenderState.init();\n\n\t\t\trenderStateStack.push( currentRenderState );\n\n\t\t\tscene.traverseVisible( function ( object ) {\n\n\t\t\t\tif ( object.isLight && object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tcurrentRenderState.setupLights( _this._useLegacyLights );\n\n\t\t\tscene.traverse( function ( object ) {\n\n\t\t\t\tconst material = object.material;\n\n\t\t\t\tif ( material ) {\n\n\t\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\t\tfor ( let i = 0; i < material.length; i ++ ) {\n\n\t\t\t\t\t\t\tconst material2 = material[ i ];\n\n\t\t\t\t\t\t\tprepare( material2, scene, object );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tprepare( material, scene, object );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\trenderStateStack.pop();\n\t\t\tcurrentRenderState = null;\n\n\t\t};\n\n\t\t// Animation Loop\n\n\t\tlet onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame( time ) {\n\n\t\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time );\n\n\t\t}\n\n\t\tfunction onXRSessionStart() {\n\n\t\t\tanimation.stop();\n\n\t\t}\n\n\t\tfunction onXRSessionEnd() {\n\n\t\t\tanimation.start();\n\n\t\t}\n\n\t\tconst animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop( onAnimationFrame );\n\n\t\tif ( typeof self !== 'undefined' ) animation.setContext( self );\n\n\t\tthis.setAnimationLoop = function ( callback ) {\n\n\t\t\tonAnimationFrameCallback = callback;\n\t\t\txr.setAnimationLoop( callback );\n\n\t\t\t( callback === null ) ? animation.stop() : animation.start();\n\n\t\t};\n\n\t\txr.addEventListener( 'sessionstart', onXRSessionStart );\n\t\txr.addEventListener( 'sessionend', onXRSessionEnd );\n\n\t\t// Rendering\n\n\t\tthis.render = function ( scene, camera ) {\n\n\t\t\tif ( camera !== undefined && camera.isCamera !== true ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif ( _isContextLost === true ) return;\n\n\t\t\t// update scene graph\n\n\t\t\tif ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld();\n\n\t\t\t// update camera matrices and frustum\n\n\t\t\tif ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld();\n\n\t\t\tif ( xr.enabled === true && xr.isPresenting === true ) {\n\n\t\t\t\tif ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );\n\n\t\t\t\tcamera = xr.getCamera(); // use XR camera for rendering\n\n\t\t\t}\n\n\t\t\t//\n\t\t\tif ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget );\n\n\t\t\tcurrentRenderState = renderStates.get( scene, renderStateStack.length );\n\t\t\tcurrentRenderState.init();\n\n\t\t\trenderStateStack.push( currentRenderState );\n\n\t\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\t\t_frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t\t\t_localClippingEnabled = this.localClippingEnabled;\n\t\t\t_clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled );\n\n\t\t\tcurrentRenderList = renderLists.get( scene, renderListStack.length );\n\t\t\tcurrentRenderList.init();\n\n\t\t\trenderListStack.push( currentRenderList );\n\n\t\t\tprojectObject( scene, camera, 0, _this.sortObjects );\n\n\t\t\tcurrentRenderList.finish();\n\n\t\t\tif ( _this.sortObjects === true ) {\n\n\t\t\t\tcurrentRenderList.sort( _opaqueSort, _transparentSort );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tthis.info.render.frame ++;\n\n\t\t\tif ( _clippingEnabled === true ) clipping.beginShadows();\n\n\t\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\t\tshadowMap.render( shadowsArray, scene, camera );\n\n\t\t\tif ( _clippingEnabled === true ) clipping.endShadows();\n\n\t\t\t//\n\n\t\t\tif ( this.info.autoReset === true ) this.info.reset();\n\n\n\t\t\t//\n\n\t\t\tbackground.render( currentRenderList, scene );\n\n\t\t\t// render scene\n\n\t\t\tcurrentRenderState.setupLights( _this._useLegacyLights );\n\n\t\t\tif ( camera.isArrayCamera ) {\n\n\t\t\t\tconst cameras = camera.cameras;\n\n\t\t\t\tfor ( let i = 0, l = cameras.length; i < l; i ++ ) {\n\n\t\t\t\t\tconst camera2 = cameras[ i ];\n\n\t\t\t\t\trenderScene( currentRenderList, scene, camera2, camera2.viewport );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderScene( currentRenderList, scene, camera );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tif ( _currentRenderTarget !== null ) {\n\n\t\t\t\t// resolve multisample renderbuffers to a single-sample texture if necessary\n\n\t\t\t\ttextures.updateMultisampleRenderTarget( _currentRenderTarget );\n\n\t\t\t\t// Generate mipmap if we're using any kind of mipmap filtering\n\n\t\t\t\ttextures.updateRenderTargetMipmap( _currentRenderTarget );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tif ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );\n\n\t\t\t// _gl.finish();\n\n\t\t\tbindingStates.resetDefaultState();\n\t\t\t_currentMaterialId = - 1;\n\t\t\t_currentCamera = null;\n\n\t\t\trenderStateStack.pop();\n\n\t\t\tif ( renderStateStack.length > 0 ) {\n\n\t\t\t\tcurrentRenderState = renderStateStack[ renderStateStack.length - 1 ];\n\n\t\t\t} else {\n\n\t\t\t\tcurrentRenderState = null;\n\n\t\t\t}\n\n\t\t\trenderListStack.pop();\n\n\t\t\tif ( renderListStack.length > 0 ) {\n\n\t\t\t\tcurrentRenderList = renderListStack[ renderListStack.length - 1 ];\n\n\t\t\t} else {\n\n\t\t\t\tcurrentRenderList = null;\n\n\t\t\t}\n\n\t\t};\n\n\t\tfunction projectObject( object, camera, groupOrder, sortObjects ) {\n\n\t\t\tif ( object.visible === false ) return;\n\n\t\t\tconst visible = object.layers.test( camera.layers );\n\n\t\t\tif ( visible ) {\n\n\t\t\t\tif ( object.isGroup ) {\n\n\t\t\t\t\tgroupOrder = object.renderOrder;\n\n\t\t\t\t} else if ( object.isLOD ) {\n\n\t\t\t\t\tif ( object.autoUpdate === true ) object.update( camera );\n\n\t\t\t\t} else if ( object.isLight ) {\n\n\t\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( object.isSprite ) {\n\n\t\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {\n\n\t\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\t\tif ( material.visible ) {\n\n\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( object.isMesh || object.isLine || object.isPoints ) {\n\n\t\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) {\n\n\t\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t\tif ( object.boundingSphere !== undefined ) {\n\n\t\t\t\t\t\t\t\tif ( object.boundingSphere === null ) object.computeBoundingSphere();\n\t\t\t\t\t\t\t\t_vector3.copy( object.boundingSphere.center );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\t\t\t\t\t\t\t\t_vector3.copy( geometry.boundingSphere.center );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_vector3\n\t\t\t\t\t\t\t\t.applyMatrix4( object.matrixWorld )\n\t\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\t\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst children = object.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tprojectObject( children[ i ], camera, groupOrder, sortObjects );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction renderScene( currentRenderList, scene, camera, viewport ) {\n\n\t\t\tconst opaqueObjects = currentRenderList.opaque;\n\t\t\tconst transmissiveObjects = currentRenderList.transmissive;\n\t\t\tconst transparentObjects = currentRenderList.transparent;\n\n\t\t\tcurrentRenderState.setupLightsView( camera );\n\n\t\t\tif ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, camera );\n\n\t\t\tif ( transmissiveObjects.length > 0 ) renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera );\n\n\t\t\tif ( viewport ) state.viewport( _currentViewport.copy( viewport ) );\n\n\t\t\tif ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera );\n\t\t\tif ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera );\n\t\t\tif ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );\n\n\t\t\t// Ensure depth buffer writing is enabled so it can be cleared on next render\n\n\t\t\tstate.buffers.depth.setTest( true );\n\t\t\tstate.buffers.depth.setMask( true );\n\t\t\tstate.buffers.color.setMask( true );\n\n\t\t\tstate.setPolygonOffset( false );\n\n\t\t}\n\n\t\tfunction renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {\n\n\t\t\tconst isWebGL2 = capabilities.isWebGL2;\n\n\t\t\tif ( _transmissionRenderTarget === null ) {\n\n\t\t\t\t_transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {\n\t\t\t\t\tgenerateMipmaps: true,\n\t\t\t\t\ttype: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,\n\t\t\t\t\tminFilter: LinearMipmapLinearFilter,\n\t\t\t\t\tsamples: ( isWebGL2 ) ? 4 : 0\n\t\t\t\t} );\n\n\t\t\t\t// debug\n\n\t\t\t\t/*\n\t\t\t\tconst geometry = new PlaneGeometry();\n\t\t\t\tconst material = new MeshBasicMaterial( { map: _transmissionRenderTarget.texture } );\n\n\t\t\t\tconst mesh = new Mesh( geometry, material );\n\t\t\t\tscene.add( mesh );\n\t\t\t\t*/\n\n\t\t\t}\n\n\t\t\t_this.getDrawingBufferSize( _vector2 );\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t_transmissionRenderTarget.setSize( _vector2.x, _vector2.y );\n\n\t\t\t} else {\n\n\t\t\t\t_transmissionRenderTarget.setSize( floorPowerOfTwo( _vector2.x ), floorPowerOfTwo( _vector2.y ) );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tconst currentRenderTarget = _this.getRenderTarget();\n\t\t\t_this.setRenderTarget( _transmissionRenderTarget );\n\n\t\t\t_this.getClearColor( _currentClearColor );\n\t\t\t_currentClearAlpha = _this.getClearAlpha();\n\t\t\tif ( _currentClearAlpha < 1 ) _this.setClearColor( 0xffffff, 0.5 );\n\n\t\t\t_this.clear();\n\n\t\t\t// Turn off the features which can affect the frag color for opaque objects pass.\n\t\t\t// Otherwise they are applied twice in opaque objects pass and transmission objects pass.\n\t\t\tconst currentToneMapping = _this.toneMapping;\n\t\t\t_this.toneMapping = NoToneMapping;\n\n\t\t\trenderObjects( opaqueObjects, scene, camera );\n\n\t\t\ttextures.updateMultisampleRenderTarget( _transmissionRenderTarget );\n\t\t\ttextures.updateRenderTargetMipmap( _transmissionRenderTarget );\n\n\t\t\tlet renderTargetNeedsUpdate = false;\n\n\t\t\tfor ( let i = 0, l = transmissiveObjects.length; i < l; i ++ ) {\n\n\t\t\t\tconst renderItem = transmissiveObjects[ i ];\n\n\t\t\t\tconst object = renderItem.object;\n\t\t\t\tconst geometry = renderItem.geometry;\n\t\t\t\tconst material = renderItem.material;\n\t\t\t\tconst group = renderItem.group;\n\n\t\t\t\tif ( material.side === DoubleSide && object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\tconst currentSide = material.side;\n\n\t\t\t\t\tmaterial.side = BackSide;\n\t\t\t\t\tmaterial.needsUpdate = true;\n\n\t\t\t\t\trenderObject( object, scene, camera, geometry, material, group );\n\n\t\t\t\t\tmaterial.side = currentSide;\n\t\t\t\t\tmaterial.needsUpdate = true;\n\n\t\t\t\t\trenderTargetNeedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( renderTargetNeedsUpdate === true ) {\n\n\t\t\t\ttextures.updateMultisampleRenderTarget( _transmissionRenderTarget );\n\t\t\t\ttextures.updateRenderTargetMipmap( _transmissionRenderTarget );\n\n\t\t\t}\n\n\t\t\t_this.setRenderTarget( currentRenderTarget );\n\n\t\t\t_this.setClearColor( _currentClearColor, _currentClearAlpha );\n\n\t\t\t_this.toneMapping = currentToneMapping;\n\n\t\t}\n\n\t\tfunction renderObjects( renderList, scene, camera ) {\n\n\t\t\tconst overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\t\tfor ( let i = 0, l = renderList.length; i < l; i ++ ) {\n\n\t\t\t\tconst renderItem = renderList[ i ];\n\n\t\t\t\tconst object = renderItem.object;\n\t\t\t\tconst geometry = renderItem.geometry;\n\t\t\t\tconst material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n\t\t\t\tconst group = renderItem.group;\n\n\t\t\t\tif ( object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\trenderObject( object, scene, camera, geometry, material, group );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction renderObject( object, scene, camera, geometry, material, group ) {\n\n\t\t\tobject.onBeforeRender( _this, scene, camera, geometry, material, group );\n\n\t\t\tobject.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );\n\t\t\tobject.normalMatrix.getNormalMatrix( object.modelViewMatrix );\n\n\t\t\tmaterial.onBeforeRender( _this, scene, camera, geometry, object, group );\n\n\t\t\tif ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) {\n\n\t\t\t\tmaterial.side = BackSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = FrontSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = DoubleSide;\n\n\t\t\t} else {\n\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t}\n\n\t\t\tobject.onAfterRender( _this, scene, camera, geometry, material, group );\n\n\t\t}\n\n\t\tfunction getProgram( material, scene, object ) {\n\n\t\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\tconst materialProperties = properties.get( material );\n\n\t\t\tconst lights = currentRenderState.state.lights;\n\t\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\t\tconst lightsStateVersion = lights.state.version;\n\n\t\t\tconst parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object );\n\t\t\tconst programCacheKey = programCache.getProgramCacheKey( parameters );\n\n\t\t\tlet programs = materialProperties.programs;\n\n\t\t\t// always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change\n\n\t\t\tmaterialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tmaterialProperties.fog = scene.fog;\n\t\t\tmaterialProperties.envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || materialProperties.environment );\n\n\t\t\tif ( programs === undefined ) {\n\n\t\t\t\t// new material\n\n\t\t\t\tmaterial.addEventListener( 'dispose', onMaterialDispose );\n\n\t\t\t\tprograms = new Map();\n\t\t\t\tmaterialProperties.programs = programs;\n\n\t\t\t}\n\n\t\t\tlet program = programs.get( programCacheKey );\n\n\t\t\tif ( program !== undefined ) {\n\n\t\t\t\t// early out if program and light state is identical\n\n\t\t\t\tif ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) {\n\n\t\t\t\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t\t\t\treturn program;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tparameters.uniforms = programCache.getUniforms( material );\n\n\t\t\t\tmaterial.onBuild( object, parameters, _this );\n\n\t\t\t\tmaterial.onBeforeCompile( parameters, _this );\n\n\t\t\t\tprogram = programCache.acquireProgram( parameters, programCacheKey );\n\t\t\t\tprograms.set( programCacheKey, program );\n\n\t\t\t\tmaterialProperties.uniforms = parameters.uniforms;\n\n\t\t\t}\n\n\t\t\tconst uniforms = materialProperties.uniforms;\n\n\t\t\tif ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) {\n\n\t\t\t\tuniforms.clippingPlanes = clipping.uniform;\n\n\t\t\t}\n\n\t\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t\t// store the light setup it was created for\n\n\t\t\tmaterialProperties.needsLights = materialNeedsLights( material );\n\t\t\tmaterialProperties.lightsStateVersion = lightsStateVersion;\n\n\t\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t\t// wire up the material to this renderer's lighting state\n\n\t\t\t\tuniforms.ambientLightColor.value = lights.state.ambient;\n\t\t\t\tuniforms.lightProbe.value = lights.state.probe;\n\t\t\t\tuniforms.directionalLights.value = lights.state.directional;\n\t\t\t\tuniforms.directionalLightShadows.value = lights.state.directionalShadow;\n\t\t\t\tuniforms.spotLights.value = lights.state.spot;\n\t\t\t\tuniforms.spotLightShadows.value = lights.state.spotShadow;\n\t\t\t\tuniforms.rectAreaLights.value = lights.state.rectArea;\n\t\t\t\tuniforms.ltc_1.value = lights.state.rectAreaLTC1;\n\t\t\t\tuniforms.ltc_2.value = lights.state.rectAreaLTC2;\n\t\t\t\tuniforms.pointLights.value = lights.state.point;\n\t\t\t\tuniforms.pointLightShadows.value = lights.state.pointShadow;\n\t\t\t\tuniforms.hemisphereLights.value = lights.state.hemi;\n\n\t\t\t\tuniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n\t\t\t\tuniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n\t\t\t\tuniforms.spotShadowMap.value = lights.state.spotShadowMap;\n\t\t\t\tuniforms.spotLightMatrix.value = lights.state.spotLightMatrix;\n\t\t\t\tuniforms.spotLightMap.value = lights.state.spotLightMap;\n\t\t\t\tuniforms.pointShadowMap.value = lights.state.pointShadowMap;\n\t\t\t\tuniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;\n\t\t\t\t// TODO (abelnation): add area lights shadow info to uniforms\n\n\t\t\t}\n\n\t\t\tconst progUniforms = program.getUniforms();\n\t\t\tconst uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, uniforms );\n\n\t\t\tmaterialProperties.currentProgram = program;\n\t\t\tmaterialProperties.uniformsList = uniformsList;\n\n\t\t\treturn program;\n\n\t\t}\n\n\t\tfunction updateCommonMaterialProperties( material, parameters ) {\n\n\t\t\tconst materialProperties = properties.get( material );\n\n\t\t\tmaterialProperties.outputColorSpace = parameters.outputColorSpace;\n\t\t\tmaterialProperties.instancing = parameters.instancing;\n\t\t\tmaterialProperties.instancingColor = parameters.instancingColor;\n\t\t\tmaterialProperties.skinning = parameters.skinning;\n\t\t\tmaterialProperties.morphTargets = parameters.morphTargets;\n\t\t\tmaterialProperties.morphNormals = parameters.morphNormals;\n\t\t\tmaterialProperties.morphColors = parameters.morphColors;\n\t\t\tmaterialProperties.morphTargetsCount = parameters.morphTargetsCount;\n\t\t\tmaterialProperties.numClippingPlanes = parameters.numClippingPlanes;\n\t\t\tmaterialProperties.numIntersection = parameters.numClipIntersection;\n\t\t\tmaterialProperties.vertexAlphas = parameters.vertexAlphas;\n\t\t\tmaterialProperties.vertexTangents = parameters.vertexTangents;\n\t\t\tmaterialProperties.toneMapping = parameters.toneMapping;\n\n\t\t}\n\n\t\tfunction setProgram( camera, scene, geometry, material, object ) {\n\n\t\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\ttextures.resetTextureUnits();\n\n\t\t\tconst fog = scene.fog;\n\t\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tconst colorSpace = ( _currentRenderTarget === null ) ? _this.outputColorSpace : ( _currentRenderTarget.isXRRenderTarget === true ? _currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace );\n\t\t\tconst envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment );\n\t\t\tconst vertexAlphas = material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4;\n\t\t\tconst vertexTangents = !! geometry.attributes.tangent && ( !! material.normalMap || material.anisotropy > 0 );\n\t\t\tconst morphTargets = !! geometry.morphAttributes.position;\n\t\t\tconst morphNormals = !! geometry.morphAttributes.normal;\n\t\t\tconst morphColors = !! geometry.morphAttributes.color;\n\n\t\t\tlet toneMapping = NoToneMapping;\n\n\t\t\tif ( material.toneMapped ) {\n\n\t\t\t\tif ( _currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true ) {\n\n\t\t\t\t\ttoneMapping = _this.toneMapping;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n\t\t\tconst morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;\n\n\t\t\tconst materialProperties = properties.get( material );\n\t\t\tconst lights = currentRenderState.state.lights;\n\n\t\t\tif ( _clippingEnabled === true ) {\n\n\t\t\t\tif ( _localClippingEnabled === true || camera !== _currentCamera ) {\n\n\t\t\t\t\tconst useCache =\n\t\t\t\t\t\tcamera === _currentCamera &&\n\t\t\t\t\t\tmaterial.id === _currentMaterialId;\n\n\t\t\t\t\t// we might want to call this function with some ClippingGroup\n\t\t\t\t\t// object instead of the material, once it becomes feasible\n\t\t\t\t\t// (#8465, #8379)\n\t\t\t\t\tclipping.setState( material, camera, useCache );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet needsProgramChange = false;\n\n\t\t\tif ( material.version === materialProperties.__version ) {\n\n\t\t\t\tif ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.outputColorSpace !== colorSpace ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancing === false ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isSkinnedMesh && materialProperties.skinning === false ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.envMap !== envMap ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( material.fog === true && materialProperties.fog !== fog ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.numClippingPlanes !== undefined &&\n\t\t\t\t\t( materialProperties.numClippingPlanes !== clipping.numPlanes ||\n\t\t\t\t\tmaterialProperties.numIntersection !== clipping.numIntersection ) ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.vertexAlphas !== vertexAlphas ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.vertexTangents !== vertexTangents ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.morphTargets !== morphTargets ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.morphNormals !== morphNormals ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.morphColors !== morphColors ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.toneMapping !== toneMapping ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( capabilities.isWebGL2 === true && materialProperties.morphTargetsCount !== morphTargetsCount ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tneedsProgramChange = true;\n\t\t\t\tmaterialProperties.__version = material.version;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet program = materialProperties.currentProgram;\n\n\t\t\tif ( needsProgramChange === true ) {\n\n\t\t\t\tprogram = getProgram( material, scene, object );\n\n\t\t\t}\n\n\t\t\tlet refreshProgram = false;\n\t\t\tlet refreshMaterial = false;\n\t\t\tlet refreshLights = false;\n\n\t\t\tconst p_uniforms = program.getUniforms(),\n\t\t\t\tm_uniforms = materialProperties.uniforms;\n\n\t\t\tif ( state.useProgram( program.program ) ) {\n\n\t\t\t\trefreshProgram = true;\n\t\t\t\trefreshMaterial = true;\n\t\t\t\trefreshLights = true;\n\n\t\t\t}\n\n\t\t\tif ( material.id !== _currentMaterialId ) {\n\n\t\t\t\t_currentMaterialId = material.id;\n\n\t\t\t\trefreshMaterial = true;\n\n\t\t\t}\n\n\t\t\tif ( refreshProgram || _currentCamera !== camera ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );\n\n\t\t\t\tif ( capabilities.logarithmicDepthBuffer ) {\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'logDepthBufFC',\n\t\t\t\t\t\t2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( _currentCamera !== camera ) {\n\n\t\t\t\t\t_currentCamera = camera;\n\n\t\t\t\t\t// lighting uniforms depend on the camera so enforce an update\n\t\t\t\t\t// now, in case this material supports lights - or later, when\n\t\t\t\t\t// the next material that does gets activated:\n\n\t\t\t\t\trefreshMaterial = true;\t\t// set to true on material change\n\t\t\t\t\trefreshLights = true;\t\t// remains set until update done\n\n\t\t\t\t}\n\n\t\t\t\t// load material specific uniforms\n\t\t\t\t// (shader material also gets them for the sake of genericity)\n\n\t\t\t\tif ( material.isShaderMaterial ||\n\t\t\t\t\tmaterial.isMeshPhongMaterial ||\n\t\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\t\tmaterial.envMap ) {\n\n\t\t\t\t\tconst uCamPos = p_uniforms.map.cameraPosition;\n\n\t\t\t\t\tif ( uCamPos !== undefined ) {\n\n\t\t\t\t\t\tuCamPos.setValue( _gl,\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition( camera.matrixWorld ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\t\tmaterial.isShaderMaterial ) {\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true );\n\n\t\t\t\t}\n\n\t\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\t\tmaterial.isShaderMaterial ||\n\t\t\t\t\tmaterial.isShadowMaterial ||\n\t\t\t\t\tobject.isSkinnedMesh ) {\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// skinning and morph target uniforms must be set even if material didn't change\n\t\t\t// auto-setting of texture unit for bone and morph texture must go before other textures\n\t\t\t// otherwise textures used for skinning and morphing can take over texture units reserved for other material textures\n\n\t\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrix' );\n\t\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrixInverse' );\n\n\t\t\t\tconst skeleton = object.skeleton;\n\n\t\t\t\tif ( skeleton ) {\n\n\t\t\t\t\tif ( capabilities.floatVertexTextures ) {\n\n\t\t\t\t\t\tif ( skeleton.boneTexture === null ) skeleton.computeBoneTexture();\n\n\t\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures );\n\t\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTextureSize', skeleton.boneTextureSize );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\n\t\t\tif ( morphAttributes.position !== undefined || morphAttributes.normal !== undefined || ( morphAttributes.color !== undefined && capabilities.isWebGL2 === true ) ) {\n\n\t\t\t\tmorphtargets.update( object, geometry, program );\n\n\t\t\t}\n\n\t\t\tif ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) {\n\n\t\t\t\tmaterialProperties.receiveShadow = object.receiveShadow;\n\t\t\t\tp_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow );\n\n\t\t\t}\n\n\t\t\t// https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512\n\n\t\t\tif ( material.isMeshGouraudMaterial && material.envMap !== null ) {\n\n\t\t\t\tm_uniforms.envMap.value = envMap;\n\n\t\t\t\tm_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1;\n\n\t\t\t}\n\n\t\t\tif ( refreshMaterial ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );\n\n\t\t\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t\t\t// the current material requires lighting info\n\n\t\t\t\t\t// note: all lighting uniforms are always set correctly\n\t\t\t\t\t// they simply reference the renderer's state for their\n\t\t\t\t\t// values\n\t\t\t\t\t//\n\t\t\t\t\t// use the current material's .needsUpdate flags to set\n\t\t\t\t\t// the GL state when required\n\n\t\t\t\t\tmarkUniformsLightsNeedsUpdate( m_uniforms, refreshLights );\n\n\t\t\t\t}\n\n\t\t\t\t// refresh uniforms common to several materials\n\n\t\t\t\tif ( fog && material.fog === true ) {\n\n\t\t\t\t\tmaterials.refreshFogUniforms( m_uniforms, fog );\n\n\t\t\t\t}\n\n\t\t\t\tmaterials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget );\n\n\t\t\t\tWebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures );\n\n\t\t\t}\n\n\t\t\tif ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) {\n\n\t\t\t\tWebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures );\n\t\t\t\tmaterial.uniformsNeedUpdate = false;\n\n\t\t\t}\n\n\t\t\tif ( material.isSpriteMaterial ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'center', object.center );\n\n\t\t\t}\n\n\t\t\t// common matrices\n\n\t\t\tp_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix );\n\t\t\tp_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix );\n\t\t\tp_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld );\n\n\t\t\t// UBOs\n\n\t\t\tif ( material.isShaderMaterial || material.isRawShaderMaterial ) {\n\n\t\t\t\tconst groups = material.uniformsGroups;\n\n\t\t\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\t\t\tuniformsGroups.update( group, program );\n\t\t\t\t\t\tuniformsGroups.bind( group, program );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn program;\n\n\t\t}\n\n\t\t// If uniforms are marked as clean, they don't need to be loaded to the GPU.\n\n\t\tfunction markUniformsLightsNeedsUpdate( uniforms, value ) {\n\n\t\t\tuniforms.ambientLightColor.needsUpdate = value;\n\t\t\tuniforms.lightProbe.needsUpdate = value;\n\n\t\t\tuniforms.directionalLights.needsUpdate = value;\n\t\t\tuniforms.directionalLightShadows.needsUpdate = value;\n\t\t\tuniforms.pointLights.needsUpdate = value;\n\t\t\tuniforms.pointLightShadows.needsUpdate = value;\n\t\t\tuniforms.spotLights.needsUpdate = value;\n\t\t\tuniforms.spotLightShadows.needsUpdate = value;\n\t\t\tuniforms.rectAreaLights.needsUpdate = value;\n\t\t\tuniforms.hemisphereLights.needsUpdate = value;\n\n\t\t}\n\n\t\tfunction materialNeedsLights( material ) {\n\n\t\t\treturn material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial || material.isShadowMaterial ||\n\t\t\t\t( material.isShaderMaterial && material.lights === true );\n\n\t\t}\n\n\t\tthis.getActiveCubeFace = function () {\n\n\t\t\treturn _currentActiveCubeFace;\n\n\t\t};\n\n\t\tthis.getActiveMipmapLevel = function () {\n\n\t\t\treturn _currentActiveMipmapLevel;\n\n\t\t};\n\n\t\tthis.getRenderTarget = function () {\n\n\t\t\treturn _currentRenderTarget;\n\n\t\t};\n\n\t\tthis.setRenderTargetTextures = function ( renderTarget, colorTexture, depthTexture ) {\n\n\t\t\tproperties.get( renderTarget.texture ).__webglTexture = colorTexture;\n\t\t\tproperties.get( renderTarget.depthTexture ).__webglTexture = depthTexture;\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\trenderTargetProperties.__hasExternalTextures = true;\n\n\t\t\tif ( renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\t\trenderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined;\n\n\t\t\t\tif ( ! renderTargetProperties.__autoAllocateDepthBuffer ) {\n\n\t\t\t\t\t// The multisample_render_to_texture extension doesn't work properly if there\n\t\t\t\t\t// are midframe flushes and an external depth buffer. Disable use of the extension.\n\t\t\t\t\tif ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' );\n\t\t\t\t\t\trenderTargetProperties.__useRenderToTexture = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setRenderTargetFramebuffer = function ( renderTarget, defaultFramebuffer ) {\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\trenderTargetProperties.__webglFramebuffer = defaultFramebuffer;\n\t\t\trenderTargetProperties.__useDefaultFramebuffer = defaultFramebuffer === undefined;\n\n\t\t};\n\n\t\tthis.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {\n\n\t\t\t_currentRenderTarget = renderTarget;\n\t\t\t_currentActiveCubeFace = activeCubeFace;\n\t\t\t_currentActiveMipmapLevel = activeMipmapLevel;\n\n\t\t\tlet useDefaultFramebuffer = true;\n\t\t\tlet framebuffer = null;\n\t\t\tlet isCube = false;\n\t\t\tlet isRenderTarget3D = false;\n\n\t\t\tif ( renderTarget ) {\n\n\t\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\t\t\tif ( renderTargetProperties.__useDefaultFramebuffer !== undefined ) {\n\n\t\t\t\t\t// We need to make sure to rebind the framebuffer.\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\t\t\t\t\tuseDefaultFramebuffer = false;\n\n\t\t\t\t} else if ( renderTargetProperties.__webglFramebuffer === undefined ) {\n\n\t\t\t\t\ttextures.setupRenderTarget( renderTarget );\n\n\t\t\t\t} else if ( renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\t\t\t// Color and depth texture must be rebound in order for the swapchain to update.\n\t\t\t\t\ttextures.rebindTextures( renderTarget, properties.get( renderTarget.texture ).__webglTexture, properties.get( renderTarget.depthTexture ).__webglTexture );\n\n\t\t\t\t}\n\n\t\t\t\tconst texture = renderTarget.texture;\n\n\t\t\t\tif ( texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {\n\n\t\t\t\t\tisRenderTarget3D = true;\n\n\t\t\t\t}\n\n\t\t\t\tconst __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\t\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\t\t\tif ( Array.isArray( __webglFramebuffer[ activeCubeFace ] ) ) {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer[ activeCubeFace ][ activeMipmapLevel ];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer[ activeCubeFace ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\tisCube = true;\n\n\t\t\t\t} else if ( ( capabilities.isWebGL2 && renderTarget.samples > 0 ) && textures.useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t\tframebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Array.isArray( __webglFramebuffer ) ) {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer[ activeMipmapLevel ];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t_currentViewport.copy( renderTarget.viewport );\n\t\t\t\t_currentScissor.copy( renderTarget.scissor );\n\t\t\t\t_currentScissorTest = renderTarget.scissorTest;\n\n\t\t\t} else {\n\n\t\t\t\t_currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t\t_currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t\t_currentScissorTest = _scissorTest;\n\n\t\t\t}\n\n\t\t\tconst framebufferBound = state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( framebufferBound && capabilities.drawBuffers && useDefaultFramebuffer ) {\n\n\t\t\t\tstate.drawBuffers( renderTarget, framebuffer );\n\n\t\t\t}\n\n\t\t\tstate.viewport( _currentViewport );\n\t\t\tstate.scissor( _currentScissor );\n\t\t\tstate.setScissorTest( _currentScissorTest );\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel );\n\n\t\t\t} else if ( isRenderTarget3D ) {\n\n\t\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\t\tconst layer = activeCubeFace || 0;\n\t\t\t\t_gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer );\n\n\t\t\t}\n\n\t\t\t_currentMaterialId = - 1; // reset current material to ensure correct uniform bindings\n\n\t\t};\n\n\t\tthis.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) {\n\n\t\t\tif ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tlet framebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\t\tif ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) {\n\n\t\t\t\tframebuffer = framebuffer[ activeCubeFaceIndex ];\n\n\t\t\t}\n\n\t\t\tif ( framebuffer ) {\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\t\ttry {\n\n\t\t\t\t\tconst texture = renderTarget.texture;\n\t\t\t\t\tconst textureFormat = texture.format;\n\t\t\t\t\tconst textureType = texture.type;\n\n\t\t\t\t\tif ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.has( 'EXT_color_buffer_float' ) ) );\n\n\t\t\t\t\tif ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513)\n\t\t\t\t\t\t! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float' ) || extensions.has( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox\n\t\t\t\t\t\t! halfFloatSupportedByExt ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n\n\t\t\t\t\tif ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {\n\n\t\t\t\t\t\t_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer );\n\n\t\t\t\t\t}\n\n\t\t\t\t} finally {\n\n\t\t\t\t\t// restore framebuffer of current render target if necessary\n\n\t\t\t\t\tconst framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null;\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.copyFramebufferToTexture = function ( position, texture, level = 0 ) {\n\n\t\t\tconst levelScale = Math.pow( 2, - level );\n\t\t\tconst width = Math.floor( texture.image.width * levelScale );\n\t\t\tconst height = Math.floor( texture.image.height * levelScale );\n\n\t\t\ttextures.setTexture2D( texture, 0 );\n\n\t\t\t_gl.copyTexSubImage2D( _gl.TEXTURE_2D, level, 0, 0, position.x, position.y, width, height );\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) {\n\n\t\t\tconst width = srcTexture.image.width;\n\t\t\tconst height = srcTexture.image.height;\n\t\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\t\tconst glType = utils.convert( dstTexture.type );\n\n\t\t\ttextures.setTexture2D( dstTexture, 0 );\n\n\t\t\t// As another texture upload may have changed pixelStorei\n\t\t\t// parameters, make sure they are correct for the dstTexture\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment );\n\n\t\t\tif ( srcTexture.isDataTexture ) {\n\n\t\t\t\t_gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data );\n\n\t\t\t} else {\n\n\t\t\t\tif ( srcTexture.isCompressedTexture ) {\n\n\t\t\t\t\t_gl.compressedTexSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Generate mipmaps only when copying level 0\n\t\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) {\n\n\t\t\tif ( _this.isWebGL1Renderer ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst width = sourceBox.max.x - sourceBox.min.x + 1;\n\t\t\tconst height = sourceBox.max.y - sourceBox.min.y + 1;\n\t\t\tconst depth = sourceBox.max.z - sourceBox.min.z + 1;\n\t\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\t\tconst glType = utils.convert( dstTexture.type );\n\t\t\tlet glTarget;\n\n\t\t\tif ( dstTexture.isData3DTexture ) {\n\n\t\t\t\ttextures.setTexture3D( dstTexture, 0 );\n\t\t\t\tglTarget = _gl.TEXTURE_3D;\n\n\t\t\t} else if ( dstTexture.isDataArrayTexture ) {\n\n\t\t\t\ttextures.setTexture2DArray( dstTexture, 0 );\n\t\t\t\tglTarget = _gl.TEXTURE_2D_ARRAY;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment );\n\n\t\t\tconst unpackRowLen = _gl.getParameter( _gl.UNPACK_ROW_LENGTH );\n\t\t\tconst unpackImageHeight = _gl.getParameter( _gl.UNPACK_IMAGE_HEIGHT );\n\t\t\tconst unpackSkipPixels = _gl.getParameter( _gl.UNPACK_SKIP_PIXELS );\n\t\t\tconst unpackSkipRows = _gl.getParameter( _gl.UNPACK_SKIP_ROWS );\n\t\t\tconst unpackSkipImages = _gl.getParameter( _gl.UNPACK_SKIP_IMAGES );\n\n\t\t\tconst image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ 0 ] : srcTexture.image;\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, image.width );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, image.height );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, sourceBox.min.x );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, sourceBox.min.y );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, sourceBox.min.z );\n\n\t\t\tif ( srcTexture.isDataTexture || srcTexture.isData3DTexture ) {\n\n\t\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data );\n\n\t\t\t} else {\n\n\t\t\t\tif ( srcTexture.isCompressedArrayTexture ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' );\n\t\t\t\t\t_gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, unpackRowLen );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, unpackSkipPixels );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, unpackSkipRows );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, unpackSkipImages );\n\n\t\t\t// Generate mipmaps only when copying level 0\n\t\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget );\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.initTexture = function ( texture ) {\n\n\t\t\tif ( texture.isCubeTexture ) {\n\n\t\t\t\ttextures.setTextureCube( texture, 0 );\n\n\t\t\t} else if ( texture.isData3DTexture ) {\n\n\t\t\t\ttextures.setTexture3D( texture, 0 );\n\n\t\t\t} else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {\n\n\t\t\t\ttextures.setTexture2DArray( texture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\ttextures.setTexture2D( texture, 0 );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.resetState = function () {\n\n\t\t\t_currentActiveCubeFace = 0;\n\t\t\t_currentActiveMipmapLevel = 0;\n\t\t\t_currentRenderTarget = null;\n\n\t\t\tstate.reset();\n\t\t\tbindingStates.reset();\n\n\t\t};\n\n\t\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );\n\n\t\t}\n\n\t}\n\n\tget coordinateSystem() {\n\n\t\treturn WebGLCoordinateSystem;\n\n\t}\n\n\tget physicallyCorrectLights() { // @deprecated, r150\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );\n\t\treturn ! this.useLegacyLights;\n\n\t}\n\n\tset physicallyCorrectLights( value ) { // @deprecated, r150\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );\n\t\tthis.useLegacyLights = ! value;\n\n\t}\n\n\tget outputEncoding() { // @deprecated, r152\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.' );\n\t\treturn this.outputColorSpace === SRGBColorSpace ? sRGBEncoding : LinearEncoding;\n\n\t}\n\n\tset outputEncoding( encoding ) { // @deprecated, r152\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.' );\n\t\tthis.outputColorSpace = encoding === sRGBEncoding ? SRGBColorSpace : LinearSRGBColorSpace;\n\n\t}\n\n\tget useLegacyLights() { // @deprecated, r155\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' );\n\t\treturn this._useLegacyLights;\n\n\t}\n\n\tset useLegacyLights( value ) { // @deprecated, r155\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' );\n\t\tthis._useLegacyLights = value;\n\n\t}\n\n}\n\nclass WebGL1Renderer extends WebGLRenderer {}\n\nWebGL1Renderer.prototype.isWebGL1Renderer = true;\n\nclass FogExp2 {\n\n\tconstructor( color, density = 0.00025 ) {\n\n\t\tthis.isFogExp2 = true;\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\t\tthis.density = density;\n\n\t}\n\n\tclone() {\n\n\t\treturn new FogExp2( this.color, this.density );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'FogExp2',\n\t\t\tcolor: this.color.getHex(),\n\t\t\tdensity: this.density\n\t\t};\n\n\t}\n\n}\n\nclass Fog {\n\n\tconstructor( color, near = 1, far = 1000 ) {\n\n\t\tthis.isFog = true;\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Fog( this.color, this.near, this.far );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'Fog',\n\t\t\tcolor: this.color.getHex(),\n\t\t\tnear: this.near,\n\t\t\tfar: this.far\n\t\t};\n\n\t}\n\n}\n\nclass Scene extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isScene = true;\n\n\t\tthis.type = 'Scene';\n\n\t\tthis.background = null;\n\t\tthis.environment = null;\n\t\tthis.fog = null;\n\n\t\tthis.backgroundBlurriness = 0;\n\t\tthis.backgroundIntensity = 1;\n\n\t\tthis.overrideMaterial = null;\n\n\t\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.background !== null ) this.background = source.background.clone();\n\t\tif ( source.environment !== null ) this.environment = source.environment.clone();\n\t\tif ( source.fog !== null ) this.fog = source.fog.clone();\n\n\t\tthis.backgroundBlurriness = source.backgroundBlurriness;\n\t\tthis.backgroundIntensity = source.backgroundIntensity;\n\n\t\tif ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.fog !== null ) data.object.fog = this.fog.toJSON();\n\t\tif ( this.backgroundBlurriness > 0 ) data.object.backgroundBlurriness = this.backgroundBlurriness;\n\t\tif ( this.backgroundIntensity !== 1 ) data.object.backgroundIntensity = this.backgroundIntensity;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass InterleavedBuffer {\n\n\tconstructor( array, stride ) {\n\n\t\tthis.isInterleavedBuffer = true;\n\n\t\tthis.array = array;\n\t\tthis.stride = stride;\n\t\tthis.count = array !== undefined ? array.length / stride : 0;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\n\t\tthis.version = 0;\n\n\t\tthis.uuid = generateUUID();\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.count = source.count;\n\t\tthis.stride = source.stride;\n\t\tthis.usage = source.usage;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.stride;\n\t\tindex2 *= attribute.stride;\n\n\t\tfor ( let i = 0, l = this.stride; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer;\n\n\t\t}\n\n\t\tconst array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] );\n\n\t\tconst ib = new this.constructor( array, this.stride );\n\t\tib.setUsage( this.usage );\n\n\t\treturn ib;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\t// generate UUID for array buffer if necessary\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = Array.from( new Uint32Array( this.array.buffer ) );\n\n\t\t}\n\n\t\t//\n\n\t\treturn {\n\t\t\tuuid: this.uuid,\n\t\t\tbuffer: this.array.buffer._uuid,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tstride: this.stride\n\t\t};\n\n\t}\n\n}\n\nconst _vector$5 = /*@__PURE__*/ new Vector3();\n\nclass InterleavedBufferAttribute {\n\n\tconstructor( interleavedBuffer, itemSize, offset, normalized = false ) {\n\n\t\tthis.isInterleavedBufferAttribute = true;\n\n\t\tthis.name = '';\n\n\t\tthis.data = interleavedBuffer;\n\t\tthis.itemSize = itemSize;\n\t\tthis.offset = offset;\n\n\t\tthis.normalized = normalized;\n\n\t}\n\n\tget count() {\n\n\t\treturn this.data.count;\n\n\t}\n\n\tget array() {\n\n\t\treturn this.data.array;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tthis.data.needsUpdate = value;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.data.count; i < l; i ++ ) {\n\n\t\t\t_vector$5.fromBufferAttribute( this, i );\n\n\t\t\t_vector$5.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$5.x, _vector$5.y, _vector$5.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$5.fromBufferAttribute( this, i );\n\n\t\t\t_vector$5.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$5.x, _vector$5.y, _vector$5.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$5.fromBufferAttribute( this, i );\n\n\t\t\t_vector$5.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$5.x, _vector$5.y, _vector$5.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tif ( this.normalized ) x = normalize( x, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tif ( this.normalized ) y = normalize( y, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tif ( this.normalized ) z = normalize( z, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tif ( this.normalized ) w = normalize( w, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\tlet x = this.data.array[ index * this.data.stride + this.offset ];\n\n\t\tif ( this.normalized ) x = denormalize( x, this.array );\n\n\t\treturn x;\n\n\t}\n\n\tgetY( index ) {\n\n\t\tlet y = this.data.array[ index * this.data.stride + this.offset + 1 ];\n\n\t\tif ( this.normalized ) y = denormalize( y, this.array );\n\n\t\treturn y;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\tlet z = this.data.array[ index * this.data.stride + this.offset + 2 ];\n\n\t\tif ( this.normalized ) z = denormalize( z, this.array );\n\n\t\treturn z;\n\n\t}\n\n\tgetW( index ) {\n\n\t\tlet w = this.data.array[ index * this.data.stride + this.offset + 3 ];\n\n\t\tif ( this.normalized ) w = denormalize( w, this.array );\n\n\t\treturn w;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\n\t\t}\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\n\t\t}\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\t\t\tw = normalize( w, this.array );\n\n\t\t}\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\t\tthis.data.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized );\n\n\t\t} else {\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.clone( data );\n\n\t\t\t}\n\n\t\t\treturn new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized );\n\n\t\t}\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// de-interleave data and save it as an ordinary buffer attribute for now\n\n\t\t\treturn {\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tarray: array,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t} else {\n\n\t\t\t// save as true interleaved attribute\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data );\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tisInterleavedBufferAttribute: true,\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\tdata: this.data.uuid,\n\t\t\t\toffset: this.offset,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t}\n\n\t}\n\n}\n\nclass SpriteMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isSpriteMaterial = true;\n\n\t\tthis.type = 'SpriteMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.rotation = 0;\n\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.transparent = true;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nlet _geometry;\n\nconst _intersectPoint = /*@__PURE__*/ new Vector3();\nconst _worldScale = /*@__PURE__*/ new Vector3();\nconst _mvPosition = /*@__PURE__*/ new Vector3();\n\nconst _alignedPosition = /*@__PURE__*/ new Vector2();\nconst _rotatedPosition = /*@__PURE__*/ new Vector2();\nconst _viewWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _vA = /*@__PURE__*/ new Vector3();\nconst _vB = /*@__PURE__*/ new Vector3();\nconst _vC = /*@__PURE__*/ new Vector3();\n\nconst _uvA = /*@__PURE__*/ new Vector2();\nconst _uvB = /*@__PURE__*/ new Vector2();\nconst _uvC = /*@__PURE__*/ new Vector2();\n\nclass Sprite extends Object3D {\n\n\tconstructor( material ) {\n\n\t\tsuper();\n\n\t\tthis.isSprite = true;\n\n\t\tthis.type = 'Sprite';\n\n\t\tif ( _geometry === undefined ) {\n\n\t\t\t_geometry = new BufferGeometry();\n\n\t\t\tconst float32Array = new Float32Array( [\n\t\t\t\t- 0.5, - 0.5, 0, 0, 0,\n\t\t\t\t0.5, - 0.5, 0, 1, 0,\n\t\t\t\t0.5, 0.5, 0, 1, 1,\n\t\t\t\t- 0.5, 0.5, 0, 0, 1\n\t\t\t] );\n\n\t\t\tconst interleavedBuffer = new InterleavedBuffer( float32Array, 5 );\n\n\t\t\t_geometry.setIndex( [ 0, 1, 2,\t0, 2, 3 ] );\n\t\t\t_geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) );\n\t\t\t_geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) );\n\n\t\t}\n\n\t\tthis.geometry = _geometry;\n\t\tthis.material = ( material !== undefined ) ? material : new SpriteMaterial();\n\n\t\tthis.center = new Vector2( 0.5, 0.5 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tif ( raycaster.camera === null ) {\n\n\t\t\tconsole.error( 'THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.' );\n\n\t\t}\n\n\t\t_worldScale.setFromMatrixScale( this.matrixWorld );\n\n\t\t_viewWorldMatrix.copy( raycaster.camera.matrixWorld );\n\t\tthis.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld );\n\n\t\t_mvPosition.setFromMatrixPosition( this.modelViewMatrix );\n\n\t\tif ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) {\n\n\t\t\t_worldScale.multiplyScalar( - _mvPosition.z );\n\n\t\t}\n\n\t\tconst rotation = this.material.rotation;\n\t\tlet sin, cos;\n\n\t\tif ( rotation !== 0 ) {\n\n\t\t\tcos = Math.cos( rotation );\n\t\t\tsin = Math.sin( rotation );\n\n\t\t}\n\n\t\tconst center = this.center;\n\n\t\ttransformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\n\t\t_uvA.set( 0, 0 );\n\t\t_uvB.set( 1, 0 );\n\t\t_uvC.set( 1, 1 );\n\n\t\t// check first triangle\n\t\tlet intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint );\n\n\t\tif ( intersect === null ) {\n\n\t\t\t// check second triangle\n\t\t\ttransformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\t\t_uvB.set( 0, 1 );\n\n\t\t\tintersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );\n\t\t\tif ( intersect === null ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( _intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tpoint: _intersectPoint.clone(),\n\t\t\tuv: Triangle.getInterpolation( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ),\n\t\t\tface: null,\n\t\t\tobject: this\n\n\t\t} );\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.center !== undefined ) this.center.copy( source.center );\n\n\t\tthis.material = source.material;\n\n\t\treturn this;\n\n\t}\n\n}\n\nfunction transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) {\n\n\t// compute position in camera space\n\t_alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale );\n\n\t// to check if rotation is not zero\n\tif ( sin !== undefined ) {\n\n\t\t_rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y );\n\t\t_rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y );\n\n\t} else {\n\n\t\t_rotatedPosition.copy( _alignedPosition );\n\n\t}\n\n\n\tvertexPosition.copy( mvPosition );\n\tvertexPosition.x += _rotatedPosition.x;\n\tvertexPosition.y += _rotatedPosition.y;\n\n\t// transform to world space\n\tvertexPosition.applyMatrix4( _viewWorldMatrix );\n\n}\n\nconst _v1$2 = /*@__PURE__*/ new Vector3();\nconst _v2$1 = /*@__PURE__*/ new Vector3();\n\nclass LOD extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis._currentLevel = 0;\n\n\t\tthis.type = 'LOD';\n\n\t\tObject.defineProperties( this, {\n\t\t\tlevels: {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tisLOD: {\n\t\t\t\tvalue: true,\n\t\t\t}\n\t\t} );\n\n\t\tthis.autoUpdate = true;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tconst levels = source.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tthis.addLevel( level.object.clone(), level.distance, level.hysteresis );\n\n\t\t}\n\n\t\tthis.autoUpdate = source.autoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\taddLevel( object, distance = 0, hysteresis = 0 ) {\n\n\t\tdistance = Math.abs( distance );\n\n\t\tconst levels = this.levels;\n\n\t\tlet l;\n\n\t\tfor ( l = 0; l < levels.length; l ++ ) {\n\n\t\t\tif ( distance < levels[ l ].distance ) {\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlevels.splice( l, 0, { distance: distance, hysteresis: hysteresis, object: object } );\n\n\t\tthis.add( object );\n\n\t\treturn this;\n\n\t}\n\n\tgetCurrentLevel() {\n\n\t\treturn this._currentLevel;\n\n\t}\n\n\n\n\tgetObjectForDistance( distance ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tlet levelDistance = levels[ i ].distance;\n\n\t\t\t\tif ( levels[ i ].object.visible ) {\n\n\t\t\t\t\tlevelDistance -= levelDistance * levels[ i ].hysteresis;\n\n\t\t\t\t}\n\n\t\t\t\tif ( distance < levelDistance ) {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn levels[ i - 1 ].object;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = raycaster.ray.origin.distanceTo( _v1$2 );\n\n\t\t\tthis.getObjectForDistance( distance ).raycast( raycaster, intersects );\n\n\t\t}\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 1 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( camera.matrixWorld );\n\t\t\t_v2$1.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom;\n\n\t\t\tlevels[ 0 ].object.visible = true;\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tlet levelDistance = levels[ i ].distance;\n\n\t\t\t\tif ( levels[ i ].object.visible ) {\n\n\t\t\t\t\tlevelDistance -= levelDistance * levels[ i ].hysteresis;\n\n\t\t\t\t}\n\n\t\t\t\tif ( distance >= levelDistance ) {\n\n\t\t\t\t\tlevels[ i - 1 ].object.visible = false;\n\t\t\t\t\tlevels[ i ].object.visible = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._currentLevel = i - 1;\n\n\t\t\tfor ( ; i < l; i ++ ) {\n\n\t\t\t\tlevels[ i ].object.visible = false;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.autoUpdate === false ) data.object.autoUpdate = false;\n\n\t\tdata.object.levels = [];\n\n\t\tconst levels = this.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tdata.object.levels.push( {\n\t\t\t\tobject: level.object.uuid,\n\t\t\t\tdistance: level.distance,\n\t\t\t\thysteresis: level.hysteresis\n\t\t\t} );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _basePosition = /*@__PURE__*/ new Vector3();\n\nconst _skinIndex = /*@__PURE__*/ new Vector4();\nconst _skinWeight = /*@__PURE__*/ new Vector4();\n\nconst _vector3 = /*@__PURE__*/ new Vector3();\nconst _matrix4 = /*@__PURE__*/ new Matrix4();\nconst _vertex = /*@__PURE__*/ new Vector3();\n\nconst _sphere$3 = /*@__PURE__*/ new Sphere();\nconst _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();\nconst _ray$2 = /*@__PURE__*/ new Ray();\n\nclass SkinnedMesh extends Mesh {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isSkinnedMesh = true;\n\n\t\tthis.type = 'SkinnedMesh';\n\n\t\tthis.bindMode = 'attached';\n\t\tthis.bindMatrix = new Matrix4();\n\t\tthis.bindMatrixInverse = new Matrix4();\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tthis.boundingBox.makeEmpty();\n\n\t\tconst positionAttribute = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0; i < positionAttribute.count; i ++ ) {\n\n\t\t\t_vertex.fromBufferAttribute( positionAttribute, i );\n\t\t\tthis.applyBoneTransform( i, _vertex );\n\t\t\tthis.boundingBox.expandByPoint( _vertex );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tthis.boundingSphere.makeEmpty();\n\n\t\tconst positionAttribute = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0; i < positionAttribute.count; i ++ ) {\n\n\t\t\t_vertex.fromBufferAttribute( positionAttribute, i );\n\t\t\tthis.applyBoneTransform( i, _vertex );\n\t\t\tthis.boundingSphere.expandByPoint( _vertex );\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.bindMode = source.bindMode;\n\t\tthis.bindMatrix.copy( source.bindMatrix );\n\t\tthis.bindMatrixInverse.copy( source.bindMatrixInverse );\n\n\t\tthis.skeleton = source.skeleton;\n\n\t\tif ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone();\n\t\tif ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone();\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst material = this.material;\n\t\tconst matrixWorld = this.matrixWorld;\n\n\t\tif ( material === undefined ) return;\n\n\t\t// test with bounding sphere in world space\n\n\t\tif ( this.boundingSphere === null ) this.computeBoundingSphere();\n\n\t\t_sphere$3.copy( this.boundingSphere );\n\t\t_sphere$3.applyMatrix4( matrixWorld );\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;\n\n\t\t// convert ray to local space of skinned mesh\n\n\t\t_inverseMatrix$2.copy( matrixWorld ).invert();\n\t\t_ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 );\n\n\t\t// test with bounding box in local space\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tif ( _ray$2.intersectsBox( this.boundingBox ) === false ) return;\n\n\t\t}\n\n\t\t// test for intersections with geometry\n\n\t\tthis._computeIntersections( raycaster, intersects, _ray$2 );\n\n\t}\n\n\tgetVertexPosition( index, target ) {\n\n\t\tsuper.getVertexPosition( index, target );\n\n\t\tthis.applyBoneTransform( index, target );\n\n\t\treturn target;\n\n\t}\n\n\tbind( skeleton, bindMatrix ) {\n\n\t\tthis.skeleton = skeleton;\n\n\t\tif ( bindMatrix === undefined ) {\n\n\t\t\tthis.updateMatrixWorld( true );\n\n\t\t\tthis.skeleton.calculateInverses();\n\n\t\t\tbindMatrix = this.matrixWorld;\n\n\t\t}\n\n\t\tthis.bindMatrix.copy( bindMatrix );\n\t\tthis.bindMatrixInverse.copy( bindMatrix ).invert();\n\n\t}\n\n\tpose() {\n\n\t\tthis.skeleton.pose();\n\n\t}\n\n\tnormalizeSkinWeights() {\n\n\t\tconst vector = new Vector4();\n\n\t\tconst skinWeight = this.geometry.attributes.skinWeight;\n\n\t\tfor ( let i = 0, l = skinWeight.count; i < l; i ++ ) {\n\n\t\t\tvector.fromBufferAttribute( skinWeight, i );\n\n\t\t\tconst scale = 1.0 / vector.manhattanLength();\n\n\t\t\tif ( scale !== Infinity ) {\n\n\t\t\t\tvector.multiplyScalar( scale );\n\n\t\t\t} else {\n\n\t\t\t\tvector.set( 1, 0, 0, 0 ); // do something reasonable\n\n\t\t\t}\n\n\t\t\tskinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w );\n\n\t\t}\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.bindMode === 'attached' ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.matrixWorld ).invert();\n\n\t\t} else if ( this.bindMode === 'detached' ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.bindMatrix ).invert();\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );\n\n\t\t}\n\n\t}\n\n\tapplyBoneTransform( index, vector ) {\n\n\t\tconst skeleton = this.skeleton;\n\t\tconst geometry = this.geometry;\n\n\t\t_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );\n\t\t_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );\n\n\t\t_basePosition.copy( vector ).applyMatrix4( this.bindMatrix );\n\n\t\tvector.set( 0, 0, 0 );\n\n\t\tfor ( let i = 0; i < 4; i ++ ) {\n\n\t\t\tconst weight = _skinWeight.getComponent( i );\n\n\t\t\tif ( weight !== 0 ) {\n\n\t\t\t\tconst boneIndex = _skinIndex.getComponent( i );\n\n\t\t\t\t_matrix4.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] );\n\n\t\t\t\tvector.addScaledVector( _vector3.copy( _basePosition ).applyMatrix4( _matrix4 ), weight );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn vector.applyMatrix4( this.bindMatrixInverse );\n\n\t}\n\n\tboneTransform( index, vector ) { // @deprecated, r151\n\n\t\tconsole.warn( 'THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151.' );\n\t\treturn this.applyBoneTransform( index, vector );\n\n\t}\n\n\n}\n\nclass Bone extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isBone = true;\n\n\t\tthis.type = 'Bone';\n\n\t}\n\n}\n\nclass DataTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, colorSpace ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );\n\n\t\tthis.isDataTexture = true;\n\n\t\tthis.image = { data: data, width: width, height: height };\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t}\n\n}\n\nconst _offsetMatrix = /*@__PURE__*/ new Matrix4();\nconst _identityMatrix = /*@__PURE__*/ new Matrix4();\n\nclass Skeleton {\n\n\tconstructor( bones = [], boneInverses = [] ) {\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.bones = bones.slice( 0 );\n\t\tthis.boneInverses = boneInverses;\n\t\tthis.boneMatrices = null;\n\n\t\tthis.boneTexture = null;\n\t\tthis.boneTextureSize = 0;\n\n\t\tthis.init();\n\n\t}\n\n\tinit() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tthis.boneMatrices = new Float32Array( bones.length * 16 );\n\n\t\t// calculate inverse bone matrices if necessary\n\n\t\tif ( boneInverses.length === 0 ) {\n\n\t\t\tthis.calculateInverses();\n\n\t\t} else {\n\n\t\t\t// handle special case\n\n\t\t\tif ( bones.length !== boneInverses.length ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' );\n\n\t\t\t\tthis.boneInverses = [];\n\n\t\t\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\t\t\tthis.boneInverses.push( new Matrix4() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcalculateInverses() {\n\n\t\tthis.boneInverses.length = 0;\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst inverse = new Matrix4();\n\n\t\t\tif ( this.bones[ i ] ) {\n\n\t\t\t\tinverse.copy( this.bones[ i ].matrixWorld ).invert();\n\n\t\t\t}\n\n\t\t\tthis.boneInverses.push( inverse );\n\n\t\t}\n\n\t}\n\n\tpose() {\n\n\t\t// recover the bind-time world matrices\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tbone.matrixWorld.copy( this.boneInverses[ i ] ).invert();\n\n\t\t\t}\n\n\t\t}\n\n\t\t// compute the local matrices, positions, rotations and scales\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t\tbone.matrix.copy( bone.parent.matrixWorld ).invert();\n\t\t\t\t\tbone.matrix.multiply( bone.matrixWorld );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbone.matrix.copy( bone.matrixWorld );\n\n\t\t\t\t}\n\n\t\t\t\tbone.matrix.decompose( bone.position, bone.quaternion, bone.scale );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\t\tconst boneMatrices = this.boneMatrices;\n\t\tconst boneTexture = this.boneTexture;\n\n\t\t// flatten bone matrices to array\n\n\t\tfor ( let i = 0, il = bones.length; i < il; i ++ ) {\n\n\t\t\t// compute the offset between the current and the original transform\n\n\t\t\tconst matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix;\n\n\t\t\t_offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] );\n\t\t\t_offsetMatrix.toArray( boneMatrices, i * 16 );\n\n\t\t}\n\n\t\tif ( boneTexture !== null ) {\n\n\t\t\tboneTexture.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new Skeleton( this.bones, this.boneInverses );\n\n\t}\n\n\tcomputeBoneTexture() {\n\n\t\t// layout (1 matrix = 4 pixels)\n\t\t// RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n\t\t// with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8)\n\t\t// 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16)\n\t\t// 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)\n\t\t// 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n\n\t\tlet size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix\n\t\tsize = ceilPowerOfTwo( size );\n\t\tsize = Math.max( size, 4 );\n\n\t\tconst boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel\n\t\tboneMatrices.set( this.boneMatrices ); // copy current values\n\n\t\tconst boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType );\n\t\tboneTexture.needsUpdate = true;\n\n\t\tthis.boneMatrices = boneMatrices;\n\t\tthis.boneTexture = boneTexture;\n\t\tthis.boneTextureSize = size;\n\n\t\treturn this;\n\n\t}\n\n\tgetBoneByName( name ) {\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone.name === name ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tdispose( ) {\n\n\t\tif ( this.boneTexture !== null ) {\n\n\t\t\tthis.boneTexture.dispose();\n\n\t\t\tthis.boneTexture = null;\n\n\t\t}\n\n\t}\n\n\tfromJSON( json, bones ) {\n\n\t\tthis.uuid = json.uuid;\n\n\t\tfor ( let i = 0, l = json.bones.length; i < l; i ++ ) {\n\n\t\t\tconst uuid = json.bones[ i ];\n\t\t\tlet bone = bones[ uuid ];\n\n\t\t\tif ( bone === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: No bone found with UUID:', uuid );\n\t\t\t\tbone = new Bone();\n\n\t\t\t}\n\n\t\t\tthis.bones.push( bone );\n\t\t\tthis.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) );\n\n\t\t}\n\n\t\tthis.init();\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Skeleton',\n\t\t\t\tgenerator: 'Skeleton.toJSON'\n\t\t\t},\n\t\t\tbones: [],\n\t\t\tboneInverses: []\n\t\t};\n\n\t\tdata.uuid = this.uuid;\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tfor ( let i = 0, l = bones.length; i < l; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\t\t\tdata.bones.push( bone.uuid );\n\n\t\t\tconst boneInverse = boneInverses[ i ];\n\t\t\tdata.boneInverses.push( boneInverse.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass InstancedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized, meshPerAttribute = 1 ) {\n\n\t\tsuper( array, itemSize, normalized );\n\n\t\tthis.isInstancedBufferAttribute = true;\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.meshPerAttribute = this.meshPerAttribute;\n\n\t\tdata.isInstancedBufferAttribute = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _instanceLocalMatrix = /*@__PURE__*/ new Matrix4();\nconst _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _instanceIntersects = [];\n\nconst _box3 = /*@__PURE__*/ new Box3();\nconst _identity = /*@__PURE__*/ new Matrix4();\nconst _mesh = /*@__PURE__*/ new Mesh();\nconst _sphere$2 = /*@__PURE__*/ new Sphere();\n\nclass InstancedMesh extends Mesh {\n\n\tconstructor( geometry, material, count ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isInstancedMesh = true;\n\n\t\tthis.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 );\n\t\tthis.instanceColor = null;\n\n\t\tthis.count = count;\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.setMatrixAt( i, _identity );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst count = this.count;\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\tgeometry.computeBoundingBox();\n\n\t\t}\n\n\t\tthis.boundingBox.makeEmpty();\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.getMatrixAt( i, _instanceLocalMatrix );\n\n\t\t\t_box3.copy( geometry.boundingBox ).applyMatrix4( _instanceLocalMatrix );\n\n\t\t\tthis.boundingBox.union( _box3 );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst count = this.count;\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tif ( geometry.boundingSphere === null ) {\n\n\t\t\tgeometry.computeBoundingSphere();\n\n\t\t}\n\n\t\tthis.boundingSphere.makeEmpty();\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.getMatrixAt( i, _instanceLocalMatrix );\n\n\t\t\t_sphere$2.copy( geometry.boundingSphere ).applyMatrix4( _instanceLocalMatrix );\n\n\t\t\tthis.boundingSphere.union( _sphere$2 );\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.instanceMatrix.copy( source.instanceMatrix );\n\n\t\tif ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();\n\n\t\tthis.count = source.count;\n\n\t\tif ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone();\n\t\tif ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone();\n\n\t\treturn this;\n\n\t}\n\n\tgetColorAt( index, color ) {\n\n\t\tcolor.fromArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tgetMatrixAt( index, matrix ) {\n\n\t\tmatrix.fromArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst raycastTimes = this.count;\n\n\t\t_mesh.geometry = this.geometry;\n\t\t_mesh.material = this.material;\n\n\t\tif ( _mesh.material === undefined ) return;\n\n\t\t// test with bounding sphere first\n\n\t\tif ( this.boundingSphere === null ) this.computeBoundingSphere();\n\n\t\t_sphere$2.copy( this.boundingSphere );\n\t\t_sphere$2.applyMatrix4( matrixWorld );\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$2 ) === false ) return;\n\n\t\t// now test each instance\n\n\t\tfor ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) {\n\n\t\t\t// calculate the world matrix for each instance\n\n\t\t\tthis.getMatrixAt( instanceId, _instanceLocalMatrix );\n\n\t\t\t_instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix );\n\n\t\t\t// the mesh represents this single instance\n\n\t\t\t_mesh.matrixWorld = _instanceWorldMatrix;\n\n\t\t\t_mesh.raycast( raycaster, _instanceIntersects );\n\n\t\t\t// process the result of raycast\n\n\t\t\tfor ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) {\n\n\t\t\t\tconst intersect = _instanceIntersects[ i ];\n\t\t\t\tintersect.instanceId = instanceId;\n\t\t\t\tintersect.object = this;\n\t\t\t\tintersects.push( intersect );\n\n\t\t\t}\n\n\t\t\t_instanceIntersects.length = 0;\n\n\t\t}\n\n\t}\n\n\tsetColorAt( index, color ) {\n\n\t\tif ( this.instanceColor === null ) {\n\n\t\t\tthis.instanceColor = new InstancedBufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ), 3 );\n\n\t\t}\n\n\t\tcolor.toArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tsetMatrixAt( index, matrix ) {\n\n\t\tmatrix.toArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nclass LineBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isLineBasicMaterial = true;\n\n\t\tthis.type = 'LineBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.linewidth = 1;\n\t\tthis.linecap = 'round';\n\t\tthis.linejoin = 'round';\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.linewidth = source.linewidth;\n\t\tthis.linecap = source.linecap;\n\t\tthis.linejoin = source.linejoin;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _start$1 = /*@__PURE__*/ new Vector3();\nconst _end$1 = /*@__PURE__*/ new Vector3();\nconst _inverseMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _ray$1 = /*@__PURE__*/ new Ray();\nconst _sphere$1 = /*@__PURE__*/ new Sphere();\n\nclass Line extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isLine = true;\n\n\t\tthis.type = 'Line';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\t// we assume non-indexed geometry\n\n\t\tif ( geometry.index === null ) {\n\n\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\tconst lineDistances = [ 0 ];\n\n\t\t\tfor ( let i = 1, l = positionAttribute.count; i < l; i ++ ) {\n\n\t\t\t\t_start$1.fromBufferAttribute( positionAttribute, i - 1 );\n\t\t\t\t_end$1.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\tlineDistances[ i ] = lineDistances[ i - 1 ];\n\t\t\t\tlineDistances[ i ] += _start$1.distanceTo( _end$1 );\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Line.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$1.copy( geometry.boundingSphere );\n\t\t_sphere$1.applyMatrix4( matrixWorld );\n\t\t_sphere$1.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix$1.copy( matrixWorld ).invert();\n\t\t_ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst vStart = new Vector3();\n\t\tconst vEnd = new Vector3();\n\t\tconst interSegment = new Vector3();\n\t\tconst interRay = new Vector3();\n\t\tconst step = this.isLineSegments ? 2 : 1;\n\n\t\tconst index = geometry.index;\n\t\tconst attributes = geometry.attributes;\n\t\tconst positionAttribute = attributes.position;\n\n\t\tif ( index !== null ) {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\tconst a = index.getX( i );\n\t\t\t\tconst b = index.getX( i + 1 );\n\n\t\t\t\tvStart.fromBufferAttribute( positionAttribute, a );\n\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, b );\n\n\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\tintersects.push( {\n\n\t\t\t\t\tdistance: distance,\n\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\tindex: i,\n\t\t\t\t\tface: null,\n\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\tobject: this\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\tvStart.fromBufferAttribute( positionAttribute, i );\n\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\tintersects.push( {\n\n\t\t\t\t\tdistance: distance,\n\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\tindex: i,\n\t\t\t\t\tface: null,\n\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\tobject: this\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\t\tconst keys = Object.keys( morphAttributes );\n\n\t\tif ( keys.length > 0 ) {\n\n\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nconst _start = /*@__PURE__*/ new Vector3();\nconst _end = /*@__PURE__*/ new Vector3();\n\nclass LineSegments extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isLineSegments = true;\n\n\t\tthis.type = 'LineSegments';\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\t// we assume non-indexed geometry\n\n\t\tif ( geometry.index === null ) {\n\n\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\tconst lineDistances = [];\n\n\t\t\tfor ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) {\n\n\t\t\t\t_start.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t_end.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\tlineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ];\n\t\t\t\tlineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end );\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineLoop extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isLineLoop = true;\n\n\t\tthis.type = 'LineLoop';\n\n\t}\n\n}\n\nclass PointsMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isPointsMaterial = true;\n\n\t\tthis.type = 'PointsMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.size = 1;\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.size = source.size;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _position$2 = /*@__PURE__*/ new Vector3();\n\nclass Points extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isPoints = true;\n\n\t\tthis.type = 'Points';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Points.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst index = geometry.index;\n\t\tconst attributes = geometry.attributes;\n\t\tconst positionAttribute = attributes.position;\n\n\t\tif ( index !== null ) {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, il = end; i < il; i ++ ) {\n\n\t\t\t\tconst a = index.getX( i );\n\n\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, a );\n\n\t\t\t\ttestPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, l = end; i < l; i ++ ) {\n\n\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\ttestPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\t\tconst keys = Object.keys( morphAttributes );\n\n\t\tif ( keys.length > 0 ) {\n\n\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nfunction testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {\n\n\tconst rayPointDistanceSq = _ray.distanceSqToPoint( point );\n\n\tif ( rayPointDistanceSq < localThresholdSq ) {\n\n\t\tconst intersectPoint = new Vector3();\n\n\t\t_ray.closestPointToPoint( point, intersectPoint );\n\t\tintersectPoint.applyMatrix4( matrixWorld );\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tdistanceToRay: Math.sqrt( rayPointDistanceSq ),\n\t\t\tpoint: intersectPoint,\n\t\t\tindex: index,\n\t\t\tface: null,\n\t\t\tobject: object\n\n\t\t} );\n\n\t}\n\n}\n\nclass VideoTexture extends Texture {\n\n\tconstructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.isVideoTexture = true;\n\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : LinearFilter;\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : LinearFilter;\n\n\t\tthis.generateMipmaps = false;\n\n\t\tconst scope = this;\n\n\t\tfunction updateVideo() {\n\n\t\t\tscope.needsUpdate = true;\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t\tif ( 'requestVideoFrameCallback' in video ) {\n\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.image ).copy( this );\n\n\t}\n\n\tupdate() {\n\n\t\tconst video = this.image;\n\t\tconst hasVideoFrameCallback = 'requestVideoFrameCallback' in video;\n\n\t\tif ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) {\n\n\t\t\tthis.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n}\n\nclass FramebufferTexture extends Texture {\n\n\tconstructor( width, height ) {\n\n\t\tsuper( { width, height } );\n\n\t\tthis.isFramebufferTexture = true;\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.generateMipmaps = false;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nclass CompressedTexture extends Texture {\n\n\tconstructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );\n\n\t\tthis.isCompressedTexture = true;\n\n\t\tthis.image = { width: width, height: height };\n\t\tthis.mipmaps = mipmaps;\n\n\t\t// no flipping for cube textures\n\t\t// (also flipping doesn't work for compressed textures )\n\n\t\tthis.flipY = false;\n\n\t\t// can't generate mipmaps for compressed textures\n\t\t// mips must be embedded in DDS files\n\n\t\tthis.generateMipmaps = false;\n\n\t}\n\n}\n\nclass CompressedArrayTexture extends CompressedTexture {\n\n\tconstructor( mipmaps, width, height, depth, format, type ) {\n\n\t\tsuper( mipmaps, width, height, format, type );\n\n\t\tthis.isCompressedArrayTexture = true;\n\t\tthis.image.depth = depth;\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t}\n\n}\n\nclass CompressedCubeTexture extends CompressedTexture {\n\n\tconstructor( images, format, type ) {\n\n\t\tsuper( undefined, images[ 0 ].width, images[ 0 ].height, format, type, CubeReflectionMapping );\n\n\t\tthis.isCompressedCubeTexture = true;\n\t\tthis.isCubeTexture = true;\n\n\t\tthis.image = images;\n\n\t}\n\n}\n\nclass CanvasTexture extends Texture {\n\n\tconstructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.isCanvasTexture = true;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\n/**\n * Extensible curve object.\n *\n * Some common of curve methods:\n * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n * .getPoints(), .getSpacedPoints()\n * .getLength()\n * .updateArcLengths()\n *\n * This following curves inherit from THREE.Curve:\n *\n * -- 2D curves --\n * THREE.ArcCurve\n * THREE.CubicBezierCurve\n * THREE.EllipseCurve\n * THREE.LineCurve\n * THREE.QuadraticBezierCurve\n * THREE.SplineCurve\n *\n * -- 3D curves --\n * THREE.CatmullRomCurve3\n * THREE.CubicBezierCurve3\n * THREE.LineCurve3\n * THREE.QuadraticBezierCurve3\n *\n * A series of curves can be represented as a THREE.CurvePath.\n *\n **/\n\nclass Curve {\n\n\tconstructor() {\n\n\t\tthis.type = 'Curve';\n\n\t\tthis.arcLengthDivisions = 200;\n\n\t}\n\n\t// Virtual base class method to overwrite and implement in subclasses\n\t//\t- t [0 .. 1]\n\n\tgetPoint( /* t, optionalTarget */ ) {\n\n\t\tconsole.warn( 'THREE.Curve: .getPoint() not implemented.' );\n\t\treturn null;\n\n\t}\n\n\t// Get point at relative position in curve according to arc length\n\t// - u [0 .. 1]\n\n\tgetPointAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getPoint( t, optionalTarget );\n\n\t}\n\n\t// Get sequence of points using getPoint( t )\n\n\tgetPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPoint( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get sequence of points using getPointAt( u )\n\n\tgetSpacedPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPointAt( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get total curve arc length\n\n\tgetLength() {\n\n\t\tconst lengths = this.getLengths();\n\t\treturn lengths[ lengths.length - 1 ];\n\n\t}\n\n\t// Get list of cumulative segment lengths\n\n\tgetLengths( divisions = this.arcLengthDivisions ) {\n\n\t\tif ( this.cacheArcLengths &&\n\t\t\t( this.cacheArcLengths.length === divisions + 1 ) &&\n\t\t\t! this.needsUpdate ) {\n\n\t\t\treturn this.cacheArcLengths;\n\n\t\t}\n\n\t\tthis.needsUpdate = false;\n\n\t\tconst cache = [];\n\t\tlet current, last = this.getPoint( 0 );\n\t\tlet sum = 0;\n\n\t\tcache.push( 0 );\n\n\t\tfor ( let p = 1; p <= divisions; p ++ ) {\n\n\t\t\tcurrent = this.getPoint( p / divisions );\n\t\t\tsum += current.distanceTo( last );\n\t\t\tcache.push( sum );\n\t\t\tlast = current;\n\n\t\t}\n\n\t\tthis.cacheArcLengths = cache;\n\n\t\treturn cache; // { sums: cache, sum: sum }; Sum is in the last element.\n\n\t}\n\n\tupdateArcLengths() {\n\n\t\tthis.needsUpdate = true;\n\t\tthis.getLengths();\n\n\t}\n\n\t// Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n\n\tgetUtoTmapping( u, distance ) {\n\n\t\tconst arcLengths = this.getLengths();\n\n\t\tlet i = 0;\n\t\tconst il = arcLengths.length;\n\n\t\tlet targetArcLength; // The targeted u distance value to get\n\n\t\tif ( distance ) {\n\n\t\t\ttargetArcLength = distance;\n\n\t\t} else {\n\n\t\t\ttargetArcLength = u * arcLengths[ il - 1 ];\n\n\t\t}\n\n\t\t// binary search for the index with largest value smaller than target u distance\n\n\t\tlet low = 0, high = il - 1, comparison;\n\n\t\twhile ( low <= high ) {\n\n\t\t\ti = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n\t\t\tcomparison = arcLengths[ i ] - targetArcLength;\n\n\t\t\tif ( comparison < 0 ) {\n\n\t\t\t\tlow = i + 1;\n\n\t\t\t} else if ( comparison > 0 ) {\n\n\t\t\t\thigh = i - 1;\n\n\t\t\t} else {\n\n\t\t\t\thigh = i;\n\t\t\t\tbreak;\n\n\t\t\t\t// DONE\n\n\t\t\t}\n\n\t\t}\n\n\t\ti = high;\n\n\t\tif ( arcLengths[ i ] === targetArcLength ) {\n\n\t\t\treturn i / ( il - 1 );\n\n\t\t}\n\n\t\t// we could get finer grain at lengths, or use simple interpolation between two points\n\n\t\tconst lengthBefore = arcLengths[ i ];\n\t\tconst lengthAfter = arcLengths[ i + 1 ];\n\n\t\tconst segmentLength = lengthAfter - lengthBefore;\n\n\t\t// determine where we are between the 'before' and 'after' points\n\n\t\tconst segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength;\n\n\t\t// add that fractional amount to t\n\n\t\tconst t = ( i + segmentFraction ) / ( il - 1 );\n\n\t\treturn t;\n\n\t}\n\n\t// Returns a unit vector tangent at t\n\t// In case any sub curve does not implement its tangent derivation,\n\t// 2 points a small delta apart will be used to find its gradient\n\t// which seems to give a reasonable approximation\n\n\tgetTangent( t, optionalTarget ) {\n\n\t\tconst delta = 0.0001;\n\t\tlet t1 = t - delta;\n\t\tlet t2 = t + delta;\n\n\t\t// Capping in case of danger\n\n\t\tif ( t1 < 0 ) t1 = 0;\n\t\tif ( t2 > 1 ) t2 = 1;\n\n\t\tconst pt1 = this.getPoint( t1 );\n\t\tconst pt2 = this.getPoint( t2 );\n\n\t\tconst tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() );\n\n\t\ttangent.copy( pt2 ).sub( pt1 ).normalize();\n\n\t\treturn tangent;\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getTangent( t, optionalTarget );\n\n\t}\n\n\tcomputeFrenetFrames( segments, closed ) {\n\n\t\t// see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n\n\t\tconst normal = new Vector3();\n\n\t\tconst tangents = [];\n\t\tconst normals = [];\n\t\tconst binormals = [];\n\n\t\tconst vec = new Vector3();\n\t\tconst mat = new Matrix4();\n\n\t\t// compute the tangent vectors for each segment on the curve\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst u = i / segments;\n\n\t\t\ttangents[ i ] = this.getTangentAt( u, new Vector3() );\n\n\t\t}\n\n\t\t// select an initial normal vector perpendicular to the first tangent vector,\n\t\t// and in the direction of the minimum tangent xyz component\n\n\t\tnormals[ 0 ] = new Vector3();\n\t\tbinormals[ 0 ] = new Vector3();\n\t\tlet min = Number.MAX_VALUE;\n\t\tconst tx = Math.abs( tangents[ 0 ].x );\n\t\tconst ty = Math.abs( tangents[ 0 ].y );\n\t\tconst tz = Math.abs( tangents[ 0 ].z );\n\n\t\tif ( tx <= min ) {\n\n\t\t\tmin = tx;\n\t\t\tnormal.set( 1, 0, 0 );\n\n\t\t}\n\n\t\tif ( ty <= min ) {\n\n\t\t\tmin = ty;\n\t\t\tnormal.set( 0, 1, 0 );\n\n\t\t}\n\n\t\tif ( tz <= min ) {\n\n\t\t\tnormal.set( 0, 0, 1 );\n\n\t\t}\n\n\t\tvec.crossVectors( tangents[ 0 ], normal ).normalize();\n\n\t\tnormals[ 0 ].crossVectors( tangents[ 0 ], vec );\n\t\tbinormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] );\n\n\n\t\t// compute the slowly-varying normal and binormal vectors for each segment on the curve\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tnormals[ i ] = normals[ i - 1 ].clone();\n\n\t\t\tbinormals[ i ] = binormals[ i - 1 ].clone();\n\n\t\t\tvec.crossVectors( tangents[ i - 1 ], tangents[ i ] );\n\n\t\t\tif ( vec.length() > Number.EPSILON ) {\n\n\t\t\t\tvec.normalize();\n\n\t\t\t\tconst theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors\n\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );\n\n\t\t\t}\n\n\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t}\n\n\t\t// if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n\n\t\tif ( closed === true ) {\n\n\t\t\tlet theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) );\n\t\t\ttheta /= segments;\n\n\t\t\tif ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {\n\n\t\t\t\ttheta = - theta;\n\n\t\t\t}\n\n\t\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\t\t// twist a little...\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) );\n\t\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttangents: tangents,\n\t\t\tnormals: normals,\n\t\t\tbinormals: binormals\n\t\t};\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.arcLengthDivisions = source.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Curve',\n\t\t\t\tgenerator: 'Curve.toJSON'\n\t\t\t}\n\t\t};\n\n\t\tdata.arcLengthDivisions = this.arcLengthDivisions;\n\t\tdata.type = this.type;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.arcLengthDivisions = json.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass EllipseCurve extends Curve {\n\n\tconstructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.isEllipseCurve = true;\n\n\t\tthis.type = 'EllipseCurve';\n\n\t\tthis.aX = aX;\n\t\tthis.aY = aY;\n\n\t\tthis.xRadius = xRadius;\n\t\tthis.yRadius = yRadius;\n\n\t\tthis.aStartAngle = aStartAngle;\n\t\tthis.aEndAngle = aEndAngle;\n\n\t\tthis.aClockwise = aClockwise;\n\n\t\tthis.aRotation = aRotation;\n\n\t}\n\n\tgetPoint( t, optionalTarget ) {\n\n\t\tconst point = optionalTarget || new Vector2();\n\n\t\tconst twoPi = Math.PI * 2;\n\t\tlet deltaAngle = this.aEndAngle - this.aStartAngle;\n\t\tconst samePoints = Math.abs( deltaAngle ) < Number.EPSILON;\n\n\t\t// ensures that deltaAngle is 0 .. 2 PI\n\t\twhile ( deltaAngle < 0 ) deltaAngle += twoPi;\n\t\twhile ( deltaAngle > twoPi ) deltaAngle -= twoPi;\n\n\t\tif ( deltaAngle < Number.EPSILON ) {\n\n\t\t\tif ( samePoints ) {\n\n\t\t\t\tdeltaAngle = 0;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.aClockwise === true && ! samePoints ) {\n\n\t\t\tif ( deltaAngle === twoPi ) {\n\n\t\t\t\tdeltaAngle = - twoPi;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = deltaAngle - twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst angle = this.aStartAngle + t * deltaAngle;\n\t\tlet x = this.aX + this.xRadius * Math.cos( angle );\n\t\tlet y = this.aY + this.yRadius * Math.sin( angle );\n\n\t\tif ( this.aRotation !== 0 ) {\n\n\t\t\tconst cos = Math.cos( this.aRotation );\n\t\t\tconst sin = Math.sin( this.aRotation );\n\n\t\t\tconst tx = x - this.aX;\n\t\t\tconst ty = y - this.aY;\n\n\t\t\t// Rotate the point about the center of the ellipse.\n\t\t\tx = tx * cos - ty * sin + this.aX;\n\t\t\ty = tx * sin + ty * cos + this.aY;\n\n\t\t}\n\n\t\treturn point.set( x, y );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.aX = source.aX;\n\t\tthis.aY = source.aY;\n\n\t\tthis.xRadius = source.xRadius;\n\t\tthis.yRadius = source.yRadius;\n\n\t\tthis.aStartAngle = source.aStartAngle;\n\t\tthis.aEndAngle = source.aEndAngle;\n\n\t\tthis.aClockwise = source.aClockwise;\n\n\t\tthis.aRotation = source.aRotation;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.aX = this.aX;\n\t\tdata.aY = this.aY;\n\n\t\tdata.xRadius = this.xRadius;\n\t\tdata.yRadius = this.yRadius;\n\n\t\tdata.aStartAngle = this.aStartAngle;\n\t\tdata.aEndAngle = this.aEndAngle;\n\n\t\tdata.aClockwise = this.aClockwise;\n\n\t\tdata.aRotation = this.aRotation;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.aX = json.aX;\n\t\tthis.aY = json.aY;\n\n\t\tthis.xRadius = json.xRadius;\n\t\tthis.yRadius = json.yRadius;\n\n\t\tthis.aStartAngle = json.aStartAngle;\n\t\tthis.aEndAngle = json.aEndAngle;\n\n\t\tthis.aClockwise = json.aClockwise;\n\n\t\tthis.aRotation = json.aRotation;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass ArcCurve extends EllipseCurve {\n\n\tconstructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tsuper( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\tthis.isArcCurve = true;\n\n\t\tthis.type = 'ArcCurve';\n\n\t}\n\n}\n\n/**\n * Centripetal CatmullRom Curve - which is useful for avoiding\n * cusps and self-intersections in non-uniform catmull rom curves.\n * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n *\n * curve.type accepts centripetal(default), chordal and catmullrom\n * curve.tension is used for catmullrom which defaults to 0.5\n */\n\n\n/*\nBased on an optimized c++ solution in\n - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n - http://ideone.com/NoEbVM\n\nThis CubicPoly class could be used for reusing some variables and calculations,\nbut for three.js curve use, it could be possible inlined and flatten into a single function call\nwhich can be placed in CurveUtils.\n*/\n\nfunction CubicPoly() {\n\n\tlet c0 = 0, c1 = 0, c2 = 0, c3 = 0;\n\n\t/*\n\t * Compute coefficients for a cubic polynomial\n\t * p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t * such that\n\t * p(0) = x0, p(1) = x1\n\t * and\n\t * p'(0) = t0, p'(1) = t1.\n\t */\n\tfunction init( x0, x1, t0, t1 ) {\n\n\t\tc0 = x0;\n\t\tc1 = t0;\n\t\tc2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1;\n\t\tc3 = 2 * x0 - 2 * x1 + t0 + t1;\n\n\t}\n\n\treturn {\n\n\t\tinitCatmullRom: function ( x0, x1, x2, x3, tension ) {\n\n\t\t\tinit( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) );\n\n\t\t},\n\n\t\tinitNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) {\n\n\t\t\t// compute tangents when parameterized in [t1,t2]\n\t\t\tlet t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1;\n\t\t\tlet t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2;\n\n\t\t\t// rescale tangents for parametrization in [0,1]\n\t\t\tt1 *= dt1;\n\t\t\tt2 *= dt1;\n\n\t\t\tinit( x1, x2, t1, t2 );\n\n\t\t},\n\n\t\tcalc: function ( t ) {\n\n\t\t\tconst t2 = t * t;\n\t\t\tconst t3 = t2 * t;\n\t\t\treturn c0 + c1 * t + c2 * t2 + c3 * t3;\n\n\t\t}\n\n\t};\n\n}\n\n//\n\nconst tmp = /*@__PURE__*/ new Vector3();\nconst px = /*@__PURE__*/ new CubicPoly();\nconst py = /*@__PURE__*/ new CubicPoly();\nconst pz = /*@__PURE__*/ new CubicPoly();\n\nclass CatmullRomCurve3 extends Curve {\n\n\tconstructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) {\n\n\t\tsuper();\n\n\t\tthis.isCatmullRomCurve3 = true;\n\n\t\tthis.type = 'CatmullRomCurve3';\n\n\t\tthis.points = points;\n\t\tthis.closed = closed;\n\t\tthis.curveType = curveType;\n\t\tthis.tension = tension;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst l = points.length;\n\n\t\tconst p = ( l - ( this.closed ? 0 : 1 ) ) * t;\n\t\tlet intPoint = Math.floor( p );\n\t\tlet weight = p - intPoint;\n\n\t\tif ( this.closed ) {\n\n\t\t\tintPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l;\n\n\t\t} else if ( weight === 0 && intPoint === l - 1 ) {\n\n\t\t\tintPoint = l - 2;\n\t\t\tweight = 1;\n\n\t\t}\n\n\t\tlet p0, p3; // 4 points (p1 & p2 defined below)\n\n\t\tif ( this.closed || intPoint > 0 ) {\n\n\t\t\tp0 = points[ ( intPoint - 1 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate first point\n\t\t\ttmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] );\n\t\t\tp0 = tmp;\n\n\t\t}\n\n\t\tconst p1 = points[ intPoint % l ];\n\t\tconst p2 = points[ ( intPoint + 1 ) % l ];\n\n\t\tif ( this.closed || intPoint + 2 < l ) {\n\n\t\t\tp3 = points[ ( intPoint + 2 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate last point\n\t\t\ttmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );\n\t\t\tp3 = tmp;\n\n\t\t}\n\n\t\tif ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) {\n\n\t\t\t// init Centripetal / Chordal Catmull-Rom\n\t\t\tconst pow = this.curveType === 'chordal' ? 0.5 : 0.25;\n\t\t\tlet dt0 = Math.pow( p0.distanceToSquared( p1 ), pow );\n\t\t\tlet dt1 = Math.pow( p1.distanceToSquared( p2 ), pow );\n\t\t\tlet dt2 = Math.pow( p2.distanceToSquared( p3 ), pow );\n\n\t\t\t// safety check for repeated points\n\t\t\tif ( dt1 < 1e-4 ) dt1 = 1.0;\n\t\t\tif ( dt0 < 1e-4 ) dt0 = dt1;\n\t\t\tif ( dt2 < 1e-4 ) dt2 = dt1;\n\n\t\t\tpx.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 );\n\t\t\tpy.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 );\n\t\t\tpz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 );\n\n\t\t} else if ( this.curveType === 'catmullrom' ) {\n\n\t\t\tpx.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension );\n\t\t\tpy.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension );\n\t\t\tpz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension );\n\n\t\t}\n\n\t\tpoint.set(\n\t\t\tpx.calc( weight ),\n\t\t\tpy.calc( weight ),\n\t\t\tpz.calc( weight )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\tthis.closed = source.closed;\n\t\tthis.curveType = source.curveType;\n\t\tthis.tension = source.tension;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\tdata.closed = this.closed;\n\t\tdata.curveType = this.curveType;\n\t\tdata.tension = this.tension;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector3().fromArray( point ) );\n\n\t\t}\n\n\t\tthis.closed = json.closed;\n\t\tthis.curveType = json.curveType;\n\t\tthis.tension = json.tension;\n\n\t\treturn this;\n\n\t}\n\n}\n\n/**\n * Bezier Curves formulas obtained from\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n */\n\nfunction CatmullRom( t, p0, p1, p2, p3 ) {\n\n\tconst v0 = ( p2 - p0 ) * 0.5;\n\tconst v1 = ( p3 - p1 ) * 0.5;\n\tconst t2 = t * t;\n\tconst t3 = t * t2;\n\treturn ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;\n\n}\n\n//\n\nfunction QuadraticBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * p;\n\n}\n\nfunction QuadraticBezierP1( t, p ) {\n\n\treturn 2 * ( 1 - t ) * t * p;\n\n}\n\nfunction QuadraticBezierP2( t, p ) {\n\n\treturn t * t * p;\n\n}\n\nfunction QuadraticBezier( t, p0, p1, p2 ) {\n\n\treturn QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) +\n\t\tQuadraticBezierP2( t, p2 );\n\n}\n\n//\n\nfunction CubicBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * k * p;\n\n}\n\nfunction CubicBezierP1( t, p ) {\n\n\tconst k = 1 - t;\n\treturn 3 * k * k * t * p;\n\n}\n\nfunction CubicBezierP2( t, p ) {\n\n\treturn 3 * ( 1 - t ) * t * t * p;\n\n}\n\nfunction CubicBezierP3( t, p ) {\n\n\treturn t * t * t * p;\n\n}\n\nfunction CubicBezier( t, p0, p1, p2, p3 ) {\n\n\treturn CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) +\n\t\tCubicBezierP3( t, p3 );\n\n}\n\nclass CubicBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.isCubicBezierCurve = true;\n\n\t\tthis.type = 'CubicBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass CubicBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.isCubicBezierCurve3 = true;\n\n\t\tthis.type = 'CubicBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y ),\n\t\t\tCubicBezier( t, v0.z, v1.z, v2.z, v3.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineCurve extends Curve {\n\n\tconstructor( v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.isLineCurve = true;\n\n\t\tthis.type = 'LineCurve';\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\n\tgetTangent( t, optionalTarget = new Vector2() ) {\n\n\t\treturn optionalTarget.subVectors( this.v2, this.v1 ).normalize();\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\treturn this.getTangent( u, optionalTarget );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineCurve3 extends Curve {\n\n\tconstructor( v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.isLineCurve3 = true;\n\n\t\tthis.type = 'LineCurve3';\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\n\tgetTangent( t, optionalTarget = new Vector3() ) {\n\n\t\treturn optionalTarget.subVectors( this.v2, this.v1 ).normalize();\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\treturn this.getTangent( u, optionalTarget );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass QuadraticBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.isQuadraticBezierCurve = true;\n\n\t\tthis.type = 'QuadraticBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass QuadraticBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.isQuadraticBezierCurve3 = true;\n\n\t\tthis.type = 'QuadraticBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y ),\n\t\t\tQuadraticBezier( t, v0.z, v1.z, v2.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass SplineCurve extends Curve {\n\n\tconstructor( points = [] ) {\n\n\t\tsuper();\n\n\t\tthis.isSplineCurve = true;\n\n\t\tthis.type = 'SplineCurve';\n\n\t\tthis.points = points;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst p = ( points.length - 1 ) * t;\n\n\t\tconst intPoint = Math.floor( p );\n\t\tconst weight = p - intPoint;\n\n\t\tconst p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ];\n\t\tconst p1 = points[ intPoint ];\n\t\tconst p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ];\n\t\tconst p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ];\n\n\t\tpoint.set(\n\t\t\tCatmullRom( weight, p0.x, p1.x, p2.x, p3.x ),\n\t\t\tCatmullRom( weight, p0.y, p1.y, p2.y, p3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector2().fromArray( point ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nvar Curves = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tArcCurve: ArcCurve,\n\tCatmullRomCurve3: CatmullRomCurve3,\n\tCubicBezierCurve: CubicBezierCurve,\n\tCubicBezierCurve3: CubicBezierCurve3,\n\tEllipseCurve: EllipseCurve,\n\tLineCurve: LineCurve,\n\tLineCurve3: LineCurve3,\n\tQuadraticBezierCurve: QuadraticBezierCurve,\n\tQuadraticBezierCurve3: QuadraticBezierCurve3,\n\tSplineCurve: SplineCurve\n});\n\n/**************************************************************\n *\tCurved Path - a curve path is simply a array of connected\n * curves, but retains the api of a curve\n **************************************************************/\n\nclass CurvePath extends Curve {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'CurvePath';\n\n\t\tthis.curves = [];\n\t\tthis.autoClose = false; // Automatically closes the path\n\n\t}\n\n\tadd( curve ) {\n\n\t\tthis.curves.push( curve );\n\n\t}\n\n\tclosePath() {\n\n\t\t// Add a line curve if start and end of lines are not connected\n\t\tconst startPoint = this.curves[ 0 ].getPoint( 0 );\n\t\tconst endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 );\n\n\t\tif ( ! startPoint.equals( endPoint ) ) {\n\n\t\t\tthis.curves.push( new LineCurve( endPoint, startPoint ) );\n\n\t\t}\n\n\t}\n\n\t// To get accurate point with reference to\n\t// entire path distance at time t,\n\t// following has to be done:\n\n\t// 1. Length of each sub path have to be known\n\t// 2. Locate and identify type of curve\n\t// 3. Get t for the curve\n\t// 4. Return curve.getPointAt(t')\n\n\tgetPoint( t, optionalTarget ) {\n\n\t\tconst d = t * this.getLength();\n\t\tconst curveLengths = this.getCurveLengths();\n\t\tlet i = 0;\n\n\t\t// To think about boundaries points.\n\n\t\twhile ( i < curveLengths.length ) {\n\n\t\t\tif ( curveLengths[ i ] >= d ) {\n\n\t\t\t\tconst diff = curveLengths[ i ] - d;\n\t\t\t\tconst curve = this.curves[ i ];\n\n\t\t\t\tconst segmentLength = curve.getLength();\n\t\t\t\tconst u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n\n\t\t\t\treturn curve.getPointAt( u, optionalTarget );\n\n\t\t\t}\n\n\t\t\ti ++;\n\n\t\t}\n\n\t\treturn null;\n\n\t\t// loop where sum != 0, sum > d , sum+1 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) {\n\n\t\t\tpoints.push( points[ 0 ] );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = source.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = source.curves[ i ];\n\n\t\t\tthis.curves.push( curve.clone() );\n\n\t\t}\n\n\t\tthis.autoClose = source.autoClose;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.autoClose = this.autoClose;\n\t\tdata.curves = [];\n\n\t\tfor ( let i = 0, l = this.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = this.curves[ i ];\n\t\t\tdata.curves.push( curve.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.autoClose = json.autoClose;\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = json.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = json.curves[ i ];\n\t\t\tthis.curves.push( new Curves[ curve.type ]().fromJSON( curve ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Path extends CurvePath {\n\n\tconstructor( points ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Path';\n\n\t\tthis.currentPoint = new Vector2();\n\n\t\tif ( points ) {\n\n\t\t\tthis.setFromPoints( points );\n\n\t\t}\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.moveTo( points[ 0 ].x, points[ 0 ].y );\n\n\t\tfor ( let i = 1, l = points.length; i < l; i ++ ) {\n\n\t\t\tthis.lineTo( points[ i ].x, points[ i ].y );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying?\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tconst curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tconst curve = new QuadraticBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCPx, aCPy ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tconst curve = new CubicBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCP1x, aCP1y ),\n\t\t\tnew Vector2( aCP2x, aCP2y ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts /*Array of Vector*/ ) {\n\n\t\tconst npts = [ this.currentPoint.clone() ].concat( pts );\n\n\t\tconst curve = new SplineCurve( npts );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.copy( pts[ pts.length - 1 ] );\n\n\t\treturn this;\n\n\t}\n\n\tarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absarc( aX + x0, aY + y0, aRadius,\n\t\t\taStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tabsarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tthis.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\treturn this;\n\n\t}\n\n\tabsellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\tif ( this.curves.length > 0 ) {\n\n\t\t\t// if a previous curve is present, attempt to join\n\t\t\tconst firstPoint = curve.getPoint( 0 );\n\n\t\t\tif ( ! firstPoint.equals( this.currentPoint ) ) {\n\n\t\t\t\tthis.lineTo( firstPoint.x, firstPoint.y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.curves.push( curve );\n\n\t\tconst lastPoint = curve.getPoint( 1 );\n\t\tthis.currentPoint.copy( lastPoint );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.currentPoint.copy( source.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.currentPoint = this.currentPoint.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.currentPoint.fromArray( json.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LatheGeometry extends BufferGeometry {\n\n\tconstructor( points = [ new Vector2( 0, - 0.5 ), new Vector2( 0.5, 0 ), new Vector2( 0, 0.5 ) ], segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LatheGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpoints: points,\n\t\t\tsegments: segments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength\n\t\t};\n\n\t\tsegments = Math.floor( segments );\n\n\t\t// clamp phiLength so it's in range of [ 0, 2PI ]\n\n\t\tphiLength = clamp( phiLength, 0, Math.PI * 2 );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst uvs = [];\n\t\tconst initNormals = [];\n\t\tconst normals = [];\n\n\t\t// helper variables\n\n\t\tconst inverseSegments = 1.0 / segments;\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\t\tconst normal = new Vector3();\n\t\tconst curNormal = new Vector3();\n\t\tconst prevNormal = new Vector3();\n\t\tlet dx = 0;\n\t\tlet dy = 0;\n\n\t\t// pre-compute normals for initial \"meridian\"\n\n\t\tfor ( let j = 0; j <= ( points.length - 1 ); j ++ ) {\n\n\t\t\tswitch ( j ) {\n\n\t\t\t\tcase 0:\t\t\t\t// special handling for 1st vertex on path\n\n\t\t\t\t\tdx = points[ j + 1 ].x - points[ j ].x;\n\t\t\t\t\tdy = points[ j + 1 ].y - points[ j ].y;\n\n\t\t\t\t\tnormal.x = dy * 1.0;\n\t\t\t\t\tnormal.y = - dx;\n\t\t\t\t\tnormal.z = dy * 0.0;\n\n\t\t\t\t\tprevNormal.copy( normal );\n\n\t\t\t\t\tnormal.normalize();\n\n\t\t\t\t\tinitNormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ( points.length - 1 ):\t// special handling for last Vertex on path\n\n\t\t\t\t\tinitNormals.push( prevNormal.x, prevNormal.y, prevNormal.z );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\t\t\t// default handling for all vertices in between\n\n\t\t\t\t\tdx = points[ j + 1 ].x - points[ j ].x;\n\t\t\t\t\tdy = points[ j + 1 ].y - points[ j ].y;\n\n\t\t\t\t\tnormal.x = dy * 1.0;\n\t\t\t\t\tnormal.y = - dx;\n\t\t\t\t\tnormal.z = dy * 0.0;\n\n\t\t\t\t\tcurNormal.copy( normal );\n\n\t\t\t\t\tnormal.x += prevNormal.x;\n\t\t\t\t\tnormal.y += prevNormal.y;\n\t\t\t\t\tnormal.z += prevNormal.z;\n\n\t\t\t\t\tnormal.normalize();\n\n\t\t\t\t\tinitNormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\tprevNormal.copy( curNormal );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate vertices, uvs and normals\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst phi = phiStart + i * inverseSegments * phiLength;\n\n\t\t\tconst sin = Math.sin( phi );\n\t\t\tconst cos = Math.cos( phi );\n\n\t\t\tfor ( let j = 0; j <= ( points.length - 1 ); j ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = points[ j ].x * sin;\n\t\t\t\tvertex.y = points[ j ].y;\n\t\t\t\tvertex.z = points[ j ].x * cos;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = i / segments;\n\t\t\t\tuv.y = j / ( points.length - 1 );\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t// normal\n\n\t\t\t\tconst x = initNormals[ 3 * j + 0 ] * sin;\n\t\t\t\tconst y = initNormals[ 3 * j + 1 ];\n\t\t\t\tconst z = initNormals[ 3 * j + 0 ] * cos;\n\n\t\t\t\tnormals.push( x, y, z );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 0; i < segments; i ++ ) {\n\n\t\t\tfor ( let j = 0; j < ( points.length - 1 ); j ++ ) {\n\n\t\t\t\tconst base = j + i * points.length;\n\n\t\t\t\tconst a = base;\n\t\t\t\tconst b = base + points.length;\n\t\t\t\tconst c = base + points.length + 1;\n\t\t\t\tconst d = base + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( c, d, b );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );\n\n\t}\n\n}\n\nclass CapsuleGeometry extends LatheGeometry {\n\n\tconstructor( radius = 1, length = 1, capSegments = 4, radialSegments = 8 ) {\n\n\t\tconst path = new Path();\n\t\tpath.absarc( 0, - length / 2, radius, Math.PI * 1.5, 0 );\n\t\tpath.absarc( 0, length / 2, radius, 0, Math.PI * 0.5 );\n\n\t\tsuper( path.getPoints( capSegments ), radialSegments );\n\n\t\tthis.type = 'CapsuleGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tlength: length,\n\t\t\tcapSegments: capSegments,\n\t\t\tradialSegments: radialSegments,\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CapsuleGeometry( data.radius, data.length, data.capSegments, data.radialSegments );\n\n\t}\n\n}\n\nclass CircleGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CircleGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tsegments: segments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tsegments = Math.max( 3, segments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// center point\n\n\t\tvertices.push( 0, 0, 0 );\n\t\tnormals.push( 0, 0, 1 );\n\t\tuvs.push( 0.5, 0.5 );\n\n\t\tfor ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) {\n\n\t\t\tconst segment = thetaStart + s / segments * thetaLength;\n\n\t\t\t// vertex\n\n\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t// normal\n\n\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t// uvs\n\n\t\t\tuv.x = ( vertices[ i ] / radius + 1 ) / 2;\n\t\t\tuv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2;\n\n\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tindices.push( i, i + 1, 0 );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass CylinderGeometry extends BufferGeometry {\n\n\tconstructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CylinderGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradiusTop: radiusTop,\n\t\t\tradiusBottom: radiusBottom,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tconst scope = this;\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet index = 0;\n\t\tconst indexArray = [];\n\t\tconst halfHeight = height / 2;\n\t\tlet groupStart = 0;\n\n\t\t// generate geometry\n\n\t\tgenerateTorso();\n\n\t\tif ( openEnded === false ) {\n\n\t\t\tif ( radiusTop > 0 ) generateCap( true );\n\t\t\tif ( radiusBottom > 0 ) generateCap( false );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction generateTorso() {\n\n\t\t\tconst normal = new Vector3();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\t// this will be used to calculate the normal\n\t\t\tconst slope = ( radiusBottom - radiusTop ) / height;\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let y = 0; y <= heightSegments; y ++ ) {\n\n\t\t\t\tconst indexRow = [];\n\n\t\t\t\tconst v = y / heightSegments;\n\n\t\t\t\t// calculate the radius of the current row\n\n\t\t\t\tconst radius = v * ( radiusBottom - radiusTop ) + radiusTop;\n\n\t\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\t\tconst u = x / radialSegments;\n\n\t\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\t\tconst sinTheta = Math.sin( theta );\n\t\t\t\t\tconst cosTheta = Math.cos( theta );\n\n\t\t\t\t\t// vertex\n\n\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\tvertex.y = - v * height + halfHeight;\n\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t\t// normal\n\n\t\t\t\t\tnormal.set( sinTheta, slope, cosTheta ).normalize();\n\t\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\t// uv\n\n\t\t\t\t\tuvs.push( u, 1 - v );\n\n\t\t\t\t\t// save index of vertex in respective row\n\n\t\t\t\t\tindexRow.push( index ++ );\n\n\t\t\t\t}\n\n\t\t\t\t// now save vertices of the row in our index array\n\n\t\t\t\tindexArray.push( indexRow );\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tfor ( let y = 0; y < heightSegments; y ++ ) {\n\n\t\t\t\t\t// we use the index array to access the correct indices\n\n\t\t\t\t\tconst a = indexArray[ y ][ x ];\n\t\t\t\t\tconst b = indexArray[ y + 1 ][ x ];\n\t\t\t\t\tconst c = indexArray[ y + 1 ][ x + 1 ];\n\t\t\t\t\tconst d = indexArray[ y ][ x + 1 ];\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// update group counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, 0 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t\tfunction generateCap( top ) {\n\n\t\t\t// save the index of the first center vertex\n\t\t\tconst centerIndexStart = index;\n\n\t\t\tconst uv = new Vector2();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst radius = ( top === true ) ? radiusTop : radiusBottom;\n\t\t\tconst sign = ( top === true ) ? 1 : - 1;\n\n\t\t\t// first we generate the center vertex data of the cap.\n\t\t\t// because the geometry needs one set of uvs per face,\n\t\t\t// we must generate a center vertex per face/segment\n\n\t\t\tfor ( let x = 1; x <= radialSegments; x ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertices.push( 0, halfHeight * sign, 0 );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( 0.5, 0.5 );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// save the index of the last center vertex\n\t\t\tconst centerIndexEnd = index;\n\n\t\t\t// now we generate the surrounding vertices, normals and uvs\n\n\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\tconst u = x / radialSegments;\n\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\tconst cosTheta = Math.cos( theta );\n\t\t\t\tconst sinTheta = Math.sin( theta );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\tvertex.y = halfHeight * sign;\n\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( cosTheta * 0.5 ) + 0.5;\n\t\t\t\tuv.y = ( sinTheta * 0.5 * sign ) + 0.5;\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tconst c = centerIndexStart + x;\n\t\t\t\tconst i = centerIndexEnd + x;\n\n\t\t\t\tif ( top === true ) {\n\n\t\t\t\t\t// face top\n\n\t\t\t\t\tindices.push( i, i + 1, c );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// face bottom\n\n\t\t\t\t\tindices.push( i + 1, i, c );\n\n\t\t\t\t}\n\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, top === true ? 1 : 2 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ConeGeometry extends CylinderGeometry {\n\n\tconstructor( radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );\n\n\t\tthis.type = 'ConeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass PolyhedronGeometry extends BufferGeometry {\n\n\tconstructor( vertices = [], indices = [], radius = 1, detail = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PolyhedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tvertices: vertices,\n\t\t\tindices: indices,\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t\t// default buffer data\n\n\t\tconst vertexBuffer = [];\n\t\tconst uvBuffer = [];\n\n\t\t// the subdivision creates the vertex buffer data\n\n\t\tsubdivide( detail );\n\n\t\t// all vertices should lie on a conceptual sphere with a given radius\n\n\t\tapplyRadius( radius );\n\n\t\t// finally, create the uv data\n\n\t\tgenerateUVs();\n\n\t\t// build non-indexed geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) );\n\n\t\tif ( detail === 0 ) {\n\n\t\t\tthis.computeVertexNormals(); // flat normals\n\n\t\t} else {\n\n\t\t\tthis.normalizeNormals(); // smooth normals\n\n\t\t}\n\n\t\t// helper functions\n\n\t\tfunction subdivide( detail ) {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\t// iterate over all faces and apply a subdivision with the given detail value\n\n\t\t\tfor ( let i = 0; i < indices.length; i += 3 ) {\n\n\t\t\t\t// get the vertices of the face\n\n\t\t\t\tgetVertexByIndex( indices[ i + 0 ], a );\n\t\t\t\tgetVertexByIndex( indices[ i + 1 ], b );\n\t\t\t\tgetVertexByIndex( indices[ i + 2 ], c );\n\n\t\t\t\t// perform subdivision\n\n\t\t\t\tsubdivideFace( a, b, c, detail );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction subdivideFace( a, b, c, detail ) {\n\n\t\t\tconst cols = detail + 1;\n\n\t\t\t// we use this multidimensional array as a data structure for creating the subdivision\n\n\t\t\tconst v = [];\n\n\t\t\t// construct all of the vertices for this subdivision\n\n\t\t\tfor ( let i = 0; i <= cols; i ++ ) {\n\n\t\t\t\tv[ i ] = [];\n\n\t\t\t\tconst aj = a.clone().lerp( c, i / cols );\n\t\t\t\tconst bj = b.clone().lerp( c, i / cols );\n\n\t\t\t\tconst rows = cols - i;\n\n\t\t\t\tfor ( let j = 0; j <= rows; j ++ ) {\n\n\t\t\t\t\tif ( j === 0 && i === cols ) {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj.clone().lerp( bj, j / rows );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// construct all of the faces\n\n\t\t\tfor ( let i = 0; i < cols; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) {\n\n\t\t\t\t\tconst k = Math.floor( j / 2 );\n\n\t\t\t\t\tif ( j % 2 === 0 ) {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\t\t\t\t\t\tpushVertex( v[ i ][ k ] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction applyRadius( radius ) {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\t// iterate over the entire buffer and apply the radius to each vertex\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tvertex.normalize().multiplyScalar( radius );\n\n\t\t\t\tvertexBuffer[ i + 0 ] = vertex.x;\n\t\t\t\tvertexBuffer[ i + 1 ] = vertex.y;\n\t\t\t\tvertexBuffer[ i + 2 ] = vertex.z;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tconst u = azimuth( vertex ) / 2 / Math.PI + 0.5;\n\t\t\t\tconst v = inclination( vertex ) / Math.PI + 0.5;\n\t\t\t\tuvBuffer.push( u, 1 - v );\n\n\t\t\t}\n\n\t\t\tcorrectUVs();\n\n\t\t\tcorrectSeam();\n\n\t\t}\n\n\t\tfunction correctSeam() {\n\n\t\t\t// handle case when face straddles the seam, see #3269\n\n\t\t\tfor ( let i = 0; i < uvBuffer.length; i += 6 ) {\n\n\t\t\t\t// uv data of a single face\n\n\t\t\t\tconst x0 = uvBuffer[ i + 0 ];\n\t\t\t\tconst x1 = uvBuffer[ i + 2 ];\n\t\t\t\tconst x2 = uvBuffer[ i + 4 ];\n\n\t\t\t\tconst max = Math.max( x0, x1, x2 );\n\t\t\t\tconst min = Math.min( x0, x1, x2 );\n\n\t\t\t\t// 0.9 is somewhat arbitrary\n\n\t\t\t\tif ( max > 0.9 && min < 0.1 ) {\n\n\t\t\t\t\tif ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1;\n\t\t\t\t\tif ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1;\n\t\t\t\t\tif ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction pushVertex( vertex ) {\n\n\t\t\tvertexBuffer.push( vertex.x, vertex.y, vertex.z );\n\n\t\t}\n\n\t\tfunction getVertexByIndex( index, vertex ) {\n\n\t\t\tconst stride = index * 3;\n\n\t\t\tvertex.x = vertices[ stride + 0 ];\n\t\t\tvertex.y = vertices[ stride + 1 ];\n\t\t\tvertex.z = vertices[ stride + 2 ];\n\n\t\t}\n\n\t\tfunction correctUVs() {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\tconst centroid = new Vector3();\n\n\t\t\tconst uvA = new Vector2();\n\t\t\tconst uvB = new Vector2();\n\t\t\tconst uvC = new Vector2();\n\n\t\t\tfor ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) {\n\n\t\t\t\ta.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] );\n\t\t\t\tb.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] );\n\t\t\t\tc.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] );\n\n\t\t\t\tuvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] );\n\t\t\t\tuvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] );\n\t\t\t\tuvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] );\n\n\t\t\t\tcentroid.copy( a ).add( b ).add( c ).divideScalar( 3 );\n\n\t\t\t\tconst azi = azimuth( centroid );\n\n\t\t\t\tcorrectUV( uvA, j + 0, a, azi );\n\t\t\t\tcorrectUV( uvB, j + 2, b, azi );\n\t\t\t\tcorrectUV( uvC, j + 4, c, azi );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction correctUV( uv, stride, vector, azimuth ) {\n\n\t\t\tif ( ( azimuth < 0 ) && ( uv.x === 1 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = uv.x - 1;\n\n\t\t\t}\n\n\t\t\tif ( ( vector.x === 0 ) && ( vector.z === 0 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Angle around the Y axis, counter-clockwise when looking from above.\n\n\t\tfunction azimuth( vector ) {\n\n\t\t\treturn Math.atan2( vector.z, - vector.x );\n\n\t\t}\n\n\n\t\t// Angle above the XZ plane.\n\n\t\tfunction inclination( vector ) {\n\n\t\t\treturn Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );\n\n\t}\n\n}\n\nclass DodecahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\t\tconst r = 1 / t;\n\n\t\tconst vertices = [\n\n\t\t\t// (±1, ±1, ±1)\n\t\t\t- 1, - 1, - 1,\t- 1, - 1, 1,\n\t\t\t- 1, 1, - 1, - 1, 1, 1,\n\t\t\t1, - 1, - 1, 1, - 1, 1,\n\t\t\t1, 1, - 1, 1, 1, 1,\n\n\t\t\t// (0, ±1/φ, ±φ)\n\t\t\t0, - r, - t, 0, - r, t,\n\t\t\t0, r, - t, 0, r, t,\n\n\t\t\t// (±1/φ, ±φ, 0)\n\t\t\t- r, - t, 0, - r, t, 0,\n\t\t\tr, - t, 0, r, t, 0,\n\n\t\t\t// (±φ, 0, ±1/φ)\n\t\t\t- t, 0, - r, t, 0, - r,\n\t\t\t- t, 0, r, t, 0, r\n\t\t];\n\n\t\tconst indices = [\n\t\t\t3, 11, 7, \t3, 7, 15, \t3, 15, 13,\n\t\t\t7, 19, 17, \t7, 17, 6, \t7, 6, 15,\n\t\t\t17, 4, 8, \t17, 8, 10, \t17, 10, 6,\n\t\t\t8, 0, 16, \t8, 16, 2, \t8, 2, 10,\n\t\t\t0, 12, 1, \t0, 1, 18, \t0, 18, 16,\n\t\t\t6, 10, 2, \t6, 2, 13, \t6, 13, 15,\n\t\t\t2, 16, 18, \t2, 18, 3, \t2, 3, 13,\n\t\t\t18, 1, 9, \t18, 9, 11, \t18, 11, 3,\n\t\t\t4, 14, 12, \t4, 12, 0, \t4, 0, 8,\n\t\t\t11, 9, 5, \t11, 5, 19, \t11, 19, 7,\n\t\t\t19, 5, 14, \t19, 14, 4, \t19, 4, 17,\n\t\t\t1, 12, 14, \t1, 14, 5, \t1, 5, 9\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'DodecahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new DodecahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nconst _v0 = /*@__PURE__*/ new Vector3();\nconst _v1$1 = /*@__PURE__*/ new Vector3();\nconst _normal = /*@__PURE__*/ new Vector3();\nconst _triangle = /*@__PURE__*/ new Triangle();\n\nclass EdgesGeometry extends BufferGeometry {\n\n\tconstructor( geometry = null, thresholdAngle = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'EdgesGeometry';\n\n\t\tthis.parameters = {\n\t\t\tgeometry: geometry,\n\t\t\tthresholdAngle: thresholdAngle\n\t\t};\n\n\t\tif ( geometry !== null ) {\n\n\t\t\tconst precisionPoints = 4;\n\t\t\tconst precision = Math.pow( 10, precisionPoints );\n\t\t\tconst thresholdDot = Math.cos( DEG2RAD * thresholdAngle );\n\n\t\t\tconst indexAttr = geometry.getIndex();\n\t\t\tconst positionAttr = geometry.getAttribute( 'position' );\n\t\t\tconst indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n\n\t\t\tconst indexArr = [ 0, 0, 0 ];\n\t\t\tconst vertKeys = [ 'a', 'b', 'c' ];\n\t\t\tconst hashes = new Array( 3 );\n\n\t\t\tconst edgeData = {};\n\t\t\tconst vertices = [];\n\t\t\tfor ( let i = 0; i < indexCount; i += 3 ) {\n\n\t\t\t\tif ( indexAttr ) {\n\n\t\t\t\t\tindexArr[ 0 ] = indexAttr.getX( i );\n\t\t\t\t\tindexArr[ 1 ] = indexAttr.getX( i + 1 );\n\t\t\t\t\tindexArr[ 2 ] = indexAttr.getX( i + 2 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindexArr[ 0 ] = i;\n\t\t\t\t\tindexArr[ 1 ] = i + 1;\n\t\t\t\t\tindexArr[ 2 ] = i + 2;\n\n\t\t\t\t}\n\n\t\t\t\tconst { a, b, c } = _triangle;\n\t\t\t\ta.fromBufferAttribute( positionAttr, indexArr[ 0 ] );\n\t\t\t\tb.fromBufferAttribute( positionAttr, indexArr[ 1 ] );\n\t\t\t\tc.fromBufferAttribute( positionAttr, indexArr[ 2 ] );\n\t\t\t\t_triangle.getNormal( _normal );\n\n\t\t\t\t// create hashes for the edge from the vertices\n\t\t\t\thashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`;\n\t\t\t\thashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`;\n\t\t\t\thashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`;\n\n\t\t\t\t// skip degenerate triangles\n\t\t\t\tif ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) {\n\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\t// iterate over every edge\n\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t// get the first and next vertex making up the edge\n\t\t\t\t\tconst jNext = ( j + 1 ) % 3;\n\t\t\t\t\tconst vecHash0 = hashes[ j ];\n\t\t\t\t\tconst vecHash1 = hashes[ jNext ];\n\t\t\t\t\tconst v0 = _triangle[ vertKeys[ j ] ];\n\t\t\t\t\tconst v1 = _triangle[ vertKeys[ jNext ] ];\n\n\t\t\t\t\tconst hash = `${ vecHash0 }_${ vecHash1 }`;\n\t\t\t\t\tconst reverseHash = `${ vecHash1 }_${ vecHash0 }`;\n\n\t\t\t\t\tif ( reverseHash in edgeData && edgeData[ reverseHash ] ) {\n\n\t\t\t\t\t\t// if we found a sibling edge add it into the vertex array if\n\t\t\t\t\t\t// it meets the angle threshold and delete the edge from the map.\n\t\t\t\t\t\tif ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) {\n\n\t\t\t\t\t\t\tvertices.push( v0.x, v0.y, v0.z );\n\t\t\t\t\t\t\tvertices.push( v1.x, v1.y, v1.z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tedgeData[ reverseHash ] = null;\n\n\t\t\t\t\t} else if ( ! ( hash in edgeData ) ) {\n\n\t\t\t\t\t\t// if we've already got an edge here then skip adding a new one\n\t\t\t\t\t\tedgeData[ hash ] = {\n\n\t\t\t\t\t\t\tindex0: indexArr[ j ],\n\t\t\t\t\t\t\tindex1: indexArr[ jNext ],\n\t\t\t\t\t\t\tnormal: _normal.clone(),\n\n\t\t\t\t\t\t};\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// iterate over all remaining, unmatched edges and add them to the vertex array\n\t\t\tfor ( const key in edgeData ) {\n\n\t\t\t\tif ( edgeData[ key ] ) {\n\n\t\t\t\t\tconst { index0, index1 } = edgeData[ key ];\n\t\t\t\t\t_v0.fromBufferAttribute( positionAttr, index0 );\n\t\t\t\t\t_v1$1.fromBufferAttribute( positionAttr, index1 );\n\n\t\t\t\t\tvertices.push( _v0.x, _v0.y, _v0.z );\n\t\t\t\t\tvertices.push( _v1$1.x, _v1$1.y, _v1$1.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Shape extends Path {\n\n\tconstructor( points ) {\n\n\t\tsuper( points );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.type = 'Shape';\n\n\t\tthis.holes = [];\n\n\t}\n\n\tgetPointsHoles( divisions ) {\n\n\t\tconst holesPts = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tholesPts[ i ] = this.holes[ i ].getPoints( divisions );\n\n\t\t}\n\n\t\treturn holesPts;\n\n\t}\n\n\t// get points of shape and holes (keypoints based on segments parameter)\n\n\textractPoints( divisions ) {\n\n\t\treturn {\n\n\t\t\tshape: this.getPoints( divisions ),\n\t\t\tholes: this.getPointsHoles( divisions )\n\n\t\t};\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = source.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = source.holes[ i ];\n\n\t\t\tthis.holes.push( hole.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.holes = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = this.holes[ i ];\n\t\t\tdata.holes.push( hole.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.uuid = json.uuid;\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = json.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = json.holes[ i ];\n\t\t\tthis.holes.push( new Path().fromJSON( hole ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\n/**\n * Port from https://github.com/mapbox/earcut (v2.2.4)\n */\n\nconst Earcut = {\n\n\ttriangulate: function ( data, holeIndices, dim = 2 ) {\n\n\t\tconst hasHoles = holeIndices && holeIndices.length;\n\t\tconst outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length;\n\t\tlet outerNode = linkedList( data, 0, outerLen, dim, true );\n\t\tconst triangles = [];\n\n\t\tif ( ! outerNode || outerNode.next === outerNode.prev ) return triangles;\n\n\t\tlet minX, minY, maxX, maxY, x, y, invSize;\n\n\t\tif ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim );\n\n\t\t// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n\t\tif ( data.length > 80 * dim ) {\n\n\t\t\tminX = maxX = data[ 0 ];\n\t\t\tminY = maxY = data[ 1 ];\n\n\t\t\tfor ( let i = dim; i < outerLen; i += dim ) {\n\n\t\t\t\tx = data[ i ];\n\t\t\t\ty = data[ i + 1 ];\n\t\t\t\tif ( x < minX ) minX = x;\n\t\t\t\tif ( y < minY ) minY = y;\n\t\t\t\tif ( x > maxX ) maxX = x;\n\t\t\t\tif ( y > maxY ) maxY = y;\n\n\t\t\t}\n\n\t\t\t// minX, minY and invSize are later used to transform coords into integers for z-order calculation\n\t\t\tinvSize = Math.max( maxX - minX, maxY - minY );\n\t\t\tinvSize = invSize !== 0 ? 32767 / invSize : 0;\n\n\t\t}\n\n\t\tearcutLinked( outerNode, triangles, dim, minX, minY, invSize, 0 );\n\n\t\treturn triangles;\n\n\t}\n\n};\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList( data, start, end, dim, clockwise ) {\n\n\tlet i, last;\n\n\tif ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) {\n\n\t\tfor ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t} else {\n\n\t\tfor ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t}\n\n\tif ( last && equals( last, last.next ) ) {\n\n\t\tremoveNode( last );\n\t\tlast = last.next;\n\n\t}\n\n\treturn last;\n\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints( start, end ) {\n\n\tif ( ! start ) return start;\n\tif ( ! end ) end = start;\n\n\tlet p = start,\n\t\tagain;\n\tdo {\n\n\t\tagain = false;\n\n\t\tif ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) {\n\n\t\t\tremoveNode( p );\n\t\t\tp = end = p.prev;\n\t\t\tif ( p === p.next ) break;\n\t\t\tagain = true;\n\n\t\t} else {\n\n\t\t\tp = p.next;\n\n\t\t}\n\n\t} while ( again || p !== end );\n\n\treturn end;\n\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) {\n\n\tif ( ! ear ) return;\n\n\t// interlink polygon nodes in z-order\n\tif ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize );\n\n\tlet stop = ear,\n\t\tprev, next;\n\n\t// iterate through ears, slicing them one by one\n\twhile ( ear.prev !== ear.next ) {\n\n\t\tprev = ear.prev;\n\t\tnext = ear.next;\n\n\t\tif ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) {\n\n\t\t\t// cut off the triangle\n\t\t\ttriangles.push( prev.i / dim | 0 );\n\t\t\ttriangles.push( ear.i / dim | 0 );\n\t\t\ttriangles.push( next.i / dim | 0 );\n\n\t\t\tremoveNode( ear );\n\n\t\t\t// skipping the next vertex leads to less sliver triangles\n\t\t\tear = next.next;\n\t\t\tstop = next.next;\n\n\t\t\tcontinue;\n\n\t\t}\n\n\t\tear = next;\n\n\t\t// if we looped through the whole remaining polygon and can't find any more ears\n\t\tif ( ear === stop ) {\n\n\t\t\t// try filtering points and slicing again\n\t\t\tif ( ! pass ) {\n\n\t\t\t\tearcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 );\n\n\t\t\t\t// if this didn't work, try curing all small self-intersections locally\n\n\t\t\t} else if ( pass === 1 ) {\n\n\t\t\t\tear = cureLocalIntersections( filterPoints( ear ), triangles, dim );\n\t\t\t\tearcutLinked( ear, triangles, dim, minX, minY, invSize, 2 );\n\n\t\t\t\t// as a last resort, try splitting the remaining polygon into two\n\n\t\t\t} else if ( pass === 2 ) {\n\n\t\t\t\tsplitEarcut( ear, triangles, dim, minX, minY, invSize );\n\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar( ear ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\t// now make sure we don't have other points inside the potential ear\n\tconst ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n\t// triangle bbox; min & max are calculated like this for speed\n\tconst x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ),\n\t\ty0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ),\n\t\tx1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ),\n\t\ty1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy );\n\n\tlet p = c.next;\n\twhile ( p !== a ) {\n\n\t\tif ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.next;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction isEarHashed( ear, minX, minY, invSize ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\tconst ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n\t// triangle bbox; min & max are calculated like this for speed\n\tconst x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ),\n\t\ty0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ),\n\t\tx1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ),\n\t\ty1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy );\n\n\t// z-order range for the current triangle bbox;\n\tconst minZ = zOrder( x0, y0, minX, minY, invSize ),\n\t\tmaxZ = zOrder( x1, y1, minX, minY, invSize );\n\n\tlet p = ear.prevZ,\n\t\tn = ear.nextZ;\n\n\t// look for points inside the triangle in both directions\n\twhile ( p && p.z >= minZ && n && n.z <= maxZ ) {\n\n\t\tif ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t\tif ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\t// look for remaining points in decreasing z-order\n\twhile ( p && p.z >= minZ ) {\n\n\t\tif ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t}\n\n\t// look for remaining points in increasing z-order\n\twhile ( n && n.z <= maxZ ) {\n\n\t\tif ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\treturn true;\n\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections( start, triangles, dim ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tconst a = p.prev,\n\t\t\tb = p.next.next;\n\n\t\tif ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) {\n\n\t\t\ttriangles.push( a.i / dim | 0 );\n\t\t\ttriangles.push( p.i / dim | 0 );\n\t\t\ttriangles.push( b.i / dim | 0 );\n\n\t\t\t// remove two nodes involved\n\t\t\tremoveNode( p );\n\t\t\tremoveNode( p.next );\n\n\t\t\tp = start = b;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn filterPoints( p );\n\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut( start, triangles, dim, minX, minY, invSize ) {\n\n\t// look for a valid diagonal that divides the polygon into two\n\tlet a = start;\n\tdo {\n\n\t\tlet b = a.next.next;\n\t\twhile ( b !== a.prev ) {\n\n\t\t\tif ( a.i !== b.i && isValidDiagonal( a, b ) ) {\n\n\t\t\t\t// split the polygon in two by the diagonal\n\t\t\t\tlet c = splitPolygon( a, b );\n\n\t\t\t\t// filter colinear points around the cuts\n\t\t\t\ta = filterPoints( a, a.next );\n\t\t\t\tc = filterPoints( c, c.next );\n\n\t\t\t\t// run earcut on each half\n\t\t\t\tearcutLinked( a, triangles, dim, minX, minY, invSize, 0 );\n\t\t\t\tearcutLinked( c, triangles, dim, minX, minY, invSize, 0 );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tb = b.next;\n\n\t\t}\n\n\t\ta = a.next;\n\n\t} while ( a !== start );\n\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles( data, holeIndices, outerNode, dim ) {\n\n\tconst queue = [];\n\tlet i, len, start, end, list;\n\n\tfor ( i = 0, len = holeIndices.length; i < len; i ++ ) {\n\n\t\tstart = holeIndices[ i ] * dim;\n\t\tend = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length;\n\t\tlist = linkedList( data, start, end, dim, false );\n\t\tif ( list === list.next ) list.steiner = true;\n\t\tqueue.push( getLeftmost( list ) );\n\n\t}\n\n\tqueue.sort( compareX );\n\n\t// process holes from left to right\n\tfor ( i = 0; i < queue.length; i ++ ) {\n\n\t\touterNode = eliminateHole( queue[ i ], outerNode );\n\n\t}\n\n\treturn outerNode;\n\n}\n\nfunction compareX( a, b ) {\n\n\treturn a.x - b.x;\n\n}\n\n// find a bridge between vertices that connects hole with an outer ring and link it\nfunction eliminateHole( hole, outerNode ) {\n\n\tconst bridge = findHoleBridge( hole, outerNode );\n\tif ( ! bridge ) {\n\n\t\treturn outerNode;\n\n\t}\n\n\tconst bridgeReverse = splitPolygon( bridge, hole );\n\n\t// filter collinear points around the cuts\n\tfilterPoints( bridgeReverse, bridgeReverse.next );\n\treturn filterPoints( bridge, bridge.next );\n\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge( hole, outerNode ) {\n\n\tlet p = outerNode,\n\t\tqx = - Infinity,\n\t\tm;\n\n\tconst hx = hole.x, hy = hole.y;\n\n\t// find a segment intersected by a ray from the hole's leftmost point to the left;\n\t// segment's endpoint with lesser x will be potential connection point\n\tdo {\n\n\t\tif ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) {\n\n\t\t\tconst x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y );\n\t\t\tif ( x <= hx && x > qx ) {\n\n\t\t\t\tqx = x;\n\t\t\t\tm = p.x < p.next.x ? p : p.next;\n\t\t\t\tif ( x === hx ) return m; // hole touches outer segment; pick leftmost endpoint\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== outerNode );\n\n\tif ( ! m ) return null;\n\n\t// look for points inside the triangle of hole point, segment intersection and endpoint;\n\t// if there are no points found, we have a valid connection;\n\t// otherwise choose the point of the minimum angle with the ray as connection point\n\n\tconst stop = m,\n\t\tmx = m.x,\n\t\tmy = m.y;\n\tlet tanMin = Infinity, tan;\n\n\tp = m;\n\n\tdo {\n\n\t\tif ( hx >= p.x && p.x >= mx && hx !== p.x &&\n\t\t\t\tpointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) {\n\n\t\t\ttan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential\n\n\t\t\tif ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) {\n\n\t\t\t\tm = p;\n\t\t\t\ttanMin = tan;\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== stop );\n\n\treturn m;\n\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector( m, p ) {\n\n\treturn area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0;\n\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve( start, minX, minY, invSize ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tif ( p.z === 0 ) p.z = zOrder( p.x, p.y, minX, minY, invSize );\n\t\tp.prevZ = p.prev;\n\t\tp.nextZ = p.next;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\tp.prevZ.nextZ = null;\n\tp.prevZ = null;\n\n\tsortLinked( p );\n\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked( list ) {\n\n\tlet i, p, q, e, tail, numMerges, pSize, qSize,\n\t\tinSize = 1;\n\n\tdo {\n\n\t\tp = list;\n\t\tlist = null;\n\t\ttail = null;\n\t\tnumMerges = 0;\n\n\t\twhile ( p ) {\n\n\t\t\tnumMerges ++;\n\t\t\tq = p;\n\t\t\tpSize = 0;\n\t\t\tfor ( i = 0; i < inSize; i ++ ) {\n\n\t\t\t\tpSize ++;\n\t\t\t\tq = q.nextZ;\n\t\t\t\tif ( ! q ) break;\n\n\t\t\t}\n\n\t\t\tqSize = inSize;\n\n\t\t\twhile ( pSize > 0 || ( qSize > 0 && q ) ) {\n\n\t\t\t\tif ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) {\n\n\t\t\t\t\te = p;\n\t\t\t\t\tp = p.nextZ;\n\t\t\t\t\tpSize --;\n\n\t\t\t\t} else {\n\n\t\t\t\t\te = q;\n\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\tqSize --;\n\n\t\t\t\t}\n\n\t\t\t\tif ( tail ) tail.nextZ = e;\n\t\t\t\telse list = e;\n\n\t\t\t\te.prevZ = tail;\n\t\t\t\ttail = e;\n\n\t\t\t}\n\n\t\t\tp = q;\n\n\t\t}\n\n\t\ttail.nextZ = null;\n\t\tinSize *= 2;\n\n\t} while ( numMerges > 1 );\n\n\treturn list;\n\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder( x, y, minX, minY, invSize ) {\n\n\t// coords are transformed into non-negative 15-bit integer range\n\tx = ( x - minX ) * invSize | 0;\n\ty = ( y - minY ) * invSize | 0;\n\n\tx = ( x | ( x << 8 ) ) & 0x00FF00FF;\n\tx = ( x | ( x << 4 ) ) & 0x0F0F0F0F;\n\tx = ( x | ( x << 2 ) ) & 0x33333333;\n\tx = ( x | ( x << 1 ) ) & 0x55555555;\n\n\ty = ( y | ( y << 8 ) ) & 0x00FF00FF;\n\ty = ( y | ( y << 4 ) ) & 0x0F0F0F0F;\n\ty = ( y | ( y << 2 ) ) & 0x33333333;\n\ty = ( y | ( y << 1 ) ) & 0x55555555;\n\n\treturn x | ( y << 1 );\n\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost( start ) {\n\n\tlet p = start,\n\t\tleftmost = start;\n\tdo {\n\n\t\tif ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn leftmost;\n\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) >= ( ax - px ) * ( cy - py ) &&\n ( ax - px ) * ( by - py ) >= ( bx - px ) * ( ay - py ) &&\n ( bx - px ) * ( cy - py ) >= ( cx - px ) * ( by - py );\n\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n ( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n ( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}\n\n// signed area of a triangle\nfunction area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}\n\n// check if two points are equal\nfunction equals( p1, p2 ) {\n\n\treturn p1.x === p2.x && p1.y === p2.y;\n\n}\n\n// check if two segments intersect\nfunction intersects( p1, q1, p2, q2 ) {\n\n\tconst o1 = sign( area( p1, q1, p2 ) );\n\tconst o2 = sign( area( p1, q1, q2 ) );\n\tconst o3 = sign( area( p2, q2, p1 ) );\n\tconst o4 = sign( area( p2, q2, q1 ) );\n\n\tif ( o1 !== o2 && o3 !== o4 ) return true; // general case\n\n\tif ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n\tif ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n\tif ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n\tif ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n\treturn false;\n\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}\n\nfunction sign( num ) {\n\n\treturn num > 0 ? 1 : num < 0 ? - 1 : 0;\n\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside( a, b ) {\n\n\tlet p = a,\n\t\tinside = false;\n\tconst px = ( a.x + b.x ) / 2,\n\t\tpy = ( a.y + b.y ) / 2;\n\tdo {\n\n\t\tif ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y &&\n\t\t\t( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) )\n\t\t\tinside = ! inside;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn inside;\n\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon( a, b ) {\n\n\tconst a2 = new Node( a.i, a.x, a.y ),\n\t\tb2 = new Node( b.i, b.x, b.y ),\n\t\tan = a.next,\n\t\tbp = b.prev;\n\n\ta.next = b;\n\tb.prev = a;\n\n\ta2.next = an;\n\tan.prev = a2;\n\n\tb2.next = a2;\n\ta2.prev = b2;\n\n\tbp.next = b2;\n\tb2.prev = bp;\n\n\treturn b2;\n\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode( i, x, y, last ) {\n\n\tconst p = new Node( i, x, y );\n\n\tif ( ! last ) {\n\n\t\tp.prev = p;\n\t\tp.next = p;\n\n\t} else {\n\n\t\tp.next = last.next;\n\t\tp.prev = last;\n\t\tlast.next.prev = p;\n\t\tlast.next = p;\n\n\t}\n\n\treturn p;\n\n}\n\nfunction removeNode( p ) {\n\n\tp.next.prev = p.prev;\n\tp.prev.next = p.next;\n\n\tif ( p.prevZ ) p.prevZ.nextZ = p.nextZ;\n\tif ( p.nextZ ) p.nextZ.prevZ = p.prevZ;\n\n}\n\nfunction Node( i, x, y ) {\n\n\t// vertex index in coordinates array\n\tthis.i = i;\n\n\t// vertex coordinates\n\tthis.x = x;\n\tthis.y = y;\n\n\t// previous and next vertex nodes in a polygon ring\n\tthis.prev = null;\n\tthis.next = null;\n\n\t// z-order curve value\n\tthis.z = 0;\n\n\t// previous and next nodes in z-order\n\tthis.prevZ = null;\n\tthis.nextZ = null;\n\n\t// indicates whether this is a steiner point\n\tthis.steiner = false;\n\n}\n\nfunction signedArea( data, start, end, dim ) {\n\n\tlet sum = 0;\n\tfor ( let i = start, j = end - dim; i < end; i += dim ) {\n\n\t\tsum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] );\n\t\tj = i;\n\n\t}\n\n\treturn sum;\n\n}\n\nclass ShapeUtils {\n\n\t// calculate area of the contour polygon\n\n\tstatic area( contour ) {\n\n\t\tconst n = contour.length;\n\t\tlet a = 0.0;\n\n\t\tfor ( let p = n - 1, q = 0; q < n; p = q ++ ) {\n\n\t\t\ta += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;\n\n\t\t}\n\n\t\treturn a * 0.5;\n\n\t}\n\n\tstatic isClockWise( pts ) {\n\n\t\treturn ShapeUtils.area( pts ) < 0;\n\n\t}\n\n\tstatic triangulateShape( contour, holes ) {\n\n\t\tconst vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n\t\tconst holeIndices = []; // array of hole indices\n\t\tconst faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n\n\t\tremoveDupEndPts( contour );\n\t\taddContour( vertices, contour );\n\n\t\t//\n\n\t\tlet holeIndex = contour.length;\n\n\t\tholes.forEach( removeDupEndPts );\n\n\t\tfor ( let i = 0; i < holes.length; i ++ ) {\n\n\t\t\tholeIndices.push( holeIndex );\n\t\t\tholeIndex += holes[ i ].length;\n\t\t\taddContour( vertices, holes[ i ] );\n\n\t\t}\n\n\t\t//\n\n\t\tconst triangles = Earcut.triangulate( vertices, holeIndices );\n\n\t\t//\n\n\t\tfor ( let i = 0; i < triangles.length; i += 3 ) {\n\n\t\t\tfaces.push( triangles.slice( i, i + 3 ) );\n\n\t\t}\n\n\t\treturn faces;\n\n\t}\n\n}\n\nfunction removeDupEndPts( points ) {\n\n\tconst l = points.length;\n\n\tif ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) {\n\n\t\tpoints.pop();\n\n\t}\n\n}\n\nfunction addContour( vertices, contour ) {\n\n\tfor ( let i = 0; i < contour.length; i ++ ) {\n\n\t\tvertices.push( contour[ i ].x );\n\t\tvertices.push( contour[ i ].y );\n\n\t}\n\n}\n\n/**\n * Creates extruded geometry from a path shape.\n *\n * parameters = {\n *\n * curveSegments: , // number of points on the curves\n * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too\n * depth: , // Depth to extrude the shape\n *\n * bevelEnabled: , // turn on bevel\n * bevelThickness: , // how deep into the original shape bevel goes\n * bevelSize: , // how far from shape outline (including bevelOffset) is bevel\n * bevelOffset: , // how far from shape outline does bevel start\n * bevelSegments: , // number of bevel layers\n *\n * extrudePath: // curve to extrude shape along\n *\n * UVGenerator: // object that provides UV generator functions\n *\n * }\n */\n\n\nclass ExtrudeGeometry extends BufferGeometry {\n\n\tconstructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( - 0.5, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), options = {} ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ExtrudeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\toptions: options\n\t\t};\n\n\t\tshapes = Array.isArray( shapes ) ? shapes : [ shapes ];\n\n\t\tconst scope = this;\n\n\t\tconst verticesArray = [];\n\t\tconst uvArray = [];\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\t\t\taddShape( shape );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) );\n\n\t\tthis.computeVertexNormals();\n\n\t\t// functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst placeholder = [];\n\n\t\t\t// options\n\n\t\t\tconst curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n\t\t\tconst steps = options.steps !== undefined ? options.steps : 1;\n\t\t\tconst depth = options.depth !== undefined ? options.depth : 1;\n\n\t\t\tlet bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n\t\t\tlet bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 0.2;\n\t\t\tlet bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 0.1;\n\t\t\tlet bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n\t\t\tlet bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n\n\t\t\tconst extrudePath = options.extrudePath;\n\n\t\t\tconst uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator;\n\n\t\t\t//\n\n\t\t\tlet extrudePts, extrudeByPath = false;\n\t\t\tlet splineTube, binormal, normal, position2;\n\n\t\t\tif ( extrudePath ) {\n\n\t\t\t\textrudePts = extrudePath.getSpacedPoints( steps );\n\n\t\t\t\textrudeByPath = true;\n\t\t\t\tbevelEnabled = false; // bevels not supported for path extrusion\n\n\t\t\t\t// SETUP TNB variables\n\n\t\t\t\t// TODO1 - have a .isClosed in spline?\n\n\t\t\t\tsplineTube = extrudePath.computeFrenetFrames( steps, false );\n\n\t\t\t\t// console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n\n\t\t\t\tbinormal = new Vector3();\n\t\t\t\tnormal = new Vector3();\n\t\t\t\tposition2 = new Vector3();\n\n\t\t\t}\n\n\t\t\t// Safeguards if bevels are not enabled\n\n\t\t\tif ( ! bevelEnabled ) {\n\n\t\t\t\tbevelSegments = 0;\n\t\t\t\tbevelThickness = 0;\n\t\t\t\tbevelSize = 0;\n\t\t\t\tbevelOffset = 0;\n\n\t\t\t}\n\n\t\t\t// Variables initialization\n\n\t\t\tconst shapePoints = shape.extractPoints( curveSegments );\n\n\t\t\tlet vertices = shapePoints.shape;\n\t\t\tconst holes = shapePoints.holes;\n\n\t\t\tconst reverse = ! ShapeUtils.isClockWise( vertices );\n\n\t\t\tif ( reverse ) {\n\n\t\t\t\tvertices = vertices.reverse();\n\n\t\t\t\t// Maybe we should also check if holes are in the opposite direction, just to be safe ...\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\t\tif ( ShapeUtils.isClockWise( ahole ) ) {\n\n\t\t\t\t\t\tholes[ h ] = ahole.reverse();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( vertices, holes );\n\n\t\t\t/* Vertices */\n\n\t\t\tconst contour = vertices; // vertices has all points but contour has only points of circumference\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\tvertices = vertices.concat( ahole );\n\n\t\t\t}\n\n\n\t\t\tfunction scalePt2( pt, vec, size ) {\n\n\t\t\t\tif ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );\n\n\t\t\t\treturn pt.clone().addScaledVector( vec, size );\n\n\t\t\t}\n\n\t\t\tconst vlen = vertices.length, flen = faces.length;\n\n\n\t\t\t// Find directions for point movement\n\n\n\t\t\tfunction getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t//\n\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\t\tlet v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\tconst v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\tconst v_next_x = inNext.x - inPt.x,\n\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\t\tconst v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t\t// check for collinear edges\n\t\t\t\tconst collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not collinear\n\n\t\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\t\tconst v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\t\tconst v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\t\tconst ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\t\tconst ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\t\tconst ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\t\tconst ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\t\tconst sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t// but prevent crazy spikes\n\t\t\t\t\tconst v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\t\tlet direction_eq = false; // assumes: opposite\n\n\t\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t\t}\n\n\n\t\t\tconst contourMovements = [];\n\n\t\t\tfor ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t// console.log('i,j,k', i, j , k)\n\n\t\t\t\tcontourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );\n\n\t\t\t}\n\n\t\t\tconst holesMovements = [];\n\t\t\tlet oneHoleMovements, verticesMovements = contourMovements.concat();\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\toneHoleMovements = [];\n\n\t\t\t\tfor ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t\toneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] );\n\n\t\t\t\t}\n\n\t\t\t\tholesMovements.push( oneHoleMovements );\n\t\t\t\tverticesMovements = verticesMovements.concat( oneHoleMovements );\n\n\t\t\t}\n\n\n\t\t\t// Loop bevelSegments, 1 for the front, 1 for the back\n\n\t\t\tfor ( let b = 0; b < bevelSegments; b ++ ) {\n\n\t\t\t\t//for ( b = bevelSegments; b > 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\n\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst bs = bevelSize + bevelOffset;\n\n\t\t\t// Back facing vertices\n\n\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\tv( vert.x, vert.y, 0 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n\n\t\t\t\t\tnormal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x );\n\t\t\t\t\tbinormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\tposition2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal );\n\n\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Add stepped vertices...\n\t\t\t// Including front facing vertices\n\n\t\t\tfor ( let s = 1; s <= steps; s ++ ) {\n\n\t\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\tv( vert.x, vert.y, depth / steps * s );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n\n\t\t\t\t\t\tnormal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x );\n\t\t\t\t\t\tbinormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\t\tposition2.copy( extrudePts[ s ] ).add( normal ).add( binormal );\n\n\t\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\t// Add bevel segments planes\n\n\t\t\t//for ( b = 1; b <= bevelSegments; b ++ ) {\n\t\t\tfor ( let b = bevelSegments - 1; b >= 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/* Faces */\n\n\t\t\t// Top and bottom faces\n\n\t\t\tbuildLidFaces();\n\n\t\t\t// Sides faces\n\n\t\t\tbuildSideFaces();\n\n\n\t\t\t///// Internal functions\n\n\t\t\tfunction buildLidFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\n\t\t\t\tif ( bevelEnabled ) {\n\n\t\t\t\t\tlet layer = 0; // steps + 1\n\t\t\t\t\tlet offset = vlen * layer;\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlayer = steps + bevelSegments * 2;\n\t\t\t\t\toffset = vlen * layer;\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ], face[ 1 ], face[ 0 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 0 );\n\n\t\t\t}\n\n\t\t\t// Create faces for the z-sides of the shape\n\n\t\t\tfunction buildSideFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\t\t\t\tlet layeroffset = 0;\n\t\t\t\tsidewalls( contour, layeroffset );\n\t\t\t\tlayeroffset += contour.length;\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\tsidewalls( ahole, layeroffset );\n\n\t\t\t\t\t//, true\n\t\t\t\t\tlayeroffset += ahole.length;\n\n\t\t\t\t}\n\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 1 );\n\n\n\t\t\t}\n\n\t\t\tfunction sidewalls( contour, layeroffset ) {\n\n\t\t\t\tlet i = contour.length;\n\n\t\t\t\twhile ( -- i >= 0 ) {\n\n\t\t\t\t\tconst j = i;\n\t\t\t\t\tlet k = i - 1;\n\t\t\t\t\tif ( k < 0 ) k = contour.length - 1;\n\n\t\t\t\t\t//console.log('b', i,j, i-1, k,vertices.length);\n\n\t\t\t\t\tfor ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) {\n\n\t\t\t\t\t\tconst slen1 = vlen * s;\n\t\t\t\t\t\tconst slen2 = vlen * ( s + 1 );\n\n\t\t\t\t\t\tconst a = layeroffset + j + slen1,\n\t\t\t\t\t\t\tb = layeroffset + k + slen1,\n\t\t\t\t\t\t\tc = layeroffset + k + slen2,\n\t\t\t\t\t\t\td = layeroffset + j + slen2;\n\n\t\t\t\t\t\tf4( a, b, c, d );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfunction v( x, y, z ) {\n\n\t\t\t\tplaceholder.push( x );\n\t\t\t\tplaceholder.push( y );\n\t\t\t\tplaceholder.push( z );\n\n\t\t\t}\n\n\n\t\t\tfunction f3( a, b, c ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\n\t\t\t}\n\n\t\t\tfunction f4( a, b, c, d ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( d );\n\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\t\t\t\taddVertex( d );\n\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t}\n\n\t\t\tfunction addVertex( index ) {\n\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 0 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 1 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 2 ] );\n\n\t\t\t}\n\n\n\t\t\tfunction addUV( vector2 ) {\n\n\t\t\t\tuvArray.push( vector2.x );\n\t\t\t\tuvArray.push( vector2.y );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\t\tconst options = this.parameters.options;\n\n\t\treturn toJSON$1( shapes, options, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\tconst extrudePath = data.options.extrudePath;\n\n\t\tif ( extrudePath !== undefined ) {\n\n\t\t\tdata.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath );\n\n\t\t}\n\n\t\treturn new ExtrudeGeometry( geometryShapes, data.options );\n\n\t}\n\n}\n\nconst WorldUVGenerator = {\n\n\tgenerateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\n\t\treturn [\n\t\t\tnew Vector2( a_x, a_y ),\n\t\t\tnew Vector2( b_x, b_y ),\n\t\t\tnew Vector2( c_x, c_y )\n\t\t];\n\n\t},\n\n\tgenerateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst a_z = vertices[ indexA * 3 + 2 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst b_z = vertices[ indexB * 3 + 2 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\t\tconst c_z = vertices[ indexC * 3 + 2 ];\n\t\tconst d_x = vertices[ indexD * 3 ];\n\t\tconst d_y = vertices[ indexD * 3 + 1 ];\n\t\tconst d_z = vertices[ indexD * 3 + 2 ];\n\n\t\tif ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_x, 1 - a_z ),\n\t\t\t\tnew Vector2( b_x, 1 - b_z ),\n\t\t\t\tnew Vector2( c_x, 1 - c_z ),\n\t\t\t\tnew Vector2( d_x, 1 - d_z )\n\t\t\t];\n\n\t\t} else {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_y, 1 - a_z ),\n\t\t\t\tnew Vector2( b_y, 1 - b_z ),\n\t\t\t\tnew Vector2( c_y, 1 - c_z ),\n\t\t\t\tnew Vector2( d_y, 1 - d_z )\n\t\t\t];\n\n\t\t}\n\n\t}\n\n};\n\nfunction toJSON$1( shapes, options, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\tdata.options = Object.assign( {}, options );\n\n\tif ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON();\n\n\treturn data;\n\n}\n\nclass IcosahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\n\t\tconst vertices = [\n\t\t\t- 1, t, 0, \t1, t, 0, \t- 1, - t, 0, \t1, - t, 0,\n\t\t\t0, - 1, t, \t0, 1, t,\t0, - 1, - t, \t0, 1, - t,\n\t\t\tt, 0, - 1, \tt, 0, 1, \t- t, 0, - 1, \t- t, 0, 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 11, 5, \t0, 5, 1, \t0, 1, 7, \t0, 7, 10, \t0, 10, 11,\n\t\t\t1, 5, 9, \t5, 11, 4,\t11, 10, 2,\t10, 7, 6,\t7, 1, 8,\n\t\t\t3, 9, 4, \t3, 4, 2,\t3, 2, 6,\t3, 6, 8,\t3, 8, 9,\n\t\t\t4, 9, 5, \t2, 4, 11,\t6, 2, 10,\t8, 6, 7,\t9, 8, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'IcosahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new IcosahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass OctahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 0, 0, \t- 1, 0, 0,\t0, 1, 0,\n\t\t\t0, - 1, 0, \t0, 0, 1,\t0, 0, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 2, 4,\t0, 4, 3,\t0, 3, 5,\n\t\t\t0, 5, 2,\t1, 2, 5,\t1, 5, 3,\n\t\t\t1, 3, 4,\t1, 4, 2\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'OctahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new OctahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass RingGeometry extends BufferGeometry {\n\n\tconstructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'RingGeometry';\n\n\t\tthis.parameters = {\n\t\t\tinnerRadius: innerRadius,\n\t\t\touterRadius: outerRadius,\n\t\t\tthetaSegments: thetaSegments,\n\t\t\tphiSegments: phiSegments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tthetaSegments = Math.max( 3, thetaSegments );\n\t\tphiSegments = Math.max( 1, phiSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// some helper variables\n\n\t\tlet radius = innerRadius;\n\t\tconst radiusStep = ( ( outerRadius - innerRadius ) / phiSegments );\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= phiSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= thetaSegments; i ++ ) {\n\n\t\t\t\t// values are generate from the inside of the ring to the outside\n\n\t\t\t\tconst segment = thetaStart + i / thetaSegments * thetaLength;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( vertex.x / outerRadius + 1 ) / 2;\n\t\t\t\tuv.y = ( vertex.y / outerRadius + 1 ) / 2;\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t}\n\n\t\t\t// increase the radius for next row of vertices\n\n\t\t\tradius += radiusStep;\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let j = 0; j < phiSegments; j ++ ) {\n\n\t\t\tconst thetaSegmentLevel = j * ( thetaSegments + 1 );\n\n\t\t\tfor ( let i = 0; i < thetaSegments; i ++ ) {\n\n\t\t\t\tconst segment = i + thetaSegmentLevel;\n\n\t\t\t\tconst a = segment;\n\t\t\t\tconst b = segment + thetaSegments + 1;\n\t\t\t\tconst c = segment + thetaSegments + 2;\n\t\t\t\tconst d = segment + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ShapeGeometry extends BufferGeometry {\n\n\tconstructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ShapeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\tcurveSegments: curveSegments\n\t\t};\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet groupStart = 0;\n\t\tlet groupCount = 0;\n\n\t\t// allow single and array values for \"shapes\" parameter\n\n\t\tif ( Array.isArray( shapes ) === false ) {\n\n\t\t\taddShape( shapes );\n\n\t\t} else {\n\n\t\t\tfor ( let i = 0; i < shapes.length; i ++ ) {\n\n\t\t\t\taddShape( shapes[ i ] );\n\n\t\t\t\tthis.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t\tgroupCount = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\n\t\t// helper functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst indexOffset = vertices.length / 3;\n\t\t\tconst points = shape.extractPoints( curveSegments );\n\n\t\t\tlet shapeVertices = points.shape;\n\t\t\tconst shapeHoles = points.holes;\n\n\t\t\t// check direction of vertices\n\n\t\t\tif ( ShapeUtils.isClockWise( shapeVertices ) === false ) {\n\n\t\t\t\tshapeVertices = shapeVertices.reverse();\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\n\t\t\t\tif ( ShapeUtils.isClockWise( shapeHole ) === true ) {\n\n\t\t\t\t\tshapeHoles[ i ] = shapeHole.reverse();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles );\n\n\t\t\t// join vertices of inner and outer paths to a single array\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\t\t\t\tshapeVertices = shapeVertices.concat( shapeHole );\n\n\t\t\t}\n\n\t\t\t// vertices, normals, uvs\n\n\t\t\tfor ( let i = 0, l = shapeVertices.length; i < l; i ++ ) {\n\n\t\t\t\tconst vertex = shapeVertices[ i ];\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, 0 );\n\t\t\t\tnormals.push( 0, 0, 1 );\n\t\t\t\tuvs.push( vertex.x, vertex.y ); // world uvs\n\n\t\t\t}\n\n\t\t\t// indices\n\n\t\t\tfor ( let i = 0, l = faces.length; i < l; i ++ ) {\n\n\t\t\t\tconst face = faces[ i ];\n\n\t\t\t\tconst a = face[ 0 ] + indexOffset;\n\t\t\t\tconst b = face[ 1 ] + indexOffset;\n\t\t\t\tconst c = face[ 2 ] + indexOffset;\n\n\t\t\t\tindices.push( a, b, c );\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\n\t\treturn toJSON( shapes, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\treturn new ShapeGeometry( geometryShapes, data.curveSegments );\n\n\t}\n\n}\n\nfunction toJSON( shapes, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\treturn data;\n\n}\n\nclass SphereGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'SphereGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\twidthSegments = Math.max( 3, Math.floor( widthSegments ) );\n\t\theightSegments = Math.max( 2, Math.floor( heightSegments ) );\n\n\t\tconst thetaEnd = Math.min( thetaStart + thetaLength, Math.PI );\n\n\t\tlet index = 0;\n\t\tconst grid = [];\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let iy = 0; iy <= heightSegments; iy ++ ) {\n\n\t\t\tconst verticesRow = [];\n\n\t\t\tconst v = iy / heightSegments;\n\n\t\t\t// special case for the poles\n\n\t\t\tlet uOffset = 0;\n\n\t\t\tif ( iy === 0 && thetaStart === 0 ) {\n\n\t\t\t\tuOffset = 0.5 / widthSegments;\n\n\t\t\t} else if ( iy === heightSegments && thetaEnd === Math.PI ) {\n\n\t\t\t\tuOffset = - 0.5 / widthSegments;\n\n\t\t\t}\n\n\t\t\tfor ( let ix = 0; ix <= widthSegments; ix ++ ) {\n\n\t\t\t\tconst u = ix / widthSegments;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\t\t\t\tvertex.y = radius * Math.cos( thetaStart + v * thetaLength );\n\t\t\t\tvertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.copy( vertex ).normalize();\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( u + uOffset, 1 - v );\n\n\t\t\t\tverticesRow.push( index ++ );\n\n\t\t\t}\n\n\t\t\tgrid.push( verticesRow );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let iy = 0; iy < heightSegments; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < widthSegments; ix ++ ) {\n\n\t\t\t\tconst a = grid[ iy ][ ix + 1 ];\n\t\t\t\tconst b = grid[ iy ][ ix ];\n\t\t\t\tconst c = grid[ iy + 1 ][ ix ];\n\t\t\t\tconst d = grid[ iy + 1 ][ ix + 1 ];\n\n\t\t\t\tif ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d );\n\t\t\t\tif ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass TetrahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 1, 1, \t- 1, - 1, 1, \t- 1, 1, - 1, \t1, - 1, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t2, 1, 0, \t0, 3, 2,\t1, 3, 0,\t2, 3, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'TetrahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TetrahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass TorusGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'TorusGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\tradialSegments: radialSegments,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tarc: arc\n\t\t};\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\ttubularSegments = Math.floor( tubularSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst center = new Vector3();\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tconst u = i / tubularSegments * arc;\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u );\n\t\t\t\tvertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u );\n\t\t\t\tvertex.z = tube * Math.sin( v );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tcenter.x = radius * Math.cos( u );\n\t\t\t\tcenter.y = radius * Math.sin( u );\n\t\t\t\tnormal.subVectors( vertex, center ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= tubularSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( tubularSegments + 1 ) * j + i - 1;\n\t\t\t\tconst b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1;\n\t\t\t\tconst c = ( tubularSegments + 1 ) * ( j - 1 ) + i;\n\t\t\t\tconst d = ( tubularSegments + 1 ) * j + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );\n\n\t}\n\n}\n\nclass TorusKnotGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'TorusKnotGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradialSegments: radialSegments,\n\t\t\tp: p,\n\t\t\tq: q\n\t\t};\n\n\t\ttubularSegments = Math.floor( tubularSegments );\n\t\tradialSegments = Math.floor( radialSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\tconst P1 = new Vector3();\n\t\tconst P2 = new Vector3();\n\n\t\tconst B = new Vector3();\n\t\tconst T = new Vector3();\n\t\tconst N = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let i = 0; i <= tubularSegments; ++ i ) {\n\n\t\t\t// the radian \"u\" is used to calculate the position on the torus curve of the current tubular segment\n\n\t\t\tconst u = i / tubularSegments * p * Math.PI * 2;\n\n\t\t\t// now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n\t\t\t// these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n\n\t\t\tcalculatePositionOnCurve( u, p, q, radius, P1 );\n\t\t\tcalculatePositionOnCurve( u + 0.01, p, q, radius, P2 );\n\n\t\t\t// calculate orthonormal basis\n\n\t\t\tT.subVectors( P2, P1 );\n\t\t\tN.addVectors( P2, P1 );\n\t\t\tB.crossVectors( T, N );\n\t\t\tN.crossVectors( B, T );\n\n\t\t\t// normalize B, N. T can be ignored, we don't use it\n\n\t\t\tB.normalize();\n\t\t\tN.normalize();\n\n\t\t\tfor ( let j = 0; j <= radialSegments; ++ j ) {\n\n\t\t\t\t// now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n\t\t\t\t// because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\t\t\t\tconst cx = - tube * Math.cos( v );\n\t\t\t\tconst cy = tube * Math.sin( v );\n\n\t\t\t\t// now calculate the final vertex position.\n\t\t\t\t// first we orient the extrusion with our basis vectors, then we add it to the current position on the curve\n\n\t\t\t\tvertex.x = P1.x + ( cx * N.x + cy * B.x );\n\t\t\t\tvertex.y = P1.y + ( cx * N.y + cy * B.y );\n\t\t\t\tvertex.z = P1.z + ( cx * N.z + cy * B.z );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n\n\t\t\t\tnormal.subVectors( vertex, P1 ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// this function calculates the current position on the torus curve\n\n\t\tfunction calculatePositionOnCurve( u, p, q, radius, position ) {\n\n\t\t\tconst cu = Math.cos( u );\n\t\t\tconst su = Math.sin( u );\n\t\t\tconst quOverP = q / p * u;\n\t\t\tconst cs = Math.cos( quOverP );\n\n\t\t\tposition.x = radius * ( 2 + cs ) * 0.5 * cu;\n\t\t\tposition.y = radius * ( 2 + cs ) * su * 0.5;\n\t\t\tposition.z = radius * Math.sin( quOverP ) * 0.5;\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );\n\n\t}\n\n}\n\nclass TubeGeometry extends BufferGeometry {\n\n\tconstructor( path = new QuadraticBezierCurve3( new Vector3( - 1, - 1, 0 ), new Vector3( - 1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'TubeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpath: path,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradius: radius,\n\t\t\tradialSegments: radialSegments,\n\t\t\tclosed: closed\n\t\t};\n\n\t\tconst frames = path.computeFrenetFrames( tubularSegments, closed );\n\n\t\t// expose internals\n\n\t\tthis.tangents = frames.tangents;\n\t\tthis.normals = frames.normals;\n\t\tthis.binormals = frames.binormals;\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\t\tconst uv = new Vector2();\n\t\tlet P = new Vector3();\n\n\t\t// buffer\n\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\t\tconst indices = [];\n\n\t\t// create buffer data\n\n\t\tgenerateBufferData();\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// functions\n\n\t\tfunction generateBufferData() {\n\n\t\t\tfor ( let i = 0; i < tubularSegments; i ++ ) {\n\n\t\t\t\tgenerateSegment( i );\n\n\t\t\t}\n\n\t\t\t// if the geometry is not closed, generate the last row of vertices and normals\n\t\t\t// at the regular position on the given path\n\t\t\t//\n\t\t\t// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n\n\t\t\tgenerateSegment( ( closed === false ) ? tubularSegments : 0 );\n\n\t\t\t// uvs are generated in a separate function.\n\t\t\t// this makes it easy compute correct values for closed geometries\n\n\t\t\tgenerateUVs();\n\n\t\t\t// finally create faces\n\n\t\t\tgenerateIndices();\n\n\t\t}\n\n\t\tfunction generateSegment( i ) {\n\n\t\t\t// we use getPointAt to sample evenly distributed points from the given path\n\n\t\t\tP = path.getPointAt( i / tubularSegments, P );\n\n\t\t\t// retrieve corresponding normal and binormal\n\n\t\t\tconst N = frames.normals[ i ];\n\t\t\tconst B = frames.binormals[ i ];\n\n\t\t\t// generate normals and vertices for the current segment\n\n\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\tconst sin = Math.sin( v );\n\t\t\t\tconst cos = - Math.cos( v );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.x = ( cos * N.x + sin * B.x );\n\t\t\t\tnormal.y = ( cos * N.y + sin * B.y );\n\t\t\t\tnormal.z = ( cos * N.z + sin * B.z );\n\t\t\t\tnormal.normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = P.x + radius * normal.x;\n\t\t\t\tvertex.y = P.y + radius * normal.y;\n\t\t\t\tvertex.z = P.z + radius * normal.z;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateIndices() {\n\n\t\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\t\tuv.x = i / tubularSegments;\n\t\t\t\t\tuv.y = j / radialSegments;\n\n\t\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.path = this.parameters.path.toJSON();\n\n\t\treturn data;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\t// This only works for built-in curves (e.g. CatmullRomCurve3).\n\t\t// User defined curves or instances of CurvePath will not be deserialized.\n\t\treturn new TubeGeometry(\n\t\t\tnew Curves[ data.path.type ]().fromJSON( data.path ),\n\t\t\tdata.tubularSegments,\n\t\t\tdata.radius,\n\t\t\tdata.radialSegments,\n\t\t\tdata.closed\n\t\t);\n\n\t}\n\n}\n\nclass WireframeGeometry extends BufferGeometry {\n\n\tconstructor( geometry = null ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'WireframeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tgeometry: geometry\n\t\t};\n\n\t\tif ( geometry !== null ) {\n\n\t\t\t// buffer\n\n\t\t\tconst vertices = [];\n\t\t\tconst edges = new Set();\n\n\t\t\t// helper variables\n\n\t\t\tconst start = new Vector3();\n\t\t\tconst end = new Vector3();\n\n\t\t\tif ( geometry.index !== null ) {\n\n\t\t\t\t// indexed BufferGeometry\n\n\t\t\t\tconst position = geometry.attributes.position;\n\t\t\t\tconst indices = geometry.index;\n\t\t\t\tlet groups = geometry.groups;\n\n\t\t\t\tif ( groups.length === 0 ) {\n\n\t\t\t\t\tgroups = [ { start: 0, count: indices.count, materialIndex: 0 } ];\n\n\t\t\t\t}\n\n\t\t\t\t// create a data structure that contains all edges without duplicates\n\n\t\t\t\tfor ( let o = 0, ol = groups.length; o < ol; ++ o ) {\n\n\t\t\t\t\tconst group = groups[ o ];\n\n\t\t\t\t\tconst groupStart = group.start;\n\t\t\t\t\tconst groupCount = group.count;\n\n\t\t\t\t\tfor ( let i = groupStart, l = ( groupStart + groupCount ); i < l; i += 3 ) {\n\n\t\t\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\t\tconst index1 = indices.getX( i + j );\n\t\t\t\t\t\t\tconst index2 = indices.getX( i + ( j + 1 ) % 3 );\n\n\t\t\t\t\t\t\tstart.fromBufferAttribute( position, index1 );\n\t\t\t\t\t\t\tend.fromBufferAttribute( position, index2 );\n\n\t\t\t\t\t\t\tif ( isUniqueEdge( start, end, edges ) === true ) {\n\n\t\t\t\t\t\t\t\tvertices.push( start.x, start.y, start.z );\n\t\t\t\t\t\t\t\tvertices.push( end.x, end.y, end.z );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// non-indexed BufferGeometry\n\n\t\t\t\tconst position = geometry.attributes.position;\n\n\t\t\t\tfor ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) {\n\n\t\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\t// three edges per triangle, an edge is represented as (index1, index2)\n\t\t\t\t\t\t// e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n\n\t\t\t\t\t\tconst index1 = 3 * i + j;\n\t\t\t\t\t\tconst index2 = 3 * i + ( ( j + 1 ) % 3 );\n\n\t\t\t\t\t\tstart.fromBufferAttribute( position, index1 );\n\t\t\t\t\t\tend.fromBufferAttribute( position, index2 );\n\n\t\t\t\t\t\tif ( isUniqueEdge( start, end, edges ) === true ) {\n\n\t\t\t\t\t\t\tvertices.push( start.x, start.y, start.z );\n\t\t\t\t\t\t\tvertices.push( end.x, end.y, end.z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// build geometry\n\n\t\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n}\n\nfunction isUniqueEdge( start, end, edges ) {\n\n\tconst hash1 = `${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;\n\tconst hash2 = `${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`; // coincident edge\n\n\tif ( edges.has( hash1 ) === true || edges.has( hash2 ) === true ) {\n\n\t\treturn false;\n\n\t} else {\n\n\t\tedges.add( hash1 );\n\t\tedges.add( hash2 );\n\t\treturn true;\n\n\t}\n\n}\n\nvar Geometries = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tBoxGeometry: BoxGeometry,\n\tCapsuleGeometry: CapsuleGeometry,\n\tCircleGeometry: CircleGeometry,\n\tConeGeometry: ConeGeometry,\n\tCylinderGeometry: CylinderGeometry,\n\tDodecahedronGeometry: DodecahedronGeometry,\n\tEdgesGeometry: EdgesGeometry,\n\tExtrudeGeometry: ExtrudeGeometry,\n\tIcosahedronGeometry: IcosahedronGeometry,\n\tLatheGeometry: LatheGeometry,\n\tOctahedronGeometry: OctahedronGeometry,\n\tPlaneGeometry: PlaneGeometry,\n\tPolyhedronGeometry: PolyhedronGeometry,\n\tRingGeometry: RingGeometry,\n\tShapeGeometry: ShapeGeometry,\n\tSphereGeometry: SphereGeometry,\n\tTetrahedronGeometry: TetrahedronGeometry,\n\tTorusGeometry: TorusGeometry,\n\tTorusKnotGeometry: TorusKnotGeometry,\n\tTubeGeometry: TubeGeometry,\n\tWireframeGeometry: WireframeGeometry\n});\n\nclass ShadowMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isShadowMaterial = true;\n\n\t\tthis.type = 'ShadowMaterial';\n\n\t\tthis.color = new Color( 0x000000 );\n\t\tthis.transparent = true;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass RawShaderMaterial extends ShaderMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper( parameters );\n\n\t\tthis.isRawShaderMaterial = true;\n\n\t\tthis.type = 'RawShaderMaterial';\n\n\t}\n\n}\n\nclass MeshStandardMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshStandardMaterial = true;\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.type = 'MeshStandardMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.roughness = 1.0;\n\t\tthis.metalness = 0.0;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.roughnessMap = null;\n\n\t\tthis.metalnessMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.envMapIntensity = 1.0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.color.copy( source.color );\n\t\tthis.roughness = source.roughness;\n\t\tthis.metalness = source.metalness;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.roughnessMap = source.roughnessMap;\n\n\t\tthis.metalnessMap = source.metalnessMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.envMapIntensity = source.envMapIntensity;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshPhysicalMaterial extends MeshStandardMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshPhysicalMaterial = true;\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.type = 'MeshPhysicalMaterial';\n\n\t\tthis.anisotropyRotation = 0;\n\t\tthis.anisotropyMap = null;\n\n\t\tthis.clearcoatMap = null;\n\t\tthis.clearcoatRoughness = 0.0;\n\t\tthis.clearcoatRoughnessMap = null;\n\t\tthis.clearcoatNormalScale = new Vector2( 1, 1 );\n\t\tthis.clearcoatNormalMap = null;\n\n\t\tthis.ior = 1.5;\n\n\t\tObject.defineProperty( this, 'reflectivity', {\n\t\t\tget: function () {\n\n\t\t\t\treturn ( clamp( 2.5 * ( this.ior - 1 ) / ( this.ior + 1 ), 0, 1 ) );\n\n\t\t\t},\n\t\t\tset: function ( reflectivity ) {\n\n\t\t\t\tthis.ior = ( 1 + 0.4 * reflectivity ) / ( 1 - 0.4 * reflectivity );\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.iridescenceMap = null;\n\t\tthis.iridescenceIOR = 1.3;\n\t\tthis.iridescenceThicknessRange = [ 100, 400 ];\n\t\tthis.iridescenceThicknessMap = null;\n\n\t\tthis.sheenColor = new Color( 0x000000 );\n\t\tthis.sheenColorMap = null;\n\t\tthis.sheenRoughness = 1.0;\n\t\tthis.sheenRoughnessMap = null;\n\n\t\tthis.transmissionMap = null;\n\n\t\tthis.thickness = 0;\n\t\tthis.thicknessMap = null;\n\t\tthis.attenuationDistance = Infinity;\n\t\tthis.attenuationColor = new Color( 1, 1, 1 );\n\n\t\tthis.specularIntensity = 1.0;\n\t\tthis.specularIntensityMap = null;\n\t\tthis.specularColor = new Color( 1, 1, 1 );\n\t\tthis.specularColorMap = null;\n\n\t\tthis._anisotropy = 0;\n\t\tthis._clearcoat = 0;\n\t\tthis._iridescence = 0;\n\t\tthis._sheen = 0.0;\n\t\tthis._transmission = 0;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tget anisotropy() {\n\n\t\treturn this._anisotropy;\n\n\t}\n\n\tset anisotropy( value ) {\n\n\t\tif ( this._anisotropy > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._anisotropy = value;\n\n\t}\n\n\tget clearcoat() {\n\n\t\treturn this._clearcoat;\n\n\t}\n\n\tset clearcoat( value ) {\n\n\t\tif ( this._clearcoat > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._clearcoat = value;\n\n\t}\n\n\tget iridescence() {\n\n\t\treturn this._iridescence;\n\n\t}\n\n\tset iridescence( value ) {\n\n\t\tif ( this._iridescence > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._iridescence = value;\n\n\t}\n\n\tget sheen() {\n\n\t\treturn this._sheen;\n\n\t}\n\n\tset sheen( value ) {\n\n\t\tif ( this._sheen > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._sheen = value;\n\n\t}\n\n\tget transmission() {\n\n\t\treturn this._transmission;\n\n\t}\n\n\tset transmission( value ) {\n\n\t\tif ( this._transmission > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._transmission = value;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.anisotropy = source.anisotropy;\n\t\tthis.anisotropyRotation = source.anisotropyRotation;\n\t\tthis.anisotropyMap = source.anisotropyMap;\n\n\t\tthis.clearcoat = source.clearcoat;\n\t\tthis.clearcoatMap = source.clearcoatMap;\n\t\tthis.clearcoatRoughness = source.clearcoatRoughness;\n\t\tthis.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n\t\tthis.clearcoatNormalMap = source.clearcoatNormalMap;\n\t\tthis.clearcoatNormalScale.copy( source.clearcoatNormalScale );\n\n\t\tthis.ior = source.ior;\n\n\t\tthis.iridescence = source.iridescence;\n\t\tthis.iridescenceMap = source.iridescenceMap;\n\t\tthis.iridescenceIOR = source.iridescenceIOR;\n\t\tthis.iridescenceThicknessRange = [ ...source.iridescenceThicknessRange ];\n\t\tthis.iridescenceThicknessMap = source.iridescenceThicknessMap;\n\n\t\tthis.sheen = source.sheen;\n\t\tthis.sheenColor.copy( source.sheenColor );\n\t\tthis.sheenColorMap = source.sheenColorMap;\n\t\tthis.sheenRoughness = source.sheenRoughness;\n\t\tthis.sheenRoughnessMap = source.sheenRoughnessMap;\n\n\t\tthis.transmission = source.transmission;\n\t\tthis.transmissionMap = source.transmissionMap;\n\n\t\tthis.thickness = source.thickness;\n\t\tthis.thicknessMap = source.thicknessMap;\n\t\tthis.attenuationDistance = source.attenuationDistance;\n\t\tthis.attenuationColor.copy( source.attenuationColor );\n\n\t\tthis.specularIntensity = source.specularIntensity;\n\t\tthis.specularIntensityMap = source.specularIntensityMap;\n\t\tthis.specularColor.copy( source.specularColor );\n\t\tthis.specularColorMap = source.specularColorMap;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshPhongMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshPhongMaterial = true;\n\n\t\tthis.type = 'MeshPhongMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.specular = new Color( 0x111111 );\n\t\tthis.shininess = 30;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.specular.copy( source.specular );\n\t\tthis.shininess = source.shininess;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshToonMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshToonMaterial = true;\n\n\t\tthis.defines = { 'TOON': '' };\n\n\t\tthis.type = 'MeshToonMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\t\tthis.gradientMap = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\t\tthis.gradientMap = source.gradientMap;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshNormalMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshNormalMaterial = true;\n\n\t\tthis.type = 'MeshNormalMaterial';\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshLambertMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshLambertMaterial = true;\n\n\t\tthis.type = 'MeshLambertMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshMatcapMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshMatcapMaterial = true;\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.type = 'MeshMatcapMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.matcap = null;\n\n\t\tthis.map = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.matcap = source.matcap;\n\n\t\tthis.map = source.map;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineDashedMaterial extends LineBasicMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isLineDashedMaterial = true;\n\n\t\tthis.type = 'LineDashedMaterial';\n\n\t\tthis.scale = 1;\n\t\tthis.dashSize = 3;\n\t\tthis.gapSize = 1;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.scale = source.scale;\n\t\tthis.dashSize = source.dashSize;\n\t\tthis.gapSize = source.gapSize;\n\n\t\treturn this;\n\n\t}\n\n}\n\n// same as Array.prototype.slice, but also works on typed arrays\nfunction arraySlice( array, from, to ) {\n\n\tif ( isTypedArray( array ) ) {\n\n\t\t// in ios9 array.subarray(from, undefined) will return empty array\n\t\t// but array.subarray(from) or array.subarray(from, len) is correct\n\t\treturn new array.constructor( array.subarray( from, to !== undefined ? to : array.length ) );\n\n\t}\n\n\treturn array.slice( from, to );\n\n}\n\n// converts an array to a specific type\nfunction convertArray( array, type, forceClone ) {\n\n\tif ( ! array || // let 'undefined' and 'null' pass\n\t\t! forceClone && array.constructor === type ) return array;\n\n\tif ( typeof type.BYTES_PER_ELEMENT === 'number' ) {\n\n\t\treturn new type( array ); // create typed array\n\n\t}\n\n\treturn Array.prototype.slice.call( array ); // create Array\n\n}\n\nfunction isTypedArray( object ) {\n\n\treturn ArrayBuffer.isView( object ) &&\n\t\t! ( object instanceof DataView );\n\n}\n\n// returns an array by which times and values can be sorted\nfunction getKeyframeOrder( times ) {\n\n\tfunction compareTime( i, j ) {\n\n\t\treturn times[ i ] - times[ j ];\n\n\t}\n\n\tconst n = times.length;\n\tconst result = new Array( n );\n\tfor ( let i = 0; i !== n; ++ i ) result[ i ] = i;\n\n\tresult.sort( compareTime );\n\n\treturn result;\n\n}\n\n// uses the array previously returned by 'getKeyframeOrder' to sort data\nfunction sortedArray( values, stride, order ) {\n\n\tconst nValues = values.length;\n\tconst result = new values.constructor( nValues );\n\n\tfor ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) {\n\n\t\tconst srcOffset = order[ i ] * stride;\n\n\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\tresult[ dstOffset ++ ] = values[ srcOffset + j ];\n\n\t\t}\n\n\t}\n\n\treturn result;\n\n}\n\n// function for parsing AOS keyframe formats\nfunction flattenJSON( jsonKeys, times, values, valuePropertyName ) {\n\n\tlet i = 1, key = jsonKeys[ 0 ];\n\n\twhile ( key !== undefined && key[ valuePropertyName ] === undefined ) {\n\n\t\tkey = jsonKeys[ i ++ ];\n\n\t}\n\n\tif ( key === undefined ) return; // no data\n\n\tlet value = key[ valuePropertyName ];\n\tif ( value === undefined ) return; // no data\n\n\tif ( Array.isArray( value ) ) {\n\n\t\tdo {\n\n\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\tif ( value !== undefined ) {\n\n\t\t\t\ttimes.push( key.time );\n\t\t\t\tvalues.push.apply( values, value ); // push all elements\n\n\t\t\t}\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t} while ( key !== undefined );\n\n\t} else if ( value.toArray !== undefined ) {\n\n\t\t// ...assume THREE.Math-ish\n\n\t\tdo {\n\n\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\tif ( value !== undefined ) {\n\n\t\t\t\ttimes.push( key.time );\n\t\t\t\tvalue.toArray( values, values.length );\n\n\t\t\t}\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t} while ( key !== undefined );\n\n\t} else {\n\n\t\t// otherwise push as-is\n\n\t\tdo {\n\n\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\tif ( value !== undefined ) {\n\n\t\t\t\ttimes.push( key.time );\n\t\t\t\tvalues.push( value );\n\n\t\t\t}\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t} while ( key !== undefined );\n\n\t}\n\n}\n\nfunction subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) {\n\n\tconst clip = sourceClip.clone();\n\n\tclip.name = name;\n\n\tconst tracks = [];\n\n\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\tconst track = clip.tracks[ i ];\n\t\tconst valueSize = track.getValueSize();\n\n\t\tconst times = [];\n\t\tconst values = [];\n\n\t\tfor ( let j = 0; j < track.times.length; ++ j ) {\n\n\t\t\tconst frame = track.times[ j ] * fps;\n\n\t\t\tif ( frame < startFrame || frame >= endFrame ) continue;\n\n\t\t\ttimes.push( track.times[ j ] );\n\n\t\t\tfor ( let k = 0; k < valueSize; ++ k ) {\n\n\t\t\t\tvalues.push( track.values[ j * valueSize + k ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( times.length === 0 ) continue;\n\n\t\ttrack.times = convertArray( times, track.times.constructor );\n\t\ttrack.values = convertArray( values, track.values.constructor );\n\n\t\ttracks.push( track );\n\n\t}\n\n\tclip.tracks = tracks;\n\n\t// find minimum .times value across all tracks in the trimmed clip\n\n\tlet minStartTime = Infinity;\n\n\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\tif ( minStartTime > clip.tracks[ i ].times[ 0 ] ) {\n\n\t\t\tminStartTime = clip.tracks[ i ].times[ 0 ];\n\n\t\t}\n\n\t}\n\n\t// shift all tracks such that clip begins at t=0\n\n\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\tclip.tracks[ i ].shift( - 1 * minStartTime );\n\n\t}\n\n\tclip.resetDuration();\n\n\treturn clip;\n\n}\n\nfunction makeClipAdditive( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) {\n\n\tif ( fps <= 0 ) fps = 30;\n\n\tconst numTracks = referenceClip.tracks.length;\n\tconst referenceTime = referenceFrame / fps;\n\n\t// Make each track's values relative to the values at the reference frame\n\tfor ( let i = 0; i < numTracks; ++ i ) {\n\n\t\tconst referenceTrack = referenceClip.tracks[ i ];\n\t\tconst referenceTrackType = referenceTrack.ValueTypeName;\n\n\t\t// Skip this track if it's non-numeric\n\t\tif ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue;\n\n\t\t// Find the track in the target clip whose name and type matches the reference track\n\t\tconst targetTrack = targetClip.tracks.find( function ( track ) {\n\n\t\t\treturn track.name === referenceTrack.name\n\t\t\t\t&& track.ValueTypeName === referenceTrackType;\n\n\t\t} );\n\n\t\tif ( targetTrack === undefined ) continue;\n\n\t\tlet referenceOffset = 0;\n\t\tconst referenceValueSize = referenceTrack.getValueSize();\n\n\t\tif ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\treferenceOffset = referenceValueSize / 3;\n\n\t\t}\n\n\t\tlet targetOffset = 0;\n\t\tconst targetValueSize = targetTrack.getValueSize();\n\n\t\tif ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\ttargetOffset = targetValueSize / 3;\n\n\t\t}\n\n\t\tconst lastIndex = referenceTrack.times.length - 1;\n\t\tlet referenceValue;\n\n\t\t// Find the value to subtract out of the track\n\t\tif ( referenceTime <= referenceTrack.times[ 0 ] ) {\n\n\t\t\t// Reference frame is earlier than the first keyframe, so just use the first keyframe\n\t\t\tconst startIndex = referenceOffset;\n\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\treferenceValue = arraySlice( referenceTrack.values, startIndex, endIndex );\n\n\t\t} else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) {\n\n\t\t\t// Reference frame is after the last keyframe, so just use the last keyframe\n\t\t\tconst startIndex = lastIndex * referenceValueSize + referenceOffset;\n\t\t\tconst endIndex = startIndex + referenceValueSize - referenceOffset;\n\t\t\treferenceValue = arraySlice( referenceTrack.values, startIndex, endIndex );\n\n\t\t} else {\n\n\t\t\t// Interpolate to the reference value\n\t\t\tconst interpolant = referenceTrack.createInterpolant();\n\t\t\tconst startIndex = referenceOffset;\n\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\tinterpolant.evaluate( referenceTime );\n\t\t\treferenceValue = arraySlice( interpolant.resultBuffer, startIndex, endIndex );\n\n\t\t}\n\n\t\t// Conjugate the quaternion\n\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\tconst referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate();\n\t\t\treferenceQuat.toArray( referenceValue );\n\n\t\t}\n\n\t\t// Subtract the reference value from all of the track values\n\n\t\tconst numTimes = targetTrack.times.length;\n\t\tfor ( let j = 0; j < numTimes; ++ j ) {\n\n\t\t\tconst valueStart = j * targetValueSize + targetOffset;\n\n\t\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\t\t// Multiply the conjugate for quaternion track types\n\t\t\t\tQuaternion.multiplyQuaternionsFlat(\n\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\tvalueStart,\n\t\t\t\t\treferenceValue,\n\t\t\t\t\t0,\n\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\tvalueStart\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\tconst valueEnd = targetValueSize - targetOffset * 2;\n\n\t\t\t\t// Subtract each value for all other numeric track types\n\t\t\t\tfor ( let k = 0; k < valueEnd; ++ k ) {\n\n\t\t\t\t\ttargetTrack.values[ valueStart + k ] -= referenceValue[ k ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttargetClip.blendMode = AdditiveAnimationBlendMode;\n\n\treturn targetClip;\n\n}\n\nconst AnimationUtils = {\n\tarraySlice: arraySlice,\n\tconvertArray: convertArray,\n\tisTypedArray: isTypedArray,\n\tgetKeyframeOrder: getKeyframeOrder,\n\tsortedArray: sortedArray,\n\tflattenJSON: flattenJSON,\n\tsubclip: subclip,\n\tmakeClipAdditive: makeClipAdditive\n};\n\n/**\n * Abstract base class of interpolants over parametric samples.\n *\n * The parameter domain is one dimensional, typically the time or a path\n * along a curve defined by the data.\n *\n * The sample values can have any dimensionality and derived classes may\n * apply special interpretations to the data.\n *\n * This class provides the interval seek in a Template Method, deferring\n * the actual interpolation to derived classes.\n *\n * Time complexity is O(1) for linear access crossing at most two points\n * and O(log N) for random access, where N is the number of positions.\n *\n * References:\n *\n * \t\thttp://www.oodesign.com/template-method-pattern.html\n *\n */\n\nclass Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tthis.parameterPositions = parameterPositions;\n\t\tthis._cachedIndex = 0;\n\n\t\tthis.resultBuffer = resultBuffer !== undefined ?\n\t\t\tresultBuffer : new sampleValues.constructor( sampleSize );\n\t\tthis.sampleValues = sampleValues;\n\t\tthis.valueSize = sampleSize;\n\n\t\tthis.settings = null;\n\t\tthis.DefaultSettings_ = {};\n\n\t}\n\n\tevaluate( t ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet i1 = this._cachedIndex,\n\t\t\tt1 = pp[ i1 ],\n\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\tvalidate_interval: {\n\n\t\t\tseek: {\n\n\t\t\t\tlet right;\n\n\t\t\t\tlinear_scan: {\n\n\t\t\t\t\t//- See http://jsperf.com/comparison-to-undefined/3\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\n\t\t\t\t\t//- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n\t\t\t\t\tforward_scan: if ( ! ( t < t1 ) ) {\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 + 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\t\t\t\tif ( t < t0 ) break forward_scan;\n\n\t\t\t\t\t\t\t\t// after end\n\n\t\t\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\t\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt0 = t1;\n\t\t\t\t\t\t\tt1 = pp[ ++ i1 ];\n\n\t\t\t\t\t\t\tif ( t < t1 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the right side of the index\n\t\t\t\t\t\tright = pp.length;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n\t\t\t\t\tif ( ! ( t >= t0 ) ) {\n\n\t\t\t\t\t\t// looping?\n\n\t\t\t\t\t\tconst t1global = pp[ 1 ];\n\n\t\t\t\t\t\tif ( t < t1global ) {\n\n\t\t\t\t\t\t\ti1 = 2; // + 1, using the scan for the details\n\t\t\t\t\t\t\tt0 = t1global;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// linear reverse scan\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 - 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\t\t\t\t// before start\n\n\t\t\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\t\t\treturn this.copySampleValue_( 0 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt1 = t0;\n\t\t\t\t\t\t\tt0 = pp[ -- i1 - 1 ];\n\n\t\t\t\t\t\t\tif ( t >= t0 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the left side of the index\n\t\t\t\t\t\tright = i1;\n\t\t\t\t\t\ti1 = 0;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// the interval is valid\n\n\t\t\t\t\tbreak validate_interval;\n\n\t\t\t\t} // linear scan\n\n\t\t\t\t// binary search\n\n\t\t\t\twhile ( i1 < right ) {\n\n\t\t\t\t\tconst mid = ( i1 + right ) >>> 1;\n\n\t\t\t\t\tif ( t < pp[ mid ] ) {\n\n\t\t\t\t\t\tright = mid;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ti1 = mid + 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tt1 = pp[ i1 ];\n\t\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\t\t\t// check boundary cases, again\n\n\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\treturn this.copySampleValue_( 0 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t\t\t\t}\n\n\t\t\t} // seek\n\n\t\t\tthis._cachedIndex = i1;\n\n\t\t\tthis.intervalChanged_( i1, t0, t1 );\n\n\t\t} // validate_interval\n\n\t\treturn this.interpolate_( i1, t0, t, t1 );\n\n\t}\n\n\tgetSettings_() {\n\n\t\treturn this.settings || this.DefaultSettings_;\n\n\t}\n\n\tcopySampleValue_( index ) {\n\n\t\t// copies a sample value to the result buffer\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = index * stride;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] = values[ offset + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\t// Template methods for derived classes:\n\n\tinterpolate_( /* i1, t0, t, t1 */ ) {\n\n\t\tthrow new Error( 'call to abstract method' );\n\t\t// implementations shall return this.resultBuffer\n\n\t}\n\n\tintervalChanged_( /* i1, t0, t1 */ ) {\n\n\t\t// empty\n\n\t}\n\n}\n\n/**\n * Fast and simple cubic spline interpolant.\n *\n * It was derived from a Hermitian construction setting the first derivative\n * at each sample position to the linear slope between neighboring positions\n * over their parameter interval.\n */\n\nclass CubicInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t\tthis._weightPrev = - 0;\n\t\tthis._offsetPrev = - 0;\n\t\tthis._weightNext = - 0;\n\t\tthis._offsetNext = - 0;\n\n\t\tthis.DefaultSettings_ = {\n\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\n\t\t};\n\n\t}\n\n\tintervalChanged_( i1, t0, t1 ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet iPrev = i1 - 2,\n\t\t\tiNext = i1 + 1,\n\n\t\t\ttPrev = pp[ iPrev ],\n\t\t\ttNext = pp[ iNext ];\n\n\t\tif ( tPrev === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingStart ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(t0) = 0\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = 2 * t0 - t1;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiPrev = pp.length - 2;\n\t\t\t\t\ttPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(t0) = 0 a.k.a. Natural Spline\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = t1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tNext === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingEnd ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(tN) = 0\n\t\t\t\t\tiNext = i1;\n\t\t\t\t\ttNext = 2 * t1 - t0;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiNext = 1;\n\t\t\t\t\ttNext = t1 + pp[ 1 ] - pp[ 0 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(tN) = 0, a.k.a. Natural Spline\n\t\t\t\t\tiNext = i1 - 1;\n\t\t\t\t\ttNext = t0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst halfDt = ( t1 - t0 ) * 0.5,\n\t\t\tstride = this.valueSize;\n\n\t\tthis._weightPrev = halfDt / ( t0 - tPrev );\n\t\tthis._weightNext = halfDt / ( tNext - t1 );\n\t\tthis._offsetPrev = iPrev * stride;\n\t\tthis._offsetNext = iNext * stride;\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\to1 = i1 * stride,\t\to0 = o1 - stride,\n\t\t\toP = this._offsetPrev, \toN = this._offsetNext,\n\t\t\twP = this._weightPrev,\twN = this._weightNext,\n\n\t\t\tp = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tpp = p * p,\n\t\t\tppp = pp * p;\n\n\t\t// evaluate polynomials\n\n\t\tconst sP = - wP * ppp + 2 * wP * pp - wP * p;\n\t\tconst s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1;\n\t\tconst s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;\n\t\tconst sN = wN * ppp - wN * pp;\n\n\t\t// combine data linearly\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tsP * values[ oP + i ] +\n\t\t\t\t\ts0 * values[ o0 + i ] +\n\t\t\t\t\ts1 * values[ o1 + i ] +\n\t\t\t\t\tsN * values[ oN + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\nclass LinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\toffset1 = i1 * stride,\n\t\t\toffset0 = offset1 - stride,\n\n\t\t\tweight1 = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tweight0 = 1 - weight1;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tvalues[ offset0 + i ] * weight0 +\n\t\t\t\t\tvalues[ offset1 + i ] * weight1;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n *\n * Interpolant that evaluates to the sample value at the position preceding\n * the parameter.\n */\n\nclass DiscreteInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1 /*, t0, t, t1 */ ) {\n\n\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t}\n\n}\n\nclass KeyframeTrack {\n\n\tconstructor( name, times, values, interpolation ) {\n\n\t\tif ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' );\n\t\tif ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name );\n\n\t\tthis.name = name;\n\n\t\tthis.times = convertArray( times, this.TimeBufferType );\n\t\tthis.values = convertArray( values, this.ValueBufferType );\n\n\t\tthis.setInterpolation( interpolation || this.DefaultInterpolation );\n\n\t}\n\n\t// Serialization (in static context, because of constructor invocation\n\t// and automatic invocation of .toJSON):\n\n\tstatic toJSON( track ) {\n\n\t\tconst trackType = track.constructor;\n\n\t\tlet json;\n\n\t\t// derived classes can define a static toJSON method\n\t\tif ( trackType.toJSON !== this.toJSON ) {\n\n\t\t\tjson = trackType.toJSON( track );\n\n\t\t} else {\n\n\t\t\t// by default, we assume the data can be serialized as-is\n\t\t\tjson = {\n\n\t\t\t\t'name': track.name,\n\t\t\t\t'times': convertArray( track.times, Array ),\n\t\t\t\t'values': convertArray( track.values, Array )\n\n\t\t\t};\n\n\t\t\tconst interpolation = track.getInterpolation();\n\n\t\t\tif ( interpolation !== track.DefaultInterpolation ) {\n\n\t\t\t\tjson.interpolation = interpolation;\n\n\t\t\t}\n\n\t\t}\n\n\t\tjson.type = track.ValueTypeName; // mandatory\n\n\t\treturn json;\n\n\t}\n\n\tInterpolantFactoryMethodDiscrete( result ) {\n\n\t\treturn new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new LinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodSmooth( result ) {\n\n\t\treturn new CubicInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tsetInterpolation( interpolation ) {\n\n\t\tlet factoryMethod;\n\n\t\tswitch ( interpolation ) {\n\n\t\t\tcase InterpolateDiscrete:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodDiscrete;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateLinear:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodLinear;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateSmooth:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodSmooth;\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tif ( factoryMethod === undefined ) {\n\n\t\t\tconst message = 'unsupported interpolation for ' +\n\t\t\t\tthis.ValueTypeName + ' keyframe track named ' + this.name;\n\n\t\t\tif ( this.createInterpolant === undefined ) {\n\n\t\t\t\t// fall back to default, unless the default itself is messed up\n\t\t\t\tif ( interpolation !== this.DefaultInterpolation ) {\n\n\t\t\t\t\tthis.setInterpolation( this.DefaultInterpolation );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( message ); // fatal, in this case\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconsole.warn( 'THREE.KeyframeTrack:', message );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tthis.createInterpolant = factoryMethod;\n\n\t\treturn this;\n\n\t}\n\n\tgetInterpolation() {\n\n\t\tswitch ( this.createInterpolant ) {\n\n\t\t\tcase this.InterpolantFactoryMethodDiscrete:\n\n\t\t\t\treturn InterpolateDiscrete;\n\n\t\t\tcase this.InterpolantFactoryMethodLinear:\n\n\t\t\t\treturn InterpolateLinear;\n\n\t\t\tcase this.InterpolantFactoryMethodSmooth:\n\n\t\t\t\treturn InterpolateSmooth;\n\n\t\t}\n\n\t}\n\n\tgetValueSize() {\n\n\t\treturn this.values.length / this.times.length;\n\n\t}\n\n\t// move all keyframes either forwards or backwards in time\n\tshift( timeOffset ) {\n\n\t\tif ( timeOffset !== 0.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] += timeOffset;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n\tscale( timeScale ) {\n\n\t\tif ( timeScale !== 1.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] *= timeScale;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n\t// IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n\ttrim( startTime, endTime ) {\n\n\t\tconst times = this.times,\n\t\t\tnKeys = times.length;\n\n\t\tlet from = 0,\n\t\t\tto = nKeys - 1;\n\n\t\twhile ( from !== nKeys && times[ from ] < startTime ) {\n\n\t\t\t++ from;\n\n\t\t}\n\n\t\twhile ( to !== - 1 && times[ to ] > endTime ) {\n\n\t\t\t-- to;\n\n\t\t}\n\n\t\t++ to; // inclusive -> exclusive bound\n\n\t\tif ( from !== 0 || to !== nKeys ) {\n\n\t\t\t// empty tracks are forbidden, so keep at least one keyframe\n\t\t\tif ( from >= to ) {\n\n\t\t\t\tto = Math.max( to, 1 );\n\t\t\t\tfrom = to - 1;\n\n\t\t\t}\n\n\t\t\tconst stride = this.getValueSize();\n\t\t\tthis.times = arraySlice( times, from, to );\n\t\t\tthis.values = arraySlice( this.values, from * stride, to * stride );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tconst valueSize = this.getValueSize();\n\t\tif ( valueSize - Math.floor( valueSize ) !== 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Invalid value size in track.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tconst times = this.times,\n\t\t\tvalues = this.values,\n\n\t\t\tnKeys = times.length;\n\n\t\tif ( nKeys === 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Track is empty.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tlet prevTime = null;\n\n\t\tfor ( let i = 0; i !== nKeys; i ++ ) {\n\n\t\t\tconst currTime = times[ i ];\n\n\t\t\tif ( typeof currTime === 'number' && isNaN( currTime ) ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( prevTime !== null && prevTime > currTime ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tprevTime = currTime;\n\n\t\t}\n\n\t\tif ( values !== undefined ) {\n\n\t\t\tif ( isTypedArray( values ) ) {\n\n\t\t\t\tfor ( let i = 0, n = values.length; i !== n; ++ i ) {\n\n\t\t\t\t\tconst value = values[ i ];\n\n\t\t\t\t\tif ( isNaN( value ) ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value );\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\t// removes equivalent sequential keys as common in morph target sequences\n\t// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n\toptimize() {\n\n\t\t// times or values may be shared with other tracks, so overwriting is unsafe\n\t\tconst times = arraySlice( this.times ),\n\t\t\tvalues = arraySlice( this.values ),\n\t\t\tstride = this.getValueSize(),\n\n\t\t\tsmoothInterpolation = this.getInterpolation() === InterpolateSmooth,\n\n\t\t\tlastIndex = times.length - 1;\n\n\t\tlet writeIndex = 1;\n\n\t\tfor ( let i = 1; i < lastIndex; ++ i ) {\n\n\t\t\tlet keep = false;\n\n\t\t\tconst time = times[ i ];\n\t\t\tconst timeNext = times[ i + 1 ];\n\n\t\t\t// remove adjacent keyframes scheduled at the same time\n\n\t\t\tif ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) {\n\n\t\t\t\tif ( ! smoothInterpolation ) {\n\n\t\t\t\t\t// remove unnecessary keyframes same as their neighbors\n\n\t\t\t\t\tconst offset = i * stride,\n\t\t\t\t\t\toffsetP = offset - stride,\n\t\t\t\t\t\toffsetN = offset + stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tconst value = values[ offset + j ];\n\n\t\t\t\t\t\tif ( value !== values[ offsetP + j ] ||\n\t\t\t\t\t\t\tvalue !== values[ offsetN + j ] ) {\n\n\t\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tkeep = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// in-place compaction\n\n\t\t\tif ( keep ) {\n\n\t\t\t\tif ( i !== writeIndex ) {\n\n\t\t\t\t\ttimes[ writeIndex ] = times[ i ];\n\n\t\t\t\t\tconst readOffset = i * stride,\n\t\t\t\t\t\twriteOffset = writeIndex * stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t++ writeIndex;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// flush last keyframe (compaction looks ahead)\n\n\t\tif ( lastIndex > 0 ) {\n\n\t\t\ttimes[ writeIndex ] = times[ lastIndex ];\n\n\t\t\tfor ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) {\n\n\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t}\n\n\t\t\t++ writeIndex;\n\n\t\t}\n\n\t\tif ( writeIndex !== times.length ) {\n\n\t\t\tthis.times = arraySlice( times, 0, writeIndex );\n\t\t\tthis.values = arraySlice( values, 0, writeIndex * stride );\n\n\t\t} else {\n\n\t\t\tthis.times = times;\n\t\t\tthis.values = values;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst times = arraySlice( this.times, 0 );\n\t\tconst values = arraySlice( this.values, 0 );\n\n\t\tconst TypedKeyframeTrack = this.constructor;\n\t\tconst track = new TypedKeyframeTrack( this.name, times, values );\n\n\t\t// Interpolant argument to constructor is not saved, so copy the factory method directly.\n\t\ttrack.createInterpolant = this.createInterpolant;\n\n\t\treturn track;\n\n\t}\n\n}\n\nKeyframeTrack.prototype.TimeBufferType = Float32Array;\nKeyframeTrack.prototype.ValueBufferType = Float32Array;\nKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\n\n/**\n * A Track of Boolean keyframe values.\n */\nclass BooleanKeyframeTrack extends KeyframeTrack {}\n\nBooleanKeyframeTrack.prototype.ValueTypeName = 'bool';\nBooleanKeyframeTrack.prototype.ValueBufferType = Array;\nBooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of keyframe values that represent color.\n */\nclass ColorKeyframeTrack extends KeyframeTrack {}\n\nColorKeyframeTrack.prototype.ValueTypeName = 'color';\n\n/**\n * A Track of numeric keyframe values.\n */\nclass NumberKeyframeTrack extends KeyframeTrack {}\n\nNumberKeyframeTrack.prototype.ValueTypeName = 'number';\n\n/**\n * Spherical linear unit quaternion interpolant.\n */\n\nclass QuaternionLinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\talpha = ( t - t0 ) / ( t1 - t0 );\n\n\t\tlet offset = i1 * stride;\n\n\t\tfor ( let end = offset + stride; offset !== end; offset += 4 ) {\n\n\t\t\tQuaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha );\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n * A Track of quaternion keyframe values.\n */\nclass QuaternionKeyframeTrack extends KeyframeTrack {\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n}\n\nQuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion';\n// ValueBufferType is inherited\nQuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\nQuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track that interpolates Strings\n */\nclass StringKeyframeTrack extends KeyframeTrack {}\n\nStringKeyframeTrack.prototype.ValueTypeName = 'string';\nStringKeyframeTrack.prototype.ValueBufferType = Array;\nStringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of vectored keyframe values.\n */\nclass VectorKeyframeTrack extends KeyframeTrack {}\n\nVectorKeyframeTrack.prototype.ValueTypeName = 'vector';\n\nclass AnimationClip {\n\n\tconstructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) {\n\n\t\tthis.name = name;\n\t\tthis.tracks = tracks;\n\t\tthis.duration = duration;\n\t\tthis.blendMode = blendMode;\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// this means it should figure out its duration by scanning the tracks\n\t\tif ( this.duration < 0 ) {\n\n\t\t\tthis.resetDuration();\n\n\t\t}\n\n\t}\n\n\n\tstatic parse( json ) {\n\n\t\tconst tracks = [],\n\t\t\tjsonTracks = json.tracks,\n\t\t\tframeTime = 1.0 / ( json.fps || 1.0 );\n\n\t\tfor ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) );\n\n\t\t}\n\n\t\tconst clip = new this( json.name, json.duration, tracks, json.blendMode );\n\t\tclip.uuid = json.uuid;\n\n\t\treturn clip;\n\n\t}\n\n\tstatic toJSON( clip ) {\n\n\t\tconst tracks = [],\n\t\t\tclipTracks = clip.tracks;\n\n\t\tconst json = {\n\n\t\t\t'name': clip.name,\n\t\t\t'duration': clip.duration,\n\t\t\t'tracks': tracks,\n\t\t\t'uuid': clip.uuid,\n\t\t\t'blendMode': clip.blendMode\n\n\t\t};\n\n\t\tfor ( let i = 0, n = clipTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) );\n\n\t\t}\n\n\t\treturn json;\n\n\t}\n\n\tstatic CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) {\n\n\t\tconst numMorphTargets = morphTargetSequence.length;\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < numMorphTargets; i ++ ) {\n\n\t\t\tlet times = [];\n\t\t\tlet values = [];\n\n\t\t\ttimes.push(\n\t\t\t\t( i + numMorphTargets - 1 ) % numMorphTargets,\n\t\t\t\ti,\n\t\t\t\t( i + 1 ) % numMorphTargets );\n\n\t\t\tvalues.push( 0, 1, 0 );\n\n\t\t\tconst order = getKeyframeOrder( times );\n\t\t\ttimes = sortedArray( times, 1, order );\n\t\t\tvalues = sortedArray( values, 1, order );\n\n\t\t\t// if there is a key at the first frame, duplicate it as the\n\t\t\t// last frame as well for perfect loop.\n\t\t\tif ( ! noLoop && times[ 0 ] === 0 ) {\n\n\t\t\t\ttimes.push( numMorphTargets );\n\t\t\t\tvalues.push( values[ 0 ] );\n\n\t\t\t}\n\n\t\t\ttracks.push(\n\t\t\t\tnew NumberKeyframeTrack(\n\t\t\t\t\t'.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']',\n\t\t\t\t\ttimes, values\n\t\t\t\t).scale( 1.0 / fps ) );\n\n\t\t}\n\n\t\treturn new this( name, - 1, tracks );\n\n\t}\n\n\tstatic findByName( objectOrClipArray, name ) {\n\n\t\tlet clipArray = objectOrClipArray;\n\n\t\tif ( ! Array.isArray( objectOrClipArray ) ) {\n\n\t\t\tconst o = objectOrClipArray;\n\t\t\tclipArray = o.geometry && o.geometry.animations || o.animations;\n\n\t\t}\n\n\t\tfor ( let i = 0; i < clipArray.length; i ++ ) {\n\n\t\t\tif ( clipArray[ i ].name === name ) {\n\n\t\t\t\treturn clipArray[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\tstatic CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) {\n\n\t\tconst animationToMorphTargets = {};\n\n\t\t// tested with https://regex101.com/ on trick sequences\n\t\t// such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n\t\tconst pattern = /^([\\w-]*?)([\\d]+)$/;\n\n\t\t// sort morph target names into animation groups based\n\t\t// patterns like Walk_001, Walk_002, Run_001, Run_002\n\t\tfor ( let i = 0, il = morphTargets.length; i < il; i ++ ) {\n\n\t\t\tconst morphTarget = morphTargets[ i ];\n\t\t\tconst parts = morphTarget.name.match( pattern );\n\n\t\t\tif ( parts && parts.length > 1 ) {\n\n\t\t\t\tconst name = parts[ 1 ];\n\n\t\t\t\tlet animationMorphTargets = animationToMorphTargets[ name ];\n\n\t\t\t\tif ( ! animationMorphTargets ) {\n\n\t\t\t\t\tanimationToMorphTargets[ name ] = animationMorphTargets = [];\n\n\t\t\t\t}\n\n\t\t\t\tanimationMorphTargets.push( morphTarget );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst clips = [];\n\n\t\tfor ( const name in animationToMorphTargets ) {\n\n\t\t\tclips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) );\n\n\t\t}\n\n\t\treturn clips;\n\n\t}\n\n\t// parse the animation.hierarchy format\n\tstatic parseAnimation( animation, bones ) {\n\n\t\tif ( ! animation ) {\n\n\t\t\tconsole.error( 'THREE.AnimationClip: No animation in JSONLoader data.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) {\n\n\t\t\t// only return track if there are actually keys.\n\t\t\tif ( animationKeys.length !== 0 ) {\n\n\t\t\t\tconst times = [];\n\t\t\t\tconst values = [];\n\n\t\t\t\tflattenJSON( animationKeys, times, values, propertyName );\n\n\t\t\t\t// empty keys are filtered out, so check again\n\t\t\t\tif ( times.length !== 0 ) {\n\n\t\t\t\t\tdestTracks.push( new trackType( trackName, times, values ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tconst tracks = [];\n\n\t\tconst clipName = animation.name || 'default';\n\t\tconst fps = animation.fps || 30;\n\t\tconst blendMode = animation.blendMode;\n\n\t\t// automatic length determination in AnimationClip.\n\t\tlet duration = animation.length || - 1;\n\n\t\tconst hierarchyTracks = animation.hierarchy || [];\n\n\t\tfor ( let h = 0; h < hierarchyTracks.length; h ++ ) {\n\n\t\t\tconst animationKeys = hierarchyTracks[ h ].keys;\n\n\t\t\t// skip empty tracks\n\t\t\tif ( ! animationKeys || animationKeys.length === 0 ) continue;\n\n\t\t\t// process morph targets\n\t\t\tif ( animationKeys[ 0 ].morphTargets ) {\n\n\t\t\t\t// figure out all morph targets used in this track\n\t\t\t\tconst morphTargetNames = {};\n\n\t\t\t\tlet k;\n\n\t\t\t\tfor ( k = 0; k < animationKeys.length; k ++ ) {\n\n\t\t\t\t\tif ( animationKeys[ k ].morphTargets ) {\n\n\t\t\t\t\t\tfor ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {\n\n\t\t\t\t\t\t\tmorphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// create a track for each morph target with all zero\n\t\t\t\t// morphTargetInfluences except for the keys in which\n\t\t\t\t// the morphTarget is named.\n\t\t\t\tfor ( const morphTargetName in morphTargetNames ) {\n\n\t\t\t\t\tconst times = [];\n\t\t\t\t\tconst values = [];\n\n\t\t\t\t\tfor ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) {\n\n\t\t\t\t\t\tconst animationKey = animationKeys[ k ];\n\n\t\t\t\t\t\ttimes.push( animationKey.time );\n\t\t\t\t\t\tvalues.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) );\n\n\t\t\t\t}\n\n\t\t\t\tduration = morphTargetNames.length * fps;\n\n\t\t\t} else {\n\n\t\t\t\t// ...assume skeletal animation\n\n\t\t\t\tconst boneName = '.bones[' + bones[ h ].name + ']';\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.position',\n\t\t\t\t\tanimationKeys, 'pos', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tQuaternionKeyframeTrack, boneName + '.quaternion',\n\t\t\t\t\tanimationKeys, 'rot', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.scale',\n\t\t\t\t\tanimationKeys, 'scl', tracks );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tracks.length === 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst clip = new this( clipName, duration, tracks, blendMode );\n\n\t\treturn clip;\n\n\t}\n\n\tresetDuration() {\n\n\t\tconst tracks = this.tracks;\n\t\tlet duration = 0;\n\n\t\tfor ( let i = 0, n = tracks.length; i !== n; ++ i ) {\n\n\t\t\tconst track = this.tracks[ i ];\n\n\t\t\tduration = Math.max( duration, track.times[ track.times.length - 1 ] );\n\n\t\t}\n\n\t\tthis.duration = duration;\n\n\t\treturn this;\n\n\t}\n\n\ttrim() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].trim( 0, this.duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tvalid = valid && this.tracks[ i ].validate();\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\toptimize() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].optimize();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\ttracks.push( this.tracks[ i ].clone() );\n\n\t\t}\n\n\t\treturn new this.constructor( this.name, this.duration, tracks, this.blendMode );\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.constructor.toJSON( this );\n\n\t}\n\n}\n\nfunction getTrackTypeForValueTypeName( typeName ) {\n\n\tswitch ( typeName.toLowerCase() ) {\n\n\t\tcase 'scalar':\n\t\tcase 'double':\n\t\tcase 'float':\n\t\tcase 'number':\n\t\tcase 'integer':\n\n\t\t\treturn NumberKeyframeTrack;\n\n\t\tcase 'vector':\n\t\tcase 'vector2':\n\t\tcase 'vector3':\n\t\tcase 'vector4':\n\n\t\t\treturn VectorKeyframeTrack;\n\n\t\tcase 'color':\n\n\t\t\treturn ColorKeyframeTrack;\n\n\t\tcase 'quaternion':\n\n\t\t\treturn QuaternionKeyframeTrack;\n\n\t\tcase 'bool':\n\t\tcase 'boolean':\n\n\t\t\treturn BooleanKeyframeTrack;\n\n\t\tcase 'string':\n\n\t\t\treturn StringKeyframeTrack;\n\n\t}\n\n\tthrow new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName );\n\n}\n\nfunction parseKeyframeTrack( json ) {\n\n\tif ( json.type === undefined ) {\n\n\t\tthrow new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' );\n\n\t}\n\n\tconst trackType = getTrackTypeForValueTypeName( json.type );\n\n\tif ( json.times === undefined ) {\n\n\t\tconst times = [], values = [];\n\n\t\tflattenJSON( json.keys, times, values, 'value' );\n\n\t\tjson.times = times;\n\t\tjson.values = values;\n\n\t}\n\n\t// derived classes can define a static parse method\n\tif ( trackType.parse !== undefined ) {\n\n\t\treturn trackType.parse( json );\n\n\t} else {\n\n\t\t// by default, we assume a constructor compatible with the base\n\t\treturn new trackType( json.name, json.times, json.values, json.interpolation );\n\n\t}\n\n}\n\nconst Cache = {\n\n\tenabled: false,\n\n\tfiles: {},\n\n\tadd: function ( key, file ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Adding key:', key );\n\n\t\tthis.files[ key ] = file;\n\n\t},\n\n\tget: function ( key ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Checking key:', key );\n\n\t\treturn this.files[ key ];\n\n\t},\n\n\tremove: function ( key ) {\n\n\t\tdelete this.files[ key ];\n\n\t},\n\n\tclear: function () {\n\n\t\tthis.files = {};\n\n\t}\n\n};\n\nclass LoadingManager {\n\n\tconstructor( onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tlet isLoading = false;\n\t\tlet itemsLoaded = 0;\n\t\tlet itemsTotal = 0;\n\t\tlet urlModifier = undefined;\n\t\tconst handlers = [];\n\n\t\t// Refer to #5689 for the reason why we don't set .onStart\n\t\t// in the constructor\n\n\t\tthis.onStart = undefined;\n\t\tthis.onLoad = onLoad;\n\t\tthis.onProgress = onProgress;\n\t\tthis.onError = onError;\n\n\t\tthis.itemStart = function ( url ) {\n\n\t\t\titemsTotal ++;\n\n\t\t\tif ( isLoading === false ) {\n\n\t\t\t\tif ( scope.onStart !== undefined ) {\n\n\t\t\t\t\tscope.onStart( url, itemsLoaded, itemsTotal );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tisLoading = true;\n\n\t\t};\n\n\t\tthis.itemEnd = function ( url ) {\n\n\t\t\titemsLoaded ++;\n\n\t\t\tif ( scope.onProgress !== undefined ) {\n\n\t\t\t\tscope.onProgress( url, itemsLoaded, itemsTotal );\n\n\t\t\t}\n\n\t\t\tif ( itemsLoaded === itemsTotal ) {\n\n\t\t\t\tisLoading = false;\n\n\t\t\t\tif ( scope.onLoad !== undefined ) {\n\n\t\t\t\t\tscope.onLoad();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.itemError = function ( url ) {\n\n\t\t\tif ( scope.onError !== undefined ) {\n\n\t\t\t\tscope.onError( url );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.resolveURL = function ( url ) {\n\n\t\t\tif ( urlModifier ) {\n\n\t\t\t\treturn urlModifier( url );\n\n\t\t\t}\n\n\t\t\treturn url;\n\n\t\t};\n\n\t\tthis.setURLModifier = function ( transform ) {\n\n\t\t\turlModifier = transform;\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.addHandler = function ( regex, loader ) {\n\n\t\t\thandlers.push( regex, loader );\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.removeHandler = function ( regex ) {\n\n\t\t\tconst index = handlers.indexOf( regex );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\thandlers.splice( index, 2 );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.getHandler = function ( file ) {\n\n\t\t\tfor ( let i = 0, l = handlers.length; i < l; i += 2 ) {\n\n\t\t\t\tconst regex = handlers[ i ];\n\t\t\t\tconst loader = handlers[ i + 1 ];\n\n\t\t\t\tif ( regex.global ) regex.lastIndex = 0; // see #17920\n\n\t\t\t\tif ( regex.test( file ) ) {\n\n\t\t\t\t\treturn loader;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t};\n\n\t}\n\n}\n\nconst DefaultLoadingManager = /*@__PURE__*/ new LoadingManager();\n\nclass Loader {\n\n\tconstructor( manager ) {\n\n\t\tthis.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;\n\n\t\tthis.crossOrigin = 'anonymous';\n\t\tthis.withCredentials = false;\n\t\tthis.path = '';\n\t\tthis.resourcePath = '';\n\t\tthis.requestHeader = {};\n\n\t}\n\n\tload( /* url, onLoad, onProgress, onError */ ) {}\n\n\tloadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\tscope.load( url, resolve, onProgress, reject );\n\n\t\t} );\n\n\t}\n\n\tparse( /* data */ ) {}\n\n\tsetCrossOrigin( crossOrigin ) {\n\n\t\tthis.crossOrigin = crossOrigin;\n\t\treturn this;\n\n\t}\n\n\tsetWithCredentials( value ) {\n\n\t\tthis.withCredentials = value;\n\t\treturn this;\n\n\t}\n\n\tsetPath( path ) {\n\n\t\tthis.path = path;\n\t\treturn this;\n\n\t}\n\n\tsetResourcePath( resourcePath ) {\n\n\t\tthis.resourcePath = resourcePath;\n\t\treturn this;\n\n\t}\n\n\tsetRequestHeader( requestHeader ) {\n\n\t\tthis.requestHeader = requestHeader;\n\t\treturn this;\n\n\t}\n\n}\n\nLoader.DEFAULT_MATERIAL_NAME = '__DEFAULT';\n\nconst loading = {};\n\nclass HttpError extends Error {\n\n\tconstructor( message, response ) {\n\n\t\tsuper( message );\n\t\tthis.response = response;\n\n\t}\n\n}\n\nclass FileLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tthis.manager.itemStart( url );\n\n\t\t\tsetTimeout( () => {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tthis.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\t// Check if request is duplicate\n\n\t\tif ( loading[ url ] !== undefined ) {\n\n\t\t\tloading[ url ].push( {\n\n\t\t\t\tonLoad: onLoad,\n\t\t\t\tonProgress: onProgress,\n\t\t\t\tonError: onError\n\n\t\t\t} );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Initialise array for duplicate requests\n\t\tloading[ url ] = [];\n\n\t\tloading[ url ].push( {\n\t\t\tonLoad: onLoad,\n\t\t\tonProgress: onProgress,\n\t\t\tonError: onError,\n\t\t} );\n\n\t\t// create request\n\t\tconst req = new Request( url, {\n\t\t\theaders: new Headers( this.requestHeader ),\n\t\t\tcredentials: this.withCredentials ? 'include' : 'same-origin',\n\t\t\t// An abort controller could be added within a future PR\n\t\t} );\n\n\t\t// record states ( avoid data race )\n\t\tconst mimeType = this.mimeType;\n\t\tconst responseType = this.responseType;\n\n\t\t// start the fetch\n\t\tfetch( req )\n\t\t\t.then( response => {\n\n\t\t\t\tif ( response.status === 200 || response.status === 0 ) {\n\n\t\t\t\t\t// Some browsers return HTTP Status 0 when using non-http protocol\n\t\t\t\t\t// e.g. 'file://' or 'data://'. Handle as success.\n\n\t\t\t\t\tif ( response.status === 0 ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.FileLoader: HTTP Status 0 received.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Workaround: Checking if response.body === undefined for Alipay browser #23548\n\n\t\t\t\t\tif ( typeof ReadableStream === 'undefined' || response.body === undefined || response.body.getReader === undefined ) {\n\n\t\t\t\t\t\treturn response;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst callbacks = loading[ url ];\n\t\t\t\t\tconst reader = response.body.getReader();\n\n\t\t\t\t\t// Nginx needs X-File-Size check\n\t\t\t\t\t// https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content\n\t\t\t\t\tconst contentLength = response.headers.get( 'Content-Length' ) || response.headers.get( 'X-File-Size' );\n\t\t\t\t\tconst total = contentLength ? parseInt( contentLength ) : 0;\n\t\t\t\t\tconst lengthComputable = total !== 0;\n\t\t\t\t\tlet loaded = 0;\n\n\t\t\t\t\t// periodically read data into the new stream tracking while download progress\n\t\t\t\t\tconst stream = new ReadableStream( {\n\t\t\t\t\t\tstart( controller ) {\n\n\t\t\t\t\t\t\treadData();\n\n\t\t\t\t\t\t\tfunction readData() {\n\n\t\t\t\t\t\t\t\treader.read().then( ( { done, value } ) => {\n\n\t\t\t\t\t\t\t\t\tif ( done ) {\n\n\t\t\t\t\t\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\tloaded += value.byteLength;\n\n\t\t\t\t\t\t\t\t\t\tconst event = new ProgressEvent( 'progress', { lengthComputable, loaded, total } );\n\t\t\t\t\t\t\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\t\t\t\t\t\t\tif ( callback.onProgress ) callback.onProgress( event );\n\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tcontroller.enqueue( value );\n\t\t\t\t\t\t\t\t\t\treadData();\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn new Response( stream );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new HttpError( `fetch for \"${response.url}\" responded with ${response.status}: ${response.statusText}`, response );\n\n\t\t\t\t}\n\n\t\t\t} )\n\t\t\t.then( response => {\n\n\t\t\t\tswitch ( responseType ) {\n\n\t\t\t\t\tcase 'arraybuffer':\n\n\t\t\t\t\t\treturn response.arrayBuffer();\n\n\t\t\t\t\tcase 'blob':\n\n\t\t\t\t\t\treturn response.blob();\n\n\t\t\t\t\tcase 'document':\n\n\t\t\t\t\t\treturn response.text()\n\t\t\t\t\t\t\t.then( text => {\n\n\t\t\t\t\t\t\t\tconst parser = new DOMParser();\n\t\t\t\t\t\t\t\treturn parser.parseFromString( text, mimeType );\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\tcase 'json':\n\n\t\t\t\t\t\treturn response.json();\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tif ( mimeType === undefined ) {\n\n\t\t\t\t\t\t\treturn response.text();\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// sniff encoding\n\t\t\t\t\t\t\tconst re = /charset=\"?([^;\"\\s]*)\"?/i;\n\t\t\t\t\t\t\tconst exec = re.exec( mimeType );\n\t\t\t\t\t\t\tconst label = exec && exec[ 1 ] ? exec[ 1 ].toLowerCase() : undefined;\n\t\t\t\t\t\t\tconst decoder = new TextDecoder( label );\n\t\t\t\t\t\t\treturn response.arrayBuffer().then( ab => decoder.decode( ab ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} )\n\t\t\t.then( data => {\n\n\t\t\t\t// Add to cache only on HTTP success, so that we do not cache\n\t\t\t\t// error response bodies as proper responses to requests.\n\t\t\t\tCache.add( url, data );\n\n\t\t\t\tconst callbacks = loading[ url ];\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onLoad ) callback.onLoad( data );\n\n\t\t\t\t}\n\n\t\t\t} )\n\t\t\t.catch( err => {\n\n\t\t\t\t// Abort errors and other errors are handled the same\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tif ( callbacks === undefined ) {\n\n\t\t\t\t\t// When onLoad was called and url was deleted in `loading`\n\t\t\t\t\tthis.manager.itemError( url );\n\t\t\t\t\tthrow err;\n\n\t\t\t\t}\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onError ) callback.onError( err );\n\n\t\t\t\t}\n\n\t\t\t\tthis.manager.itemError( url );\n\n\t\t\t} )\n\t\t\t.finally( () => {\n\n\t\t\t\tthis.manager.itemEnd( url );\n\n\t\t\t} );\n\n\t\tthis.manager.itemStart( url );\n\n\t}\n\n\tsetResponseType( value ) {\n\n\t\tthis.responseType = value;\n\t\treturn this;\n\n\t}\n\n\tsetMimeType( value ) {\n\n\t\tthis.mimeType = value;\n\t\treturn this;\n\n\t}\n\n}\n\nclass AnimationLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst animations = [];\n\n\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\tconst clip = AnimationClip.parse( json[ i ] );\n\n\t\t\tanimations.push( clip );\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to block based textures loader (dds, pvr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass CompressedTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst images = [];\n\n\t\tconst texture = new CompressedTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( url[ i ], function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\timages[ i ] = {\n\t\t\t\t\twidth: texDatas.width,\n\t\t\t\t\theight: texDatas.height,\n\t\t\t\t\tformat: texDatas.format,\n\t\t\t\t\tmipmaps: texDatas.mipmaps\n\t\t\t\t};\n\n\t\t\t\tloaded += 1;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\tif ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter;\n\n\t\t\t\t\ttexture.image = images;\n\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\tif ( Array.isArray( url ) ) {\n\n\t\t\tfor ( let i = 0, il = url.length; i < il; ++ i ) {\n\n\t\t\t\tloadTexture( i );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// compressed cubemap texture stored in a single DDS file\n\n\t\t\tloader.load( url, function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\tif ( texDatas.isCubemap ) {\n\n\t\t\t\t\tconst faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n\n\t\t\t\t\tfor ( let f = 0; f < faces; f ++ ) {\n\n\t\t\t\t\t\timages[ f ] = { mipmaps: [] };\n\n\t\t\t\t\t\tfor ( let i = 0; i < texDatas.mipmapCount; i ++ ) {\n\n\t\t\t\t\t\t\timages[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] );\n\t\t\t\t\t\t\timages[ f ].format = texDatas.format;\n\t\t\t\t\t\t\timages[ f ].width = texDatas.width;\n\t\t\t\t\t\t\timages[ f ].height = texDatas.height;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.image = images;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture.image.width = texDatas.width;\n\t\t\t\t\ttexture.image.height = texDatas.height;\n\t\t\t\t\ttexture.mipmaps = texDatas.mipmaps;\n\n\t\t\t\t}\n\n\t\t\t\tif ( texDatas.mipmapCount === 1 ) {\n\n\t\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t\t}\n\n\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass ImageLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst image = createElementNS( 'img' );\n\n\t\tfunction onImageLoad() {\n\n\t\t\tremoveEventListeners();\n\n\t\t\tCache.add( url, this );\n\n\t\t\tif ( onLoad ) onLoad( this );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\tfunction onImageError( event ) {\n\n\t\t\tremoveEventListeners();\n\n\t\t\tif ( onError ) onError( event );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\tfunction removeEventListeners() {\n\n\t\t\timage.removeEventListener( 'load', onImageLoad, false );\n\t\t\timage.removeEventListener( 'error', onImageError, false );\n\n\t\t}\n\n\t\timage.addEventListener( 'load', onImageLoad, false );\n\t\timage.addEventListener( 'error', onImageError, false );\n\n\t\tif ( url.slice( 0, 5 ) !== 'data:' ) {\n\n\t\t\tif ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin;\n\n\t\t}\n\n\t\tscope.manager.itemStart( url );\n\n\t\timage.src = url;\n\n\t\treturn image;\n\n\t}\n\n}\n\nclass CubeTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( urls, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new CubeTexture();\n\t\ttexture.colorSpace = SRGBColorSpace;\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( urls[ i ], function ( image ) {\n\n\t\t\t\ttexture.images[ i ] = image;\n\n\t\t\t\tloaded ++;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, undefined, onError );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < urls.length; ++ i ) {\n\n\t\t\tloadTexture( i );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass DataTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst texture = new DataTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setPath( this.path );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\tlet texData;\n\n\t\t\ttry {\n\n\t\t\t\ttexData = scope.parse( buffer );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\tif ( onError !== undefined ) {\n\n\t\t\t\t\tonError( error );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( error );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ! texData ) return onError(); // TODO: Remove this when all loaders properly throw errors\n\n\t\t\tif ( texData.image !== undefined ) {\n\n\t\t\t\ttexture.image = texData.image;\n\n\t\t\t} else if ( texData.data !== undefined ) {\n\n\t\t\t\ttexture.image.width = texData.width;\n\t\t\t\ttexture.image.height = texData.height;\n\t\t\t\ttexture.image.data = texData.data;\n\n\t\t\t}\n\n\t\t\ttexture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping;\n\t\t\ttexture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping;\n\n\t\t\ttexture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter;\n\t\t\ttexture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter;\n\n\t\t\ttexture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n\n\t\t\tif ( texData.colorSpace !== undefined ) {\n\n\t\t\t\ttexture.colorSpace = texData.colorSpace;\n\n\t\t\t} else if ( texData.encoding !== undefined ) { // @deprecated, r152\n\n\t\t\t\ttexture.encoding = texData.encoding;\n\n\t\t\t}\n\n\t\t\tif ( texData.flipY !== undefined ) {\n\n\t\t\t\ttexture.flipY = texData.flipY;\n\n\t\t\t}\n\n\t\t\tif ( texData.format !== undefined ) {\n\n\t\t\t\ttexture.format = texData.format;\n\n\t\t\t}\n\n\t\t\tif ( texData.type !== undefined ) {\n\n\t\t\t\ttexture.type = texData.type;\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmaps !== undefined ) {\n\n\t\t\t\ttexture.mipmaps = texData.mipmaps;\n\t\t\t\ttexture.minFilter = LinearMipmapLinearFilter; // presumably...\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmapCount === 1 ) {\n\n\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t}\n\n\t\t\tif ( texData.generateMipmaps !== undefined ) {\n\n\t\t\t\ttexture.generateMipmaps = texData.generateMipmaps;\n\n\t\t\t}\n\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad ) onLoad( texture, texData );\n\n\t\t}, onProgress, onError );\n\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass TextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new Texture();\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tloader.load( url, function ( image ) {\n\n\t\t\ttexture.image = image;\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad !== undefined ) {\n\n\t\t\t\tonLoad( texture );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass Light extends Object3D {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.isLight = true;\n\n\t\tthis.type = 'Light';\n\n\t\tthis.color = new Color( color );\n\t\tthis.intensity = intensity;\n\n\t}\n\n\tdispose() {\n\n\t\t// Empty here in base class; some subclasses override.\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.intensity = source.intensity;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.color = this.color.getHex();\n\t\tdata.object.intensity = this.intensity;\n\n\t\tif ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();\n\n\t\tif ( this.distance !== undefined ) data.object.distance = this.distance;\n\t\tif ( this.angle !== undefined ) data.object.angle = this.angle;\n\t\tif ( this.decay !== undefined ) data.object.decay = this.decay;\n\t\tif ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra;\n\n\t\tif ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON();\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass HemisphereLight extends Light {\n\n\tconstructor( skyColor, groundColor, intensity ) {\n\n\t\tsuper( skyColor, intensity );\n\n\t\tthis.isHemisphereLight = true;\n\n\t\tthis.type = 'HemisphereLight';\n\n\t\tthis.position.copy( Object3D.DEFAULT_UP );\n\t\tthis.updateMatrix();\n\n\t\tthis.groundColor = new Color( groundColor );\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.groundColor.copy( source.groundColor );\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld$1 = /*@__PURE__*/ new Vector3();\nconst _lookTarget$1 = /*@__PURE__*/ new Vector3();\n\nclass LightShadow {\n\n\tconstructor( camera ) {\n\n\t\tthis.camera = camera;\n\n\t\tthis.bias = 0;\n\t\tthis.normalBias = 0;\n\t\tthis.radius = 1;\n\t\tthis.blurSamples = 8;\n\n\t\tthis.mapSize = new Vector2( 512, 512 );\n\n\t\tthis.map = null;\n\t\tthis.mapPass = null;\n\t\tthis.matrix = new Matrix4();\n\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\n\t\tthis._frustum = new Frustum();\n\t\tthis._frameExtents = new Vector2( 1, 1 );\n\n\t\tthis._viewportCount = 1;\n\n\t\tthis._viewports = [\n\n\t\t\tnew Vector4( 0, 0, 1, 1 )\n\n\t\t];\n\n\t}\n\n\tgetViewportCount() {\n\n\t\treturn this._viewportCount;\n\n\t}\n\n\tgetFrustum() {\n\n\t\treturn this._frustum;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst shadowCamera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\t_lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld );\n\t\tshadowCamera.position.copy( _lightPositionWorld$1 );\n\n\t\t_lookTarget$1.setFromMatrixPosition( light.target.matrixWorld );\n\t\tshadowCamera.lookAt( _lookTarget$1 );\n\t\tshadowCamera.updateMatrixWorld();\n\n\t\t_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix$1 );\n\n\t\tshadowMatrix.set(\n\t\t\t0.5, 0.0, 0.0, 0.5,\n\t\t\t0.0, 0.5, 0.0, 0.5,\n\t\t\t0.0, 0.0, 0.5, 0.5,\n\t\t\t0.0, 0.0, 0.0, 1.0\n\t\t);\n\n\t\tshadowMatrix.multiply( _projScreenMatrix$1 );\n\n\t}\n\n\tgetViewport( viewportIndex ) {\n\n\t\treturn this._viewports[ viewportIndex ];\n\n\t}\n\n\tgetFrameExtents() {\n\n\t\treturn this._frameExtents;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.map ) {\n\n\t\t\tthis.map.dispose();\n\n\t\t}\n\n\t\tif ( this.mapPass ) {\n\n\t\t\tthis.mapPass.dispose();\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.camera = source.camera.clone();\n\n\t\tthis.bias = source.bias;\n\t\tthis.radius = source.radius;\n\n\t\tthis.mapSize.copy( source.mapSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst object = {};\n\n\t\tif ( this.bias !== 0 ) object.bias = this.bias;\n\t\tif ( this.normalBias !== 0 ) object.normalBias = this.normalBias;\n\t\tif ( this.radius !== 1 ) object.radius = this.radius;\n\t\tif ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray();\n\n\t\tobject.camera = this.camera.toJSON( false ).object;\n\t\tdelete object.camera.matrix;\n\n\t\treturn object;\n\n\t}\n\n}\n\nclass SpotLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 50, 1, 0.5, 500 ) );\n\n\t\tthis.isSpotLightShadow = true;\n\n\t\tthis.focus = 1;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst camera = this.camera;\n\n\t\tconst fov = RAD2DEG * 2 * light.angle * this.focus;\n\t\tconst aspect = this.mapSize.width / this.mapSize.height;\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) {\n\n\t\t\tcamera.fov = fov;\n\t\t\tcamera.aspect = aspect;\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\tsuper.updateMatrices( light );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.focus = source.focus;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass SpotLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isSpotLight = true;\n\n\t\tthis.type = 'SpotLight';\n\n\t\tthis.position.copy( Object3D.DEFAULT_UP );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.distance = distance;\n\t\tthis.angle = angle;\n\t\tthis.penumbra = penumbra;\n\t\tthis.decay = decay;\n\n\t\tthis.map = null;\n\n\t\tthis.shadow = new SpotLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// compute the light's luminous power (in lumens) from its intensity (in candela)\n\t\t// by convention for a spotlight, luminous power (lm) = π * luminous intensity (cd)\n\t\treturn this.intensity * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// set the light's intensity (in candela) from the desired luminous power (in lumens)\n\t\tthis.intensity = power / Math.PI;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.distance = source.distance;\n\t\tthis.angle = source.angle;\n\t\tthis.penumbra = source.penumbra;\n\t\tthis.decay = source.decay;\n\n\t\tthis.target = source.target.clone();\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _projScreenMatrix = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld = /*@__PURE__*/ new Vector3();\nconst _lookTarget = /*@__PURE__*/ new Vector3();\n\nclass PointLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 90, 1, 0.5, 500 ) );\n\n\t\tthis.isPointLightShadow = true;\n\n\t\tthis._frameExtents = new Vector2( 4, 2 );\n\n\t\tthis._viewportCount = 6;\n\n\t\tthis._viewports = [\n\t\t\t// These viewports map a cube-map onto a 2D texture with the\n\t\t\t// following orientation:\n\t\t\t//\n\t\t\t// xzXZ\n\t\t\t// y Y\n\t\t\t//\n\t\t\t// X - Positive x direction\n\t\t\t// x - Negative x direction\n\t\t\t// Y - Positive y direction\n\t\t\t// y - Negative y direction\n\t\t\t// Z - Positive z direction\n\t\t\t// z - Negative z direction\n\n\t\t\t// positive X\n\t\t\tnew Vector4( 2, 1, 1, 1 ),\n\t\t\t// negative X\n\t\t\tnew Vector4( 0, 1, 1, 1 ),\n\t\t\t// positive Z\n\t\t\tnew Vector4( 3, 1, 1, 1 ),\n\t\t\t// negative Z\n\t\t\tnew Vector4( 1, 1, 1, 1 ),\n\t\t\t// positive Y\n\t\t\tnew Vector4( 3, 0, 1, 1 ),\n\t\t\t// negative Y\n\t\t\tnew Vector4( 1, 0, 1, 1 )\n\t\t];\n\n\t\tthis._cubeDirections = [\n\t\t\tnew Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ),\n\t\t\tnew Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 )\n\t\t];\n\n\t\tthis._cubeUps = [\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ),\tnew Vector3( 0, 0, - 1 )\n\t\t];\n\n\t}\n\n\tupdateMatrices( light, viewportIndex = 0 ) {\n\n\t\tconst camera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( far !== camera.far ) {\n\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\t_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );\n\t\tcamera.position.copy( _lightPositionWorld );\n\n\t\t_lookTarget.copy( camera.position );\n\t\t_lookTarget.add( this._cubeDirections[ viewportIndex ] );\n\t\tcamera.up.copy( this._cubeUps[ viewportIndex ] );\n\t\tcamera.lookAt( _lookTarget );\n\t\tcamera.updateMatrixWorld();\n\n\t\tshadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z );\n\n\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t}\n\n}\n\nclass PointLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, decay = 2 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isPointLight = true;\n\n\t\tthis.type = 'PointLight';\n\n\t\tthis.distance = distance;\n\t\tthis.decay = decay;\n\n\t\tthis.shadow = new PointLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// compute the light's luminous power (in lumens) from its intensity (in candela)\n\t\t// for an isotropic light source, luminous power (lm) = 4 π luminous intensity (cd)\n\t\treturn this.intensity * 4 * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// set the light's intensity (in candela) from the desired luminous power (in lumens)\n\t\tthis.intensity = power / ( 4 * Math.PI );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.distance = source.distance;\n\t\tthis.decay = source.decay;\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass DirectionalLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );\n\n\t\tthis.isDirectionalLightShadow = true;\n\n\t}\n\n}\n\nclass DirectionalLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isDirectionalLight = true;\n\n\t\tthis.type = 'DirectionalLight';\n\n\t\tthis.position.copy( Object3D.DEFAULT_UP );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.shadow = new DirectionalLightShadow();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.target = source.target.clone();\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass AmbientLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isAmbientLight = true;\n\n\t\tthis.type = 'AmbientLight';\n\n\t}\n\n}\n\nclass RectAreaLight extends Light {\n\n\tconstructor( color, intensity, width = 10, height = 10 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isRectAreaLight = true;\n\n\t\tthis.type = 'RectAreaLight';\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\n\t}\n\n\tget power() {\n\n\t\t// compute the light's luminous power (in lumens) from its intensity (in nits)\n\t\treturn this.intensity * this.width * this.height * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// set the light's intensity (in nits) from the desired luminous power (in lumens)\n\t\tthis.intensity = power / ( this.width * this.height * Math.PI );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.width = this.width;\n\t\tdata.object.height = this.height;\n\n\t\treturn data;\n\n\t}\n\n}\n\n/**\n * Primary reference:\n * https://graphics.stanford.edu/papers/envmap/envmap.pdf\n *\n * Secondary reference:\n * https://www.ppsloan.org/publications/StupidSH36.pdf\n */\n\n// 3-band SH defined by 9 coefficients\n\nclass SphericalHarmonics3 {\n\n\tconstructor() {\n\n\t\tthis.isSphericalHarmonics3 = true;\n\n\t\tthis.coefficients = [];\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients.push( new Vector3() );\n\n\t\t}\n\n\t}\n\n\tset( coefficients ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].copy( coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tzero() {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].set( 0, 0, 0 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// get the radiance in the direction of the normal\n\t// target is a Vector3\n\tgetAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 );\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 0.488603 * y );\n\t\ttarget.addScaledVector( coeff[ 2 ], 0.488603 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 0.488603 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) );\n\t\ttarget.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) );\n\t\ttarget.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) );\n\n\t\treturn target;\n\n\t}\n\n\t// get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n\t// target is a Vector3\n\t// https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\tgetIrradianceAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603\n\t\ttarget.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548\n\t\ttarget.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3\n\t\ttarget.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274\n\n\t\treturn target;\n\n\t}\n\n\tadd( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].add( sh.coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\taddScaledSH( sh, s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tscale( s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].multiplyScalar( s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tlerp( sh, alpha ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].lerp( sh.coefficients[ i ], alpha );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tequals( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcopy( sh ) {\n\n\t\treturn this.set( sh.coefficients );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].fromArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].toArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn array;\n\n\t}\n\n\t// evaluate the basis functions\n\t// shBasis is an Array[ 9 ]\n\tstatic getBasisAt( normal, shBasis ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\t// band 0\n\t\tshBasis[ 0 ] = 0.282095;\n\n\t\t// band 1\n\t\tshBasis[ 1 ] = 0.488603 * y;\n\t\tshBasis[ 2 ] = 0.488603 * z;\n\t\tshBasis[ 3 ] = 0.488603 * x;\n\n\t\t// band 2\n\t\tshBasis[ 4 ] = 1.092548 * x * y;\n\t\tshBasis[ 5 ] = 1.092548 * y * z;\n\t\tshBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 );\n\t\tshBasis[ 7 ] = 1.092548 * x * z;\n\t\tshBasis[ 8 ] = 0.546274 * ( x * x - y * y );\n\n\t}\n\n}\n\nclass LightProbe extends Light {\n\n\tconstructor( sh = new SphericalHarmonics3(), intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tthis.isLightProbe = true;\n\n\t\tthis.sh = sh;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.sh.copy( source.sh );\n\n\t\treturn this;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n\t\tthis.sh.fromArray( json.sh );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.sh = this.sh.toArray();\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass MaterialLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\t\tthis.textures = {};\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst textures = this.textures;\n\n\t\tfunction getTexture( name ) {\n\n\t\t\tif ( textures[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.MaterialLoader: Undefined texture', name );\n\n\t\t\t}\n\n\t\t\treturn textures[ name ];\n\n\t\t}\n\n\t\tconst material = MaterialLoader.createMaterialFromType( json.type );\n\n\t\tif ( json.uuid !== undefined ) material.uuid = json.uuid;\n\t\tif ( json.name !== undefined ) material.name = json.name;\n\t\tif ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color );\n\t\tif ( json.roughness !== undefined ) material.roughness = json.roughness;\n\t\tif ( json.metalness !== undefined ) material.metalness = json.metalness;\n\t\tif ( json.sheen !== undefined ) material.sheen = json.sheen;\n\t\tif ( json.sheenColor !== undefined ) material.sheenColor = new Color().setHex( json.sheenColor );\n\t\tif ( json.sheenRoughness !== undefined ) material.sheenRoughness = json.sheenRoughness;\n\t\tif ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive );\n\t\tif ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular );\n\t\tif ( json.specularIntensity !== undefined ) material.specularIntensity = json.specularIntensity;\n\t\tif ( json.specularColor !== undefined && material.specularColor !== undefined ) material.specularColor.setHex( json.specularColor );\n\t\tif ( json.shininess !== undefined ) material.shininess = json.shininess;\n\t\tif ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat;\n\t\tif ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;\n\t\tif ( json.iridescence !== undefined ) material.iridescence = json.iridescence;\n\t\tif ( json.iridescenceIOR !== undefined ) material.iridescenceIOR = json.iridescenceIOR;\n\t\tif ( json.iridescenceThicknessRange !== undefined ) material.iridescenceThicknessRange = json.iridescenceThicknessRange;\n\t\tif ( json.transmission !== undefined ) material.transmission = json.transmission;\n\t\tif ( json.thickness !== undefined ) material.thickness = json.thickness;\n\t\tif ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance;\n\t\tif ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor );\n\t\tif ( json.anisotropy !== undefined ) material.anisotropy = json.anisotropy;\n\t\tif ( json.anisotropyRotation !== undefined ) material.anisotropyRotation = json.anisotropyRotation;\n\t\tif ( json.fog !== undefined ) material.fog = json.fog;\n\t\tif ( json.flatShading !== undefined ) material.flatShading = json.flatShading;\n\t\tif ( json.blending !== undefined ) material.blending = json.blending;\n\t\tif ( json.combine !== undefined ) material.combine = json.combine;\n\t\tif ( json.side !== undefined ) material.side = json.side;\n\t\tif ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide;\n\t\tif ( json.opacity !== undefined ) material.opacity = json.opacity;\n\t\tif ( json.transparent !== undefined ) material.transparent = json.transparent;\n\t\tif ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest;\n\t\tif ( json.alphaHash !== undefined ) material.alphaHash = json.alphaHash;\n\t\tif ( json.depthTest !== undefined ) material.depthTest = json.depthTest;\n\t\tif ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite;\n\t\tif ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite;\n\n\t\tif ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite;\n\t\tif ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask;\n\t\tif ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc;\n\t\tif ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef;\n\t\tif ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask;\n\t\tif ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail;\n\t\tif ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail;\n\t\tif ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass;\n\n\t\tif ( json.wireframe !== undefined ) material.wireframe = json.wireframe;\n\t\tif ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;\n\t\tif ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap;\n\t\tif ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin;\n\n\t\tif ( json.rotation !== undefined ) material.rotation = json.rotation;\n\n\t\tif ( json.linewidth !== 1 ) material.linewidth = json.linewidth;\n\t\tif ( json.dashSize !== undefined ) material.dashSize = json.dashSize;\n\t\tif ( json.gapSize !== undefined ) material.gapSize = json.gapSize;\n\t\tif ( json.scale !== undefined ) material.scale = json.scale;\n\n\t\tif ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset;\n\t\tif ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor;\n\t\tif ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits;\n\n\t\tif ( json.dithering !== undefined ) material.dithering = json.dithering;\n\n\t\tif ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage;\n\t\tif ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha;\n\t\tif ( json.forceSinglePass !== undefined ) material.forceSinglePass = json.forceSinglePass;\n\n\t\tif ( json.visible !== undefined ) material.visible = json.visible;\n\n\t\tif ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped;\n\n\t\tif ( json.userData !== undefined ) material.userData = json.userData;\n\n\t\tif ( json.vertexColors !== undefined ) {\n\n\t\t\tif ( typeof json.vertexColors === 'number' ) {\n\n\t\t\t\tmaterial.vertexColors = ( json.vertexColors > 0 ) ? true : false;\n\n\t\t\t} else {\n\n\t\t\t\tmaterial.vertexColors = json.vertexColors;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Shader Material\n\n\t\tif ( json.uniforms !== undefined ) {\n\n\t\t\tfor ( const name in json.uniforms ) {\n\n\t\t\t\tconst uniform = json.uniforms[ name ];\n\n\t\t\t\tmaterial.uniforms[ name ] = {};\n\n\t\t\t\tswitch ( uniform.type ) {\n\n\t\t\t\t\tcase 't':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = getTexture( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Color().setHex( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v2':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector2().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = uniform.value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json.defines !== undefined ) material.defines = json.defines;\n\t\tif ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader;\n\t\tif ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader;\n\t\tif ( json.glslVersion !== undefined ) material.glslVersion = json.glslVersion;\n\n\t\tif ( json.extensions !== undefined ) {\n\n\t\t\tfor ( const key in json.extensions ) {\n\n\t\t\t\tmaterial.extensions[ key ] = json.extensions[ key ];\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json.lights !== undefined ) material.lights = json.lights;\n\t\tif ( json.clipping !== undefined ) material.clipping = json.clipping;\n\n\t\t// for PointsMaterial\n\n\t\tif ( json.size !== undefined ) material.size = json.size;\n\t\tif ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation;\n\n\t\t// maps\n\n\t\tif ( json.map !== undefined ) material.map = getTexture( json.map );\n\t\tif ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap );\n\n\t\tif ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap );\n\n\t\tif ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap );\n\t\tif ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale;\n\n\t\tif ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap );\n\t\tif ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType;\n\t\tif ( json.normalScale !== undefined ) {\n\n\t\t\tlet normalScale = json.normalScale;\n\n\t\t\tif ( Array.isArray( normalScale ) === false ) {\n\n\t\t\t\t// Blender exporter used to export a scalar. See #7459\n\n\t\t\t\tnormalScale = [ normalScale, normalScale ];\n\n\t\t\t}\n\n\t\t\tmaterial.normalScale = new Vector2().fromArray( normalScale );\n\n\t\t}\n\n\t\tif ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap );\n\t\tif ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale;\n\t\tif ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias;\n\n\t\tif ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap );\n\t\tif ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap );\n\n\t\tif ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap );\n\t\tif ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity;\n\n\t\tif ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );\n\t\tif ( json.specularIntensityMap !== undefined ) material.specularIntensityMap = getTexture( json.specularIntensityMap );\n\t\tif ( json.specularColorMap !== undefined ) material.specularColorMap = getTexture( json.specularColorMap );\n\n\t\tif ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );\n\t\tif ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;\n\n\t\tif ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity;\n\t\tif ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio;\n\n\t\tif ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap );\n\t\tif ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity;\n\n\t\tif ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap );\n\t\tif ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity;\n\n\t\tif ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap );\n\n\t\tif ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap );\n\t\tif ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap );\n\t\tif ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap );\n\t\tif ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale );\n\n\t\tif ( json.iridescenceMap !== undefined ) material.iridescenceMap = getTexture( json.iridescenceMap );\n\t\tif ( json.iridescenceThicknessMap !== undefined ) material.iridescenceThicknessMap = getTexture( json.iridescenceThicknessMap );\n\n\t\tif ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap );\n\t\tif ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap );\n\n\t\tif ( json.anisotropyMap !== undefined ) material.anisotropyMap = getTexture( json.anisotropyMap );\n\n\t\tif ( json.sheenColorMap !== undefined ) material.sheenColorMap = getTexture( json.sheenColorMap );\n\t\tif ( json.sheenRoughnessMap !== undefined ) material.sheenRoughnessMap = getTexture( json.sheenRoughnessMap );\n\n\t\treturn material;\n\n\t}\n\n\tsetTextures( value ) {\n\n\t\tthis.textures = value;\n\t\treturn this;\n\n\t}\n\n\tstatic createMaterialFromType( type ) {\n\n\t\tconst materialLib = {\n\t\t\tShadowMaterial,\n\t\t\tSpriteMaterial,\n\t\t\tRawShaderMaterial,\n\t\t\tShaderMaterial,\n\t\t\tPointsMaterial,\n\t\t\tMeshPhysicalMaterial,\n\t\t\tMeshStandardMaterial,\n\t\t\tMeshPhongMaterial,\n\t\t\tMeshToonMaterial,\n\t\t\tMeshNormalMaterial,\n\t\t\tMeshLambertMaterial,\n\t\t\tMeshDepthMaterial,\n\t\t\tMeshDistanceMaterial,\n\t\t\tMeshBasicMaterial,\n\t\t\tMeshMatcapMaterial,\n\t\t\tLineDashedMaterial,\n\t\t\tLineBasicMaterial,\n\t\t\tMaterial\n\t\t};\n\n\t\treturn new materialLib[ type ]();\n\n\t}\n\n}\n\nclass LoaderUtils {\n\n\tstatic decodeText( array ) {\n\n\t\tif ( typeof TextDecoder !== 'undefined' ) {\n\n\t\t\treturn new TextDecoder().decode( array );\n\n\t\t}\n\n\t\t// Avoid the String.fromCharCode.apply(null, array) shortcut, which\n\t\t// throws a \"maximum call stack size exceeded\" error for large arrays.\n\n\t\tlet s = '';\n\n\t\tfor ( let i = 0, il = array.length; i < il; i ++ ) {\n\n\t\t\t// Implicitly assumes little-endian.\n\t\t\ts += String.fromCharCode( array[ i ] );\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// merges multi-byte utf-8 characters.\n\n\t\t\treturn decodeURIComponent( escape( s ) );\n\n\t\t} catch ( e ) { // see #16358\n\n\t\t\treturn s;\n\n\t\t}\n\n\t}\n\n\tstatic extractUrlBase( url ) {\n\n\t\tconst index = url.lastIndexOf( '/' );\n\n\t\tif ( index === - 1 ) return './';\n\n\t\treturn url.slice( 0, index + 1 );\n\n\t}\n\n\tstatic resolveURL( url, path ) {\n\n\t\t// Invalid URL\n\t\tif ( typeof url !== 'string' || url === '' ) return '';\n\n\t\t// Host Relative URL\n\t\tif ( /^https?:\\/\\//i.test( path ) && /^\\//.test( url ) ) {\n\n\t\t\tpath = path.replace( /(^https?:\\/\\/[^\\/]+).*/i, '$1' );\n\n\t\t}\n\n\t\t// Absolute URL http://,https://,//\n\t\tif ( /^(https?:)?\\/\\//i.test( url ) ) return url;\n\n\t\t// Data URI\n\t\tif ( /^data:.*,.*$/i.test( url ) ) return url;\n\n\t\t// Blob URL\n\t\tif ( /^blob:.*$/i.test( url ) ) return url;\n\n\t\t// Relative URL\n\t\treturn path + url;\n\n\t}\n\n}\n\nclass InstancedBufferGeometry extends BufferGeometry {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isInstancedBufferGeometry = true;\n\n\t\tthis.type = 'InstancedBufferGeometry';\n\t\tthis.instanceCount = Infinity;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.instanceCount = source.instanceCount;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.instanceCount = this.instanceCount;\n\n\t\tdata.isInstancedBufferGeometry = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass BufferGeometryLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst interleavedBufferMap = {};\n\t\tconst arrayBufferMap = {};\n\n\t\tfunction getInterleavedBuffer( json, uuid ) {\n\n\t\t\tif ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ];\n\n\t\t\tconst interleavedBuffers = json.interleavedBuffers;\n\t\t\tconst interleavedBuffer = interleavedBuffers[ uuid ];\n\n\t\t\tconst buffer = getArrayBuffer( json, interleavedBuffer.buffer );\n\n\t\t\tconst array = getTypedArray( interleavedBuffer.type, buffer );\n\t\t\tconst ib = new InterleavedBuffer( array, interleavedBuffer.stride );\n\t\t\tib.uuid = interleavedBuffer.uuid;\n\n\t\t\tinterleavedBufferMap[ uuid ] = ib;\n\n\t\t\treturn ib;\n\n\t\t}\n\n\t\tfunction getArrayBuffer( json, uuid ) {\n\n\t\t\tif ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ];\n\n\t\t\tconst arrayBuffers = json.arrayBuffers;\n\t\t\tconst arrayBuffer = arrayBuffers[ uuid ];\n\n\t\t\tconst ab = new Uint32Array( arrayBuffer ).buffer;\n\n\t\t\tarrayBufferMap[ uuid ] = ab;\n\n\t\t\treturn ab;\n\n\t\t}\n\n\t\tconst geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();\n\n\t\tconst index = json.data.index;\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst typedArray = getTypedArray( index.type, index.array );\n\t\t\tgeometry.setIndex( new BufferAttribute( typedArray, 1 ) );\n\n\t\t}\n\n\t\tconst attributes = json.data.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\t\t\tlet bufferAttribute;\n\n\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t} else {\n\n\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\tconst bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;\n\t\t\t\tbufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t}\n\n\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\tif ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage );\n\n\t\t\tif ( attribute.updateRange !== undefined ) {\n\n\t\t\t\tbufferAttribute.updateRange.offset = attribute.updateRange.offset;\n\t\t\t\tbufferAttribute.updateRange.count = attribute.updateRange.count;\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( key, bufferAttribute );\n\n\t\t}\n\n\t\tconst morphAttributes = json.data.morphAttributes;\n\n\t\tif ( morphAttributes ) {\n\n\t\t\tfor ( const key in morphAttributes ) {\n\n\t\t\t\tconst attributeArray = morphAttributes[ key ];\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst attribute = attributeArray[ i ];\n\t\t\t\t\tlet bufferAttribute;\n\n\t\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\t\t\tbufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\t\t\tarray.push( bufferAttribute );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.morphAttributes[ key ] = array;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst morphTargetsRelative = json.data.morphTargetsRelative;\n\n\t\tif ( morphTargetsRelative ) {\n\n\t\t\tgeometry.morphTargetsRelative = true;\n\n\t\t}\n\n\t\tconst groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n\n\t\tif ( groups !== undefined ) {\n\n\t\t\tfor ( let i = 0, n = groups.length; i !== n; ++ i ) {\n\n\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\tgeometry.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst boundingSphere = json.data.boundingSphere;\n\n\t\tif ( boundingSphere !== undefined ) {\n\n\t\t\tconst center = new Vector3();\n\n\t\t\tif ( boundingSphere.center !== undefined ) {\n\n\t\t\t\tcenter.fromArray( boundingSphere.center );\n\n\t\t\t}\n\n\t\t\tgeometry.boundingSphere = new Sphere( center, boundingSphere.radius );\n\n\t\t}\n\n\t\tif ( json.name ) geometry.name = json.name;\n\t\tif ( json.userData ) geometry.userData = json.userData;\n\n\t\treturn geometry;\n\n\t}\n\n}\n\nclass ObjectLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tlet json = null;\n\n\t\t\ttry {\n\n\t\t\t\tjson = JSON.parse( text );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\tif ( onError !== undefined ) onError( error );\n\n\t\t\t\tconsole.error( 'THREE:ObjectLoader: Can\\'t parse ' + url + '.', error.message );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst metadata = json.metadata;\n\n\t\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\t\tif ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\\'t load ' + url ) );\n\n\t\t\t\tconsole.error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tscope.parse( json, onLoad );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tasync loadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tconst text = await loader.loadAsync( url, onProgress );\n\n\t\tconst json = JSON.parse( text );\n\n\t\tconst metadata = json.metadata;\n\n\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\tthrow new Error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\n\t\t}\n\n\t\treturn await scope.parseAsync( json );\n\n\t}\n\n\tparse( json, onLoad ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = this.parseImages( json.images, function () {\n\n\t\t\tif ( onLoad !== undefined ) onLoad( object );\n\n\t\t} );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\t//\n\n\t\tif ( onLoad !== undefined ) {\n\n\t\t\tlet hasImages = false;\n\n\t\t\tfor ( const uuid in images ) {\n\n\t\t\t\tif ( images[ uuid ].data instanceof HTMLImageElement ) {\n\n\t\t\t\t\thasImages = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hasImages === false ) onLoad( object );\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tasync parseAsync( json ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = await this.parseImagesAsync( json.images );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\treturn object;\n\n\t}\n\n\tparseShapes( json ) {\n\n\t\tconst shapes = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst shape = new Shape().fromJSON( json[ i ] );\n\n\t\t\t\tshapes[ shape.uuid ] = shape;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n\tparseSkeletons( json, object ) {\n\n\t\tconst skeletons = {};\n\t\tconst bones = {};\n\n\t\t// generate bone lookup table\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isBone ) bones[ child.uuid ] = child;\n\n\t\t} );\n\n\t\t// create skeletons\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst skeleton = new Skeleton().fromJSON( json[ i ], bones );\n\n\t\t\t\tskeletons[ skeleton.uuid ] = skeleton;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn skeletons;\n\n\t}\n\n\tparseGeometries( json, shapes ) {\n\n\t\tconst geometries = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst bufferGeometryLoader = new BufferGeometryLoader();\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tlet geometry;\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tswitch ( data.type ) {\n\n\t\t\t\t\tcase 'BufferGeometry':\n\t\t\t\t\tcase 'InstancedBufferGeometry':\n\n\t\t\t\t\t\tgeometry = bufferGeometryLoader.parse( data );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tif ( data.type in Geometries ) {\n\n\t\t\t\t\t\t\tgeometry = Geometries[ data.type ].fromJSON( data, shapes );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tconsole.warn( `THREE.ObjectLoader: Unsupported geometry type \"${ data.type }\"` );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) geometry.name = data.name;\n\t\t\t\tif ( data.userData !== undefined ) geometry.userData = data.userData;\n\n\t\t\t\tgeometries[ data.uuid ] = geometry;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn geometries;\n\n\t}\n\n\tparseMaterials( json, textures ) {\n\n\t\tconst cache = {}; // MultiMaterial\n\t\tconst materials = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst loader = new MaterialLoader();\n\t\t\tloader.setTextures( textures );\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( cache[ data.uuid ] === undefined ) {\n\n\t\t\t\t\tcache[ data.uuid ] = loader.parse( data );\n\n\t\t\t\t}\n\n\t\t\t\tmaterials[ data.uuid ] = cache[ data.uuid ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn materials;\n\n\t}\n\n\tparseAnimations( json ) {\n\n\t\tconst animations = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tconst clip = AnimationClip.parse( data );\n\n\t\t\t\tanimations[ clip.uuid ] = clip;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n\tparseImages( json, onLoad ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tfunction loadImage( url ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\treturn loader.load( url, function () {\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, undefined, function () {\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t} );\n\n\t\t}\n\n\t\tfunction deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn loadImage( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tconst manager = new LoadingManager( onLoad );\n\n\t\t\tloader = new ImageLoader( manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\tconst imageArray = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timageArray.push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\timages[ image.uuid ] = new Source( imageArray );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = deserializeImage( image.url );\n\t\t\t\t\timages[ image.uuid ] = new Source( deserializedImage );\n\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tasync parseImagesAsync( json ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tasync function deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn await loader.loadAsync( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tloader = new ImageLoader( this.manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\tconst imageArray = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = await deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timageArray.push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\timages[ image.uuid ] = new Source( imageArray );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = await deserializeImage( image.url );\n\t\t\t\t\timages[ image.uuid ] = new Source( deserializedImage );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tparseTextures( json, images ) {\n\n\t\tfunction parseConstant( value, type ) {\n\n\t\t\tif ( typeof value === 'number' ) return value;\n\n\t\t\tconsole.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value );\n\n\t\t\treturn type[ value ];\n\n\t\t}\n\n\t\tconst textures = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( data.image === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No \"image\" specified for', data.uuid );\n\n\t\t\t\t}\n\n\t\t\t\tif ( images[ data.image ] === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined image', data.image );\n\n\t\t\t\t}\n\n\t\t\t\tconst source = images[ data.image ];\n\t\t\t\tconst image = source.data;\n\n\t\t\t\tlet texture;\n\n\t\t\t\tif ( Array.isArray( image ) ) {\n\n\t\t\t\t\ttexture = new CubeTexture();\n\n\t\t\t\t\tif ( image.length === 6 ) texture.needsUpdate = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( image && image.data ) {\n\n\t\t\t\t\t\ttexture = new DataTexture();\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttexture = new Texture();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( image ) texture.needsUpdate = true; // textures can have undefined image data\n\n\t\t\t\t}\n\n\t\t\t\ttexture.source = source;\n\n\t\t\t\ttexture.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) texture.name = data.name;\n\n\t\t\t\tif ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING );\n\t\t\t\tif ( data.channel !== undefined ) texture.channel = data.channel;\n\n\t\t\t\tif ( data.offset !== undefined ) texture.offset.fromArray( data.offset );\n\t\t\t\tif ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );\n\t\t\t\tif ( data.center !== undefined ) texture.center.fromArray( data.center );\n\t\t\t\tif ( data.rotation !== undefined ) texture.rotation = data.rotation;\n\n\t\t\t\tif ( data.wrap !== undefined ) {\n\n\t\t\t\t\ttexture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING );\n\t\t\t\t\ttexture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING );\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.format !== undefined ) texture.format = data.format;\n\t\t\t\tif ( data.internalFormat !== undefined ) texture.internalFormat = data.internalFormat;\n\t\t\t\tif ( data.type !== undefined ) texture.type = data.type;\n\t\t\t\tif ( data.colorSpace !== undefined ) texture.colorSpace = data.colorSpace;\n\t\t\t\tif ( data.encoding !== undefined ) texture.encoding = data.encoding; // @deprecated, r152\n\n\t\t\t\tif ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;\n\n\t\t\t\tif ( data.flipY !== undefined ) texture.flipY = data.flipY;\n\n\t\t\t\tif ( data.generateMipmaps !== undefined ) texture.generateMipmaps = data.generateMipmaps;\n\t\t\t\tif ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha;\n\t\t\t\tif ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment;\n\t\t\t\tif ( data.compareFunction !== undefined ) texture.compareFunction = data.compareFunction;\n\n\t\t\t\tif ( data.userData !== undefined ) texture.userData = data.userData;\n\n\t\t\t\ttextures[ data.uuid ] = texture;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn textures;\n\n\t}\n\n\tparseObject( data, geometries, materials, textures, animations ) {\n\n\t\tlet object;\n\n\t\tfunction getGeometry( name ) {\n\n\t\t\tif ( geometries[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined geometry', name );\n\n\t\t\t}\n\n\t\t\treturn geometries[ name ];\n\n\t\t}\n\n\t\tfunction getMaterial( name ) {\n\n\t\t\tif ( name === undefined ) return undefined;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, l = name.length; i < l; i ++ ) {\n\n\t\t\t\t\tconst uuid = name[ i ];\n\n\t\t\t\t\tif ( materials[ uuid ] === undefined ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', uuid );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tarray.push( materials[ uuid ] );\n\n\t\t\t\t}\n\n\t\t\t\treturn array;\n\n\t\t\t}\n\n\t\t\tif ( materials[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', name );\n\n\t\t\t}\n\n\t\t\treturn materials[ name ];\n\n\t\t}\n\n\t\tfunction getTexture( uuid ) {\n\n\t\t\tif ( textures[ uuid ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined texture', uuid );\n\n\t\t\t}\n\n\t\t\treturn textures[ uuid ];\n\n\t\t}\n\n\t\tlet geometry, material;\n\n\t\tswitch ( data.type ) {\n\n\t\t\tcase 'Scene':\n\n\t\t\t\tobject = new Scene();\n\n\t\t\t\tif ( data.background !== undefined ) {\n\n\t\t\t\t\tif ( Number.isInteger( data.background ) ) {\n\n\t\t\t\t\t\tobject.background = new Color( data.background );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tobject.background = getTexture( data.background );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.environment !== undefined ) {\n\n\t\t\t\t\tobject.environment = getTexture( data.environment );\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.fog !== undefined ) {\n\n\t\t\t\t\tif ( data.fog.type === 'Fog' ) {\n\n\t\t\t\t\t\tobject.fog = new Fog( data.fog.color, data.fog.near, data.fog.far );\n\n\t\t\t\t\t} else if ( data.fog.type === 'FogExp2' ) {\n\n\t\t\t\t\t\tobject.fog = new FogExp2( data.fog.color, data.fog.density );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.backgroundBlurriness !== undefined ) object.backgroundBlurriness = data.backgroundBlurriness;\n\t\t\t\tif ( data.backgroundIntensity !== undefined ) object.backgroundIntensity = data.backgroundIntensity;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PerspectiveCamera':\n\n\t\t\t\tobject = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far );\n\n\t\t\t\tif ( data.focus !== undefined ) object.focus = data.focus;\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge;\n\t\t\t\tif ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'OrthographicCamera':\n\n\t\t\t\tobject = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far );\n\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'AmbientLight':\n\n\t\t\t\tobject = new AmbientLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'DirectionalLight':\n\n\t\t\t\tobject = new DirectionalLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointLight':\n\n\t\t\t\tobject = new PointLight( data.color, data.intensity, data.distance, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'RectAreaLight':\n\n\t\t\t\tobject = new RectAreaLight( data.color, data.intensity, data.width, data.height );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SpotLight':\n\n\t\t\t\tobject = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'HemisphereLight':\n\n\t\t\t\tobject = new HemisphereLight( data.color, data.groundColor, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LightProbe':\n\n\t\t\t\tobject = new LightProbe().fromJSON( data );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SkinnedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t \tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new SkinnedMesh( geometry, material );\n\n\t\t\t\tif ( data.bindMode !== undefined ) object.bindMode = data.bindMode;\n\t\t\t\tif ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix );\n\t\t\t\tif ( data.skeleton !== undefined ) object.skeleton = data.skeleton;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Mesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new Mesh( geometry, material );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'InstancedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\t\t\t\tconst count = data.count;\n\t\t\t\tconst instanceMatrix = data.instanceMatrix;\n\t\t\t\tconst instanceColor = data.instanceColor;\n\n\t\t\t\tobject = new InstancedMesh( geometry, material, count );\n\t\t\t\tobject.instanceMatrix = new InstancedBufferAttribute( new Float32Array( instanceMatrix.array ), 16 );\n\t\t\t\tif ( instanceColor !== undefined ) object.instanceColor = new InstancedBufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LOD':\n\n\t\t\t\tobject = new LOD();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Line':\n\n\t\t\t\tobject = new Line( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineLoop':\n\n\t\t\t\tobject = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineSegments':\n\n\t\t\t\tobject = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointCloud':\n\t\t\tcase 'Points':\n\n\t\t\t\tobject = new Points( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Sprite':\n\n\t\t\t\tobject = new Sprite( getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Group':\n\n\t\t\t\tobject = new Group();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Bone':\n\n\t\t\t\tobject = new Bone();\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tobject = new Object3D();\n\n\t\t}\n\n\t\tobject.uuid = data.uuid;\n\n\t\tif ( data.name !== undefined ) object.name = data.name;\n\n\t\tif ( data.matrix !== undefined ) {\n\n\t\t\tobject.matrix.fromArray( data.matrix );\n\n\t\t\tif ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate;\n\t\t\tif ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n\t\t} else {\n\n\t\t\tif ( data.position !== undefined ) object.position.fromArray( data.position );\n\t\t\tif ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation );\n\t\t\tif ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion );\n\t\t\tif ( data.scale !== undefined ) object.scale.fromArray( data.scale );\n\n\t\t}\n\n\t\tif ( data.up !== undefined ) object.up.fromArray( data.up );\n\n\t\tif ( data.castShadow !== undefined ) object.castShadow = data.castShadow;\n\t\tif ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow;\n\n\t\tif ( data.shadow ) {\n\n\t\t\tif ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias;\n\t\t\tif ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias;\n\t\t\tif ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius;\n\t\t\tif ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize );\n\t\t\tif ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera );\n\n\t\t}\n\n\t\tif ( data.visible !== undefined ) object.visible = data.visible;\n\t\tif ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;\n\t\tif ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;\n\t\tif ( data.userData !== undefined ) object.userData = data.userData;\n\t\tif ( data.layers !== undefined ) object.layers.mask = data.layers;\n\n\t\tif ( data.children !== undefined ) {\n\n\t\t\tconst children = data.children;\n\n\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\tobject.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.animations !== undefined ) {\n\n\t\t\tconst objectAnimations = data.animations;\n\n\t\t\tfor ( let i = 0; i < objectAnimations.length; i ++ ) {\n\n\t\t\t\tconst uuid = objectAnimations[ i ];\n\n\t\t\t\tobject.animations.push( animations[ uuid ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.type === 'LOD' ) {\n\n\t\t\tif ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate;\n\n\t\t\tconst levels = data.levels;\n\n\t\t\tfor ( let l = 0; l < levels.length; l ++ ) {\n\n\t\t\t\tconst level = levels[ l ];\n\t\t\t\tconst child = object.getObjectByProperty( 'uuid', level.object );\n\n\t\t\t\tif ( child !== undefined ) {\n\n\t\t\t\t\tobject.addLevel( child, level.distance, level.hysteresis );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tbindSkeletons( object, skeletons ) {\n\n\t\tif ( Object.keys( skeletons ).length === 0 ) return;\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isSkinnedMesh === true && child.skeleton !== undefined ) {\n\n\t\t\t\tconst skeleton = skeletons[ child.skeleton ];\n\n\t\t\t\tif ( skeleton === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tchild.bind( skeleton, child.bindMatrix );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n}\n\nconst TEXTURE_MAPPING = {\n\tUVMapping: UVMapping,\n\tCubeReflectionMapping: CubeReflectionMapping,\n\tCubeRefractionMapping: CubeRefractionMapping,\n\tEquirectangularReflectionMapping: EquirectangularReflectionMapping,\n\tEquirectangularRefractionMapping: EquirectangularRefractionMapping,\n\tCubeUVReflectionMapping: CubeUVReflectionMapping\n};\n\nconst TEXTURE_WRAPPING = {\n\tRepeatWrapping: RepeatWrapping,\n\tClampToEdgeWrapping: ClampToEdgeWrapping,\n\tMirroredRepeatWrapping: MirroredRepeatWrapping\n};\n\nconst TEXTURE_FILTER = {\n\tNearestFilter: NearestFilter,\n\tNearestMipmapNearestFilter: NearestMipmapNearestFilter,\n\tNearestMipmapLinearFilter: NearestMipmapLinearFilter,\n\tLinearFilter: LinearFilter,\n\tLinearMipmapNearestFilter: LinearMipmapNearestFilter,\n\tLinearMipmapLinearFilter: LinearMipmapLinearFilter\n};\n\nclass ImageBitmapLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t\tthis.isImageBitmapLoader = true;\n\n\t\tif ( typeof createImageBitmap === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' );\n\n\t\t}\n\n\t\tif ( typeof fetch === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' );\n\n\t\t}\n\n\t\tthis.options = { premultiplyAlpha: 'none' };\n\n\t}\n\n\tsetOptions( options ) {\n\n\t\tthis.options = options;\n\n\t\treturn this;\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst fetchOptions = {};\n\t\tfetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include';\n\t\tfetchOptions.headers = this.requestHeader;\n\n\t\tfetch( url, fetchOptions ).then( function ( res ) {\n\n\t\t\treturn res.blob();\n\n\t\t} ).then( function ( blob ) {\n\n\t\t\treturn createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) );\n\n\t\t} ).then( function ( imageBitmap ) {\n\n\t\t\tCache.add( url, imageBitmap );\n\n\t\t\tif ( onLoad ) onLoad( imageBitmap );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} ).catch( function ( e ) {\n\n\t\t\tif ( onError ) onError( e );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} );\n\n\t\tscope.manager.itemStart( url );\n\n\t}\n\n}\n\nlet _context;\n\nclass AudioContext {\n\n\tstatic getContext() {\n\n\t\tif ( _context === undefined ) {\n\n\t\t\t_context = new ( window.AudioContext || window.webkitAudioContext )();\n\n\t\t}\n\n\t\treturn _context;\n\n\t}\n\n\tstatic setContext( value ) {\n\n\t\t_context = value;\n\n\t}\n\n}\n\nclass AudioLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\ttry {\n\n\t\t\t\t// Create a copy of the buffer. The `decodeAudioData` method\n\t\t\t\t// detaches the buffer when complete, preventing reuse.\n\t\t\t\tconst bufferCopy = buffer.slice( 0 );\n\n\t\t\t\tconst context = AudioContext.getContext();\n\t\t\t\tcontext.decodeAudioData( bufferCopy, function ( audioBuffer ) {\n\n\t\t\t\t\tonLoad( audioBuffer );\n\n\t\t\t\t}, handleError );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\thandleError( e );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t\tfunction handleError( e ) {\n\n\t\t\tif ( onError ) {\n\n\t\t\t\tonError( e );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.error( e );\n\n\t\t\t}\n\n\t\t\tscope.manager.itemError( url );\n\n\t\t}\n\n\t}\n\n}\n\nclass HemisphereLightProbe extends LightProbe {\n\n\tconstructor( skyColor, groundColor, intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tthis.isHemisphereLightProbe = true;\n\n\t\tconst color1 = new Color().set( skyColor );\n\t\tconst color2 = new Color().set( groundColor );\n\n\t\tconst sky = new Vector3( color1.r, color1.g, color1.b );\n\t\tconst ground = new Vector3( color2.r, color2.g, color2.b );\n\n\t\t// without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );\n\t\tconst c0 = Math.sqrt( Math.PI );\n\t\tconst c1 = c0 * Math.sqrt( 0.75 );\n\n\t\tthis.sh.coefficients[ 0 ].copy( sky ).add( ground ).multiplyScalar( c0 );\n\t\tthis.sh.coefficients[ 1 ].copy( sky ).sub( ground ).multiplyScalar( c1 );\n\n\t}\n\n}\n\nclass AmbientLightProbe extends LightProbe {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tthis.isAmbientLightProbe = true;\n\n\t\tconst color1 = new Color().set( color );\n\n\t\t// without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );\n\t\tthis.sh.coefficients[ 0 ].set( color1.r, color1.g, color1.b ).multiplyScalar( 2 * Math.sqrt( Math.PI ) );\n\n\t}\n\n}\n\nconst _eyeRight = /*@__PURE__*/ new Matrix4();\nconst _eyeLeft = /*@__PURE__*/ new Matrix4();\nconst _projectionMatrix = /*@__PURE__*/ new Matrix4();\n\nclass StereoCamera {\n\n\tconstructor() {\n\n\t\tthis.type = 'StereoCamera';\n\n\t\tthis.aspect = 1;\n\n\t\tthis.eyeSep = 0.064;\n\n\t\tthis.cameraL = new PerspectiveCamera();\n\t\tthis.cameraL.layers.enable( 1 );\n\t\tthis.cameraL.matrixAutoUpdate = false;\n\n\t\tthis.cameraR = new PerspectiveCamera();\n\t\tthis.cameraR.layers.enable( 2 );\n\t\tthis.cameraR.matrixAutoUpdate = false;\n\n\t\tthis._cache = {\n\t\t\tfocus: null,\n\t\t\tfov: null,\n\t\t\taspect: null,\n\t\t\tnear: null,\n\t\t\tfar: null,\n\t\t\tzoom: null,\n\t\t\teyeSep: null\n\t\t};\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst cache = this._cache;\n\n\t\tconst needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov ||\n\t\t\tcache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near ||\n\t\t\tcache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n\n\t\tif ( needsUpdate ) {\n\n\t\t\tcache.focus = camera.focus;\n\t\t\tcache.fov = camera.fov;\n\t\t\tcache.aspect = camera.aspect * this.aspect;\n\t\t\tcache.near = camera.near;\n\t\t\tcache.far = camera.far;\n\t\t\tcache.zoom = camera.zoom;\n\t\t\tcache.eyeSep = this.eyeSep;\n\n\t\t\t// Off-axis stereoscopic effect based on\n\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\t_projectionMatrix.copy( camera.projectionMatrix );\n\t\t\tconst eyeSepHalf = cache.eyeSep / 2;\n\t\t\tconst eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n\t\t\tconst ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom;\n\t\t\tlet xmin, xmax;\n\n\t\t\t// translate xOffset\n\n\t\t\t_eyeLeft.elements[ 12 ] = - eyeSepHalf;\n\t\t\t_eyeRight.elements[ 12 ] = eyeSepHalf;\n\n\t\t\t// for left eye\n\n\t\t\txmin = - ymax * cache.aspect + eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect + eyeSepOnProjection;\n\n\t\t\t_projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\t_projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraL.projectionMatrix.copy( _projectionMatrix );\n\n\t\t\t// for right eye\n\n\t\t\txmin = - ymax * cache.aspect - eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect - eyeSepOnProjection;\n\n\t\t\t_projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\t_projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraR.projectionMatrix.copy( _projectionMatrix );\n\n\t\t}\n\n\t\tthis.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft );\n\t\tthis.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight );\n\n\t}\n\n}\n\nclass Clock {\n\n\tconstructor( autoStart = true ) {\n\n\t\tthis.autoStart = autoStart;\n\n\t\tthis.startTime = 0;\n\t\tthis.oldTime = 0;\n\t\tthis.elapsedTime = 0;\n\n\t\tthis.running = false;\n\n\t}\n\n\tstart() {\n\n\t\tthis.startTime = now();\n\n\t\tthis.oldTime = this.startTime;\n\t\tthis.elapsedTime = 0;\n\t\tthis.running = true;\n\n\t}\n\n\tstop() {\n\n\t\tthis.getElapsedTime();\n\t\tthis.running = false;\n\t\tthis.autoStart = false;\n\n\t}\n\n\tgetElapsedTime() {\n\n\t\tthis.getDelta();\n\t\treturn this.elapsedTime;\n\n\t}\n\n\tgetDelta() {\n\n\t\tlet diff = 0;\n\n\t\tif ( this.autoStart && ! this.running ) {\n\n\t\t\tthis.start();\n\t\t\treturn 0;\n\n\t\t}\n\n\t\tif ( this.running ) {\n\n\t\t\tconst newTime = now();\n\n\t\t\tdiff = ( newTime - this.oldTime ) / 1000;\n\t\t\tthis.oldTime = newTime;\n\n\t\t\tthis.elapsedTime += diff;\n\n\t\t}\n\n\t\treturn diff;\n\n\t}\n\n}\n\nfunction now() {\n\n\treturn ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732\n\n}\n\nconst _position$1 = /*@__PURE__*/ new Vector3();\nconst _quaternion$1 = /*@__PURE__*/ new Quaternion();\nconst _scale$1 = /*@__PURE__*/ new Vector3();\nconst _orientation$1 = /*@__PURE__*/ new Vector3();\n\nclass AudioListener extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'AudioListener';\n\n\t\tthis.context = AudioContext.getContext();\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( this.context.destination );\n\n\t\tthis.filter = null;\n\n\t\tthis.timeDelta = 0;\n\n\t\t// private\n\n\t\tthis._clock = new Clock();\n\n\t}\n\n\tgetInput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tremoveFilter() {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\t\t\tthis.gain.connect( this.context.destination );\n\t\t\tthis.filter = null;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.filter;\n\n\t}\n\n\tsetFilter( value ) {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\n\t\t} else {\n\n\t\t\tthis.gain.disconnect( this.context.destination );\n\n\t\t}\n\n\t\tthis.filter = value;\n\t\tthis.gain.connect( this.filter );\n\t\tthis.filter.connect( this.context.destination );\n\n\t\treturn this;\n\n\t}\n\n\tgetMasterVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetMasterVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tconst listener = this.context.listener;\n\t\tconst up = this.up;\n\n\t\tthis.timeDelta = this._clock.getDelta();\n\n\t\tthis.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 );\n\n\t\t_orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 );\n\n\t\tif ( listener.positionX ) {\n\n\t\t\t// code path for Chrome (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.timeDelta;\n\n\t\t\tlistener.positionX.linearRampToValueAtTime( _position$1.x, endTime );\n\t\t\tlistener.positionY.linearRampToValueAtTime( _position$1.y, endTime );\n\t\t\tlistener.positionZ.linearRampToValueAtTime( _position$1.z, endTime );\n\t\t\tlistener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime );\n\t\t\tlistener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime );\n\t\t\tlistener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime );\n\t\t\tlistener.upX.linearRampToValueAtTime( up.x, endTime );\n\t\t\tlistener.upY.linearRampToValueAtTime( up.y, endTime );\n\t\t\tlistener.upZ.linearRampToValueAtTime( up.z, endTime );\n\n\t\t} else {\n\n\t\t\tlistener.setPosition( _position$1.x, _position$1.y, _position$1.z );\n\t\t\tlistener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass Audio extends Object3D {\n\n\tconstructor( listener ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Audio';\n\n\t\tthis.listener = listener;\n\t\tthis.context = listener.context;\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( listener.getInput() );\n\n\t\tthis.autoplay = false;\n\n\t\tthis.buffer = null;\n\t\tthis.detune = 0;\n\t\tthis.loop = false;\n\t\tthis.loopStart = 0;\n\t\tthis.loopEnd = 0;\n\t\tthis.offset = 0;\n\t\tthis.duration = undefined;\n\t\tthis.playbackRate = 1;\n\t\tthis.isPlaying = false;\n\t\tthis.hasPlaybackControl = true;\n\t\tthis.source = null;\n\t\tthis.sourceType = 'empty';\n\n\t\tthis._startedAt = 0;\n\t\tthis._progress = 0;\n\t\tthis._connected = false;\n\n\t\tthis.filters = [];\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tsetNodeSource( audioNode ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'audioNode';\n\t\tthis.source = audioNode;\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaElementSource( mediaElement ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaNode';\n\t\tthis.source = this.context.createMediaElementSource( mediaElement );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaStreamSource( mediaStream ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaStreamNode';\n\t\tthis.source = this.context.createMediaStreamSource( mediaStream );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetBuffer( audioBuffer ) {\n\n\t\tthis.buffer = audioBuffer;\n\t\tthis.sourceType = 'buffer';\n\n\t\tif ( this.autoplay ) this.play();\n\n\t\treturn this;\n\n\t}\n\n\tplay( delay = 0 ) {\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: Audio is already playing.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._startedAt = this.context.currentTime + delay;\n\n\t\tconst source = this.context.createBufferSource();\n\t\tsource.buffer = this.buffer;\n\t\tsource.loop = this.loop;\n\t\tsource.loopStart = this.loopStart;\n\t\tsource.loopEnd = this.loopEnd;\n\t\tsource.onended = this.onEnded.bind( this );\n\t\tsource.start( this._startedAt, this._progress + this.offset, this.duration );\n\n\t\tthis.isPlaying = true;\n\n\t\tthis.source = source;\n\n\t\tthis.setDetune( this.detune );\n\t\tthis.setPlaybackRate( this.playbackRate );\n\n\t\treturn this.connect();\n\n\t}\n\n\tpause() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\t// update current progress\n\n\t\t\tthis._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate;\n\n\t\t\tif ( this.loop === true ) {\n\n\t\t\t\t// ensure _progress does not exceed duration with looped audios\n\n\t\t\t\tthis._progress = this._progress % ( this.duration || this.buffer.duration );\n\n\t\t\t}\n\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\n\t\t\tthis.isPlaying = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._progress = 0;\n\n\t\tif ( this.source !== null ) {\n\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\n\t\t}\n\n\t\tthis.isPlaying = false;\n\n\t\treturn this;\n\n\t}\n\n\tconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.connect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].connect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].connect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.connect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = true;\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.disconnect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].disconnect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].disconnect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.disconnect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = false;\n\n\t\treturn this;\n\n\t}\n\n\tgetFilters() {\n\n\t\treturn this.filters;\n\n\t}\n\n\tsetFilters( value ) {\n\n\t\tif ( ! value ) value = [];\n\n\t\tif ( this._connected === true ) {\n\n\t\t\tthis.disconnect();\n\t\t\tthis.filters = value.slice();\n\t\t\tthis.connect();\n\n\t\t} else {\n\n\t\t\tthis.filters = value.slice();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetDetune( value ) {\n\n\t\tthis.detune = value;\n\n\t\tif ( this.source.detune === undefined ) return; // only set detune when available\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetDetune() {\n\n\t\treturn this.detune;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.getFilters()[ 0 ];\n\n\t}\n\n\tsetFilter( filter ) {\n\n\t\treturn this.setFilters( filter ? [ filter ] : [] );\n\n\t}\n\n\tsetPlaybackRate( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.playbackRate = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetPlaybackRate() {\n\n\t\treturn this.playbackRate;\n\n\t}\n\n\tonEnded() {\n\n\t\tthis.isPlaying = false;\n\n\t}\n\n\tgetLoop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn false;\n\n\t\t}\n\n\t\treturn this.loop;\n\n\t}\n\n\tsetLoop( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.loop = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.loop = this.loop;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopStart( value ) {\n\n\t\tthis.loopStart = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopEnd( value ) {\n\n\t\tthis.loopEnd = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _position = /*@__PURE__*/ new Vector3();\nconst _quaternion = /*@__PURE__*/ new Quaternion();\nconst _scale = /*@__PURE__*/ new Vector3();\nconst _orientation = /*@__PURE__*/ new Vector3();\n\nclass PositionalAudio extends Audio {\n\n\tconstructor( listener ) {\n\n\t\tsuper( listener );\n\n\t\tthis.panner = this.context.createPanner();\n\t\tthis.panner.panningModel = 'HRTF';\n\t\tthis.panner.connect( this.gain );\n\n\t}\n\n\tconnect() {\n\n\t\tsuper.connect();\n\n\t\tthis.panner.connect( this.gain );\n\n\t}\n\n\tdisconnect() {\n\n\t\tsuper.disconnect();\n\n\t\tthis.panner.disconnect( this.gain );\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.panner;\n\n\t}\n\n\tgetRefDistance() {\n\n\t\treturn this.panner.refDistance;\n\n\t}\n\n\tsetRefDistance( value ) {\n\n\t\tthis.panner.refDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetRolloffFactor() {\n\n\t\treturn this.panner.rolloffFactor;\n\n\t}\n\n\tsetRolloffFactor( value ) {\n\n\t\tthis.panner.rolloffFactor = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetDistanceModel() {\n\n\t\treturn this.panner.distanceModel;\n\n\t}\n\n\tsetDistanceModel( value ) {\n\n\t\tthis.panner.distanceModel = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxDistance() {\n\n\t\treturn this.panner.maxDistance;\n\n\t}\n\n\tsetMaxDistance( value ) {\n\n\t\tthis.panner.maxDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) {\n\n\t\tthis.panner.coneInnerAngle = coneInnerAngle;\n\t\tthis.panner.coneOuterAngle = coneOuterAngle;\n\t\tthis.panner.coneOuterGain = coneOuterGain;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.hasPlaybackControl === true && this.isPlaying === false ) return;\n\n\t\tthis.matrixWorld.decompose( _position, _quaternion, _scale );\n\n\t\t_orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion );\n\n\t\tconst panner = this.panner;\n\n\t\tif ( panner.positionX ) {\n\n\t\t\t// code path for Chrome and Firefox (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.listener.timeDelta;\n\n\t\t\tpanner.positionX.linearRampToValueAtTime( _position.x, endTime );\n\t\t\tpanner.positionY.linearRampToValueAtTime( _position.y, endTime );\n\t\t\tpanner.positionZ.linearRampToValueAtTime( _position.z, endTime );\n\t\t\tpanner.orientationX.linearRampToValueAtTime( _orientation.x, endTime );\n\t\t\tpanner.orientationY.linearRampToValueAtTime( _orientation.y, endTime );\n\t\t\tpanner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime );\n\n\t\t} else {\n\n\t\t\tpanner.setPosition( _position.x, _position.y, _position.z );\n\t\t\tpanner.setOrientation( _orientation.x, _orientation.y, _orientation.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass AudioAnalyser {\n\n\tconstructor( audio, fftSize = 2048 ) {\n\n\t\tthis.analyser = audio.context.createAnalyser();\n\t\tthis.analyser.fftSize = fftSize;\n\n\t\tthis.data = new Uint8Array( this.analyser.frequencyBinCount );\n\n\t\taudio.getOutput().connect( this.analyser );\n\n\t}\n\n\n\tgetFrequencyData() {\n\n\t\tthis.analyser.getByteFrequencyData( this.data );\n\n\t\treturn this.data;\n\n\t}\n\n\tgetAverageFrequency() {\n\n\t\tlet value = 0;\n\t\tconst data = this.getFrequencyData();\n\n\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\tvalue += data[ i ];\n\n\t\t}\n\n\t\treturn value / data.length;\n\n\t}\n\n}\n\nclass PropertyMixer {\n\n\tconstructor( binding, typeName, valueSize ) {\n\n\t\tthis.binding = binding;\n\t\tthis.valueSize = valueSize;\n\n\t\tlet mixFunction,\n\t\t\tmixFunctionAdditive,\n\t\t\tsetIdentity;\n\n\t\t// buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n\t\t//\n\t\t// interpolators can use .buffer as their .result\n\t\t// the data then goes to 'incoming'\n\t\t//\n\t\t// 'accu0' and 'accu1' are used frame-interleaved for\n\t\t// the cumulative result and are compared to detect\n\t\t// changes\n\t\t//\n\t\t// 'orig' stores the original state of the property\n\t\t//\n\t\t// 'add' is used for additive cumulative results\n\t\t//\n\t\t// 'work' is optional and is only present for quaternion types. It is used\n\t\t// to store intermediate quaternion multiplication results\n\n\t\tswitch ( typeName ) {\n\n\t\t\tcase 'quaternion':\n\t\t\t\tmixFunction = this._slerp;\n\t\t\t\tmixFunctionAdditive = this._slerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityQuaternion;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 6 );\n\t\t\t\tthis._workIndex = 5;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\tcase 'bool':\n\t\t\t\tmixFunction = this._select;\n\n\t\t\t\t// Use the regular mix function and for additive on these types,\n\t\t\t\t// additive is not relevant for non-numeric types\n\t\t\t\tmixFunctionAdditive = this._select;\n\n\t\t\t\tsetIdentity = this._setAdditiveIdentityOther;\n\n\t\t\t\tthis.buffer = new Array( valueSize * 5 );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmixFunction = this._lerp;\n\t\t\t\tmixFunctionAdditive = this._lerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityNumeric;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 5 );\n\n\t\t}\n\n\t\tthis._mixBufferRegion = mixFunction;\n\t\tthis._mixBufferRegionAdditive = mixFunctionAdditive;\n\t\tthis._setIdentity = setIdentity;\n\t\tthis._origIndex = 3;\n\t\tthis._addIndex = 4;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tthis.useCount = 0;\n\t\tthis.referenceCount = 0;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'accu'\n\taccumulate( accuIndex, weight ) {\n\n\t\t// note: happily accumulating nothing when weight = 0, the caller knows\n\t\t// the weight and shouldn't have made the call in the first place\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = accuIndex * stride + stride;\n\n\t\tlet currentWeight = this.cumulativeWeight;\n\n\t\tif ( currentWeight === 0 ) {\n\n\t\t\t// accuN := incoming * weight\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ offset + i ] = buffer[ i ];\n\n\t\t\t}\n\n\t\t\tcurrentWeight = weight;\n\n\t\t} else {\n\n\t\t\t// accuN := accuN + incoming * weight\n\n\t\t\tcurrentWeight += weight;\n\t\t\tconst mix = weight / currentWeight;\n\t\t\tthis._mixBufferRegion( buffer, offset, 0, mix, stride );\n\n\t\t}\n\n\t\tthis.cumulativeWeight = currentWeight;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'add'\n\taccumulateAdditive( weight ) {\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = stride * this._addIndex;\n\n\t\tif ( this.cumulativeWeightAdditive === 0 ) {\n\n\t\t\t// add = identity\n\n\t\t\tthis._setIdentity();\n\n\t\t}\n\n\t\t// add := add + incoming * weight\n\n\t\tthis._mixBufferRegionAdditive( buffer, offset, 0, weight, stride );\n\t\tthis.cumulativeWeightAdditive += weight;\n\n\t}\n\n\t// apply the state of 'accu' to the binding when accus differ\n\tapply( accuIndex ) {\n\n\t\tconst stride = this.valueSize,\n\t\t\tbuffer = this.buffer,\n\t\t\toffset = accuIndex * stride + stride,\n\n\t\t\tweight = this.cumulativeWeight,\n\t\t\tweightAdditive = this.cumulativeWeightAdditive,\n\n\t\t\tbinding = this.binding;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tif ( weight < 1 ) {\n\n\t\t\t// accuN := accuN + original * ( 1 - cumulativeWeight )\n\n\t\t\tconst originalValueOffset = stride * this._origIndex;\n\n\t\t\tthis._mixBufferRegion(\n\t\t\t\tbuffer, offset, originalValueOffset, 1 - weight, stride );\n\n\t\t}\n\n\t\tif ( weightAdditive > 0 ) {\n\n\t\t\t// accuN := accuN + additive accuN\n\n\t\t\tthis._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride );\n\n\t\t}\n\n\t\tfor ( let i = stride, e = stride + stride; i !== e; ++ i ) {\n\n\t\t\tif ( buffer[ i ] !== buffer[ i + stride ] ) {\n\n\t\t\t\t// value has changed -> update scene graph\n\n\t\t\t\tbinding.setValue( buffer, offset );\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remember the state of the bound property and copy it to both accus\n\tsaveOriginalState() {\n\n\t\tconst binding = this.binding;\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\n\t\t\toriginalValueOffset = stride * this._origIndex;\n\n\t\tbinding.getValue( buffer, originalValueOffset );\n\n\t\t// accu[0..1] := orig -- initially detect changes against the original\n\t\tfor ( let i = stride, e = originalValueOffset; i !== e; ++ i ) {\n\n\t\t\tbuffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ];\n\n\t\t}\n\n\t\t// Add to identity for additive\n\t\tthis._setIdentity();\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t}\n\n\t// apply the state previously taken via 'saveOriginalState' to the binding\n\trestoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}\n\n\t_setAdditiveIdentityNumeric() {\n\n\t\tconst startIndex = this._addIndex * this.valueSize;\n\t\tconst endIndex = startIndex + this.valueSize;\n\n\t\tfor ( let i = startIndex; i < endIndex; i ++ ) {\n\n\t\t\tthis.buffer[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\t_setAdditiveIdentityQuaternion() {\n\n\t\tthis._setAdditiveIdentityNumeric();\n\t\tthis.buffer[ this._addIndex * this.valueSize + 3 ] = 1;\n\n\t}\n\n\t_setAdditiveIdentityOther() {\n\n\t\tconst startIndex = this._origIndex * this.valueSize;\n\t\tconst targetIndex = this._addIndex * this.valueSize;\n\n\t\tfor ( let i = 0; i < this.valueSize; i ++ ) {\n\n\t\t\tthis.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ];\n\n\t\t}\n\n\t}\n\n\n\t// mix functions\n\n\t_select( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tif ( t >= 0.5 ) {\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ dstOffset + i ] = buffer[ srcOffset + i ];\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_slerp( buffer, dstOffset, srcOffset, t ) {\n\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t );\n\n\t}\n\n\t_slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst workOffset = this._workIndex * stride;\n\n\t\t// Store result in intermediate buffer offset\n\t\tQuaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset );\n\n\t\t// Slerp to the intermediate result\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t );\n\n\t}\n\n\t_lerp( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst s = 1 - t;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n\t_lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n}\n\n// Characters [].:/ are reserved for track binding syntax.\nconst _RESERVED_CHARS_RE = '\\\\[\\\\]\\\\.:\\\\/';\nconst _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' );\n\n// Attempts to allow node names from any language. ES5's `\\w` regexp matches\n// only latin characters, and the unicode \\p{L} is not yet supported. So\n// instead, we exclude reserved characters and match everything else.\nconst _wordChar = '[^' + _RESERVED_CHARS_RE + ']';\nconst _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\\\.', '' ) + ']';\n\n// Parent directories, delimited by '/' or ':'. Currently unused, but must\n// be matched to parse the rest of the track name.\nconst _directoryRe = /*@__PURE__*/ /((?:WC+[\\/:])*)/.source.replace( 'WC', _wordChar );\n\n// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\nconst _nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot );\n\n// Object on target node, and accessor. May not contain reserved\n// characters. Accessor may contain any character except closing bracket.\nconst _objectRe = /*@__PURE__*/ /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace( 'WC', _wordChar );\n\n// Property and accessor. May not contain reserved characters. Accessor may\n// contain any non-bracket characters.\nconst _propertyRe = /*@__PURE__*/ /\\.(WC+)(?:\\[(.+)\\])?/.source.replace( 'WC', _wordChar );\n\nconst _trackRe = new RegExp( ''\n\t+ '^'\n\t+ _directoryRe\n\t+ _nodeRe\n\t+ _objectRe\n\t+ _propertyRe\n\t+ '$'\n);\n\nconst _supportedObjectNames = [ 'material', 'materials', 'bones', 'map' ];\n\nclass Composite {\n\n\tconstructor( targetGroup, path, optionalParsedPath ) {\n\n\t\tconst parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis._targetGroup = targetGroup;\n\t\tthis._bindings = targetGroup.subscribe_( path, parsedPath );\n\n\t}\n\n\tgetValue( array, offset ) {\n\n\t\tthis.bind(); // bind all binding\n\n\t\tconst firstValidIndex = this._targetGroup.nCachedObjects_,\n\t\t\tbinding = this._bindings[ firstValidIndex ];\n\n\t\t// and only call .getValue on the first\n\t\tif ( binding !== undefined ) binding.getValue( array, offset );\n\n\t}\n\n\tsetValue( array, offset ) {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].setValue( array, offset );\n\n\t\t}\n\n\t}\n\n\tbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].bind();\n\n\t\t}\n\n\t}\n\n\tunbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].unbind();\n\n\t\t}\n\n\t}\n\n}\n\n// Note: This class uses a State pattern on a per-method basis:\n// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n// prototype version of these methods with one that represents\n// the bound state. When the property is not found, the methods\n// become no-ops.\nclass PropertyBinding {\n\n\tconstructor( rootNode, path, parsedPath ) {\n\n\t\tthis.path = path;\n\t\tthis.parsedPath = parsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName );\n\n\t\tthis.rootNode = rootNode;\n\n\t\t// initial state of these methods that calls 'bind'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n\n\tstatic create( root, path, parsedPath ) {\n\n\t\tif ( ! ( root && root.isAnimationObjectGroup ) ) {\n\n\t\t\treturn new PropertyBinding( root, path, parsedPath );\n\n\t\t} else {\n\n\t\t\treturn new PropertyBinding.Composite( root, path, parsedPath );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Replaces spaces with underscores and removes unsupported characters from\n\t * node names, to ensure compatibility with parseTrackName().\n\t *\n\t * @param {string} name Node name to be sanitized.\n\t * @return {string}\n\t */\n\tstatic sanitizeNodeName( name ) {\n\n\t\treturn name.replace( /\\s/g, '_' ).replace( _reservedRe, '' );\n\n\t}\n\n\tstatic parseTrackName( trackName ) {\n\n\t\tconst matches = _trackRe.exec( trackName );\n\n\t\tif ( matches === null ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName );\n\n\t\t}\n\n\t\tconst results = {\n\t\t\t// directoryName: matches[ 1 ], // (tschw) currently unused\n\t\t\tnodeName: matches[ 2 ],\n\t\t\tobjectName: matches[ 3 ],\n\t\t\tobjectIndex: matches[ 4 ],\n\t\t\tpropertyName: matches[ 5 ], // required\n\t\t\tpropertyIndex: matches[ 6 ]\n\t\t};\n\n\t\tconst lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );\n\n\t\tif ( lastDot !== undefined && lastDot !== - 1 ) {\n\n\t\t\tconst objectName = results.nodeName.substring( lastDot + 1 );\n\n\t\t\t// Object names must be checked against an allowlist. Otherwise, there\n\t\t\t// is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n\t\t\t// 'bar' could be the objectName, or part of a nodeName (which can\n\t\t\t// include '.' characters).\n\t\t\tif ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) {\n\n\t\t\t\tresults.nodeName = results.nodeName.substring( 0, lastDot );\n\t\t\t\tresults.objectName = objectName;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( results.propertyName === null || results.propertyName.length === 0 ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName );\n\n\t\t}\n\n\t\treturn results;\n\n\t}\n\n\tstatic findNode( root, nodeName ) {\n\n\t\tif ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) {\n\n\t\t\treturn root;\n\n\t\t}\n\n\t\t// search into skeleton bones.\n\t\tif ( root.skeleton ) {\n\n\t\t\tconst bone = root.skeleton.getBoneByName( nodeName );\n\n\t\t\tif ( bone !== undefined ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// search into node subtree.\n\t\tif ( root.children ) {\n\n\t\t\tconst searchNodeSubtree = function ( children ) {\n\n\t\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\t\tconst childNode = children[ i ];\n\n\t\t\t\t\tif ( childNode.name === nodeName || childNode.uuid === nodeName ) {\n\n\t\t\t\t\t\treturn childNode;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = searchNodeSubtree( childNode.children );\n\n\t\t\t\t\tif ( result ) return result;\n\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\n\t\t\t};\n\n\t\t\tconst subTreeNode = searchNodeSubtree( root.children );\n\n\t\t\tif ( subTreeNode ) {\n\n\t\t\t\treturn subTreeNode;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// these are used to \"bind\" a nonexistent property\n\t_getValue_unavailable() {}\n\t_setValue_unavailable() {}\n\n\t// Getters\n\n\t_getValue_direct( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.targetObject[ this.propertyName ];\n\n\t}\n\n\t_getValue_array( buffer, offset ) {\n\n\t\tconst source = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = source.length; i !== n; ++ i ) {\n\n\t\t\tbuffer[ offset ++ ] = source[ i ];\n\n\t\t}\n\n\t}\n\n\t_getValue_arrayElement( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.resolvedProperty[ this.propertyIndex ];\n\n\t}\n\n\t_getValue_toArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.toArray( buffer, offset );\n\n\t}\n\n\t// Direct\n\n\t_setValue_direct( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_direct_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// EntireArray\n\n\t_setValue_array( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t}\n\n\t_setValue_array_setNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// ArrayElement\n\n\t_setValue_arrayElement( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_arrayElement_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// HasToFromArray\n\n\t_setValue_fromArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\n\t}\n\n\t_setValue_fromArray_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t_getValue_unbound( targetArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.getValue( targetArray, offset );\n\n\t}\n\n\t_setValue_unbound( sourceArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.setValue( sourceArray, offset );\n\n\t}\n\n\t// create getter / setter pair for a property in the scene graph\n\tbind() {\n\n\t\tlet targetObject = this.node;\n\t\tconst parsedPath = this.parsedPath;\n\n\t\tconst objectName = parsedPath.objectName;\n\t\tconst propertyName = parsedPath.propertyName;\n\t\tlet propertyIndex = parsedPath.propertyIndex;\n\n\t\tif ( ! targetObject ) {\n\n\t\t\ttargetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName );\n\n\t\t\tthis.node = targetObject;\n\n\t\t}\n\n\t\t// set fail state so we can just 'return' on error\n\t\tthis.getValue = this._getValue_unavailable;\n\t\tthis.setValue = this._setValue_unavailable;\n\n\t\t// ensure there is a value node\n\t\tif ( ! targetObject ) {\n\n\t\t\tconsole.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( objectName ) {\n\n\t\t\tlet objectIndex = parsedPath.objectIndex;\n\n\t\t\t// special cases were we need to reach deeper into the hierarchy to get the face materials....\n\t\t\tswitch ( objectName ) {\n\n\t\t\t\tcase 'materials':\n\n\t\t\t\t\tif ( ! targetObject.material ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material.materials ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject.material.materials;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bones':\n\n\t\t\t\t\tif ( ! targetObject.skeleton ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// potential future optimization: skip this if propertyIndex is already an integer\n\t\t\t\t\t// and convert the integer string to a true integer.\n\n\t\t\t\t\ttargetObject = targetObject.skeleton.bones;\n\n\t\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\t\tfor ( let i = 0; i < targetObject.length; i ++ ) {\n\n\t\t\t\t\t\tif ( targetObject[ i ].name === objectIndex ) {\n\n\t\t\t\t\t\t\tobjectIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map':\n\n\t\t\t\t\tif ( 'map' in targetObject ) {\n\n\t\t\t\t\t\ttargetObject = targetObject.map;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material.map ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject.material.map;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tif ( targetObject[ objectName ] === undefined ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject[ objectName ];\n\n\t\t\t}\n\n\n\t\t\tif ( objectIndex !== undefined ) {\n\n\t\t\t\tif ( targetObject[ objectIndex ] === undefined ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\ttargetObject = targetObject[ objectIndex ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// resolve property\n\t\tconst nodeProperty = targetObject[ propertyName ];\n\n\t\tif ( nodeProperty === undefined ) {\n\n\t\t\tconst nodeName = parsedPath.nodeName;\n\n\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName +\n\t\t\t\t'.' + propertyName + ' but it wasn\\'t found.', targetObject );\n\t\t\treturn;\n\n\t\t}\n\n\t\t// determine versioning scheme\n\t\tlet versioning = this.Versioning.None;\n\n\t\tthis.targetObject = targetObject;\n\n\t\tif ( targetObject.needsUpdate !== undefined ) { // material\n\n\t\t\tversioning = this.Versioning.NeedsUpdate;\n\n\t\t} else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform\n\n\t\t\tversioning = this.Versioning.MatrixWorldNeedsUpdate;\n\n\t\t}\n\n\t\t// determine how the property gets bound\n\t\tlet bindingType = this.BindingType.Direct;\n\n\t\tif ( propertyIndex !== undefined ) {\n\n\t\t\t// access a sub element of the property array (only primitives are supported right now)\n\n\t\t\tif ( propertyName === 'morphTargetInfluences' ) {\n\n\t\t\t\t// potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n\n\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\tif ( ! targetObject.geometry ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( ! targetObject.geometry.morphAttributes ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) {\n\n\t\t\t\t\tpropertyIndex = targetObject.morphTargetDictionary[ propertyIndex ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbindingType = this.BindingType.ArrayElement;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\tthis.propertyIndex = propertyIndex;\n\n\t\t} else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) {\n\n\t\t\t// must use copy for Object3D.Euler/Quaternion\n\n\t\t\tbindingType = this.BindingType.HasFromToArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else if ( Array.isArray( nodeProperty ) ) {\n\n\t\t\tbindingType = this.BindingType.EntireArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else {\n\n\t\t\tthis.propertyName = propertyName;\n\n\t\t}\n\n\t\t// select getter / setter\n\t\tthis.getValue = this.GetterByBindingType[ bindingType ];\n\t\tthis.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ];\n\n\t}\n\n\tunbind() {\n\n\t\tthis.node = null;\n\n\t\t// back to the prototype version of getValue / setValue\n\t\t// note: avoiding to mutate the shape of 'this' via 'delete'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n}\n\nPropertyBinding.Composite = Composite;\n\nPropertyBinding.prototype.BindingType = {\n\tDirect: 0,\n\tEntireArray: 1,\n\tArrayElement: 2,\n\tHasFromToArray: 3\n};\n\nPropertyBinding.prototype.Versioning = {\n\tNone: 0,\n\tNeedsUpdate: 1,\n\tMatrixWorldNeedsUpdate: 2\n};\n\nPropertyBinding.prototype.GetterByBindingType = [\n\n\tPropertyBinding.prototype._getValue_direct,\n\tPropertyBinding.prototype._getValue_array,\n\tPropertyBinding.prototype._getValue_arrayElement,\n\tPropertyBinding.prototype._getValue_toArray,\n\n];\n\nPropertyBinding.prototype.SetterByBindingTypeAndVersioning = [\n\n\t[\n\t\t// Direct\n\t\tPropertyBinding.prototype._setValue_direct,\n\t\tPropertyBinding.prototype._setValue_direct_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// EntireArray\n\n\t\tPropertyBinding.prototype._setValue_array,\n\t\tPropertyBinding.prototype._setValue_array_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// ArrayElement\n\t\tPropertyBinding.prototype._setValue_arrayElement,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// HasToFromArray\n\t\tPropertyBinding.prototype._setValue_fromArray,\n\t\tPropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate,\n\n\t]\n\n];\n\n/**\n *\n * A group of objects that receives a shared animation state.\n *\n * Usage:\n *\n * - Add objects you would otherwise pass as 'root' to the\n * constructor or the .clipAction method of AnimationMixer.\n *\n * - Instead pass this object as 'root'.\n *\n * - You can also add and remove objects later when the mixer\n * is running.\n *\n * Note:\n *\n * Objects of this class appear as one object to the mixer,\n * so cache control of the individual objects must be done\n * on the group.\n *\n * Limitation:\n *\n * - The animated properties must be compatible among the\n * all objects in the group.\n *\n * - A single property can either be controlled through a\n * target group or directly, but not both.\n */\n\nclass AnimationObjectGroup {\n\n\tconstructor() {\n\n\t\tthis.isAnimationObjectGroup = true;\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// cached objects followed by the active ones\n\t\tthis._objects = Array.prototype.slice.call( arguments );\n\n\t\tthis.nCachedObjects_ = 0; // threshold\n\t\t// note: read by PropertyBinding.Composite\n\n\t\tconst indices = {};\n\t\tthis._indicesByUUID = indices; // for bookkeeping\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tindices[ arguments[ i ].uuid ] = i;\n\n\t\t}\n\n\t\tthis._paths = []; // inside: string\n\t\tthis._parsedPaths = []; // inside: { we don't care, here }\n\t\tthis._bindings = []; // inside: Array< PropertyBinding >\n\t\tthis._bindingsIndicesByPath = {}; // inside: indices in these arrays\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tobjects: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._objects.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn this.total - scope.nCachedObjects_;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tget bindingsPerObject() {\n\n\t\t\t\treturn scope._bindings.length;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tadd() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tpaths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet knownObject = undefined,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid;\n\t\t\tlet index = indicesByUUID[ uuid ];\n\n\t\t\tif ( index === undefined ) {\n\n\t\t\t\t// unknown object -> add it to the ACTIVE region\n\n\t\t\t\tindex = nObjects ++;\n\t\t\t\tindicesByUUID[ uuid ] = index;\n\t\t\t\tobjects.push( object );\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tbindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) );\n\n\t\t\t\t}\n\n\t\t\t} else if ( index < nCachedObjects ) {\n\n\t\t\t\tknownObject = objects[ index ];\n\n\t\t\t\t// move existing object to the ACTIVE region\n\n\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ];\n\n\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = firstActiveIndex;\n\t\t\t\tobjects[ firstActiveIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ];\n\n\t\t\t\t\tlet binding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\n\t\t\t\t\tif ( binding === undefined ) {\n\n\t\t\t\t\t\t// since we do not bother to create new bindings\n\t\t\t\t\t\t// for objects that are cached, the binding may\n\t\t\t\t\t\t// or may not exist\n\n\t\t\t\t\t\tbinding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t} else if ( objects[ index ] !== knownObject ) {\n\n\t\t\t\tconsole.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' +\n\t\t\t\t\t'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );\n\n\t\t\t} // else the object is already where we want it to be\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\tremove() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined && index >= nCachedObjects ) {\n\n\t\t\t\t// move existing object into the CACHED region\n\n\t\t\t\tconst lastCachedIndex = nCachedObjects ++,\n\t\t\t\t\tfirstActiveObject = objects[ lastCachedIndex ];\n\n\t\t\t\tindicesByUUID[ firstActiveObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = firstActiveObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = lastCachedIndex;\n\t\t\t\tobjects[ lastCachedIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tfirstActive = bindingsForPath[ lastCachedIndex ],\n\t\t\t\t\t\tbinding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = firstActive;\n\t\t\t\t\tbindingsForPath[ lastCachedIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// remove & forget\n\tuncache() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_,\n\t\t\tnObjects = objects.length;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined ) {\n\n\t\t\t\tdelete indicesByUUID[ uuid ];\n\n\t\t\t\tif ( index < nCachedObjects ) {\n\n\t\t\t\t\t// object is cached, shrink the CACHED region\n\n\t\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ],\n\t\t\t\t\t\tlastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\t// last cached object takes this object's place\n\t\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\t\t// last object goes to the activated slot and pop\n\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = firstActiveIndex;\n\t\t\t\t\tobjects[ firstActiveIndex ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ],\n\t\t\t\t\t\t\tlast = bindingsForPath[ lastIndex ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\t\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = last;\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// object is active, just swap with the last and pop\n\n\t\t\t\t\tconst lastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\tif ( lastIndex > 0 ) {\n\n\t\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = index;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tobjects[ index ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = bindingsForPath[ lastIndex ];\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} // cached or active\n\n\t\t\t} // if object is known\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// Internal interface used by befriended PropertyBinding.Composite:\n\n\tsubscribe_( path, parsedPath ) {\n\n\t\t// returns an array of bindings for the given path that is changed\n\t\t// according to the contained objects in the group\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath;\n\t\tlet index = indicesByPath[ path ];\n\t\tconst bindings = this._bindings;\n\n\t\tif ( index !== undefined ) return bindings[ index ];\n\n\t\tconst paths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tobjects = this._objects,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_,\n\t\t\tbindingsForPath = new Array( nObjects );\n\n\t\tindex = bindings.length;\n\n\t\tindicesByPath[ path ] = index;\n\n\t\tpaths.push( path );\n\t\tparsedPaths.push( parsedPath );\n\t\tbindings.push( bindingsForPath );\n\n\t\tfor ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) {\n\n\t\t\tconst object = objects[ i ];\n\t\t\tbindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath );\n\n\t\t}\n\n\t\treturn bindingsForPath;\n\n\t}\n\n\tunsubscribe_( path ) {\n\n\t\t// tells the group to forget about a property path and no longer\n\t\t// update the array previously obtained with 'subscribe_'\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath,\n\t\t\tindex = indicesByPath[ path ];\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst paths = this._paths,\n\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\tbindings = this._bindings,\n\t\t\t\tlastBindingsIndex = bindings.length - 1,\n\t\t\t\tlastBindings = bindings[ lastBindingsIndex ],\n\t\t\t\tlastBindingsPath = path[ lastBindingsIndex ];\n\n\t\t\tindicesByPath[ lastBindingsPath ] = index;\n\n\t\t\tbindings[ index ] = lastBindings;\n\t\t\tbindings.pop();\n\n\t\t\tparsedPaths[ index ] = parsedPaths[ lastBindingsIndex ];\n\t\t\tparsedPaths.pop();\n\n\t\t\tpaths[ index ] = paths[ lastBindingsIndex ];\n\t\t\tpaths.pop();\n\n\t\t}\n\n\t}\n\n}\n\nclass AnimationAction {\n\n\tconstructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) {\n\n\t\tthis._mixer = mixer;\n\t\tthis._clip = clip;\n\t\tthis._localRoot = localRoot;\n\t\tthis.blendMode = blendMode;\n\n\t\tconst tracks = clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tinterpolants = new Array( nTracks );\n\n\t\tconst interpolantSettings = {\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t};\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst interpolant = tracks[ i ].createInterpolant( null );\n\t\t\tinterpolants[ i ] = interpolant;\n\t\t\tinterpolant.settings = interpolantSettings;\n\n\t\t}\n\n\t\tthis._interpolantSettings = interpolantSettings;\n\n\t\tthis._interpolants = interpolants; // bound by the mixer\n\n\t\t// inside: PropertyMixer (managed by the mixer)\n\t\tthis._propertyBindings = new Array( nTracks );\n\n\t\tthis._cacheIndex = null; // for the memory manager\n\t\tthis._byClipCacheIndex = null; // for the memory manager\n\n\t\tthis._timeScaleInterpolant = null;\n\t\tthis._weightInterpolant = null;\n\n\t\tthis.loop = LoopRepeat;\n\t\tthis._loopCount = - 1;\n\n\t\t// global mixer time when the action is to be started\n\t\t// it's set back to 'null' upon start of the action\n\t\tthis._startTime = null;\n\n\t\t// scaled local time of the action\n\t\t// gets clamped or wrapped to 0..clip.duration according to loop\n\t\tthis.time = 0;\n\n\t\tthis.timeScale = 1;\n\t\tthis._effectiveTimeScale = 1;\n\n\t\tthis.weight = 1;\n\t\tthis._effectiveWeight = 1;\n\n\t\tthis.repetitions = Infinity; // no. of repetitions when looping\n\n\t\tthis.paused = false; // true -> zero effective time scale\n\t\tthis.enabled = true; // false -> zero effective weight\n\n\t\tthis.clampWhenFinished = false;// keep feeding the last frame?\n\n\t\tthis.zeroSlopeAtStart = true;// for smooth interpolation w/o separate\n\t\tthis.zeroSlopeAtEnd = true;// clips for start, loop and end\n\n\t}\n\n\t// State & Scheduling\n\n\tplay() {\n\n\t\tthis._mixer._activateAction( this );\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tthis._mixer._deactivateAction( this );\n\n\t\treturn this.reset();\n\n\t}\n\n\treset() {\n\n\t\tthis.paused = false;\n\t\tthis.enabled = true;\n\n\t\tthis.time = 0; // restart clip\n\t\tthis._loopCount = - 1;// forget previous loops\n\t\tthis._startTime = null;// forget scheduling\n\n\t\treturn this.stopFading().stopWarping();\n\n\t}\n\n\tisRunning() {\n\n\t\treturn this.enabled && ! this.paused && this.timeScale !== 0 &&\n\t\t\tthis._startTime === null && this._mixer._isActiveAction( this );\n\n\t}\n\n\t// return true when play has been called\n\tisScheduled() {\n\n\t\treturn this._mixer._isActiveAction( this );\n\n\t}\n\n\tstartAt( time ) {\n\n\t\tthis._startTime = time;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoop( mode, repetitions ) {\n\n\t\tthis.loop = mode;\n\t\tthis.repetitions = repetitions;\n\n\t\treturn this;\n\n\t}\n\n\t// Weight\n\n\t// set the weight stopping any scheduled fading\n\t// although .enabled = false yields an effective weight of zero, this\n\t// method does *not* change .enabled, because it would be confusing\n\tsetEffectiveWeight( weight ) {\n\n\t\tthis.weight = weight;\n\n\t\t// note: same logic as when updated at runtime\n\t\tthis._effectiveWeight = this.enabled ? weight : 0;\n\n\t\treturn this.stopFading();\n\n\t}\n\n\t// return the weight considering fading and .enabled\n\tgetEffectiveWeight() {\n\n\t\treturn this._effectiveWeight;\n\n\t}\n\n\tfadeIn( duration ) {\n\n\t\treturn this._scheduleFading( duration, 0, 1 );\n\n\t}\n\n\tfadeOut( duration ) {\n\n\t\treturn this._scheduleFading( duration, 1, 0 );\n\n\t}\n\n\tcrossFadeFrom( fadeOutAction, duration, warp ) {\n\n\t\tfadeOutAction.fadeOut( duration );\n\t\tthis.fadeIn( duration );\n\n\t\tif ( warp ) {\n\n\t\t\tconst fadeInDuration = this._clip.duration,\n\t\t\t\tfadeOutDuration = fadeOutAction._clip.duration,\n\n\t\t\t\tstartEndRatio = fadeOutDuration / fadeInDuration,\n\t\t\t\tendStartRatio = fadeInDuration / fadeOutDuration;\n\n\t\t\tfadeOutAction.warp( 1.0, startEndRatio, duration );\n\t\t\tthis.warp( endStartRatio, 1.0, duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcrossFadeTo( fadeInAction, duration, warp ) {\n\n\t\treturn fadeInAction.crossFadeFrom( this, duration, warp );\n\n\t}\n\n\tstopFading() {\n\n\t\tconst weightInterpolant = this._weightInterpolant;\n\n\t\tif ( weightInterpolant !== null ) {\n\n\t\t\tthis._weightInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( weightInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Time Scale Control\n\n\t// set the time scale stopping any scheduled warping\n\t// although .paused = true yields an effective time scale of zero, this\n\t// method does *not* change .paused, because it would be confusing\n\tsetEffectiveTimeScale( timeScale ) {\n\n\t\tthis.timeScale = timeScale;\n\t\tthis._effectiveTimeScale = this.paused ? 0 : timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\t// return the time scale considering warping and .paused\n\tgetEffectiveTimeScale() {\n\n\t\treturn this._effectiveTimeScale;\n\n\t}\n\n\tsetDuration( duration ) {\n\n\t\tthis.timeScale = this._clip.duration / duration;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\tsyncWith( action ) {\n\n\t\tthis.time = action.time;\n\t\tthis.timeScale = action.timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\thalt( duration ) {\n\n\t\treturn this.warp( this._effectiveTimeScale, 0, duration );\n\n\t}\n\n\twarp( startTimeScale, endTimeScale, duration ) {\n\n\t\tconst mixer = this._mixer,\n\t\t\tnow = mixer.time,\n\t\t\ttimeScale = this.timeScale;\n\n\t\tlet interpolant = this._timeScaleInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._timeScaleInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\ttimes[ 1 ] = now + duration;\n\n\t\tvalues[ 0 ] = startTimeScale / timeScale;\n\t\tvalues[ 1 ] = endTimeScale / timeScale;\n\n\t\treturn this;\n\n\t}\n\n\tstopWarping() {\n\n\t\tconst timeScaleInterpolant = this._timeScaleInterpolant;\n\n\t\tif ( timeScaleInterpolant !== null ) {\n\n\t\t\tthis._timeScaleInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( timeScaleInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Object Accessors\n\n\tgetMixer() {\n\n\t\treturn this._mixer;\n\n\t}\n\n\tgetClip() {\n\n\t\treturn this._clip;\n\n\t}\n\n\tgetRoot() {\n\n\t\treturn this._localRoot || this._mixer._root;\n\n\t}\n\n\t// Interna\n\n\t_update( time, deltaTime, timeDirection, accuIndex ) {\n\n\t\t// called by the mixer\n\n\t\tif ( ! this.enabled ) {\n\n\t\t\t// call ._updateWeight() to update ._effectiveWeight\n\n\t\t\tthis._updateWeight( time );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst startTime = this._startTime;\n\n\t\tif ( startTime !== null ) {\n\n\t\t\t// check for scheduled start of action\n\n\t\t\tconst timeRunning = ( time - startTime ) * timeDirection;\n\t\t\tif ( timeRunning < 0 || timeDirection === 0 ) {\n\n\t\t\t\tdeltaTime = 0;\n\n\t\t\t} else {\n\n\n\t\t\t\tthis._startTime = null; // unschedule\n\t\t\t\tdeltaTime = timeDirection * timeRunning;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// apply time scale and advance time\n\n\t\tdeltaTime *= this._updateTimeScale( time );\n\t\tconst clipTime = this._updateTime( deltaTime );\n\n\t\t// note: _updateTime may disable the action resulting in\n\t\t// an effective weight of 0\n\n\t\tconst weight = this._updateWeight( time );\n\n\t\tif ( weight > 0 ) {\n\n\t\t\tconst interpolants = this._interpolants;\n\t\t\tconst propertyMixers = this._propertyBindings;\n\n\t\t\tswitch ( this.blendMode ) {\n\n\t\t\t\tcase AdditiveAnimationBlendMode:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulateAdditive( weight );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase NormalAnimationBlendMode:\n\t\t\t\tdefault:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulate( accuIndex, weight );\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_updateWeight( time ) {\n\n\t\tlet weight = 0;\n\n\t\tif ( this.enabled ) {\n\n\t\t\tweight = this.weight;\n\t\t\tconst interpolant = this._weightInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\tweight *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopFading();\n\n\t\t\t\t\tif ( interpolantValue === 0 ) {\n\n\t\t\t\t\t\t// faded out, disable\n\t\t\t\t\t\tthis.enabled = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveWeight = weight;\n\t\treturn weight;\n\n\t}\n\n\t_updateTimeScale( time ) {\n\n\t\tlet timeScale = 0;\n\n\t\tif ( ! this.paused ) {\n\n\t\t\ttimeScale = this.timeScale;\n\n\t\t\tconst interpolant = this._timeScaleInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\ttimeScale *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopWarping();\n\n\t\t\t\t\tif ( timeScale === 0 ) {\n\n\t\t\t\t\t\t// motion has halted, pause\n\t\t\t\t\t\tthis.paused = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// warp done - apply final time scale\n\t\t\t\t\t\tthis.timeScale = timeScale;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveTimeScale = timeScale;\n\t\treturn timeScale;\n\n\t}\n\n\t_updateTime( deltaTime ) {\n\n\t\tconst duration = this._clip.duration;\n\t\tconst loop = this.loop;\n\n\t\tlet time = this.time + deltaTime;\n\t\tlet loopCount = this._loopCount;\n\n\t\tconst pingPong = ( loop === LoopPingPong );\n\n\t\tif ( deltaTime === 0 ) {\n\n\t\t\tif ( loopCount === - 1 ) return time;\n\n\t\t\treturn ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;\n\n\t\t}\n\n\t\tif ( loop === LoopOnce ) {\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tthis._loopCount = 0;\n\t\t\t\tthis._setEndings( true, true, false );\n\n\t\t\t}\n\n\t\t\thandle_stop: {\n\n\t\t\t\tif ( time >= duration ) {\n\n\t\t\t\t\ttime = duration;\n\n\t\t\t\t} else if ( time < 0 ) {\n\n\t\t\t\t\ttime = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tbreak handle_stop;\n\n\t\t\t\t}\n\n\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\telse this.enabled = false;\n\n\t\t\t\tthis.time = time;\n\n\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\tdirection: deltaTime < 0 ? - 1 : 1\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t} else { // repetitive Repeat or PingPong\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tif ( deltaTime >= 0 ) {\n\n\t\t\t\t\tloopCount = 0;\n\n\t\t\t\t\tthis._setEndings( true, this.repetitions === 0, pingPong );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// when looping in reverse direction, the initial\n\t\t\t\t\t// transition through zero counts as a repetition,\n\t\t\t\t\t// so leave loopCount at -1\n\n\t\t\t\t\tthis._setEndings( this.repetitions === 0, true, pingPong );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( time >= duration || time < 0 ) {\n\n\t\t\t\t// wrap around\n\n\t\t\t\tconst loopDelta = Math.floor( time / duration ); // signed\n\t\t\t\ttime -= duration * loopDelta;\n\n\t\t\t\tloopCount += Math.abs( loopDelta );\n\n\t\t\t\tconst pending = this.repetitions - loopCount;\n\n\t\t\t\tif ( pending <= 0 ) {\n\n\t\t\t\t\t// have to stop (switch state, clamp time, fire event)\n\n\t\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\t\telse this.enabled = false;\n\n\t\t\t\t\ttime = deltaTime > 0 ? duration : 0;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\t\tdirection: deltaTime > 0 ? 1 : - 1\n\t\t\t\t\t} );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// keep running\n\n\t\t\t\t\tif ( pending === 1 ) {\n\n\t\t\t\t\t\t// entering the last round\n\n\t\t\t\t\t\tconst atStart = deltaTime < 0;\n\t\t\t\t\t\tthis._setEndings( atStart, ! atStart, pingPong );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis._setEndings( false, false, pingPong );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._loopCount = loopCount;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'loop', action: this, loopDelta: loopDelta\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tthis.time = time;\n\n\t\t\t}\n\n\t\t\tif ( pingPong && ( loopCount & 1 ) === 1 ) {\n\n\t\t\t\t// invert time for the \"pong round\"\n\n\t\t\t\treturn duration - time;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn time;\n\n\t}\n\n\t_setEndings( atStart, atEnd, pingPong ) {\n\n\t\tconst settings = this._interpolantSettings;\n\n\t\tif ( pingPong ) {\n\n\t\t\tsettings.endingStart = ZeroSlopeEnding;\n\t\t\tsettings.endingEnd = ZeroSlopeEnding;\n\n\t\t} else {\n\n\t\t\t// assuming for LoopOnce atStart == atEnd == true\n\n\t\t\tif ( atStart ) {\n\n\t\t\t\tsettings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingStart = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t\tif ( atEnd ) {\n\n\t\t\t\tsettings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingEnd \t = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_scheduleFading( duration, weightNow, weightThen ) {\n\n\t\tconst mixer = this._mixer, now = mixer.time;\n\t\tlet interpolant = this._weightInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._weightInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\tvalues[ 0 ] = weightNow;\n\t\ttimes[ 1 ] = now + duration;\n\t\tvalues[ 1 ] = weightThen;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _controlInterpolantsResultBuffer = new Float32Array( 1 );\n\n\nclass AnimationMixer extends EventDispatcher {\n\n\tconstructor( root ) {\n\n\t\tsuper();\n\n\t\tthis._root = root;\n\t\tthis._initMemoryManager();\n\t\tthis._accuIndex = 0;\n\t\tthis.time = 0;\n\t\tthis.timeScale = 1.0;\n\n\t}\n\n\t_bindAction( action, prototypeAction ) {\n\n\t\tconst root = action._localRoot || this._root,\n\t\t\ttracks = action._clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tbindings = action._propertyBindings,\n\t\t\tinterpolants = action._interpolants,\n\t\t\trootUuid = root.uuid,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName;\n\n\t\tlet bindingsByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingsByName === undefined ) {\n\n\t\t\tbindingsByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingsByName;\n\n\t\t}\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst track = tracks[ i ],\n\t\t\t\ttrackName = track.name;\n\n\t\t\tlet binding = bindingsByName[ trackName ];\n\n\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\t++ binding.referenceCount;\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t} else {\n\n\t\t\t\tbinding = bindings[ i ];\n\n\t\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\t\t// existing binding, make sure the cache knows\n\n\t\t\t\t\tif ( binding._cacheIndex === null ) {\n\n\t\t\t\t\t\t++ binding.referenceCount;\n\t\t\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\tconst path = prototypeAction && prototypeAction.\n\t\t\t\t\t_propertyBindings[ i ].binding.parsedPath;\n\n\t\t\t\tbinding = new PropertyMixer(\n\t\t\t\t\tPropertyBinding.create( root, trackName, path ),\n\t\t\t\t\ttrack.ValueTypeName, track.getValueSize() );\n\n\t\t\t\t++ binding.referenceCount;\n\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t}\n\n\t\t\tinterpolants[ i ].resultBuffer = binding.buffer;\n\n\t\t}\n\n\t}\n\n\t_activateAction( action ) {\n\n\t\tif ( ! this._isActiveAction( action ) ) {\n\n\t\t\tif ( action._cacheIndex === null ) {\n\n\t\t\t\t// this action has been forgotten by the cache, but the user\n\t\t\t\t// appears to be still using it -> rebind\n\n\t\t\t\tconst rootUuid = ( action._localRoot || this._root ).uuid,\n\t\t\t\t\tclipUuid = action._clip.uuid,\n\t\t\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\t\t\tthis._bindAction( action,\n\t\t\t\t\tactionsForClip && actionsForClip.knownActions[ 0 ] );\n\n\t\t\t\tthis._addInactiveAction( action, clipUuid, rootUuid );\n\n\t\t\t}\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// increment reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( binding.useCount ++ === 0 ) {\n\n\t\t\t\t\tthis._lendBinding( binding );\n\t\t\t\t\tbinding.saveOriginalState();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._lendAction( action );\n\n\t\t}\n\n\t}\n\n\t_deactivateAction( action ) {\n\n\t\tif ( this._isActiveAction( action ) ) {\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// decrement reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( -- binding.useCount === 0 ) {\n\n\t\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\t\tthis._takeBackBinding( binding );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._takeBackAction( action );\n\n\t\t}\n\n\t}\n\n\t// Memory manager\n\n\t_initMemoryManager() {\n\n\t\tthis._actions = []; // 'nActiveActions' followed by inactive ones\n\t\tthis._nActiveActions = 0;\n\n\t\tthis._actionsByClip = {};\n\t\t// inside:\n\t\t// {\n\t\t// \tknownActions: Array< AnimationAction > - used as prototypes\n\t\t// \tactionByRoot: AnimationAction - lookup\n\t\t// }\n\n\n\t\tthis._bindings = []; // 'nActiveBindings' followed by inactive ones\n\t\tthis._nActiveBindings = 0;\n\n\t\tthis._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n\n\n\t\tthis._controlInterpolants = []; // same game as above\n\t\tthis._nActiveControlInterpolants = 0;\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tactions: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._actions.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveActions;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tbindings: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._bindings.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveBindings;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tcontrolInterpolants: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._controlInterpolants.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveControlInterpolants;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t// Memory management for AnimationAction objects\n\n\t_isActiveAction( action ) {\n\n\t\tconst index = action._cacheIndex;\n\t\treturn index !== null && index < this._nActiveActions;\n\n\t}\n\n\t_addInactiveAction( action, clipUuid, rootUuid ) {\n\n\t\tconst actions = this._actions,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tlet actionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip === undefined ) {\n\n\t\t\tactionsForClip = {\n\n\t\t\t\tknownActions: [ action ],\n\t\t\t\tactionByRoot: {}\n\n\t\t\t};\n\n\t\t\taction._byClipCacheIndex = 0;\n\n\t\t\tactionsByClip[ clipUuid ] = actionsForClip;\n\n\t\t} else {\n\n\t\t\tconst knownActions = actionsForClip.knownActions;\n\n\t\t\taction._byClipCacheIndex = knownActions.length;\n\t\t\tknownActions.push( action );\n\n\t\t}\n\n\t\taction._cacheIndex = actions.length;\n\t\tactions.push( action );\n\n\t\tactionsForClip.actionByRoot[ rootUuid ] = action;\n\n\t}\n\n\t_removeInactiveAction( action ) {\n\n\t\tconst actions = this._actions,\n\t\t\tlastInactiveAction = actions[ actions.length - 1 ],\n\t\t\tcacheIndex = action._cacheIndex;\n\n\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\tactions.pop();\n\n\t\taction._cacheIndex = null;\n\n\n\t\tconst clipUuid = action._clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ],\n\t\t\tknownActionsForClip = actionsForClip.knownActions,\n\n\t\t\tlastKnownAction =\n\t\t\t\tknownActionsForClip[ knownActionsForClip.length - 1 ],\n\n\t\t\tbyClipCacheIndex = action._byClipCacheIndex;\n\n\t\tlastKnownAction._byClipCacheIndex = byClipCacheIndex;\n\t\tknownActionsForClip[ byClipCacheIndex ] = lastKnownAction;\n\t\tknownActionsForClip.pop();\n\n\t\taction._byClipCacheIndex = null;\n\n\n\t\tconst actionByRoot = actionsForClip.actionByRoot,\n\t\t\trootUuid = ( action._localRoot || this._root ).uuid;\n\n\t\tdelete actionByRoot[ rootUuid ];\n\n\t\tif ( knownActionsForClip.length === 0 ) {\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t\tthis._removeInactiveBindingsForAction( action );\n\n\t}\n\n\t_removeInactiveBindingsForAction( action ) {\n\n\t\tconst bindings = action._propertyBindings;\n\n\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tconst binding = bindings[ i ];\n\n\t\t\tif ( -- binding.referenceCount === 0 ) {\n\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_lendAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions >| inactive actions ]\n\t\t// s a\n\t\t// <-swap->\n\t\t// a s\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveActions ++,\n\n\t\t\tfirstInactiveAction = actions[ lastActiveIndex ];\n\n\t\taction._cacheIndex = lastActiveIndex;\n\t\tactions[ lastActiveIndex ] = action;\n\n\t\tfirstInactiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = firstInactiveAction;\n\n\t}\n\n\t_takeBackAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions |< inactive actions ]\n\t\t// a s\n\t\t// <-swap->\n\t\t// s a\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveActions,\n\n\t\t\tlastActiveAction = actions[ firstInactiveIndex ];\n\n\t\taction._cacheIndex = firstInactiveIndex;\n\t\tactions[ firstInactiveIndex ] = action;\n\n\t\tlastActiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = lastActiveAction;\n\n\t}\n\n\t// Memory management for PropertyMixer objects\n\n\t_addInactiveBinding( binding, rootUuid, trackName ) {\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindings = this._bindings;\n\n\t\tlet bindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName === undefined ) {\n\n\t\t\tbindingByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingByName;\n\n\t\t}\n\n\t\tbindingByName[ trackName ] = binding;\n\n\t\tbinding._cacheIndex = bindings.length;\n\t\tbindings.push( binding );\n\n\t}\n\n\t_removeInactiveBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tpropBinding = binding.binding,\n\t\t\trootUuid = propBinding.rootNode.uuid,\n\t\t\ttrackName = propBinding.path,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ],\n\n\t\t\tlastInactiveBinding = bindings[ bindings.length - 1 ],\n\t\t\tcacheIndex = binding._cacheIndex;\n\n\t\tlastInactiveBinding._cacheIndex = cacheIndex;\n\t\tbindings[ cacheIndex ] = lastInactiveBinding;\n\t\tbindings.pop();\n\n\t\tdelete bindingByName[ trackName ];\n\n\t\tif ( Object.keys( bindingByName ).length === 0 ) {\n\n\t\t\tdelete bindingsByRoot[ rootUuid ];\n\n\t\t}\n\n\t}\n\n\t_lendBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveBindings ++,\n\n\t\t\tfirstInactiveBinding = bindings[ lastActiveIndex ];\n\n\t\tbinding._cacheIndex = lastActiveIndex;\n\t\tbindings[ lastActiveIndex ] = binding;\n\n\t\tfirstInactiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = firstInactiveBinding;\n\n\t}\n\n\t_takeBackBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveBindings,\n\n\t\t\tlastActiveBinding = bindings[ firstInactiveIndex ];\n\n\t\tbinding._cacheIndex = firstInactiveIndex;\n\t\tbindings[ firstInactiveIndex ] = binding;\n\n\t\tlastActiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = lastActiveBinding;\n\n\t}\n\n\n\t// Memory management of Interpolants for weight and time scale\n\n\t_lendControlInterpolant() {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tlastActiveIndex = this._nActiveControlInterpolants ++;\n\n\t\tlet interpolant = interpolants[ lastActiveIndex ];\n\n\t\tif ( interpolant === undefined ) {\n\n\t\t\tinterpolant = new LinearInterpolant(\n\t\t\t\tnew Float32Array( 2 ), new Float32Array( 2 ),\n\t\t\t\t1, _controlInterpolantsResultBuffer );\n\n\t\t\tinterpolant.__cacheIndex = lastActiveIndex;\n\t\t\tinterpolants[ lastActiveIndex ] = interpolant;\n\n\t\t}\n\n\t\treturn interpolant;\n\n\t}\n\n\t_takeBackControlInterpolant( interpolant ) {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tprevIndex = interpolant.__cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveControlInterpolants,\n\n\t\t\tlastActiveInterpolant = interpolants[ firstInactiveIndex ];\n\n\t\tinterpolant.__cacheIndex = firstInactiveIndex;\n\t\tinterpolants[ firstInactiveIndex ] = interpolant;\n\n\t\tlastActiveInterpolant.__cacheIndex = prevIndex;\n\t\tinterpolants[ prevIndex ] = lastActiveInterpolant;\n\n\t}\n\n\t// return an action for a clip optionally using a custom root target\n\t// object (this method allocates a lot of dynamic memory in case a\n\t// previously unknown clip/root combination is specified)\n\tclipAction( clip, optionalRoot, blendMode ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid;\n\n\t\tlet clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip;\n\n\t\tconst clipUuid = clipObject !== null ? clipObject.uuid : clip;\n\n\t\tconst actionsForClip = this._actionsByClip[ clipUuid ];\n\t\tlet prototypeAction = null;\n\n\t\tif ( blendMode === undefined ) {\n\n\t\t\tif ( clipObject !== null ) {\n\n\t\t\t\tblendMode = clipObject.blendMode;\n\n\t\t\t} else {\n\n\t\t\t\tblendMode = NormalAnimationBlendMode;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\tconst existingAction = actionsForClip.actionByRoot[ rootUuid ];\n\n\t\t\tif ( existingAction !== undefined && existingAction.blendMode === blendMode ) {\n\n\t\t\t\treturn existingAction;\n\n\t\t\t}\n\n\t\t\t// we know the clip, so we don't have to parse all\n\t\t\t// the bindings again but can just copy\n\t\t\tprototypeAction = actionsForClip.knownActions[ 0 ];\n\n\t\t\t// also, take the clip from the prototype action\n\t\t\tif ( clipObject === null )\n\t\t\t\tclipObject = prototypeAction._clip;\n\n\t\t}\n\n\t\t// clip must be known when specified via string\n\t\tif ( clipObject === null ) return null;\n\n\t\t// allocate all resources required to run it\n\t\tconst newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode );\n\n\t\tthis._bindAction( newAction, prototypeAction );\n\n\t\t// and make the action known to the memory manager\n\t\tthis._addInactiveAction( newAction, clipUuid, rootUuid );\n\n\t\treturn newAction;\n\n\t}\n\n\t// get an existing action\n\texistingAction( clip, optionalRoot ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid,\n\n\t\t\tclipObject = typeof clip === 'string' ?\n\t\t\t\tAnimationClip.findByName( root, clip ) : clip,\n\n\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\n\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\treturn actionsForClip.actionByRoot[ rootUuid ] || null;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// deactivates all previously scheduled actions\n\tstopAllAction() {\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions;\n\n\t\tfor ( let i = nActions - 1; i >= 0; -- i ) {\n\n\t\t\tactions[ i ].stop();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// advance the time and update apply the animation\n\tupdate( deltaTime ) {\n\n\t\tdeltaTime *= this.timeScale;\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions,\n\n\t\t\ttime = this.time += deltaTime,\n\t\t\ttimeDirection = Math.sign( deltaTime ),\n\n\t\t\taccuIndex = this._accuIndex ^= 1;\n\n\t\t// run active actions\n\n\t\tfor ( let i = 0; i !== nActions; ++ i ) {\n\n\t\t\tconst action = actions[ i ];\n\n\t\t\taction._update( time, deltaTime, timeDirection, accuIndex );\n\n\t\t}\n\n\t\t// update scene graph\n\n\t\tconst bindings = this._bindings,\n\t\t\tnBindings = this._nActiveBindings;\n\n\t\tfor ( let i = 0; i !== nBindings; ++ i ) {\n\n\t\t\tbindings[ i ].apply( accuIndex );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Allows you to seek to a specific time in an animation.\n\tsetTime( timeInSeconds ) {\n\n\t\tthis.time = 0; // Zero out time attribute for AnimationMixer object;\n\t\tfor ( let i = 0; i < this._actions.length; i ++ ) {\n\n\t\t\tthis._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n\n\t\t}\n\n\t\treturn this.update( timeInSeconds ); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n\n\t}\n\n\t// return this mixer's root target object\n\tgetRoot() {\n\n\t\treturn this._root;\n\n\t}\n\n\t// free all resources specific to a particular clip\n\tuncacheClip( clip ) {\n\n\t\tconst actions = this._actions,\n\t\t\tclipUuid = clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\t// note: just calling _removeInactiveAction would mess up the\n\t\t\t// iteration state and also require updating the state we can\n\t\t\t// just throw away\n\n\t\t\tconst actionsToRemove = actionsForClip.knownActions;\n\n\t\t\tfor ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) {\n\n\t\t\t\tconst action = actionsToRemove[ i ];\n\n\t\t\t\tthis._deactivateAction( action );\n\n\t\t\t\tconst cacheIndex = action._cacheIndex,\n\t\t\t\t\tlastInactiveAction = actions[ actions.length - 1 ];\n\n\t\t\t\taction._cacheIndex = null;\n\t\t\t\taction._byClipCacheIndex = null;\n\n\t\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\t\t\tactions.pop();\n\n\t\t\t\tthis._removeInactiveBindingsForAction( action );\n\n\t\t\t}\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t}\n\n\t// free all resources specific to a particular root target object\n\tuncacheRoot( root ) {\n\n\t\tconst rootUuid = root.uuid,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tfor ( const clipUuid in actionsByClip ) {\n\n\t\t\tconst actionByRoot = actionsByClip[ clipUuid ].actionByRoot,\n\t\t\t\taction = actionByRoot[ rootUuid ];\n\n\t\t\tif ( action !== undefined ) {\n\n\t\t\t\tthis._deactivateAction( action );\n\t\t\t\tthis._removeInactiveAction( action );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName !== undefined ) {\n\n\t\t\tfor ( const trackName in bindingByName ) {\n\n\t\t\t\tconst binding = bindingByName[ trackName ];\n\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remove a targeted clip from the cache\n\tuncacheAction( clip, optionalRoot ) {\n\n\t\tconst action = this.existingAction( clip, optionalRoot );\n\n\t\tif ( action !== null ) {\n\n\t\t\tthis._deactivateAction( action );\n\t\t\tthis._removeInactiveAction( action );\n\n\t\t}\n\n\t}\n\n}\n\nclass Uniform {\n\n\tconstructor( value ) {\n\n\t\tthis.value = value;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );\n\n\t}\n\n}\n\nlet id = 0;\n\nclass UniformsGroup extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isUniformsGroup = true;\n\n\t\tObject.defineProperty( this, 'id', { value: id ++ } );\n\n\t\tthis.name = '';\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.uniforms = [];\n\n\t}\n\n\tadd( uniform ) {\n\n\t\tthis.uniforms.push( uniform );\n\n\t\treturn this;\n\n\t}\n\n\tremove( uniform ) {\n\n\t\tconst index = this.uniforms.indexOf( uniform );\n\n\t\tif ( index !== - 1 ) this.uniforms.splice( index, 1 );\n\n\t\treturn this;\n\n\t}\n\n\tsetName( name ) {\n\n\t\tthis.name = name;\n\n\t\treturn this;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\t\tthis.usage = source.usage;\n\n\t\tconst uniformsSource = source.uniforms;\n\n\t\tthis.uniforms.length = 0;\n\n\t\tfor ( let i = 0, l = uniformsSource.length; i < l; i ++ ) {\n\n\t\t\tthis.uniforms.push( uniformsSource[ i ].clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass InstancedInterleavedBuffer extends InterleavedBuffer {\n\n\tconstructor( array, stride, meshPerAttribute = 1 ) {\n\n\t\tsuper( array, stride );\n\n\t\tthis.isInstancedInterleavedBuffer = true;\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tconst ib = super.clone( data );\n\n\t\tib.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn ib;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tconst json = super.toJSON( data );\n\n\t\tjson.isInstancedInterleavedBuffer = true;\n\t\tjson.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn json;\n\n\t}\n\n}\n\nclass GLBufferAttribute {\n\n\tconstructor( buffer, type, itemSize, elementSize, count ) {\n\n\t\tthis.isGLBufferAttribute = true;\n\n\t\tthis.name = '';\n\n\t\tthis.buffer = buffer;\n\t\tthis.type = type;\n\t\tthis.itemSize = itemSize;\n\t\tthis.elementSize = elementSize;\n\t\tthis.count = count;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetBuffer( buffer ) {\n\n\t\tthis.buffer = buffer;\n\n\t\treturn this;\n\n\t}\n\n\tsetType( type, elementSize ) {\n\n\t\tthis.type = type;\n\t\tthis.elementSize = elementSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetItemSize( itemSize ) {\n\n\t\tthis.itemSize = itemSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetCount( count ) {\n\n\t\tthis.count = count;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Raycaster {\n\n\tconstructor( origin, direction, near = 0, far = Infinity ) {\n\n\t\tthis.ray = new Ray( origin, direction );\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.camera = null;\n\t\tthis.layers = new Layers();\n\n\t\tthis.params = {\n\t\t\tMesh: {},\n\t\t\tLine: { threshold: 1 },\n\t\t\tLOD: {},\n\t\t\tPoints: { threshold: 1 },\n\t\t\tSprite: {}\n\t\t};\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.ray.set( origin, direction );\n\n\t}\n\n\tsetFromCamera( coords, camera ) {\n\n\t\tif ( camera.isPerspectiveCamera ) {\n\n\t\t\tthis.ray.origin.setFromMatrixPosition( camera.matrixWorld );\n\t\t\tthis.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();\n\t\t\tthis.camera = camera;\n\n\t\t} else if ( camera.isOrthographicCamera ) {\n\n\t\t\tthis.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera\n\t\t\tthis.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );\n\t\t\tthis.camera = camera;\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type );\n\n\t\t}\n\n\t}\n\n\tintersectObject( object, recursive = true, intersects = [] ) {\n\n\t\tintersectObject( object, this, intersects, recursive );\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n\tintersectObjects( objects, recursive = true, intersects = [] ) {\n\n\t\tfor ( let i = 0, l = objects.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( objects[ i ], this, intersects, recursive );\n\n\t\t}\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n}\n\nfunction ascSort( a, b ) {\n\n\treturn a.distance - b.distance;\n\n}\n\nfunction intersectObject( object, raycaster, intersects, recursive ) {\n\n\tif ( object.layers.test( raycaster.layers ) ) {\n\n\t\tobject.raycast( raycaster, intersects );\n\n\t}\n\n\tif ( recursive === true ) {\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( children[ i ], raycaster, intersects, true );\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n *\n * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n * The azimuthal angle (theta) is measured from the positive z-axis.\n */\n\n\nclass Spherical {\n\n\tconstructor( radius = 1, phi = 0, theta = 0 ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi; // polar angle\n\t\tthis.theta = theta; // azimuthal angle\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, phi, theta ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi;\n\t\tthis.theta = theta;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.phi = other.phi;\n\t\tthis.theta = other.theta;\n\n\t\treturn this;\n\n\t}\n\n\t// restrict phi to be between EPS and PI-EPS\n\tmakeSafe() {\n\n\t\tconst EPS = 0.000001;\n\t\tthis.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + y * y + z * z );\n\n\t\tif ( this.radius === 0 ) {\n\n\t\t\tthis.theta = 0;\n\t\t\tthis.phi = 0;\n\n\t\t} else {\n\n\t\t\tthis.theta = Math.atan2( x, z );\n\t\t\tthis.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n */\n\nclass Cylindrical {\n\n\tconstructor( radius = 1, theta = 0, y = 0 ) {\n\n\t\tthis.radius = radius; // distance from the origin to a point in the x-z plane\n\t\tthis.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n\t\tthis.y = y; // height above the x-z plane\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, theta, y ) {\n\n\t\tthis.radius = radius;\n\t\tthis.theta = theta;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.theta = other.theta;\n\t\tthis.y = other.y;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + z * z );\n\t\tthis.theta = Math.atan2( x, z );\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$4 = /*@__PURE__*/ new Vector2();\n\nclass Box2 {\n\n\tconstructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) {\n\n\t\tthis.isBox2 = true;\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 );\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = + Infinity;\n\t\tthis.max.x = this.max.y = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 4 splitting planes to rule out intersections\n\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.clampPoint( point, _vector$4 ).distanceTo( point );\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\tif ( this.isEmpty() ) this.makeEmpty();\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nconst _startP = /*@__PURE__*/ new Vector3();\nconst _startEnd = /*@__PURE__*/ new Vector3();\n\nclass Line3 {\n\n\tconstructor( start = new Vector3(), end = new Vector3() ) {\n\n\t\tthis.start = start;\n\t\tthis.end = end;\n\n\t}\n\n\tset( start, end ) {\n\n\t\tthis.start.copy( start );\n\t\tthis.end.copy( end );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( line ) {\n\n\t\tthis.start.copy( line.start );\n\t\tthis.end.copy( line.end );\n\n\t\treturn this;\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn target.addVectors( this.start, this.end ).multiplyScalar( 0.5 );\n\n\t}\n\n\tdelta( target ) {\n\n\t\treturn target.subVectors( this.end, this.start );\n\n\t}\n\n\tdistanceSq() {\n\n\t\treturn this.start.distanceToSquared( this.end );\n\n\t}\n\n\tdistance() {\n\n\t\treturn this.start.distanceTo( this.end );\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tclosestPointToPointParameter( point, clampToLine ) {\n\n\t\t_startP.subVectors( point, this.start );\n\t\t_startEnd.subVectors( this.end, this.start );\n\n\t\tconst startEnd2 = _startEnd.dot( _startEnd );\n\t\tconst startEnd_startP = _startEnd.dot( _startP );\n\n\t\tlet t = startEnd_startP / startEnd2;\n\n\t\tif ( clampToLine ) {\n\n\t\t\tt = clamp( t, 0, 1 );\n\n\t\t}\n\n\t\treturn t;\n\n\t}\n\n\tclosestPointToPoint( point, clampToLine, target ) {\n\n\t\tconst t = this.closestPointToPointParameter( point, clampToLine );\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.start.applyMatrix4( matrix );\n\t\tthis.end.applyMatrix4( matrix );\n\n\t\treturn this;\n\n\t}\n\n\tequals( line ) {\n\n\t\treturn line.start.equals( this.start ) && line.end.equals( this.end );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$3 = /*@__PURE__*/ new Vector3();\n\nclass SpotLightHelper extends Object3D {\n\n\tconstructor( light, color ) {\n\n\t\tsuper();\n\n\t\tthis.light = light;\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'SpotLightHelper';\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst positions = [\n\t\t\t0, 0, 0, \t0, 0, 1,\n\t\t\t0, 0, 0, \t1, 0, 1,\n\t\t\t0, 0, 0,\t- 1, 0, 1,\n\t\t\t0, 0, 0, \t0, 1, 1,\n\t\t\t0, 0, 0, \t0, - 1, 1\n\t\t];\n\n\t\tfor ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {\n\n\t\t\tconst p1 = ( i / l ) * Math.PI * 2;\n\t\t\tconst p2 = ( j / l ) * Math.PI * 2;\n\n\t\t\tpositions.push(\n\t\t\t\tMath.cos( p1 ), Math.sin( p1 ), 1,\n\t\t\t\tMath.cos( p2 ), Math.sin( p2 ), 1\n\t\t\t);\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.cone = new LineSegments( geometry, material );\n\t\tthis.add( this.cone );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.cone.geometry.dispose();\n\t\tthis.cone.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\t\tthis.light.target.updateWorldMatrix( true, false );\n\n\t\tconst coneLength = this.light.distance ? this.light.distance : 1000;\n\t\tconst coneWidth = coneLength * Math.tan( this.light.angle );\n\n\t\tthis.cone.scale.set( coneWidth, coneWidth, coneLength );\n\n\t\t_vector$3.setFromMatrixPosition( this.light.target.matrixWorld );\n\n\t\tthis.cone.lookAt( _vector$3 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.cone.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.cone.material.color.copy( this.light.color );\n\n\t\t}\n\n\t}\n\n}\n\nconst _vector$2 = /*@__PURE__*/ new Vector3();\nconst _boneMatrix = /*@__PURE__*/ new Matrix4();\nconst _matrixWorldInv = /*@__PURE__*/ new Matrix4();\n\n\nclass SkeletonHelper extends LineSegments {\n\n\tconstructor( object ) {\n\n\t\tconst bones = getBoneList( object );\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst color1 = new Color( 0, 0, 1 );\n\t\tconst color2 = new Color( 0, 1, 0 );\n\n\t\tfor ( let i = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tcolors.push( color1.r, color1.g, color1.b );\n\t\t\t\tcolors.push( color2.r, color2.g, color2.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isSkeletonHelper = true;\n\n\t\tthis.type = 'SkeletonHelper';\n\n\t\tthis.root = object;\n\t\tthis.bones = bones;\n\n\t\tthis.matrix = object.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst bones = this.bones;\n\n\t\tconst geometry = this.geometry;\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\t_matrixWorldInv.copy( this.root.matrixWorld ).invert();\n\n\t\tfor ( let i = 0, j = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\tj += 2;\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\n\nfunction getBoneList( object ) {\n\n\tconst boneList = [];\n\n\tif ( object.isBone === true ) {\n\n\t\tboneList.push( object );\n\n\t}\n\n\tfor ( let i = 0; i < object.children.length; i ++ ) {\n\n\t\tboneList.push.apply( boneList, getBoneList( object.children[ i ] ) );\n\n\t}\n\n\treturn boneList;\n\n}\n\nclass PointLightHelper extends Mesh {\n\n\tconstructor( light, sphereSize, color ) {\n\n\t\tconst geometry = new SphereGeometry( sphereSize, 4, 2 );\n\t\tconst material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.light = light;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'PointLightHelper';\n\n\t\tthis.matrix = this.light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\n\t\t/*\n\t// TODO: delete this comment?\n\tconst distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );\n\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\n\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\n\tconst d = light.distance;\n\n\tif ( d === 0.0 ) {\n\n\t\tthis.lightDistance.visible = false;\n\n\t} else {\n\n\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t}\n\n\tthis.add( this.lightDistance );\n\t*/\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\t/*\n\t\tconst d = this.light.distance;\n\n\t\tif ( d === 0.0 ) {\n\n\t\t\tthis.lightDistance.visible = false;\n\n\t\t} else {\n\n\t\t\tthis.lightDistance.visible = true;\n\t\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t\t}\n\t\t*/\n\n\t}\n\n}\n\nconst _vector$1 = /*@__PURE__*/ new Vector3();\nconst _color1 = /*@__PURE__*/ new Color();\nconst _color2 = /*@__PURE__*/ new Color();\n\nclass HemisphereLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\n\t\tthis.light = light;\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'HemisphereLightHelper';\n\n\t\tconst geometry = new OctahedronGeometry( size );\n\t\tgeometry.rotateY( Math.PI * 0.5 );\n\n\t\tthis.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\t\tif ( this.color === undefined ) this.material.vertexColors = true;\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\t\tconst colors = new Float32Array( position.count * 3 );\n\n\t\tgeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );\n\n\t\tthis.add( new Mesh( geometry, this.material ) );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.children[ 0 ].geometry.dispose();\n\t\tthis.children[ 0 ].material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tconst mesh = this.children[ 0 ];\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tconst colors = mesh.geometry.getAttribute( 'color' );\n\n\t\t\t_color1.copy( this.light.color );\n\t\t\t_color2.copy( this.light.groundColor );\n\n\t\t\tfor ( let i = 0, l = colors.count; i < l; i ++ ) {\n\n\t\t\t\tconst color = ( i < ( l / 2 ) ) ? _color1 : _color2;\n\n\t\t\t\tcolors.setXYZ( i, color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t\tcolors.needsUpdate = true;\n\n\t\t}\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\n\t\tmesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() );\n\n\t}\n\n}\n\nclass GridHelper extends LineSegments {\n\n\tconstructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst center = divisions / 2;\n\t\tconst step = size / divisions;\n\t\tconst halfSize = size / 2;\n\n\t\tconst vertices = [], colors = [];\n\n\t\tfor ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) {\n\n\t\t\tvertices.push( - halfSize, 0, k, halfSize, 0, k );\n\t\t\tvertices.push( k, 0, - halfSize, k, 0, halfSize );\n\n\t\t\tconst color = i === center ? color1 : color2;\n\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'GridHelper';\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass PolarGridHelper extends LineSegments {\n\n\tconstructor( radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\t// create the sectors\n\n\t\tif ( sectors > 1 ) {\n\n\t\t\tfor ( let i = 0; i < sectors; i ++ ) {\n\n\t\t\t\tconst v = ( i / sectors ) * ( Math.PI * 2 );\n\n\t\t\t\tconst x = Math.sin( v ) * radius;\n\t\t\t\tconst z = Math.cos( v ) * radius;\n\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tvertices.push( x, 0, z );\n\n\t\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// create the rings\n\n\t\tfor ( let i = 0; i < rings; i ++ ) {\n\n\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\tconst r = radius - ( radius / rings * i );\n\n\t\t\tfor ( let j = 0; j < divisions; j ++ ) {\n\n\t\t\t\t// first vertex\n\n\t\t\t\tlet v = ( j / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tlet x = Math.sin( v ) * r;\n\t\t\t\tlet z = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t\t// second vertex\n\n\t\t\t\tv = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tx = Math.sin( v ) * r;\n\t\t\t\tz = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'PolarGridHelper';\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nconst _v1 = /*@__PURE__*/ new Vector3();\nconst _v2 = /*@__PURE__*/ new Vector3();\nconst _v3 = /*@__PURE__*/ new Vector3();\n\nclass DirectionalLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\n\t\tthis.light = light;\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'DirectionalLightHelper';\n\n\t\tif ( size === undefined ) size = 1;\n\n\t\tlet geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [\n\t\t\t- size, size, 0,\n\t\t\tsize, size, 0,\n\t\t\tsize, - size, 0,\n\t\t\t- size, - size, 0,\n\t\t\t- size, size, 0\n\t\t], 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.lightPlane = new Line( geometry, material );\n\t\tthis.add( this.lightPlane );\n\n\t\tgeometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) );\n\n\t\tthis.targetLine = new Line( geometry, material );\n\t\tthis.add( this.targetLine );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.lightPlane.geometry.dispose();\n\t\tthis.lightPlane.material.dispose();\n\t\tthis.targetLine.geometry.dispose();\n\t\tthis.targetLine.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\t\tthis.light.target.updateWorldMatrix( true, false );\n\n\t\t_v1.setFromMatrixPosition( this.light.matrixWorld );\n\t\t_v2.setFromMatrixPosition( this.light.target.matrixWorld );\n\t\t_v3.subVectors( _v2, _v1 );\n\n\t\tthis.lightPlane.lookAt( _v2 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.lightPlane.material.color.set( this.color );\n\t\t\tthis.targetLine.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.lightPlane.material.color.copy( this.light.color );\n\t\t\tthis.targetLine.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\tthis.targetLine.lookAt( _v2 );\n\t\tthis.targetLine.scale.z = _v3.length();\n\n\t}\n\n}\n\nconst _vector = /*@__PURE__*/ new Vector3();\nconst _camera = /*@__PURE__*/ new Camera();\n\n/**\n *\t- shows frustum, line of sight and up of the camera\n *\t- suitable for fast updates\n * \t- based on frustum visualization in lightgl.js shadowmap example\n *\t\thttps://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html\n */\n\nclass CameraHelper extends LineSegments {\n\n\tconstructor( camera ) {\n\n\t\tconst geometry = new BufferGeometry();\n\t\tconst material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst pointMap = {};\n\n\t\t// near\n\n\t\taddLine( 'n1', 'n2' );\n\t\taddLine( 'n2', 'n4' );\n\t\taddLine( 'n4', 'n3' );\n\t\taddLine( 'n3', 'n1' );\n\n\t\t// far\n\n\t\taddLine( 'f1', 'f2' );\n\t\taddLine( 'f2', 'f4' );\n\t\taddLine( 'f4', 'f3' );\n\t\taddLine( 'f3', 'f1' );\n\n\t\t// sides\n\n\t\taddLine( 'n1', 'f1' );\n\t\taddLine( 'n2', 'f2' );\n\t\taddLine( 'n3', 'f3' );\n\t\taddLine( 'n4', 'f4' );\n\n\t\t// cone\n\n\t\taddLine( 'p', 'n1' );\n\t\taddLine( 'p', 'n2' );\n\t\taddLine( 'p', 'n3' );\n\t\taddLine( 'p', 'n4' );\n\n\t\t// up\n\n\t\taddLine( 'u1', 'u2' );\n\t\taddLine( 'u2', 'u3' );\n\t\taddLine( 'u3', 'u1' );\n\n\t\t// target\n\n\t\taddLine( 'c', 't' );\n\t\taddLine( 'p', 'c' );\n\n\t\t// cross\n\n\t\taddLine( 'cn1', 'cn2' );\n\t\taddLine( 'cn3', 'cn4' );\n\n\t\taddLine( 'cf1', 'cf2' );\n\t\taddLine( 'cf3', 'cf4' );\n\n\t\tfunction addLine( a, b ) {\n\n\t\t\taddPoint( a );\n\t\t\taddPoint( b );\n\n\t\t}\n\n\t\tfunction addPoint( id ) {\n\n\t\t\tvertices.push( 0, 0, 0 );\n\t\t\tcolors.push( 0, 0, 0 );\n\n\t\t\tif ( pointMap[ id ] === undefined ) {\n\n\t\t\t\tpointMap[ id ] = [];\n\n\t\t\t}\n\n\t\t\tpointMap[ id ].push( ( vertices.length / 3 ) - 1 );\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'CameraHelper';\n\n\t\tthis.camera = camera;\n\t\tif ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix();\n\n\t\tthis.matrix = camera.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.pointMap = pointMap;\n\n\t\tthis.update();\n\n\t\t// colors\n\n\t\tconst colorFrustum = new Color( 0xffaa00 );\n\t\tconst colorCone = new Color( 0xff0000 );\n\t\tconst colorUp = new Color( 0x00aaff );\n\t\tconst colorTarget = new Color( 0xffffff );\n\t\tconst colorCross = new Color( 0x333333 );\n\n\t\tthis.setColors( colorFrustum, colorCone, colorUp, colorTarget, colorCross );\n\n\t}\n\n\tsetColors( frustum, cone, up, target, cross ) {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst colorAttribute = geometry.getAttribute( 'color' );\n\n\t\t// near\n\n\t\tcolorAttribute.setXYZ( 0, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 1, frustum.r, frustum.g, frustum.b ); // n1, n2\n\t\tcolorAttribute.setXYZ( 2, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 3, frustum.r, frustum.g, frustum.b ); // n2, n4\n\t\tcolorAttribute.setXYZ( 4, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 5, frustum.r, frustum.g, frustum.b ); // n4, n3\n\t\tcolorAttribute.setXYZ( 6, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 7, frustum.r, frustum.g, frustum.b ); // n3, n1\n\n\t\t// far\n\n\t\tcolorAttribute.setXYZ( 8, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 9, frustum.r, frustum.g, frustum.b ); // f1, f2\n\t\tcolorAttribute.setXYZ( 10, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 11, frustum.r, frustum.g, frustum.b ); // f2, f4\n\t\tcolorAttribute.setXYZ( 12, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 13, frustum.r, frustum.g, frustum.b ); // f4, f3\n\t\tcolorAttribute.setXYZ( 14, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 15, frustum.r, frustum.g, frustum.b ); // f3, f1\n\n\t\t// sides\n\n\t\tcolorAttribute.setXYZ( 16, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 17, frustum.r, frustum.g, frustum.b ); // n1, f1\n\t\tcolorAttribute.setXYZ( 18, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 19, frustum.r, frustum.g, frustum.b ); // n2, f2\n\t\tcolorAttribute.setXYZ( 20, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 21, frustum.r, frustum.g, frustum.b ); // n3, f3\n\t\tcolorAttribute.setXYZ( 22, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 23, frustum.r, frustum.g, frustum.b ); // n4, f4\n\n\t\t// cone\n\n\t\tcolorAttribute.setXYZ( 24, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 25, cone.r, cone.g, cone.b ); // p, n1\n\t\tcolorAttribute.setXYZ( 26, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 27, cone.r, cone.g, cone.b ); // p, n2\n\t\tcolorAttribute.setXYZ( 28, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 29, cone.r, cone.g, cone.b ); // p, n3\n\t\tcolorAttribute.setXYZ( 30, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 31, cone.r, cone.g, cone.b ); // p, n4\n\n\t\t// up\n\n\t\tcolorAttribute.setXYZ( 32, up.r, up.g, up.b ); colorAttribute.setXYZ( 33, up.r, up.g, up.b ); // u1, u2\n\t\tcolorAttribute.setXYZ( 34, up.r, up.g, up.b ); colorAttribute.setXYZ( 35, up.r, up.g, up.b ); // u2, u3\n\t\tcolorAttribute.setXYZ( 36, up.r, up.g, up.b ); colorAttribute.setXYZ( 37, up.r, up.g, up.b ); // u3, u1\n\n\t\t// target\n\n\t\tcolorAttribute.setXYZ( 38, target.r, target.g, target.b ); colorAttribute.setXYZ( 39, target.r, target.g, target.b ); // c, t\n\t\tcolorAttribute.setXYZ( 40, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 41, cross.r, cross.g, cross.b ); // p, c\n\n\t\t// cross\n\n\t\tcolorAttribute.setXYZ( 42, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 43, cross.r, cross.g, cross.b ); // cn1, cn2\n\t\tcolorAttribute.setXYZ( 44, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 45, cross.r, cross.g, cross.b ); // cn3, cn4\n\n\t\tcolorAttribute.setXYZ( 46, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 47, cross.r, cross.g, cross.b ); // cf1, cf2\n\t\tcolorAttribute.setXYZ( 48, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 49, cross.r, cross.g, cross.b ); // cf3, cf4\n\n\t\tcolorAttribute.needsUpdate = true;\n\n\t}\n\n\tupdate() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst pointMap = this.pointMap;\n\n\t\tconst w = 1, h = 1;\n\n\t\t// we need just camera projection matrix inverse\n\t\t// world matrix must be identity\n\n\t\t_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );\n\n\t\t// center / target\n\n\t\tsetPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 );\n\t\tsetPoint( 't', pointMap, geometry, _camera, 0, 0, 1 );\n\n\t\t// near\n\n\t\tsetPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 );\n\t\tsetPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 );\n\t\tsetPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 );\n\t\tsetPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 );\n\n\t\t// far\n\n\t\tsetPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 );\n\t\tsetPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 );\n\t\tsetPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 );\n\t\tsetPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );\n\n\t\t// up\n\n\t\tsetPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 );\n\n\t\t// cross\n\n\t\tsetPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 );\n\t\tsetPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );\n\t\tsetPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 );\n\t\tsetPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );\n\n\t\tsetPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 );\n\t\tsetPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 );\n\t\tsetPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 );\n\t\tsetPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 );\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\n\nfunction setPoint( point, pointMap, geometry, camera, x, y, z ) {\n\n\t_vector.set( x, y, z ).unproject( camera );\n\n\tconst points = pointMap[ point ];\n\n\tif ( points !== undefined ) {\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tposition.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z );\n\n\t\t}\n\n\t}\n\n}\n\nconst _box = /*@__PURE__*/ new Box3();\n\nclass BoxHelper extends LineSegments {\n\n\tconstructor( object, color = 0xffff00 ) {\n\n\t\tconst indices = 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 ] );\n\t\tconst positions = new Float32Array( 8 * 3 );\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\t\tgeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.object = object;\n\t\tthis.type = 'BoxHelper';\n\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\t}\n\n\tupdate( object ) {\n\n\t\tif ( object !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.BoxHelper: .update() has no longer arguments.' );\n\n\t\t}\n\n\t\tif ( this.object !== undefined ) {\n\n\t\t\t_box.setFromObject( this.object );\n\n\t\t}\n\n\t\tif ( _box.isEmpty() ) return;\n\n\t\tconst min = _box.min;\n\t\tconst max = _box.max;\n\n\t\t/*\n\t\t\t5____4\n\t\t1/___0/|\n\t\t| 6__|_7\n\t\t2/___3/\n\n\t\t0: max.x, max.y, max.z\n\t\t1: min.x, max.y, max.z\n\t\t2: min.x, min.y, max.z\n\t\t3: max.x, min.y, max.z\n\t\t4: max.x, max.y, min.z\n\t\t5: min.x, max.y, min.z\n\t\t6: min.x, min.y, min.z\n\t\t7: max.x, min.y, min.z\n\t\t*/\n\n\t\tconst position = this.geometry.attributes.position;\n\t\tconst array = position.array;\n\n\t\tarray[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z;\n\t\tarray[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z;\n\t\tarray[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z;\n\t\tarray[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z;\n\t\tarray[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z;\n\t\tarray[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z;\n\t\tarray[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z;\n\t\tarray[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z;\n\n\t\tposition.needsUpdate = true;\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\t}\n\n\tsetFromObject( object ) {\n\n\t\tthis.object = object;\n\t\tthis.update();\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.object = source.object;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass Box3Helper extends LineSegments {\n\n\tconstructor( box, color = 0xffff00 ) {\n\n\t\tconst indices = 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 ] );\n\n\t\tconst positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ];\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.box = box;\n\n\t\tthis.type = 'Box3Helper';\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst box = this.box;\n\n\t\tif ( box.isEmpty() ) return;\n\n\t\tbox.getCenter( this.position );\n\n\t\tbox.getSize( this.scale );\n\n\t\tthis.scale.multiplyScalar( 0.5 );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass PlaneHelper extends Line {\n\n\tconstructor( plane, size = 1, hex = 0xffff00 ) {\n\n\t\tconst color = hex;\n\n\t\tconst positions = [ 1, - 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, - 1, 0, 1, 1, 0 ];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\t\tgeometry.computeBoundingSphere();\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.type = 'PlaneHelper';\n\n\t\tthis.plane = plane;\n\n\t\tthis.size = size;\n\n\t\tconst positions2 = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ];\n\n\t\tconst geometry2 = new BufferGeometry();\n\t\tgeometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );\n\t\tgeometry2.computeBoundingSphere();\n\n\t\tthis.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) );\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tthis.position.set( 0, 0, 0 );\n\n\t\tthis.scale.set( 0.5 * this.size, 0.5 * this.size, 1 );\n\n\t\tthis.lookAt( this.plane.normal );\n\n\t\tthis.translateZ( - this.plane.constant );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\t\tthis.children[ 0 ].geometry.dispose();\n\t\tthis.children[ 0 ].material.dispose();\n\n\t}\n\n}\n\nconst _axis = /*@__PURE__*/ new Vector3();\nlet _lineGeometry, _coneGeometry;\n\nclass ArrowHelper extends Object3D {\n\n\t// dir is assumed to be normalized\n\n\tconstructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ArrowHelper';\n\n\t\tif ( _lineGeometry === undefined ) {\n\n\t\t\t_lineGeometry = new BufferGeometry();\n\t\t\t_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );\n\n\t\t\t_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );\n\t\t\t_coneGeometry.translate( 0, - 0.5, 0 );\n\n\t\t}\n\n\t\tthis.position.copy( origin );\n\n\t\tthis.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.line.matrixAutoUpdate = false;\n\t\tthis.add( this.line );\n\n\t\tthis.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.cone.matrixAutoUpdate = false;\n\t\tthis.add( this.cone );\n\n\t\tthis.setDirection( dir );\n\t\tthis.setLength( length, headLength, headWidth );\n\n\t}\n\n\tsetDirection( dir ) {\n\n\t\t// dir is assumed to be normalized\n\n\t\tif ( dir.y > 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 0, 0, 0, 1 );\n\n\t\t} else if ( dir.y < - 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 1, 0, 0, 0 );\n\n\t\t} else {\n\n\t\t\t_axis.set( dir.z, 0, - dir.x ).normalize();\n\n\t\t\tconst radians = Math.acos( dir.y );\n\n\t\t\tthis.quaternion.setFromAxisAngle( _axis, radians );\n\n\t\t}\n\n\t}\n\n\tsetLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tthis.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458\n\t\tthis.line.updateMatrix();\n\n\t\tthis.cone.scale.set( headWidth, headLength, headWidth );\n\t\tthis.cone.position.y = length;\n\t\tthis.cone.updateMatrix();\n\n\t}\n\n\tsetColor( color ) {\n\n\t\tthis.line.material.color.set( color );\n\t\tthis.cone.material.color.set( color );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tthis.line.copy( source.line );\n\t\tthis.cone.copy( source.cone );\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.line.geometry.dispose();\n\t\tthis.line.material.dispose();\n\t\tthis.cone.geometry.dispose();\n\t\tthis.cone.material.dispose();\n\n\t}\n\n}\n\nclass AxesHelper extends LineSegments {\n\n\tconstructor( size = 1 ) {\n\n\t\tconst vertices = [\n\t\t\t0, 0, 0,\tsize, 0, 0,\n\t\t\t0, 0, 0,\t0, size, 0,\n\t\t\t0, 0, 0,\t0, 0, size\n\t\t];\n\n\t\tconst colors = [\n\t\t\t1, 0, 0,\t1, 0.6, 0,\n\t\t\t0, 1, 0,\t0.6, 1, 0,\n\t\t\t0, 0, 1,\t0, 0.6, 1\n\t\t];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'AxesHelper';\n\n\t}\n\n\tsetColors( xAxisColor, yAxisColor, zAxisColor ) {\n\n\t\tconst color = new Color();\n\t\tconst array = this.geometry.attributes.color.array;\n\n\t\tcolor.set( xAxisColor );\n\t\tcolor.toArray( array, 0 );\n\t\tcolor.toArray( array, 3 );\n\n\t\tcolor.set( yAxisColor );\n\t\tcolor.toArray( array, 6 );\n\t\tcolor.toArray( array, 9 );\n\n\t\tcolor.set( zAxisColor );\n\t\tcolor.toArray( array, 12 );\n\t\tcolor.toArray( array, 15 );\n\n\t\tthis.geometry.attributes.color.needsUpdate = true;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass ShapePath {\n\n\tconstructor() {\n\n\t\tthis.type = 'ShapePath';\n\n\t\tthis.color = new Color();\n\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPath = new Path();\n\t\tthis.subPaths.push( this.currentPath );\n\t\tthis.currentPath.moveTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tthis.currentPath.lineTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tthis.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tthis.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts ) {\n\n\t\tthis.currentPath.splineThru( pts );\n\n\t\treturn this;\n\n\t}\n\n\ttoShapes( isCCW ) {\n\n\t\tfunction toShapesNoHoles( inSubpaths ) {\n\n\t\t\tconst shapes = [];\n\n\t\t\tfor ( let i = 0, l = inSubpaths.length; i < l; i ++ ) {\n\n\t\t\t\tconst tmpPath = inSubpaths[ i ];\n\n\t\t\t\tconst tmpShape = new Shape();\n\t\t\t\ttmpShape.curves = tmpPath.curves;\n\n\t\t\t\tshapes.push( tmpShape );\n\n\t\t\t}\n\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tfunction isPointInsidePolygon( inPt, inPolygon ) {\n\n\t\t\tconst polyLen = inPolygon.length;\n\n\t\t\t// inPt on polygon contour => immediate success or\n\t\t\t// toggling of inside/outside at every single! intersection point of an edge\n\t\t\t// with the horizontal line through inPt, left of inPt\n\t\t\t// not counting lowerY endpoints of edges and whole edges on that line\n\t\t\tlet inside = false;\n\t\t\tfor ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) {\n\n\t\t\t\tlet edgeLowPt = inPolygon[ p ];\n\t\t\t\tlet edgeHighPt = inPolygon[ q ];\n\n\t\t\t\tlet edgeDx = edgeHighPt.x - edgeLowPt.x;\n\t\t\t\tlet edgeDy = edgeHighPt.y - edgeLowPt.y;\n\n\t\t\t\tif ( Math.abs( edgeDy ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not parallel\n\t\t\t\t\tif ( edgeDy < 0 ) {\n\n\t\t\t\t\t\tedgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx;\n\t\t\t\t\t\tedgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) \t\tcontinue;\n\n\t\t\t\t\tif ( inPt.y === edgeLowPt.y ) {\n\n\t\t\t\t\t\tif ( inPt.x === edgeLowPt.x )\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\t// continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y );\n\t\t\t\t\t\tif ( perpEdge === 0 )\t\t\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\tif ( perpEdge < 0 ) \t\t\t\tcontinue;\n\t\t\t\t\t\tinside = ! inside;\t\t// true intersection left of inPt\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// parallel or collinear\n\t\t\t\t\tif ( inPt.y !== edgeLowPt.y ) \t\tcontinue;\t\t\t// parallel\n\t\t\t\t\t// edge lies on the same horizontal line as inPt\n\t\t\t\t\tif ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) ||\n\t\t\t\t\t\t ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) )\t\treturn\ttrue;\t// inPt: Point on contour !\n\t\t\t\t\t// continue;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tinside;\n\n\t\t}\n\n\t\tconst isClockWise = ShapeUtils.isClockWise;\n\n\t\tconst subPaths = this.subPaths;\n\t\tif ( subPaths.length === 0 ) return [];\n\n\t\tlet solid, tmpPath, tmpShape;\n\t\tconst shapes = [];\n\n\t\tif ( subPaths.length === 1 ) {\n\n\t\t\ttmpPath = subPaths[ 0 ];\n\t\t\ttmpShape = new Shape();\n\t\t\ttmpShape.curves = tmpPath.curves;\n\t\t\tshapes.push( tmpShape );\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tlet holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() );\n\t\tholesFirst = isCCW ? ! holesFirst : holesFirst;\n\n\t\t// console.log(\"Holes first\", holesFirst);\n\n\t\tconst betterShapeHoles = [];\n\t\tconst newShapes = [];\n\t\tlet newShapeHoles = [];\n\t\tlet mainIdx = 0;\n\t\tlet tmpPoints;\n\n\t\tnewShapes[ mainIdx ] = undefined;\n\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\tfor ( let i = 0, l = subPaths.length; i < l; i ++ ) {\n\n\t\t\ttmpPath = subPaths[ i ];\n\t\t\ttmpPoints = tmpPath.getPoints();\n\t\t\tsolid = isClockWise( tmpPoints );\n\t\t\tsolid = isCCW ? ! solid : solid;\n\n\t\t\tif ( solid ) {\n\n\t\t\t\tif ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) )\tmainIdx ++;\n\n\t\t\t\tnewShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints };\n\t\t\t\tnewShapes[ mainIdx ].s.curves = tmpPath.curves;\n\n\t\t\t\tif ( holesFirst )\tmainIdx ++;\n\t\t\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\t\t\t//console.log('cw', i);\n\n\t\t\t} else {\n\n\t\t\t\tnewShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } );\n\n\t\t\t\t//console.log('ccw', i);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// only Holes? -> probably all Shapes with wrong orientation\n\t\tif ( ! newShapes[ 0 ] )\treturn\ttoShapesNoHoles( subPaths );\n\n\n\t\tif ( newShapes.length > 1 ) {\n\n\t\t\tlet ambiguous = false;\n\t\t\tlet toChange = 0;\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tbetterShapeHoles[ sIdx ] = [];\n\n\t\t\t}\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tconst sho = newShapeHoles[ sIdx ];\n\n\t\t\t\tfor ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) {\n\n\t\t\t\t\tconst ho = sho[ hIdx ];\n\t\t\t\t\tlet hole_unassigned = true;\n\n\t\t\t\t\tfor ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) {\n\n\t\t\t\t\t\tif ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) {\n\n\t\t\t\t\t\t\tif ( sIdx !== s2Idx )\ttoChange ++;\n\n\t\t\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\t\t\thole_unassigned = false;\n\t\t\t\t\t\t\t\tbetterShapeHoles[ s2Idx ].push( ho );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tambiguous = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\tbetterShapeHoles[ sIdx ].push( ho );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( toChange > 0 && ambiguous === false ) {\n\n\t\t\t\tnewShapeHoles = betterShapeHoles;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet tmpHoles;\n\n\t\tfor ( let i = 0, il = newShapes.length; i < il; i ++ ) {\n\n\t\t\ttmpShape = newShapes[ i ].s;\n\t\t\tshapes.push( tmpShape );\n\t\t\ttmpHoles = newShapeHoles[ i ];\n\n\t\t\tfor ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) {\n\n\t\t\t\ttmpShape.holes.push( tmpHoles[ j ].h );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//console.log(\"shape\", shapes);\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: {\n\t\trevision: REVISION,\n\t} } ) );\n\n}\n\nif ( typeof window !== 'undefined' ) {\n\n\tif ( window.__THREE__ ) {\n\n\t\tconsole.warn( 'WARNING: Multiple instances of Three.js being imported.' );\n\n\t} else {\n\n\t\twindow.__THREE__ = REVISION;\n\n\t}\n\n}\n\nexport { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Float64BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, TwoPassDoubleSide, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL1Renderer, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, _SRGBAFormat, sRGBEncoding };\n","class WebGL {\n\n\tstatic isWebGLAvailable() {\n\n\t\ttry {\n\n\t\t\tconst canvas = document.createElement( 'canvas' );\n\t\t\treturn !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) );\n\n\t\t} catch ( e ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}\n\n\tstatic isWebGL2Available() {\n\n\t\ttry {\n\n\t\t\tconst canvas = document.createElement( 'canvas' );\n\t\t\treturn !! ( window.WebGL2RenderingContext && canvas.getContext( 'webgl2' ) );\n\n\t\t} catch ( e ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}\n\n\tstatic getWebGLErrorMessage() {\n\n\t\treturn this.getErrorMessage( 1 );\n\n\t}\n\n\tstatic getWebGL2ErrorMessage() {\n\n\t\treturn this.getErrorMessage( 2 );\n\n\t}\n\n\tstatic getErrorMessage( version ) {\n\n\t\tconst names = {\n\t\t\t1: 'WebGL',\n\t\t\t2: 'WebGL 2'\n\t\t};\n\n\t\tconst contexts = {\n\t\t\t1: window.WebGLRenderingContext,\n\t\t\t2: window.WebGL2RenderingContext\n\t\t};\n\n\t\tlet message = 'Your $0 does not seem to support $1';\n\n\t\tconst element = document.createElement( 'div' );\n\t\telement.id = 'webglmessage';\n\t\telement.style.fontFamily = 'monospace';\n\t\telement.style.fontSize = '13px';\n\t\telement.style.fontWeight = 'normal';\n\t\telement.style.textAlign = 'center';\n\t\telement.style.background = '#fff';\n\t\telement.style.color = '#000';\n\t\telement.style.padding = '1.5em';\n\t\telement.style.width = '400px';\n\t\telement.style.margin = '5em auto 0';\n\n\t\tif ( contexts[ version ] ) {\n\n\t\t\tmessage = message.replace( '$0', 'graphics card' );\n\n\t\t} else {\n\n\t\t\tmessage = message.replace( '$0', 'browser' );\n\n\t\t}\n\n\t\tmessage = message.replace( '$1', names[ version ] );\n\n\t\telement.innerHTML = message;\n\n\t\treturn element;\n\n\t}\n\n}\n\nexport default WebGL;\n"],"names":["$d5b33d7c30034067$var$_canvas","$d5b33d7c30034067$export$561f394b24edfcaa","$d5b33d7c30034067$export$42429b3acfb233a4","$d5b33d7c30034067$export$626af19ae879bdf6","$d5b33d7c30034067$export$f63012db5506e7dd","$d5b33d7c30034067$export$ec8b666c5fe2c75a","addEventListener","type","listener","undefined","_listeners","listeners","indexOf","push","hasEventListener","removeEventListener","listenerArray","index","splice","dispatchEvent","event","target","array","slice","i","l","length","call","$d5b33d7c30034067$var$_lut","$d5b33d7c30034067$var$DEG2RAD","Math","PI","$d5b33d7c30034067$var$RAD2DEG","$d5b33d7c30034067$var$generateUUID","d0","random","d1","d2","d3","uuid","toLowerCase","$d5b33d7c30034067$var$clamp","value","min","max","$d5b33d7c30034067$var$isPowerOfTwo","$d5b33d7c30034067$var$floorPowerOfTwo","pow","floor","log","LN2","$d5b33d7c30034067$var$denormalize","constructor","Float32Array","Uint32Array","Uint16Array","Uint8Array","Int32Array","Int16Array","Int8Array","Error","$d5b33d7c30034067$var$normalize","round","$d5b33d7c30034067$export$c977b3e384af9ae1","x","y","prototype","isVector2","width","height","set","setScalar","scalar","setX","setY","setComponent","getComponent","clone","copy","v","add","addScalar","s","addVectors","a","b","addScaledVector","sub","subScalar","subVectors","multiply","multiplyScalar","divide","divideScalar","applyMatrix3","m","e","elements","clamp","clampScalar","minVal","maxVal","clampLength","ceil","roundToZero","negate","dot","cross","lengthSq","sqrt","manhattanLength","abs","normalize","angle","atan2","angleTo","denominator","theta","acos","distanceTo","distanceToSquared","dx","dy","manhattanDistanceTo","setLength","lerp","alpha","lerpVectors","v1","v2","equals","fromArray","offset","toArray","fromBufferAttribute","attribute","getX","getY","rotateAround","center","c","cos","sin","Symbol","iterator","$d5b33d7c30034067$export$8ff26dafa08918","n11","n12","n13","n21","n22","n23","n31","n32","n33","isMatrix3","te","identity","me","extractBasis","xAxis","yAxis","zAxis","setFromMatrix3Column","setFromMatrix4","multiplyMatrices","premultiply","ae","be","a11","a12","a13","a21","a22","a23","a31","a32","a33","b11","b12","b13","b21","b22","b23","b31","b32","b33","determinant","d","f","g","h","invert","t11","t12","t13","det","detInv","transpose","tmp","getNormalMatrix","matrix4","transposeIntoArray","r","setUvTransform","tx","ty","sx","sy","rotation","cx","cy","scale","$d5b33d7c30034067$var$_m3","makeScale","rotate","makeRotation","translate","makeTranslation","matrix","$d5b33d7c30034067$var$arrayNeedsUint32","$d5b33d7c30034067$var$createElementNS","name","document","createElementNS","Uint8ClampedArray","Float64Array","$d5b33d7c30034067$var$_cache","$d5b33d7c30034067$var$warnOnce","message","console","warn","$d5b33d7c30034067$var$SRGBToLinear","$d5b33d7c30034067$var$LinearToSRGB","$d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3","$d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB","$d5b33d7c30034067$var$TO_LINEAR","color","convertSRGBToLinear","$d5b33d7c30034067$var$FROM_LINEAR","convertLinearToSRGB","$d5b33d7c30034067$export$5e6fd513f44698c","enabled","legacyMode","workingColorSpace","colorSpace","convert","sourceColorSpace","targetColorSpace","sourceToLinear","targetFromLinear","fromWorkingColorSpace","toWorkingColorSpace","$d5b33d7c30034067$export$698882cf06df44aa","getDataURL","image","canvas","test","src","HTMLCanvasElement","context","getContext","ImageData","putImageData","drawImage","toDataURL","sRGBToLinear","HTMLImageElement","ImageBitmap","imageData","getImageData","data","$d5b33d7c30034067$var$sourceId","$d5b33d7c30034067$export$1d2df86270c81ecb","isSource","Object","defineProperty","version","needsUpdate","toJSON","meta","isRootObject","images","output","url","Array","isArray","isDataTexture","$d5b33d7c30034067$var$serializeImage","from","$d5b33d7c30034067$var$textureId","$d5b33d7c30034067$export$5431306cf43de24a","DEFAULT_IMAGE","mapping","DEFAULT_MAPPING","wrapS","wrapT","magFilter","minFilter","format","anisotropy","DEFAULT_ANISOTROPY","colorSpace1","isTexture","source","mipmaps","channel","internalFormat","repeat","matrixAutoUpdate","generateMipmaps","premultiplyAlpha","flipY","unpackAlignment","userData","onUpdate","isRenderTargetTexture","needsPMREMUpdate","updateMatrix","JSON","parse","stringify","textures","metadata","generator","wrap","keys","dispose","transformUv","uv","encoding","$d5b33d7c30034067$export$fa7daccca11cdbe3","z","w","isVector4","setZ","setW","applyMatrix4","setAxisAngleFromQuaternion","q","setAxisAngleFromRotationMatrix","m11","m12","m13","m21","m22","m23","m31","m32","m33","xx","yy","zz","xy","xz","yz","getZ","getW","$d5b33d7c30034067$export$efcb1f8bf367cbfb","options","isRenderTarget","depth","scissor","scissorTest","viewport","texture","depthBuffer","stencilBuffer","depthTexture","samples","setSize","assign","$d5b33d7c30034067$export$3c052beb2e51e23f","isWebGLRenderTarget","$d5b33d7c30034067$export$dfac6c8e811406a3","isDataArrayTexture","wrapR","$d5b33d7c30034067$export$23d6a54f0bbc85a3","isQuaternion","_x","_y","_z","_w","slerpFlat","dst","dstOffset","src0","srcOffset0","src1","srcOffset1","t","x0","y0","z0","w0","x1","y1","z1","w1","dir","sqrSin","Number","EPSILON","len","tDir","multiplyQuaternionsFlat","_onChangeCallback","quaternion","setFromEuler","euler","update","order","_order","c1","c2","c3","s1","s2","s3","setFromAxisAngle","axis","halfAngle","setFromRotationMatrix","trace","setFromUnitVectors","vFrom","vTo","rotateTowards","step","slerp","conjugate","multiplyQuaternions","qax","qay","qaz","qaw","qbx","qby","qbz","qbw","qb","cosHalfTheta","sqrSinHalfTheta","sinHalfTheta","halfTheta","ratioA","ratioB","slerpQuaternions","qa","u1","sqrt1u1","sqrtu1","u2","u3","_onChange","callback","$d5b33d7c30034067$export$64b5c384219d3699","isVector3","multiplyVectors","applyEuler","applyQuaternion","$d5b33d7c30034067$var$_quaternion$4","applyAxisAngle","applyNormalMatrix","qx","qy","qz","qw","ix","iy","iz","iw","project","camera","matrixWorldInverse","projectionMatrix","unproject","projectionMatrixInverse","matrixWorld","transformDirection","crossVectors","ax","ay","az","bx","by","bz","projectOnVector","projectOnPlane","planeNormal","$d5b33d7c30034067$var$_vector$b","reflect","normal","dz","setFromSpherical","setFromSphericalCoords","radius","phi","sinPhiRadius","setFromCylindrical","setFromCylindricalCoords","setFromMatrixPosition","setFromMatrixScale","setFromMatrixColumn","sz","setFromColor","randomDirection","u","$d5b33d7c30034067$export$6f7d5a9418ab2aa3","Infinity","isBox3","setFromArray","makeEmpty","il","expandByPoint","$d5b33d7c30034067$var$_vector$a","setFromBufferAttribute","count","setFromPoints","points","setFromCenterAndSize","size","halfSize","setFromObject","object","precise","expandByObject","box","isEmpty","getCenter","getSize","point","expandByVector","vector","expandByScalar","updateWorldMatrix","boundingBox","computeBoundingBox","$d5b33d7c30034067$var$_box$3","union","geometry","attributes","position","children","containsPoint","containsBox","getParameter","intersectsBox","intersectsSphere","sphere","clampPoint","intersectsPlane","plane","constant","intersectsTriangle","triangle","$d5b33d7c30034067$var$_center","$d5b33d7c30034067$var$_extents","$d5b33d7c30034067$var$_v0$2","$d5b33d7c30034067$var$_v1$7","$d5b33d7c30034067$var$_v2$4","$d5b33d7c30034067$var$_f0","$d5b33d7c30034067$var$_f1","$d5b33d7c30034067$var$_f2","axes","$d5b33d7c30034067$var$satForAxes","$d5b33d7c30034067$var$_triangleNormal","distanceToPoint","getBoundingSphere","intersect","$d5b33d7c30034067$var$_points","$d5b33d7c30034067$var$_testAxis","v0","extents","j","p0","p1","p2","$d5b33d7c30034067$var$_box$2","$d5b33d7c30034067$var$_v1$6","$d5b33d7c30034067$var$_v2$3","$d5b33d7c30034067$export$805e8b72413ccaba","optionalCenter","maxRadiusSq","radiusSum","deltaLengthSq","getBoundingBox","getMaxScaleOnAxis","delta","$d5b33d7c30034067$var$_vector$9","$d5b33d7c30034067$var$_segCenter","$d5b33d7c30034067$var$_segDir","$d5b33d7c30034067$var$_diff","$d5b33d7c30034067$var$_edge1","$d5b33d7c30034067$var$_edge2","$d5b33d7c30034067$var$_normal$1","$d5b33d7c30034067$export$a186db52eed6d40e","origin","direction","ray","at","lookAt","recast","closestPointToPoint","directionDistance","distanceSqToPoint","distanceSqToSegment","optionalPointOnRay","optionalPointOnSegment","s0","sqrDist","extDet","segExtent","a01","b0","b1","invDet","intersectSphere","tca","radius2","thc","t0","t1","distanceToPlane","intersectPlane","distToPoint","intersectBox","tmin","tmax","tymin","tymax","tzmin","tzmax","invdirx","invdiry","invdirz","isNaN","intersectTriangle","backfaceCulling","sign","DdN","DdQxE2","DdE1xQ","QdN","$d5b33d7c30034067$export$2ae72fc923e5eb5","n14","n24","n34","n41","n42","n43","n44","isMatrix4","copyPosition","setFromMatrix3","makeBasis","extractRotation","scaleX","$d5b33d7c30034067$var$_v1$5","scaleY","scaleZ","makeRotationFromEuler","af","bf","ce","cf","de","df","ac","ad","bc","bd","makeRotationFromQuaternion","compose","$d5b33d7c30034067$var$_zero","$d5b33d7c30034067$var$_one","eye","up","$d5b33d7c30034067$var$_z","$d5b33d7c30034067$var$_x","$d5b33d7c30034067$var$_y","a14","a24","a34","a41","a42","a43","a44","b14","b24","b34","b41","b42","b43","b44","setPosition","t14","scaleXSq","scaleYSq","scaleZSq","makeRotationX","makeRotationY","makeRotationZ","makeRotationAxis","makeShear","yx","zx","zy","x2","y2","z2","wx","wy","wz","decompose","$d5b33d7c30034067$var$_m1$2","invSX","invSY","invSZ","makePerspective","left","right","top","bottom","near","far","coordinateSystem","makeOrthographic","zInv","p","$d5b33d7c30034067$var$_matrix","$d5b33d7c30034067$var$_quaternion$3","$d5b33d7c30034067$export$d93cc409a0768c5f","DEFAULT_ORDER","isEuler","asin","setFromQuaternion","setFromVector3","reorder","newOrder","$d5b33d7c30034067$export$89312ce47c0ca777","mask","enable","enableAll","toggle","disable","disableAll","layers","isEnabled","$d5b33d7c30034067$var$_object3DId","$d5b33d7c30034067$var$_v1$4","$d5b33d7c30034067$var$_q1","$d5b33d7c30034067$var$_m1$1","$d5b33d7c30034067$var$_target","$d5b33d7c30034067$var$_position$3","$d5b33d7c30034067$var$_scale$2","$d5b33d7c30034067$var$_quaternion$2","$d5b33d7c30034067$var$_xAxis","$d5b33d7c30034067$var$_yAxis","$d5b33d7c30034067$var$_zAxis","$d5b33d7c30034067$var$_addedEvent","$d5b33d7c30034067$var$_removedEvent","$d5b33d7c30034067$export$e4dd07dff30cc924","isObject3D","parent","DEFAULT_UP","defineProperties","configurable","enumerable","modelViewMatrix","normalMatrix","DEFAULT_MATRIX_AUTO_UPDATE","matrixWorldNeedsUpdate","matrixWorldAutoUpdate","DEFAULT_MATRIX_WORLD_AUTO_UPDATE","visible","castShadow","receiveShadow","frustumCulled","renderOrder","animations","onBeforeRender","onAfterRender","setRotationFromAxisAngle","setRotationFromEuler","setRotationFromMatrix","setRotationFromQuaternion","rotateOnAxis","rotateOnWorldAxis","rotateX","rotateY","rotateZ","translateOnAxis","distance","translateX","translateY","translateZ","localToWorld","worldToLocal","isCamera","isLight","arguments","error","remove","removeFromParent","clear","attach","getObjectById","id","getObjectByProperty","getObjectByName","child","getObjectsByProperty","result","childResult","concat","getWorldPosition","getWorldQuaternion","getWorldScale","getWorldDirection","raycast","traverse","traverseVisible","traverseAncestors","updateMatrixWorld","force","updateParents","updateChildren","geometries","materials","shapes","skeletons","nodes","serialize","library","element","isInstancedMesh","instanceMatrix","instanceColor","isScene","background","isColor","environment","isMesh","isLine","isPoints","parameters","shape","isSkinnedMesh","bindMode","bindMatrix","skeleton","material","uuids","animation","extractFromCache","cache","values","key","recursive","$d5b33d7c30034067$var$_v0$1","$d5b33d7c30034067$var$_v1$3","$d5b33d7c30034067$var$_v2$2","$d5b33d7c30034067$var$_v3$1","$d5b33d7c30034067$var$_vab","$d5b33d7c30034067$var$_vac","$d5b33d7c30034067$var$_vbc","$d5b33d7c30034067$var$_vap","$d5b33d7c30034067$var$_vbp","$d5b33d7c30034067$var$_vcp","$d5b33d7c30034067$var$warnedGetUV","$d5b33d7c30034067$export$5a465592bfe74b48","getNormal","targetLengthSq","getBarycoord","dot00","dot01","dot02","dot11","dot12","denom","invDenom","getUV","p3","uv1","uv2","uv3","getInterpolation","v3","isFrontFacing","setFromPointsAndIndices","i0","i1","i2","setFromAttributeAndIndices","getArea","getMidpoint","getPlane","setFromCoplanarPoints","d4","vc","d5","d6","vb","va","$d5b33d7c30034067$var$materialId","$d5b33d7c30034067$export$a2d8b23205c25948","isMaterial","blending","side","vertexColors","opacity","transparent","alphaHash","blendSrc","blendDst","blendEquation","blendSrcAlpha","blendDstAlpha","blendEquationAlpha","depthFunc","depthTest","depthWrite","stencilWriteMask","stencilFunc","stencilRef","stencilFuncMask","stencilFail","stencilZFail","stencilZPass","stencilWrite","clippingPlanes","clipIntersection","clipShadows","shadowSide","colorWrite","precision","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","dithering","alphaToCoverage","premultipliedAlpha","forceSinglePass","toneMapped","_alphaTest","alphaTest","onBuild","onBeforeCompile","customProgramCacheKey","toString","setValues","newValue","currentValue","getHex","roughness","metalness","sheen","sheenColor","sheenRoughness","emissive","emissiveIntensity","specular","specularIntensity","specularColor","shininess","clearcoat","clearcoatRoughness","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","clearcoatNormalScale","iridescence","iridescenceIOR","iridescenceThicknessRange","iridescenceMap","iridescenceThicknessMap","anisotropyRotation","anisotropyMap","map","matcap","alphaMap","lightMap","lightMapIntensity","aoMap","aoMapIntensity","bumpMap","bumpScale","normalMap","normalMapType","normalScale","displacementMap","displacementScale","displacementBias","roughnessMap","metalnessMap","emissiveMap","specularMap","specularIntensityMap","specularColorMap","envMap","combine","envMapIntensity","reflectivity","refractionRatio","gradientMap","transmission","transmissionMap","thickness","thicknessMap","attenuationDistance","attenuationColor","sizeAttenuation","linewidth","dashSize","gapSize","wireframe","wireframeLinewidth","wireframeLinecap","wireframeLinejoin","flatShading","fog","srcPlanes","dstPlanes","n","$d5b33d7c30034067$var$_colorKeywords","$d5b33d7c30034067$var$_hslA","$d5b33d7c30034067$var$_hslB","$d5b33d7c30034067$var$hue2rgb","$d5b33d7c30034067$export$892596cec99bc70e","setHex","setStyle","setRGB","hex","setHSL","style","handleAlpha","string","parseFloat","exec","components","parseInt","charAt","setColorName","copySRGBToLinear","copyLinearToSRGB","$d5b33d7c30034067$var$_color","getHexString","getHSL","hue","saturation","lightness","getRGB","getStyle","toFixed","offsetHSL","addColors","color1","color2","lerpColors","lerpHSL","NAMES","$d5b33d7c30034067$export$55cbcc9b622fe1f5","isMeshBasicMaterial","$d5b33d7c30034067$var$_vector$8","$d5b33d7c30034067$var$_vector2$1","$d5b33d7c30034067$export$8dea267bd6bde117","itemSize","normalized","TypeError","isBufferAttribute","usage","updateRange","gpuType","onUploadCallback","setUsage","copyAt","index1","index2","copyArray","setXY","setXYZ","component","setXYZW","onUpload","$d5b33d7c30034067$export$640a853f68025f2e","$d5b33d7c30034067$export$7eb8c9fa25cd5bd6","$d5b33d7c30034067$export$cbe7a62641830ebd","$d5b33d7c30034067$var$_id$1","$d5b33d7c30034067$var$_m1","$d5b33d7c30034067$var$_obj","$d5b33d7c30034067$var$_offset","$d5b33d7c30034067$var$_box$1","$d5b33d7c30034067$var$_boxMorphTargets","$d5b33d7c30034067$var$_vector$7","$d5b33d7c30034067$export$b7be63a67df8959","isBufferGeometry","morphAttributes","morphTargetsRelative","groups","boundingSphere","drawRange","start","getIndex","setIndex","getAttribute","setAttribute","deleteAttribute","hasAttribute","addGroup","materialIndex","clearGroups","setDrawRange","tangent","computeBoundingSphere","morphAttributesPosition","isGLBufferAttribute","morphAttribute","jl","computeTangents","indices","positions","normals","uvs","nVertices","tangents","tan1","tan2","vA","vB","vC","uvA","uvB","uvC","sdir","tdir","group","handleTriangle","isFinite","tmp2","n2","handleVertex","computeVertexNormals","positionAttribute","normalAttribute","pA","pB","pC","nA","nB","nC","cb","ab","normalizeNormals","toNonIndexed","convertBufferAttribute","array2","isInterleavedBufferAttribute","stride","geometry2","newAttribute","morphArray","hasMorphAttributes","attributeArray","$d5b33d7c30034067$var$_inverseMatrix$3","$d5b33d7c30034067$var$_ray$3","$d5b33d7c30034067$var$_sphere$5","$d5b33d7c30034067$var$_sphereHitAt","$d5b33d7c30034067$var$_vA$1","$d5b33d7c30034067$var$_vB$1","$d5b33d7c30034067$var$_vC$1","$d5b33d7c30034067$var$_tempA","$d5b33d7c30034067$var$_morphA","$d5b33d7c30034067$var$_uvA$1","$d5b33d7c30034067$var$_uvB$1","$d5b33d7c30034067$var$_uvC$1","$d5b33d7c30034067$var$_normalA","$d5b33d7c30034067$var$_normalB","$d5b33d7c30034067$var$_normalC","$d5b33d7c30034067$var$_intersectionPoint","$d5b33d7c30034067$var$_intersectionPointWorld","$d5b33d7c30034067$export$e176487c05830cc5","updateMorphTargets","morphTargetInfluences","morphTargetDictionary","ml","String","getVertexPosition","morphPosition","morphInfluences","influence","raycaster","intersects","_computeIntersections","rayLocalSpace","intersection","groupMaterial","end","$d5b33d7c30034067$var$checkGeometryIntersection","faceIndex","face","$d5b33d7c30034067$var$checkIntersection","$d5b33d7c30034067$export$33e43285f7406bd5","widthSegments","heightSegments","depthSegments","scope","vertices","numberOfVertices","groupStart","buildPlane","udir","vdir","gridX","gridY","segmentWidth","segmentHeight","widthHalf","heightHalf","depthHalf","gridX1","gridY1","vertexCounter","groupCount","fromJSON","$d5b33d7c30034067$var$cloneUniforms","property","$d5b33d7c30034067$var$mergeUniforms","uniforms","merged","$d5b33d7c30034067$var$getUnlitUniformColorSpace","renderer","getRenderTarget","outputColorSpace","$d5b33d7c30034067$export$d8ecdf8615bfea69","merge","$d5b33d7c30034067$export$83c7d75d550a8b0d","isShaderMaterial","defines","uniformsGroups","vertexShader","fragmentShader","lights","clipping","extensions","derivatives","fragDepth","drawBuffers","shaderTextureLOD","defaultAttributeValues","index0AttributeName","uniformsNeedUpdate","glslVersion","$d5b33d7c30034067$var$cloneUniformsGroups","uniform","$d5b33d7c30034067$export$79f141de891a5fed","$d5b33d7c30034067$export$74e4ae24825f68d7","fov","aspect","isPerspectiveCamera","zoom","focus","view","filmGauge","filmOffset","updateProjectionMatrix","setFocalLength","focalLength","vExtentSlope","getFilmHeight","atan","getFocalLength","tan","getEffectiveFOV","getFilmWidth","setViewOffset","fullWidth","fullHeight","offsetX","offsetY","clearViewOffset","skew","$d5b33d7c30034067$export$d0cdd0bd804995de","renderTarget","cameraPX","cameraNX","cameraPY","cameraNY","cameraPZ","cameraNZ","updateCoordinateSystem","cameras","scene","currentRenderTarget","currentXrEnabled","xr","setRenderTarget","render","$d5b33d7c30034067$export$ee2e5a18258a4049","isCubeTexture","$d5b33d7c30034067$export$ac386671d651941e","isWebGLCubeRenderTarget","fromEquirectangularTexture","shader","tEquirect","mesh","currentMinFilter","stencil","$d5b33d7c30034067$var$_vector1","$d5b33d7c30034067$var$_vector2","$d5b33d7c30034067$var$_normalMatrix","$d5b33d7c30034067$export$7ff5ac152ef991b0","isPlane","setComponents","setFromNormalAndCoplanarPoint","inverseNormalLength","distanceToSphere","projectPoint","intersectLine","line","intersectsLine","startSign","endSign","coplanarPoint","optionalNormalMatrix","referencePoint","$d5b33d7c30034067$var$_sphere$4","$d5b33d7c30034067$var$_vector$6","$d5b33d7c30034067$export$35efe6f4c85463d2","p4","p5","planes","frustum","setFromProjectionMatrix","me0","me1","me2","me3","me4","me5","me6","me7","me8","me9","me10","me11","me12","me13","me14","me15","intersectsObject","intersectsSprite","sprite","negRadius","$d5b33d7c30034067$var$WebGLAnimation","isAnimating","animationLoop","requestId","onAnimationFrame","time","frame","requestAnimationFrame","stop","cancelAnimationFrame","setAnimationLoop","setContext","$d5b33d7c30034067$var$WebGLAttributes","gl","capabilities","isWebGL2","buffers","WeakMap","get","deleteBuffer","buffer","delete","bufferType","cached","bytesPerElement","elementSize","createBuffer","bindBuffer","bufferData","FLOAT","isFloat16BufferAttribute","HALF_FLOAT","UNSIGNED_SHORT","SHORT","UNSIGNED_INT","INT","BYTE","UNSIGNED_BYTE","BYTES_PER_ELEMENT","updateBuffer","bufferSubData","subarray","$d5b33d7c30034067$export$967d831af31f69ce","width_half","height_half","segment_width","segment_height","$d5b33d7c30034067$export$955f9f2e84c43c8b","alphahash_fragment","alphahash_pars_fragment","alphamap_fragment","alphamap_pars_fragment","alphatest_fragment","alphatest_pars_fragment","aomap_fragment","aomap_pars_fragment","begin_vertex","beginnormal_vertex","bsdfs","iridescence_fragment","bumpmap_pars_fragment","clipping_planes_fragment","clipping_planes_pars_fragment","clipping_planes_pars_vertex","clipping_planes_vertex","color_fragment","color_pars_fragment","color_pars_vertex","color_vertex","common","cube_uv_reflection_fragment","defaultnormal_vertex","displacementmap_pars_vertex","displacementmap_vertex","emissivemap_fragment","emissivemap_pars_fragment","colorspace_fragment","colorspace_pars_fragment","envmap_fragment","envmap_common_pars_fragment","envmap_pars_fragment","envmap_pars_vertex","envmap_physical_pars_fragment","envmap_vertex","fog_vertex","fog_pars_vertex","fog_fragment","fog_pars_fragment","gradientmap_pars_fragment","lightmap_fragment","lightmap_pars_fragment","lights_lambert_fragment","lights_lambert_pars_fragment","lights_pars_begin","lights_toon_fragment","lights_toon_pars_fragment","lights_phong_fragment","lights_phong_pars_fragment","lights_physical_fragment","lights_physical_pars_fragment","lights_fragment_begin","lights_fragment_maps","lights_fragment_end","logdepthbuf_fragment","logdepthbuf_pars_fragment","logdepthbuf_pars_vertex","logdepthbuf_vertex","map_fragment","map_pars_fragment","map_particle_fragment","map_particle_pars_fragment","metalnessmap_fragment","metalnessmap_pars_fragment","morphcolor_vertex","morphnormal_vertex","morphtarget_pars_vertex","morphtarget_vertex","normal_fragment_begin","normal_fragment_maps","normal_pars_fragment","normal_pars_vertex","normal_vertex","normalmap_pars_fragment","clearcoat_normal_fragment_begin","clearcoat_normal_fragment_maps","clearcoat_pars_fragment","iridescence_pars_fragment","opaque_fragment","packing","premultiplied_alpha_fragment","project_vertex","dithering_fragment","dithering_pars_fragment","roughnessmap_fragment","roughnessmap_pars_fragment","shadowmap_pars_fragment","shadowmap_pars_vertex","shadowmap_vertex","shadowmask_pars_fragment","skinbase_vertex","skinning_pars_vertex","skinning_vertex","skinnormal_vertex","specularmap_fragment","specularmap_pars_fragment","tonemapping_fragment","tonemapping_pars_fragment","transmission_fragment","transmission_pars_fragment","uv_pars_fragment","uv_pars_vertex","uv_vertex","worldpos_vertex","background_vert","background_frag","backgroundCube_vert","backgroundCube_frag","cube_vert","cube_frag","depth_vert","depth_frag","distanceRGBA_vert","distanceRGBA_frag","equirect_vert","equirect_frag","linedashed_vert","linedashed_frag","meshbasic_vert","meshbasic_frag","meshlambert_vert","meshlambert_frag","meshmatcap_vert","meshmatcap_frag","meshnormal_vert","meshnormal_frag","meshphong_vert","meshphong_frag","meshphysical_vert","meshphysical_frag","meshtoon_vert","meshtoon_frag","points_vert","points_frag","shadow_vert","shadow_frag","sprite_vert","sprite_frag","$d5b33d7c30034067$export$6643083551874bf5","diffuse","mapTransform","alphaMapTransform","specularmap","specularMapTransform","envmap","flipEnvMap","ior","aomap","aoMapTransform","lightmap","lightMapTransform","bumpmap","bumpMapTransform","normalmap","normalMapTransform","displacementmap","displacementMapTransform","emissivemap","emissiveMapTransform","metalnessmap","metalnessMapTransform","roughnessmap","roughnessMapTransform","gradientmap","fogDensity","fogNear","fogFar","fogColor","ambientLightColor","lightProbe","directionalLights","properties","directionalLightShadows","shadowBias","shadowNormalBias","shadowRadius","shadowMapSize","directionalShadowMap","directionalShadowMatrix","spotLights","coneCos","penumbraCos","decay","spotLightShadows","spotLightMap","spotShadowMap","spotLightMatrix","pointLights","pointLightShadows","shadowCameraNear","shadowCameraFar","pointShadowMap","pointShadowMatrix","hemisphereLights","skyColor","groundColor","rectAreaLights","ltc_1","ltc_2","uvTransform","$d5b33d7c30034067$export$bee4a7d47f8f5014","basic","lambert","phong","standard","toon","dashed","totalSize","t2D","backgroundIntensity","backgroundCube","backgroundBlurriness","cube","tCube","tFlip","equirect","distanceRGBA","referencePosition","nearDistance","farDistance","shadow","physical","clearcoatMapTransform","clearcoatNormalMapTransform","clearcoatRoughnessMapTransform","iridescenceMapTransform","iridescenceThicknessMinimum","iridescenceThicknessMaximum","iridescenceThicknessMapTransform","sheenColorMap","sheenColorMapTransform","sheenRoughnessMap","sheenRoughnessMapTransform","transmissionMapTransform","transmissionSamplerSize","transmissionSamplerMap","thicknessMapTransform","specularColorMapTransform","specularIntensityMapTransform","anisotropyVector","anisotropyMapTransform","$d5b33d7c30034067$var$_rgb","$d5b33d7c30034067$var$WebGLBackground","cubemaps","cubeuvmaps","state","objects","planeMesh","boxMesh","clearColor","clearAlpha","currentBackground","currentBackgroundVersion","currentTonemapping","setClear","getClearColor","setClearColor","getClearAlpha","setClearAlpha","renderList","forceClear","usePMREM","environmentBlendMode","getEnvironmentBlendMode","autoClear","autoClearColor","autoClearDepth","autoClearStencil","toneMapping","unshift","$d5b33d7c30034067$var$WebGLBindingStates","maxVertexAttributes","MAX_VERTEX_ATTRIBS","extension","vaoAvailable","bindingStates","defaultState","createBindingState","currentState","forceUpdate","bindVertexArrayObject","vao","bindVertexArray","bindVertexArrayOES","deleteVertexArrayObject","deleteVertexArray","deleteVertexArrayOES","newAttributes","enabledAttributes","attributeDivisors","program","initAttributes","enableAttribute","enableAttributeAndDivisor","meshPerAttribute","enableVertexAttribArray","disableUnusedAttributes","disableVertexAttribArray","vertexAttribPointer","integer","vertexAttribIPointer","reset","resetDefaultState","setup","updateBuffers","getBindingState","programMap","stateMap","createVertexArray","createVertexArrayOES","cachedAttributes","geometryAttributes","attributesNum","programAttributes","getAttributes","programAttribute","location","cachedAttribute","geometryAttribute","saveCache","ELEMENT_ARRAY_BUFFER","setupVertexAttributes","isInstancedBufferGeometry","materialDefaultAttributeValues","isInstancedInterleavedBuffer","locationSize","_maxInstanceCount","ARRAY_BUFFER","isInstancedBufferAttribute","vertexAttrib2fv","vertexAttrib3fv","vertexAttrib4fv","vertexAttrib1fv","geometryId","programId","releaseStatesOfGeometry","releaseStatesOfProgram","$d5b33d7c30034067$var$WebGLBufferRenderer","info","mode","setMode","drawArrays","renderInstances","primcount","methodName","$d5b33d7c30034067$var$WebGLCapabilities","maxAnisotropy","getMaxPrecision","getShaderPrecisionFormat","VERTEX_SHADER","HIGH_FLOAT","FRAGMENT_SHADER","MEDIUM_FLOAT","WebGL2RenderingContext","maxPrecision","has","logarithmicDepthBuffer","maxTextures","MAX_TEXTURE_IMAGE_UNITS","maxVertexTextures","MAX_VERTEX_TEXTURE_IMAGE_UNITS","maxTextureSize","MAX_TEXTURE_SIZE","maxCubemapSize","MAX_CUBE_MAP_TEXTURE_SIZE","maxAttributes","maxVertexUniforms","MAX_VERTEX_UNIFORM_VECTORS","maxVaryings","MAX_VARYING_VECTORS","maxFragmentUniforms","MAX_FRAGMENT_UNIFORM_VECTORS","vertexTextures","floatFragmentTextures","maxSamples","MAX_SAMPLES","getMaxAnisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT","floatVertexTextures","$d5b33d7c30034067$var$WebGLClipping","globalState","numGlobalPlanes","localClippingEnabled","renderingShadows","viewNormalMatrix","projectPlanes","skipTransform","nPlanes","dstArray","flatSize","viewMatrix","i4","numPlanes","numIntersection","init","enableLocalClipping","beginShadows","endShadows","setGlobalState","setState","useCache","materialProperties","nGlobal","lGlobal","clippingState","$d5b33d7c30034067$var$WebGLCubeMaps","mapTextureMapping","onTextureDispose","cubemap","$d5b33d7c30034067$var$EXTRA_LOD_SIGMA","$d5b33d7c30034067$var$_flatCamera","isOrthographicCamera","scaleW","scaleH","$d5b33d7c30034067$var$_clearColor","$d5b33d7c30034067$var$_oldTarget","$d5b33d7c30034067$var$PHI","$d5b33d7c30034067$var$INV_PHI","$d5b33d7c30034067$var$_axisDirections","$d5b33d7c30034067$export$6add42717753e221","_renderer","_pingPongRenderTarget","_lodMax","_cubeSize","_lodPlanes","_sizeLods","_sigmas","_blurMaterial","_cubemapMaterial","_equirectMaterial","_compileMaterial","fromScene","sigma","_setSize","cubeUVRenderTarget","_allocateTargets","_sceneToCubeUV","_blur","_applyPMREM","_cleanup","fromEquirectangular","equirectangular","_fromTexture","fromCubemap","compileCubemapShader","$d5b33d7c30034067$var$_getCubemapMaterial","compileEquirectangularShader","$d5b33d7c30034067$var$_getEquirectMaterial","_dispose","cubeSize","log2","outputTarget","$d5b33d7c30034067$var$_setViewport","_textureToCubeUV","params","$d5b33d7c30034067$var$_createRenderTarget","sizeLods","lodPlanes","sigmas","$d5b33d7c30034067$var$_createPlanes","lodMax","lod","totalLods","sizeLod","texelSize","positionSize","uvSize","faceIndexSize","coordinates","fill","$d5b33d7c30034067$var$_getBlurShader","weights","poleAxis","shaderMaterial","$d5b33d7c30034067$var$_getCommonVertexShader","tmpMesh","compile","cubeCamera","upSign","forwardSign","originalAutoClear","backgroundMaterial","backgroundBox","useSolidColor","col","lodIn","lodOut","pingPongRenderTarget","_halfBlur","targetIn","targetOut","sigmaRadians","blurMaterial","blurMesh","blurUniforms","pixels","radiansPerPixel","sigmaPixels","STANDARD_DEVIATIONS","sum","weight","exp","outputSize","$d5b33d7c30034067$var$WebGLCubeUVMaps","cubeUVmaps","pmremGenerator","cubemapUV","isEquirectMap","isCubeMap","isCubeTextureComplete","$d5b33d7c30034067$var$WebGLExtensions","getExtension","$d5b33d7c30034067$var$WebGLGeometries","wireframeAttributes","onGeometryDispose","memory","updateWireframeAttribute","geometryIndex","geometryPosition","previousAttribute","getWireframeAttribute","currentAttribute","$d5b33d7c30034067$var$WebGLIndexedBufferRenderer","drawElements","$d5b33d7c30034067$var$WebGLInfo","calls","triangles","lines","programs","autoReset","instanceCount","TRIANGLES","LINES","LINE_STRIP","LINE_LOOP","POINTS","$d5b33d7c30034067$var$numericalSort","$d5b33d7c30034067$var$absNumericalSort","$d5b33d7c30034067$var$WebGLMorphtargets","influencesList","morphTextures","morph","workInfluences","objectInfluences","morphTargetsCount","entry","hasMorphPosition","hasMorphNormals","hasMorphColors","morphTargets","morphNormals","morphColors","vertexDataCount","vertexDataStride","morphTarget","morphNormal","morphColor","disposeTexture","morphInfluencesSum","morphBaseInfluence","getUniforms","setValue","influences","sort","MAX_SAFE_INTEGER","$d5b33d7c30034067$var$WebGLObjects","updateMap","onInstancedMeshDispose","instancedMesh","buffergeometry","$d5b33d7c30034067$var$emptyTexture","$d5b33d7c30034067$var$emptyArrayTexture","$d5b33d7c30034067$var$empty3dTexture","isData3DTexture","$d5b33d7c30034067$var$emptyCubeTexture","$d5b33d7c30034067$var$arrayCacheF32","$d5b33d7c30034067$var$arrayCacheI32","$d5b33d7c30034067$var$mat4array","$d5b33d7c30034067$var$mat3array","$d5b33d7c30034067$var$mat2array","$d5b33d7c30034067$var$flatten","nBlocks","blockSize","firstElem","$d5b33d7c30034067$var$arraysEqual","$d5b33d7c30034067$var$copyArray","$d5b33d7c30034067$var$allocTexUnits","allocateTextureUnit","$d5b33d7c30034067$var$setValueV1f","uniform1f","addr","$d5b33d7c30034067$var$setValueV2f","uniform2f","uniform2fv","$d5b33d7c30034067$var$setValueV3f","uniform3f","uniform3fv","$d5b33d7c30034067$var$setValueV4f","uniform4f","uniform4fv","$d5b33d7c30034067$var$setValueM2","uniformMatrix2fv","$d5b33d7c30034067$var$setValueM3","uniformMatrix3fv","$d5b33d7c30034067$var$setValueM4","uniformMatrix4fv","$d5b33d7c30034067$var$setValueV1i","uniform1i","$d5b33d7c30034067$var$setValueV2i","uniform2i","uniform2iv","$d5b33d7c30034067$var$setValueV3i","uniform3i","uniform3iv","$d5b33d7c30034067$var$setValueV4i","uniform4i","uniform4iv","$d5b33d7c30034067$var$setValueV1ui","uniform1ui","$d5b33d7c30034067$var$setValueV2ui","uniform2ui","uniform2uiv","$d5b33d7c30034067$var$setValueV3ui","uniform3ui","uniform3uiv","$d5b33d7c30034067$var$setValueV4ui","uniform4ui","uniform4uiv","$d5b33d7c30034067$var$setValueT1","unit","setTexture2D","$d5b33d7c30034067$var$setValueT3D1","setTexture3D","$d5b33d7c30034067$var$setValueT6","setTextureCube","$d5b33d7c30034067$var$setValueT2DArray1","setTexture2DArray","$d5b33d7c30034067$var$setValueV1fArray","uniform1fv","$d5b33d7c30034067$var$setValueV2fArray","$d5b33d7c30034067$var$setValueV3fArray","$d5b33d7c30034067$var$setValueV4fArray","$d5b33d7c30034067$var$setValueM2Array","$d5b33d7c30034067$var$setValueM3Array","$d5b33d7c30034067$var$setValueM4Array","$d5b33d7c30034067$var$setValueV1iArray","uniform1iv","$d5b33d7c30034067$var$setValueV2iArray","$d5b33d7c30034067$var$setValueV3iArray","$d5b33d7c30034067$var$setValueV4iArray","$d5b33d7c30034067$var$setValueV1uiArray","uniform1uiv","$d5b33d7c30034067$var$setValueV2uiArray","$d5b33d7c30034067$var$setValueV3uiArray","$d5b33d7c30034067$var$setValueV4uiArray","$d5b33d7c30034067$var$setValueT1Array","units","$d5b33d7c30034067$var$setValueT3DArray","$d5b33d7c30034067$var$setValueT6Array","$d5b33d7c30034067$var$setValueT2DArrayArray","$d5b33d7c30034067$var$SingleUniform","activeInfo","$d5b33d7c30034067$var$getSingularSetter","$d5b33d7c30034067$var$PureArrayUniform","$d5b33d7c30034067$var$getPureArraySetter","$d5b33d7c30034067$var$StructuredUniform","seq","$d5b33d7c30034067$var$RePathPart","$d5b33d7c30034067$var$addUniform","container","uniformObject","$d5b33d7c30034067$var$WebGLUniforms","getProgramParameter","ACTIVE_UNIFORMS","getActiveUniform","getUniformLocation","$d5b33d7c30034067$var$parseUniform","path","pathLength","lastIndex","match","matchEnd","idIsIndex","subscript","next","setOptional","upload","seqWithValue","$d5b33d7c30034067$var$WebGLShader","createShader","shaderSource","compileShader","$d5b33d7c30034067$var$programIdCount","$d5b33d7c30034067$var$getShaderErrors","status","getShaderParameter","COMPILE_STATUS","errors","getShaderInfoLog","trim","errorMatches","errorLine","toUpperCase","$d5b33d7c30034067$var$handleSource","split","lines2","to","join","getShaderSource","$d5b33d7c30034067$var$filterEmptyLine","$d5b33d7c30034067$var$replaceLightNums","numSpotLightCoords","numSpotLightShadows","numSpotLightMaps","numSpotLightShadowsWithMaps","replace","numDirLights","numSpotLights","numRectAreaLights","numPointLights","numHemiLights","numDirLightShadows","numPointLightShadows","$d5b33d7c30034067$var$replaceClippingPlaneNums","numClippingPlanes","numClipIntersection","$d5b33d7c30034067$var$includePattern","$d5b33d7c30034067$var$resolveIncludes","$d5b33d7c30034067$var$includeReplacer","$d5b33d7c30034067$var$shaderChunkMap","Map","include","newInclude","$d5b33d7c30034067$var$unrollLoopPattern","$d5b33d7c30034067$var$unrollLoops","$d5b33d7c30034067$var$loopReplacer","snippet","$d5b33d7c30034067$var$generatePrecision","precisionstring","$d5b33d7c30034067$var$WebGLProgram","cacheKey","prefixVertex","prefixFragment","cachedUniforms","shadowMapTypeDefine","envMapModeDefine","shadowMapType","envMapTypeDefine","$d5b33d7c30034067$var$generateEnvMapTypeDefine","envMapMode","envMapBlendingDefine","$d5b33d7c30034067$var$generateEnvMapBlendingDefine","envMapCubeUVSize","$d5b33d7c30034067$var$generateCubeUVSize","imageHeight","envMapCubeUVHeight","maxMip","texelWidth","texelHeight","customExtensions","$d5b33d7c30034067$var$generateExtensions","chunks","extensionDerivatives","normalMapTangentSpace","shaderID","extensionFragDepth","rendererExtensionFragDepth","extensionDrawBuffers","rendererExtensionDrawBuffers","extensionShaderTextureLOD","rendererExtensionShaderTextureLod","filter","customDefines","$d5b33d7c30034067$var$generateDefines","createProgram","versionString","isRawShaderMaterial","shaderType","shaderName","instancing","instancingColor","useFog","fogExp2","normalMapObjectSpace","mapUv","alphaMapUv","lightMapUv","aoMapUv","emissiveMapUv","bumpMapUv","normalMapUv","displacementMapUv","metalnessMapUv","roughnessMapUv","anisotropyMapUv","clearcoatMapUv","clearcoatNormalMapUv","clearcoatRoughnessMapUv","iridescenceMapUv","iridescenceThicknessMapUv","sheenColorMapUv","sheenRoughnessMapUv","specularMapUv","specularColorMapUv","specularIntensityMapUv","transmissionMapUv","thicknessMapUv","vertexTangents","vertexAlphas","vertexUv1s","vertexUv2s","vertexUv3s","pointsUvs","skinning","morphTextureStride","doubleSided","flipSided","shadowMapEnabled","useLegacyLights","$d5b33d7c30034067$var$getToneMappingFunction","functionName","toneMappingName","opaque","$d5b33d7c30034067$var$getTexelEncodingFunction","$d5b33d7c30034067$var$getEncodingComponents","useDepthPacking","depthPacking","vertexGlsl","fragmentGlsl","glVertexShader","glFragmentShader","attachShader","bindAttribLocation","linkProgram","debug","checkShaderErrors","programLog","getProgramInfoLog","vertexLog","fragmentLog","runnable","haveDiagnostics","LINK_STATUS","onShaderError","vertexErrors","fragmentErrors","getError","VALIDATE_STATUS","diagnostics","prefix","deleteShader","$d5b33d7c30034067$var$fetchAttributeLocations","ACTIVE_ATTRIBUTES","getActiveAttrib","FLOAT_MAT2","FLOAT_MAT3","FLOAT_MAT4","getAttribLocation","destroy","deleteProgram","usedTimes","$d5b33d7c30034067$var$_id","$d5b33d7c30034067$var$WebGLShaderCache","shaderCache","materialCache","vertexShaderStage","_getShaderStage","fragmentShaderStage","materialShaders","_getShaderCacheForMaterial","shaderStage","code","getVertexShaderID","getFragmentShaderID","Set","stage","$d5b33d7c30034067$var$WebGLShaderStage","$d5b33d7c30034067$var$WebGLPrograms","_programLayers","_customShaders","IS_WEBGL2","SUPPORTS_VERTEX_TEXTURES","shaderIDs","MeshDepthMaterial","MeshDistanceMaterial","MeshNormalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial","MeshStandardMaterial","MeshPhysicalMaterial","MeshMatcapMaterial","LineBasicMaterial","LineDashedMaterial","PointsMaterial","ShadowMaterial","SpriteMaterial","getChannel","getParameters","shadows","customVertexShaderID","customFragmentShaderID","isMeshStandardMaterial","IS_INSTANCEDMESH","HAS_MAP","HAS_MATCAP","HAS_ENVMAP","HAS_AOMAP","HAS_LIGHTMAP","HAS_BUMPMAP","HAS_NORMALMAP","HAS_DISPLACEMENTMAP","HAS_EMISSIVEMAP","HAS_METALNESSMAP","HAS_ROUGHNESSMAP","HAS_ANISOTROPY","HAS_CLEARCOAT","HAS_IRIDESCENCE","HAS_SHEEN","HAS_TRANSMISSION","HAS_ANISOTROPYMAP","HAS_CLEARCOATMAP","HAS_CLEARCOAT_NORMALMAP","HAS_CLEARCOAT_ROUGHNESSMAP","HAS_IRIDESCENCEMAP","HAS_IRIDESCENCE_THICKNESSMAP","HAS_SHEEN_COLORMAP","HAS_SHEEN_ROUGHNESSMAP","HAS_SPECULARMAP","HAS_SPECULAR_COLORMAP","HAS_SPECULAR_INTENSITYMAP","HAS_TRANSMISSIONMAP","HAS_THICKNESSMAP","HAS_GRADIENTMAP","HAS_ALPHAMAP","HAS_ALPHATEST","HAS_ALPHAHASH","HAS_EXTENSIONS","HAS_ATTRIBUTE_UV1","HAS_ATTRIBUTE_UV2","HAS_ATTRIBUTE_UV3","isXRRenderTarget","supportsVertexTextures","isFogExp2","directional","spot","rectArea","hemi","shadowMap","_useLegacyLights","getProgramCacheKey","morphAttributeCount","acquireProgram","pl","preexistingProgram","releaseProgram","pop","releaseShaderCache","$d5b33d7c30034067$var$WebGLProperties","$d5b33d7c30034067$var$painterSortStable","groupOrder","$d5b33d7c30034067$var$reversePainterSortStable","$d5b33d7c30034067$var$WebGLRenderList","renderItems","renderItemsIndex","transmissive","getNextRenderItem","renderItem","finish","customOpaqueSort","customTransparentSort","$d5b33d7c30034067$var$WebGLRenderLists","lists","renderCallDepth","list","listArray","$d5b33d7c30034067$var$UniformsCache","light","halfWidth","halfHeight","$d5b33d7c30034067$var$nextVersion","$d5b33d7c30034067$var$shadowCastingAndTexturingLightsFirst","lightA","lightB","$d5b33d7c30034067$var$WebGLLights","shadowCache","$d5b33d7c30034067$var$ShadowUniformsCache","hash","directionalLength","pointLength","spotLength","rectAreaLength","hemiLength","numDirectionalShadows","numPointShadows","numSpotShadows","numSpotMaps","ambient","probe","directionalShadow","spotShadow","rectAreaLTC1","rectAreaLTC2","pointShadow","vector3","matrix42","numSpotShadowsWithMaps","scaleFactor","intensity","isAmbientLight","isLightProbe","sh","coefficients","isDirectionalLight","shadowUniforms","bias","normalBias","mapSize","isSpotLight","penumbra","updateMatrices","isRectAreaLight","isPointLight","isHemisphereLight","LTC_FLOAT_1","LTC_FLOAT_2","LTC_HALF_1","LTC_HALF_2","setupView","$d5b33d7c30034067$var$WebGLRenderState","lightsArray","shadowsArray","setupLights","setupLightsView","pushLight","pushShadow","shadowLight","$d5b33d7c30034067$var$WebGLRenderStates","renderStates","renderState","renderStateArray","$d5b33d7c30034067$export$2698c22ec13825db","isMeshDepthMaterial","$d5b33d7c30034067$export$33e187ed002f2a19","isMeshDistanceMaterial","$d5b33d7c30034067$var$WebGLShadowMap","_objects","_capabilities","_frustum","_shadowMapSize","_viewportSize","_viewport","_depthMaterial","_distanceMaterial","_materialCache","_maxTextureSize","shadowMaterialVertical","VSM_SAMPLES","shadow_pass","resolution","shadowMaterialHorizontal","HORIZONTAL_PASS","fullScreenTri","fullScreenMesh","autoUpdate","_previousType","getDepthMaterial","customMaterial","customDistanceMaterial","customDepthMaterial","keyA","keyB","materialsForVariant","cachedMaterial","activeCubeFace","getActiveCubeFace","activeMipmapLevel","getActiveMipmapLevel","_state","setBlending","setTest","setScissorTest","toVSM","fromVSM","shadowFrameExtents","getFrameExtents","pars","viewportCount","getViewportCount","vp","getViewport","getFrustum","renderObject","shadowCamera","k","kl","depthMaterial","renderBufferDirect","isPointLightShadow","VSMPass","blurSamples","mapPass","$d5b33d7c30034067$var$WebGLState","colorBuffer","locked","currentColorMask","currentColorClear","setMask","colorMask","setLocked","lock","currentDepthMask","currentDepthFunc","currentDepthClear","DEPTH_TEST","depthMask","setFunc","NEVER","ALWAYS","LESS","LEQUAL","EQUAL","GEQUAL","GREATER","NOTEQUAL","clearDepth","currentStencilMask","currentStencilFunc","currentStencilRef","currentStencilFuncMask","currentStencilFail","currentStencilZFail","currentStencilZPass","currentStencilClear","stencilTest","STENCIL_TEST","stencilMask","setOp","stencilOp","clearStencil","uboBindings","uboProgramMap","enabledCapabilities","currentBoundFramebuffers","currentDrawbuffers","defaultDrawbuffers","currentProgram","currentBlendingEnabled","currentBlending","currentBlendEquation","currentBlendSrc","currentBlendDst","currentBlendEquationAlpha","currentBlendSrcAlpha","currentBlendDstAlpha","currentPremultipledAlpha","currentFlipSided","currentCullFace","currentLineWidth","currentPolygonOffsetFactor","currentPolygonOffsetUnits","MAX_COMBINED_TEXTURE_IMAGE_UNITS","lineWidthAvailable","glVersion","VERSION","currentTextureSlot","currentBoundTextures","scissorParam","SCISSOR_BOX","viewportParam","VIEWPORT","currentScissor","currentViewport","createTexture","dimensions","bindTexture","texParameteri","TEXTURE_MIN_FILTER","NEAREST","TEXTURE_MAG_FILTER","TEXTURE_3D","TEXTURE_2D_ARRAY","texImage3D","RGBA","texImage2D","emptyTextures","TEXTURE_2D","TEXTURE_CUBE_MAP","TEXTURE_CUBE_MAP_POSITIVE_X","setFlipSided","setCullFace","CULL_FACE","equationToGL","FUNC_ADD","FUNC_SUBTRACT","FUNC_REVERSE_SUBTRACT","MIN","MAX","MIN_EXT","MAX_EXT","factorToGL","ZERO","ONE","SRC_COLOR","SRC_ALPHA","SRC_ALPHA_SATURATE","DST_COLOR","DST_ALPHA","ONE_MINUS_SRC_COLOR","ONE_MINUS_SRC_ALPHA","ONE_MINUS_DST_COLOR","ONE_MINUS_DST_ALPHA","BLEND","blendFuncSeparate","blendFunc","blendEquationSeparate","frontFace","CW","CCW","cullFace","BACK","FRONT","FRONT_AND_BACK","setPolygonOffset","factor","POLYGON_OFFSET_FILL","bindFramebuffer","framebuffer","DRAW_FRAMEBUFFER","FRAMEBUFFER","isWebGLMultipleRenderTargets","COLOR_ATTACHMENT0","drawBuffersWEBGL","useProgram","setMaterial","frontFaceCW","SAMPLE_ALPHA_TO_COVERAGE","setLineWidth","lineWidth","SCISSOR_TEST","activeTexture","webglSlot","TEXTURE0","webglType","webglTexture","boundTexture","unbindTexture","compressedTexImage2D","apply","compressedTexImage3D","updateUBOMapping","uniformsGroup","blockIndex","getUniformBlockIndex","uniformBlockBinding","__bindingPointIndex","texStorage2D","texStorage3D","texSubImage2D","texSubImage3D","compressedTexSubImage2D","compressedTexSubImage3D","KEEP","READ_FRAMEBUFFER","$d5b33d7c30034067$var$WebGLTextures","_gl","utils","_canvas","multisampledRTTExt","supportsInvalidateFramebuffer","navigator","userAgent","_videoTextures","_sources","useOffscreenCanvas","OffscreenCanvas","err","createCanvas","resizeImage","needsPowerOfTwo","needsNewCanvas","maxSize","isPowerOfTwo$1","textureNeedsGenerateMipmaps","supportsMips","generateMipmap","getInternalFormat","internalFormatName","glFormat","glType","forceLinearTransfer","RED","R32F","R16F","R8","RED_INTEGER","R8UI","R16UI","R32UI","R8I","R16I","R32I","RG","RG32F","RG16F","RG8","RGBA32F","RGBA16F","SRGB8_ALPHA8","RGBA8","UNSIGNED_SHORT_4_4_4_4","RGBA4","UNSIGNED_SHORT_5_5_5_1","RGB5_A1","getMipLevels","isFramebufferTexture","isCompressedTexture","filterFallback","LINEAR","deallocateTexture","textureProperties","__webglInit","webglTextures","__cacheKey","deleteTexture","isVideoTexture","onRenderTargetDispose","deallocateRenderTarget","renderTargetProperties","__webglTexture","__webglFramebuffer","level","deleteFramebuffer","__webglDepthbuffer","deleteRenderbuffer","__webglMultisampledFramebuffer","__webglColorRenderbuffer","__webglDepthRenderbuffer","attachmentProperties","textureUnits","slot","updateVideoTexture","__version","complete","uploadTexture","wrappingToGL","REPEAT","CLAMP_TO_EDGE","MIRRORED_REPEAT","filterToGL","NEAREST_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_NEAREST","LINEAR_MIPMAP_LINEAR","compareToGL","setTextureParameters","textureType","TEXTURE_WRAP_S","TEXTURE_WRAP_T","TEXTURE_WRAP_R","compareFunction","TEXTURE_COMPARE_MODE","COMPARE_REF_TO_TEXTURE","TEXTURE_COMPARE_FUNC","__currentAnisotropy","texParameterf","TEXTURE_MAX_ANISOTROPY_EXT","initTexture","forceUpload","textureCacheKey","getTextureCacheKey","isCompressedArrayTexture","sourceProperties","mipmap","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","UNPACK_ALIGNMENT","UNPACK_COLORSPACE_CONVERSION_WEBGL","NONE","verifyColorSpace","glInternalFormat","useTexStorage","allocateMemory","levels","isDepthTexture","DEPTH_COMPONENT","DEPTH_COMPONENT32F","DEPTH_COMPONENT24","DEPTH24_STENCIL8","DEPTH_COMPONENT16","DEPTH_STENCIL","setupFrameBufferTexture","attachment","textureTarget","__hasExternalTextures","useMultisampledRTT","framebufferTexture2DMultisampleEXT","getRenderTargetSamples","TEXTURE_CUBE_MAP_NEGATIVE_Z","framebufferTexture2D","setupRenderBufferStorage","renderbuffer","isMultisample","bindRenderbuffer","RENDERBUFFER","renderbufferStorageMultisampleEXT","renderbufferStorageMultisample","renderbufferStorage","framebufferRenderbuffer","DEPTH_ATTACHMENT","DEPTH_STENCIL_ATTACHMENT","setupDepthRenderbuffer","isCube","__autoAllocateDepthBuffer","setupDepthTexture","webglDepthTexture","createRenderbuffer","__useRenderToTexture","textureUnit","resetTextureUnits","uploadCubeTexture","isCompressed","cubeImage","mipmapImage","rebindTextures","colorTexture","setupRenderTarget","isMultipleRenderTargets","createFramebuffer","glTextureType","isWebGL3DRenderTarget","isWebGLArrayRenderTarget","updateRenderTargetMipmap","updateMultisampleRenderTarget","COLOR_BUFFER_BIT","invalidationArray","depthStyle","ignoreDepthValues","__ignoreDepthValues","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT","invalidateFramebuffer","blitFramebuffer","$d5b33d7c30034067$export$ddaebcad857649a8","HALF_FLOAT_OES","ALPHA","LUMINANCE","LUMINANCE_ALPHA","SRGB_ALPHA_EXT","RG_INTEGER","RGBA_INTEGER","COMPRESSED_SRGB_S3TC_DXT1_EXT","COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT","COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT","COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT","COMPRESSED_RGB_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT3_EXT","COMPRESSED_RGBA_S3TC_DXT5_EXT","COMPRESSED_RGB_PVRTC_4BPPV1_IMG","COMPRESSED_RGB_PVRTC_2BPPV1_IMG","COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","COMPRESSED_RGB_ETC1_WEBGL","COMPRESSED_SRGB8_ETC2","COMPRESSED_RGB8_ETC2","COMPRESSED_SRGB8_ALPHA8_ETC2_EAC","COMPRESSED_RGBA8_ETC2_EAC","COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR","COMPRESSED_RGBA_ASTC_4x4_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR","COMPRESSED_RGBA_ASTC_5x4_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR","COMPRESSED_RGBA_ASTC_5x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR","COMPRESSED_RGBA_ASTC_6x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR","COMPRESSED_RGBA_ASTC_6x6_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR","COMPRESSED_RGBA_ASTC_8x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR","COMPRESSED_RGBA_ASTC_8x6_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR","COMPRESSED_RGBA_ASTC_8x8_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR","COMPRESSED_RGBA_ASTC_10x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR","COMPRESSED_RGBA_ASTC_10x6_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR","COMPRESSED_RGBA_ASTC_10x8_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR","COMPRESSED_RGBA_ASTC_10x10_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR","COMPRESSED_RGBA_ASTC_12x10_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR","COMPRESSED_RGBA_ASTC_12x12_KHR","COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT","COMPRESSED_RGBA_BPTC_UNORM_EXT","COMPRESSED_RED_RGTC1_EXT","COMPRESSED_SIGNED_RED_RGTC1_EXT","COMPRESSED_RED_GREEN_RGTC2_EXT","COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT","UNSIGNED_INT_24_8","UNSIGNED_INT_24_8_WEBGL","$d5b33d7c30034067$export$56b937d9e5581166","isArrayCamera","$d5b33d7c30034067$export$eb2fcfdbd7ba97d4","isGroup","$d5b33d7c30034067$var$_moveEvent","$d5b33d7c30034067$var$WebXRController","_targetRay","_grip","_hand","getHandSpace","joints","inputState","pinching","getTargetRaySpace","hasLinearVelocity","linearVelocity","hasAngularVelocity","angularVelocity","getGripSpace","connect","inputSource","hand","inputjoint","_getHandJoint","disconnect","referenceSpace","inputPose","gripPose","handPose","targetRay","grip","session","visibilityState","jointPose","getJointPose","joint","transform","jointRadius","indexTip","thumbTip","distanceToPinch","handedness","gripSpace","getPose","targetRaySpace","jointName","$d5b33d7c30034067$export$fc830aa069cc8c2f","$d5b33d7c30034067$var$WebXRManager","framebufferScaleFactor","referenceSpaceType","foveation","customReferenceSpace","pose","glBinding","glProjLayer","glBaseLayer","xrFrame","getContextAttributes","initialRenderTarget","newRenderTarget","controllers","controllerInputSources","cameraL","cameraR","cameraXR","_currentDepthNear","_currentDepthFar","onSessionEvent","controllerIndex","controller","onSessionEnd","onInputSourcesChange","isPresenting","removed","added","cameraAutoUpdate","getController","getControllerGrip","getHand","setFramebufferScaleFactor","setReferenceSpaceType","getReferenceSpace","setReferenceSpace","space","getBaseLayer","getBinding","getFrame","getSession","setSession","xrCompatible","makeXRCompatible","layerInit","antialias","XRWebGLLayer","updateRenderState","baseLayer","framebufferWidth","framebufferHeight","depthFormat","depthType","glDepthFormat","projectionlayerInit","colorFormat","XRWebGLBinding","createProjectionLayer","textureWidth","textureHeight","setFoveation","requestReferenceSpace","cameraLPos","cameraRPos","updateCamera","depthNear","depthFar","setProjectionFromUnion","ipd","projL","projR","topFov","bottomFov","leftFov","rightFov","zOffset","xOffset","near2","far2","left2","right2","top2","bottom2","getCamera","getFoveation","fixedFoveation","onAnimationFrameCallback","getViewerPose","views","setRenderTargetFramebuffer","cameraXRNeedsUpdate","glSubImage","getViewSubImage","setRenderTargetTextures","depthStencilTexture","detectedPlanes","$d5b33d7c30034067$var$WebGLMaterials","refreshTransformUniform","refreshUniformsCommon","refreshFogUniforms","isFog","density","refreshMaterialUniforms","pixelRatio","transmissionRenderTarget","isMeshLambertMaterial","isMeshToonMaterial","isMeshPhongMaterial","refreshUniformsStandard","isMeshPhysicalMaterial","isMeshMatcapMaterial","refreshUniformsDistance","isMeshNormalMaterial","isLineBasicMaterial","isLineDashedMaterial","isPointsMaterial","isSpriteMaterial","isShadowMaterial","$d5b33d7c30034067$var$WebGLUniformsGroups","updateList","allocatedBindingPoints","maxBindingPoints","MAX_UNIFORM_BUFFER_BINDINGS","getUniformSize","boundary","storage","onUniformsGroupsDispose","bind","webglProgram","prepareUniformsGroup","chunkOffset","infos","__data","__offset","remainingSizeInChunk","chunkSize","__size","__cache","bindingPointIndex","allocateBindingPointIndex","UNIFORM_BUFFER","bindBufferBase","updateBufferData","hasUniformChanged","tempValues","cachedObjects","cachedObject","arrayOffset","$d5b33d7c30034067$export$f6cc00ef28d7cf97","_alpha","programCache","renderLists","morphtargets","bufferRenderer","indexedBufferRenderer","$d5b33d7c30034067$var$createCanvasElement","display","preserveDrawingBuffer","powerPreference","failIfMajorPerformanceCaveat","isWebGLRenderer","uintClearColor","intClearColor","currentRenderList","currentRenderState","renderListStack","renderStateStack","domElement","sortObjects","toneMappingExposure","_this","_isContextLost","_currentActiveCubeFace","_currentActiveMipmapLevel","_currentRenderTarget","_currentMaterialId","_currentCamera","_currentViewport","_currentScissor","_currentScissorTest","_currentClearColor","_currentClearAlpha","_width","_height","_pixelRatio","_opaqueSort","_transparentSort","_scissor","_scissorTest","_clippingEnabled","_localClippingEnabled","_transmissionRenderTarget","_projScreenMatrix","_vector2","_vector3","_emptyScene","overrideMaterial","getTargetPixelRatio","contextNames","contextAttributes","contextName","onContextLost","onContextRestore","onContextCreationError","isWebGL1Renderer","shift","WebGLRenderingContext","initGLContext","preventDefault","infoAutoReset","shadowMapAutoUpdate","shadowMapNeedsUpdate","statusMessage","onMaterialDispose","releaseMaterialProgramReferences","forEach","forceContextLoss","loseContext","forceContextRestore","restoreContext","getPixelRatio","setPixelRatio","updateStyle","setViewport","getDrawingBufferSize","setDrawingBufferSize","getCurrentViewport","getScissor","setScissor","getScissorTest","boolean","setOpaqueSort","method","setTransparentSort","bits","isIntegerFormat","targetFormat","targetType","clearBufferuiv","COLOR","clearBufferiv","onXRSessionStart","onXRSessionEnd","setProgram","needsProgramChange","needsLights","lightsStateVersion","getProgram","refreshProgram","refreshMaterial","refreshLights","p_uniforms","m_uniforms","uCamPos","cameraPosition","boneTexture","computeBoneTexture","boneTextureSize","isMeshGouraudMaterial","uniformsList","rangeFactor","drawStart","drawEnd","drawCount","isLineSegments","isLineLoop","isSprite","maxInstanceCount","prepare","material2","renderScene","opaqueObjects","transmissiveObjects","transparentObjects","renderTransmissionPass","currentToneMapping","renderObjects","renderTargetNeedsUpdate","currentSide","programCacheKey","updateCommonMaterialProperties","progUniforms","self","projectObject","isLOD","camera2","defaultFramebuffer","__useDefaultFramebuffer","useDefaultFramebuffer","isRenderTarget3D","framebufferBound","layer","framebufferTextureLayer","readRenderTargetPixels","activeCubeFaceIndex","textureFormat","IMPLEMENTATION_COLOR_READ_FORMAT","halfFloatSupportedByExt","IMPLEMENTATION_COLOR_READ_TYPE","readPixels","copyFramebufferToTexture","levelScale","copyTexSubImage2D","copyTextureToTexture","srcTexture","dstTexture","copyTextureToTexture3D","sourceBox","glTarget","unpackRowLen","UNPACK_ROW_LENGTH","unpackImageHeight","UNPACK_IMAGE_HEIGHT","unpackSkipPixels","UNPACK_SKIP_PIXELS","unpackSkipRows","UNPACK_SKIP_ROWS","unpackSkipImages","UNPACK_SKIP_IMAGES","resetState","__THREE_DEVTOOLS__","CustomEvent","detail","physicallyCorrectLights","outputEncoding","$d5b33d7c30034067$export$a2f65229194348f9","$d5b33d7c30034067$export$a178c45366ce5d6b","$d5b33d7c30034067$var$_inverseMatrix","$d5b33d7c30034067$var$_ray","$d5b33d7c30034067$var$_sphere","$d5b33d7c30034067$var$_position$2","$d5b33d7c30034067$export$1c787534cb11aa3e","threshold","Points","localThreshold","localThresholdSq","$d5b33d7c30034067$var$testPoint","rayPointDistanceSq","intersectPoint","distanceToRay","$d5b33d7c30034067$export$b0e83c3ef8d2db1","arcLengthDivisions","getPoint","getPointAt","optionalTarget","getUtoTmapping","getPoints","divisions","getSpacedPoints","getLength","lengths","getLengths","cacheArcLengths","current","last","updateArcLengths","targetArcLength","arcLengths","low","high","comparison","lengthBefore","lengthAfter","getTangent","t2","pt1","pt2","getTangentAt","computeFrenetFrames","segments","closed","binormals","vec","mat","MAX_VALUE","tz","json","$d5b33d7c30034067$export$3f87a931616cde04","aX","aY","xRadius","yRadius","aStartAngle","aEndAngle","aClockwise","aRotation","isEllipseCurve","twoPi","deltaAngle","samePoints","$d5b33d7c30034067$var$CubicPoly","c0","initCatmullRom","x3","tension","initNonuniformCatmullRom","dt0","dt1","dt2","calc","$d5b33d7c30034067$var$tmp","$d5b33d7c30034067$var$px","$d5b33d7c30034067$var$py","$d5b33d7c30034067$var$pz","$d5b33d7c30034067$var$CatmullRom","$d5b33d7c30034067$var$QuadraticBezier","$d5b33d7c30034067$var$QuadraticBezierP0","$d5b33d7c30034067$var$CubicBezier","$d5b33d7c30034067$var$CubicBezierP0","$d5b33d7c30034067$var$CubicBezierP1","$d5b33d7c30034067$export$e36650d36468bb39","isCubicBezierCurve","$d5b33d7c30034067$export$ab2e07e76531a47e","isLineCurve","$d5b33d7c30034067$export$5938c4ee491a43ad","isQuadraticBezierCurve","$d5b33d7c30034067$export$bf3f4c7e459f90fc","isQuadraticBezierCurve3","$d5b33d7c30034067$export$d3bdd77da77afc1b","isSplineCurve","intPoint","$d5b33d7c30034067$var$Curves","freeze","__proto__","ArcCurve","aRadius","isArcCurve","CatmullRomCurve3","curveType","isCatmullRomCurve3","CubicBezierCurve","CubicBezierCurve3","isCubicBezierCurve3","EllipseCurve","LineCurve","LineCurve3","isLineCurve3","QuadraticBezierCurve","QuadraticBezierCurve3","SplineCurve","$d5b33d7c30034067$export$4aaf9b66af1bbf2c","curves","autoClose","curve","closePath","startPoint","endPoint","curveLengths","getCurveLengths","diff","segmentLength","lens","cacheLengths","sums","pts","$d5b33d7c30034067$export$4b2950bdac9b6ee9","currentPoint","moveTo","lineTo","quadraticCurveTo","aCPx","aCPy","bezierCurveTo","aCP1x","aCP1y","aCP2x","aCP2y","splineThru","npts","arc","absarc","absellipse","ellipse","firstPoint","lastPoint","$d5b33d7c30034067$export$6d839803fcd1882c","phiStart","phiLength","initNormals","inverseSegments","vertex","curNormal","prevNormal","base","$d5b33d7c30034067$export$41680e8551036033","capSegments","radialSegments","$d5b33d7c30034067$export$d5c0e8d607467193","thetaStart","thetaLength","segment","$d5b33d7c30034067$export$68f745719dbe5198","radiusTop","radiusBottom","openEnded","indexArray","generateCap","centerIndexStart","centerIndexEnd","cosTheta","sinTheta","slope","indexRow","$d5b33d7c30034067$export$a7a48974f285c9b3","$d5b33d7c30034067$export$60e57a7d3f20ff65","vertexBuffer","uvBuffer","pushVertex","getVertexByIndex","correctUV","azimuth","cols","aj","bj","rows","inclination","correctUVs","centroid","azi","correctSeam","details","$d5b33d7c30034067$export$c0babfeb8708fc9c","$d5b33d7c30034067$export$6428a7f2611ef1fa","holes","getPointsHoles","holesPts","extractPoints","hole","$d5b33d7c30034067$var$Earcut","triangulate","holeIndices","dim","minX","minY","maxX","maxY","invSize","hasHoles","outerLen","outerNode","$d5b33d7c30034067$var$linkedList","prev","$d5b33d7c30034067$var$eliminateHoles","queue","steiner","$d5b33d7c30034067$var$getLeftmost","leftmost","$d5b33d7c30034067$var$compareX","$d5b33d7c30034067$var$eliminateHole","bridge","$d5b33d7c30034067$var$findHoleBridge","hx","hy","mx","my","tanMin","$d5b33d7c30034067$var$pointInTriangle","$d5b33d7c30034067$var$locallyInside","$d5b33d7c30034067$var$area","bridgeReverse","$d5b33d7c30034067$var$splitPolygon","$d5b33d7c30034067$var$filterPoints","$d5b33d7c30034067$var$earcutLinked","ear","pass","$d5b33d7c30034067$var$indexCurve","$d5b33d7c30034067$var$zOrder","prevZ","nextZ","$d5b33d7c30034067$var$sortLinked","tail","numMerges","pSize","qSize","inSize","$d5b33d7c30034067$var$isEarHashed","minZ","maxZ","$d5b33d7c30034067$var$isEar","$d5b33d7c30034067$var$removeNode","$d5b33d7c30034067$var$cureLocalIntersections","$d5b33d7c30034067$var$equals","$d5b33d7c30034067$var$intersects","$d5b33d7c30034067$var$splitEarcut","$d5b33d7c30034067$var$intersectsPolygon","$d5b33d7c30034067$var$middleInside","inside","px","py","clockwise","$d5b33d7c30034067$var$signedArea","$d5b33d7c30034067$var$insertNode","again","q1","q2","o1","$d5b33d7c30034067$var$sign","o2","o3","o4","$d5b33d7c30034067$var$onSegment","num","a2","$d5b33d7c30034067$var$Node","b2","an","bp","$d5b33d7c30034067$export$96bdf6d9c66d7ba8","area","contour","isClockWise","triangulateShape","faces","$d5b33d7c30034067$var$removeDupEndPts","$d5b33d7c30034067$var$addContour","holeIndex","$d5b33d7c30034067$export$598697a1efa63ca7","verticesArray","uvArray","addShape","splineTube","binormal","position2","placeholder","curveSegments","steps","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","extrudePath","uvgen","UVGenerator","$d5b33d7c30034067$var$WorldUVGenerator","extrudePts","extrudeByPath","shapePoints","reverse","hl","ahole","scalePt2","pt","vlen","flen","getBevelVec","inPt","inPrev","inNext","v_trans_x","v_trans_y","shrink_by","v_prev_x","v_prev_y","v_next_x","v_next_y","v_prev_lensq","collinear0","v_prev_len","v_next_len","ptPrevShift_x","ptPrevShift_y","ptNextShift_x","ptNextShift_y","sf","v_trans_lensq","direction_eq","contourMovements","holesMovements","oneHoleMovements","verticesMovements","bs","vert","sidewalls","layeroffset","sl","slen1","slen2","f4","addVertex","nextIndex","generateSideWallUV","addUV","f3","generateTopUV","vector2","$d5b33d7c30034067$var$toJSON$1","geometryShapes","indexA","indexB","indexC","a_x","a_y","b_x","b_y","c_x","c_y","indexD","a_z","b_z","c_z","d_x","d_y","d_z","$d5b33d7c30034067$export$9567cc828c9535da","$d5b33d7c30034067$export$1954e2b809fe361e","$d5b33d7c30034067$export$68cb731f50f614af","innerRadius","outerRadius","thetaSegments","phiSegments","radiusStep","thetaSegmentLevel","$d5b33d7c30034067$export$57a29a1c803e9065","indexOffset","shapeVertices","shapeHoles","shapeHole","$d5b33d7c30034067$var$toJSON","$d5b33d7c30034067$export$1b417fc3b307a251","thetaEnd","grid","verticesRow","uOffset","$d5b33d7c30034067$export$fb3f7adc68bd6e02","$d5b33d7c30034067$export$a2312a2a1fa56495","tube","tubularSegments","$d5b33d7c30034067$export$77e9bfadfb9ab8c8","P1","P2","B","T","N","calculatePositionOnCurve","quOverP","cs","$d5b33d7c30034067$export$7897d9d48904490c","frames","P","generateSegment","$d5b33d7c30034067$var$arraySlice","$d5b33d7c30034067$var$isTypedArray","$d5b33d7c30034067$var$convertArray","forceClone","ArrayBuffer","isView","DataView","$d5b33d7c30034067$export$b558baee9c0f72d3","parameterPositions","sampleValues","sampleSize","resultBuffer","_cachedIndex","valueSize","settings","DefaultSettings_","evaluate","pp","validate_interval","seek","linear_scan","forward_scan","giveUpAt","copySampleValue_","t1global","mid","intervalChanged_","interpolate_","getSettings_","$d5b33d7c30034067$export$3646682e7a3959","_weightPrev","_offsetPrev","_weightNext","_offsetNext","endingStart","endingEnd","iPrev","iNext","tPrev","tNext","halfDt","o0","oP","oN","wP","wN","ppp","sP","sN","$d5b33d7c30034067$export$a8e6009059f51e1a","offset1","offset0","weight1","weight0","$d5b33d7c30034067$export$fb9758ef7ef8d5cc","$d5b33d7c30034067$export$b0e479f45b7006d6","times","interpolation","TimeBufferType","ValueBufferType","setInterpolation","DefaultInterpolation","track","trackType","ValueTypeName","InterpolantFactoryMethodDiscrete","getValueSize","InterpolantFactoryMethodLinear","InterpolantFactoryMethodSmooth","factoryMethod","createInterpolant","timeOffset","timeScale","startTime","endTime","nKeys","validate","valid","prevTime","currTime","optimize","smoothInterpolation","writeIndex","keep","timeNext","offsetP","offsetN","readOffset","writeOffset","TypedKeyframeTrack","$d5b33d7c30034067$export$d3a344b98cf0b775","$d5b33d7c30034067$export$83444c5d885347d8","$d5b33d7c30034067$export$d45f0d1a4d9a9314","$d5b33d7c30034067$export$2db1cfb7923d931e","$d5b33d7c30034067$export$b8043f12b5aafbd7","$d5b33d7c30034067$export$6ce41d4f3a8df9cd","$d5b33d7c30034067$export$5ce2dcb4cc9f2bff","$d5b33d7c30034067$export$94affb487e701bf2","files","file","$d5b33d7c30034067$export$99cc795e99919eed","onLoad","onProgress","onError","urlModifier","isLoading","itemsLoaded","itemsTotal","handlers","onStart","itemStart","itemEnd","itemError","resolveURL","setURLModifier","addHandler","regex","loader","removeHandler","getHandler","global","$d5b33d7c30034067$export$b033c3f9a95c6a16","$d5b33d7c30034067$export$3b0d6d7590275603","manager","crossOrigin","withCredentials","resourcePath","requestHeader","load","loadAsync","Promise","resolve","reject","setCrossOrigin","setWithCredentials","setPath","setResourcePath","setRequestHeader","DEFAULT_MATERIAL_NAME","$d5b33d7c30034067$export$8905ce1c7a2464a1","setTimeout","onImageLoad","removeEventListeners","onImageError","$d5b33d7c30034067$var$_RESERVED_CHARS_RE","$d5b33d7c30034067$var$_reservedRe","RegExp","$d5b33d7c30034067$var$_wordChar","$d5b33d7c30034067$var$_wordCharOrDot","$d5b33d7c30034067$var$_directoryRe","$d5b33d7c30034067$var$_nodeRe","$d5b33d7c30034067$var$_objectRe","$d5b33d7c30034067$var$_propertyRe","$d5b33d7c30034067$var$_trackRe","$d5b33d7c30034067$var$_supportedObjectNames","$d5b33d7c30034067$export$7bf70fcf9f891893","rootNode","parsedPath","parseTrackName","node","findNode","nodeName","getValue","_getValue_unbound","_setValue_unbound","create","root","isAnimationObjectGroup","Composite","sanitizeNodeName","trackName","matches","results","objectName","objectIndex","propertyName","propertyIndex","lastDot","lastIndexOf","substring","bone","getBoneByName","searchNodeSubtree","childNode","subTreeNode","_getValue_unavailable","_setValue_unavailable","_getValue_direct","targetObject","_getValue_array","resolvedProperty","_getValue_arrayElement","_getValue_toArray","_setValue_direct","_setValue_direct_setNeedsUpdate","_setValue_direct_setMatrixWorldNeedsUpdate","_setValue_array","dest","_setValue_array_setNeedsUpdate","_setValue_array_setMatrixWorldNeedsUpdate","_setValue_arrayElement","_setValue_arrayElement_setNeedsUpdate","_setValue_arrayElement_setMatrixWorldNeedsUpdate","_setValue_fromArray","_setValue_fromArray_setNeedsUpdate","_setValue_fromArray_setMatrixWorldNeedsUpdate","targetArray","sourceArray","bones","nodeProperty","versioning","Versioning","None","NeedsUpdate","MatrixWorldNeedsUpdate","bindingType","BindingType","Direct","ArrayElement","HasFromToArray","EntireArray","GetterByBindingType","SetterByBindingTypeAndVersioning","unbind","targetGroup","optionalParsedPath","_targetGroup","_bindings","subscribe_","firstValidIndex","nCachedObjects_","binding","bindings","revision","window","__THREE__","$a4e30d08b53515ba$export$2e2bcd8739ae039","isWebGLAvailable","createElement","isWebGL2Available","getWebGLErrorMessage","getErrorMessage","getWebGL2ErrorMessage","contexts","fontFamily","fontSize","fontWeight","textAlign","padding","margin","names","innerHTML","gsap","registerPlugin","ScrollTrigger","$efd3ba4ec2608b1d$var$scene","$efd3ba4ec2608b1d$var$camera","innerWidth","innerHeight","$efd3ba4ec2608b1d$var$renderer","body","appendChild","$efd3ba4ec2608b1d$var$geometry","$efd3ba4ec2608b1d$var$material","$efd3ba4ec2608b1d$var$geometry2","$efd3ba4ec2608b1d$var$material2","$efd3ba4ec2608b1d$var$geometry3","$efd3ba4ec2608b1d$var$material3","$efd3ba4ec2608b1d$var$mesh","$efd3ba4ec2608b1d$var$mesh2","$efd3ba4ec2608b1d$var$mesh3","$efd3ba4ec2608b1d$var$getRandomParticelPos","particleCount","arr","$efd3ba4ec2608b1d$var$geometrys","$efd3ba4ec2608b1d$var$loader","$efd3ba4ec2608b1d$var$materials","$efd3ba4ec2608b1d$var$starsT1","$efd3ba4ec2608b1d$var$starsT2","$efd3ba4ec2608b1d$var$loadingManager","$efd3ba4ec2608b1d$var$progressBar","getElementById","loaded","total","$efd3ba4ec2608b1d$var$progressBarContainer","querySelector","onscroll","getBoundingClientRect","$efd3ba4ec2608b1d$var$animate","warning"],"version":3,"file":"index.c4e12884.js.map"}