fork download
  1. (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  2. module.exports={
  3. "positions": [
  4. [
  5. 111.0246,
  6. 52.6046,
  7. 46.2259
  8. ],
  9. [
  10. 114.025,
  11. 87.6733,
  12. 58.9818
  13. ],
  14. [
  15. 66.192,
  16. 80.898,
  17. 55.3943
  18. ],
  19. [
  20. 72.1133,
  21. 35.4918,
  22. 30.8714
  23. ],
  24. [
  25. 97.8045,
  26. 116.561,
  27. 73.9788
  28. ],
  29. [
  30. 16.7623,
  31. 58.0109,
  32. 58.0782
  33. ],
  34. [
  35. 52.6089,
  36. 30.3641,
  37. 42.5561
  38. ],
  39. [
  40. 106.8814,
  41. 31.9455,
  42. 46.9133
  43. ],
  44. [
  45. 113.4846,
  46. 38.6049,
  47. 49.1215
  48. ],
  49. [
  50. 108.6633,
  51. 43.2332,
  52. 46.3154
  53. ],
  54. [
  55. 101.2166,
  56. 15.9822,
  57. 46.3082
  58. ],
  59. [
  60. 16.6605,
  61. -16.2883,
  62. 93.6187
  63. ],
  64. [
  65. 40.775,
  66. -10.2288,
  67. 85.2764
  68. ],
  69. [
  70. 23.9269,
  71. -2.5103,
  72. 86.7365
  73. ],
  74. [
  75. 11.1691,
  76. -7.0037,
  77. 99.3776
  78. ],
  79. [
  80. 9.5692,
  81. -34.3939,
  82. 141.672
  83. ],
  84. [
  85. 12.596,
  86. 7.1655,
  87. 88.741
  88. ],
  89. [
  90. 61.1809,
  91. 8.8142,
  92. 76.9968
  93. ],
  94. [
  95. 39.7195,
  96. -28.9271,
  97. 88.9638
  98. ],
  99. [
  100. 13.7962,
  101. -68.5757,
  102. 132.057
  103. ],
  104. [
  105. 15.2674,
  106. -62.32,
  107. 129.688
  108. ],
  109. [
  110. 14.8446,
  111. -52.6096,
  112. 140.113
  113. ],
  114. [
  115. 12.8917,
  116. -49.7716,
  117. 144.741
  118. ],
  119. [
  120. 35.6042,
  121. -71.758,
  122. 81.0639
  123. ],
  124. [
  125. 47.4625,
  126. -68.6061,
  127. 63.3697
  128. ],
  129. [
  130. 38.2486,
  131. -64.7302,
  132. 38.9099
  133. ],
  134. [
  135. -12.8917,
  136. -49.7716,
  137. 144.741
  138. ],
  139. [
  140. -13.7962,
  141. -68.5757,
  142. 132.057
  143. ],
  144. [
  145. 17.8021,
  146. -71.758,
  147. 81.0639
  148. ],
  149. [
  150. 19.1243,
  151. -69.0168,
  152. 49.4201
  153. ],
  154. [
  155. 38.2486,
  156. -66.2756,
  157. 17.7762
  158. ],
  159. [
  160. 12.8928,
  161. -36.7035,
  162. 141.672
  163. ],
  164. [
  165. 109.284,
  166. -93.5899,
  167. 27.8243
  168. ],
  169. [
  170. 122.118,
  171. -36.8894,
  172. 35.025
  173. ],
  174. [
  175. 67.7668,
  176. -30.197,
  177. 78.4178
  178. ],
  179. [
  180. 33.1807,
  181. 101.852,
  182. 25.3186
  183. ],
  184. [
  185. 9.4063,
  186. -35.5898,
  187. 150.722
  188. ],
  189. [
  190. -9.5692,
  191. -34.3939,
  192. 141.672
  193. ],
  194. [
  195. -9.4063,
  196. -35.5898,
  197. 150.722
  198. ],
  199. [
  200. 11.4565,
  201. -37.8994,
  202. 150.722
  203. ],
  204. [
  205. -12.596,
  206. 7.1655,
  207. 88.741
  208. ],
  209. [
  210. -11.1691,
  211. -7.0037,
  212. 99.3776
  213. ],
  214. [
  215. 70.2365,
  216. 62.8362,
  217. -3.9475
  218. ],
  219. [
  220. 47.2634,
  221. 54.294,
  222. -27.4148
  223. ],
  224. [
  225. 28.7302,
  226. 91.7311,
  227. -24.9726
  228. ],
  229. [
  230. 69.1676,
  231. 6.5862,
  232. -12.7757
  233. ],
  234. [
  235. 28.7302,
  236. 49.1003,
  237. -48.3596
  238. ],
  239. [
  240. 31.903,
  241. 5.692,
  242. -47.822
  243. ],
  244. [
  245. 35.0758,
  246. -34.4329,
  247. -16.2809
  248. ],
  249. [
  250. 115.2841,
  251. 48.6815,
  252. 48.6841
  253. ],
  254. [
  255. 110.8428,
  256. 28.4821,
  257. 49.1762
  258. ],
  259. [
  260. -19.1243,
  261. -69.0168,
  262. 49.4201
  263. ],
  264. [
  265. -38.2486,
  266. -66.2756,
  267. 17.7762
  268. ],
  269. [
  270. -111.0246,
  271. 52.6046,
  272. 46.2259
  273. ],
  274. [
  275. -72.1133,
  276. 35.4918,
  277. 30.8714
  278. ],
  279. [
  280. -66.192,
  281. 80.898,
  282. 55.3943
  283. ],
  284. [
  285. -114.025,
  286. 87.6733,
  287. 58.9818
  288. ],
  289. [
  290. -97.8045,
  291. 116.561,
  292. 73.9788
  293. ],
  294. [
  295. -52.6089,
  296. 30.3641,
  297. 42.5561
  298. ],
  299. [
  300. -16.7623,
  301. 58.0109,
  302. 58.0782
  303. ],
  304. [
  305. -106.8814,
  306. 31.9455,
  307. 46.9133
  308. ],
  309. [
  310. -108.6633,
  311. 43.2332,
  312. 46.3154
  313. ],
  314. [
  315. -113.4846,
  316. 38.6049,
  317. 49.1215
  318. ],
  319. [
  320. -101.2166,
  321. 15.9822,
  322. 46.3082
  323. ],
  324. [
  325. -16.6605,
  326. -16.2883,
  327. 93.6187
  328. ],
  329. [
  330. -23.9269,
  331. -2.5103,
  332. 86.7365
  333. ],
  334. [
  335. -40.775,
  336. -10.2288,
  337. 85.2764
  338. ],
  339. [
  340. -61.1809,
  341. 8.8142,
  342. 76.9968
  343. ],
  344. [
  345. -39.7195,
  346. -28.9271,
  347. 88.9638
  348. ],
  349. [
  350. -14.8446,
  351. -52.6096,
  352. 140.113
  353. ],
  354. [
  355. -15.2674,
  356. -62.32,
  357. 129.688
  358. ],
  359. [
  360. -47.4625,
  361. -68.6061,
  362. 63.3697
  363. ],
  364. [
  365. -35.6042,
  366. -71.758,
  367. 81.0639
  368. ],
  369. [
  370. -38.2486,
  371. -64.7302,
  372. 38.9099
  373. ],
  374. [
  375. -17.8021,
  376. -71.758,
  377. 81.0639
  378. ],
  379. [
  380. -12.8928,
  381. -36.7035,
  382. 141.672
  383. ],
  384. [
  385. -67.7668,
  386. -30.197,
  387. 78.4178
  388. ],
  389. [
  390. -122.118,
  391. -36.8894,
  392. 35.025
  393. ],
  394. [
  395. -109.284,
  396. -93.5899,
  397. 27.8243
  398. ],
  399. [
  400. -33.1807,
  401. 101.852,
  402. 25.3186
  403. ],
  404. [
  405. -11.4565,
  406. -37.8994,
  407. 150.722
  408. ],
  409. [
  410. -70.2365,
  411. 62.8362,
  412. -3.9475
  413. ],
  414. [
  415. -28.7302,
  416. 91.7311,
  417. -24.9726
  418. ],
  419. [
  420. -47.2634,
  421. 54.294,
  422. -27.4148
  423. ],
  424. [
  425. -69.1676,
  426. 6.5862,
  427. -12.7757
  428. ],
  429. [
  430. -28.7302,
  431. 49.1003,
  432. -48.3596
  433. ],
  434. [
  435. -31.903,
  436. 5.692,
  437. -47.822
  438. ],
  439. [
  440. -35.0758,
  441. -34.4329,
  442. -16.2809
  443. ],
  444. [
  445. -115.2841,
  446. 48.6815,
  447. 48.6841
  448. ],
  449. [
  450. -110.8428,
  451. 28.4821,
  452. 49.1762
  453. ]
  454. ],
  455. "chunks": [
  456. {
  457. "color": [
  458. 246,
  459. 133,
  460. 27
  461. ],
  462. "faces": [
  463. [
  464. 17,
  465. 33,
  466. 10
  467. ],
  468. [
  469. 17,
  470. 18,
  471. 34
  472. ],
  473. [
  474. 34,
  475. 33,
  476. 17
  477. ],
  478. [
  479. 10,
  480. 6,
  481. 17
  482. ],
  483. [
  484. 11,
  485. 15,
  486. 31
  487. ],
  488. [
  489. 31,
  490. 18,
  491. 11
  492. ],
  493. [
  494. 18,
  495. 12,
  496. 11
  497. ],
  498. [
  499. 14,
  500. 16,
  501. 40
  502. ],
  503. [
  504. 40,
  505. 41,
  506. 14
  507. ],
  508. [
  509. 59,
  510. 5,
  511. 35
  512. ],
  513. [
  514. 35,
  515. 79,
  516. 59
  517. ],
  518. [
  519. 67,
  520. 63,
  521. 77
  522. ],
  523. [
  524. 67,
  525. 77,
  526. 76
  527. ],
  528. [
  529. 76,
  530. 68,
  531. 67
  532. ],
  533. [
  534. 63,
  535. 67,
  536. 58
  537. ],
  538. [
  539. 64,
  540. 68,
  541. 75
  542. ],
  543. [
  544. 75,
  545. 37,
  546. 64
  547. ],
  548. [
  549. 68,
  550. 64,
  551. 66
  552. ],
  553. [
  554. 14,
  555. 41,
  556. 37
  557. ],
  558. [
  559. 37,
  560. 15,
  561. 14
  562. ],
  563. [
  564. 5,
  565. 59,
  566. 40
  567. ],
  568. [
  569. 40,
  570. 16,
  571. 5
  572. ]
  573. ]
  574. },
  575. {
  576. "color": [
  577. 228,
  578. 118,
  579. 27
  580. ],
  581. "faces": [
  582. [
  583. 31,
  584. 24,
  585. 18
  586. ],
  587. [
  588. 6,
  589. 5,
  590. 16
  591. ],
  592. [
  593. 16,
  594. 17,
  595. 6
  596. ],
  597. [
  598. 24,
  599. 32,
  600. 33
  601. ],
  602. [
  603. 33,
  604. 34,
  605. 24
  606. ],
  607. [
  608. 5,
  609. 4,
  610. 35
  611. ],
  612. [
  613. 75,
  614. 68,
  615. 71
  616. ],
  617. [
  618. 58,
  619. 67,
  620. 40
  621. ],
  622. [
  623. 40,
  624. 59,
  625. 58
  626. ],
  627. [
  628. 71,
  629. 76,
  630. 77
  631. ],
  632. [
  633. 77,
  634. 78,
  635. 71
  636. ]
  637. ]
  638. },
  639. {
  640. "color": [
  641. 118,
  642. 61,
  643. 22
  644. ],
  645. "faces": [
  646. [
  647. 0,
  648. 1,
  649. 2
  650. ],
  651. [
  652. 2,
  653. 3,
  654. 0
  655. ],
  656. [
  657. 4,
  658. 5,
  659. 2
  660. ],
  661. [
  662. 6,
  663. 3,
  664. 2
  665. ],
  666. [
  667. 2,
  668. 5,
  669. 6
  670. ],
  671. [
  672. 7,
  673. 8,
  674. 9
  675. ],
  676. [
  677. 10,
  678. 3,
  679. 6
  680. ],
  681. [
  682. 10,
  683. 50,
  684. 7
  685. ],
  686. [
  687. 7,
  688. 3,
  689. 10
  690. ],
  691. [
  692. 7,
  693. 9,
  694. 3
  695. ],
  696. [
  697. 49,
  698. 0,
  699. 9
  700. ],
  701. [
  702. 3,
  703. 9,
  704. 0
  705. ],
  706. [
  707. 53,
  708. 54,
  709. 55
  710. ],
  711. [
  712. 55,
  713. 56,
  714. 53
  715. ],
  716. [
  717. 57,
  718. 56,
  719. 55
  720. ],
  721. [
  722. 58,
  723. 59,
  724. 55
  725. ],
  726. [
  727. 55,
  728. 54,
  729. 58
  730. ],
  731. [
  732. 60,
  733. 61,
  734. 62
  735. ],
  736. [
  737. 63,
  738. 58,
  739. 54
  740. ],
  741. [
  742. 63,
  743. 60,
  744. 89
  745. ],
  746. [
  747. 60,
  748. 63,
  749. 54
  750. ],
  751. [
  752. 60,
  753. 54,
  754. 61
  755. ],
  756. [
  757. 88,
  758. 61,
  759. 53
  760. ],
  761. [
  762. 54,
  763. 53,
  764. 61
  765. ],
  766. [
  767. 2,
  768. 1,
  769. 4
  770. ],
  771. [
  772. 55,
  773. 59,
  774. 57
  775. ]
  776. ]
  777. },
  778. {
  779. "color": [
  780. 22,
  781. 22,
  782. 22
  783. ],
  784. "faces": [
  785. [
  786. 36,
  787. 15,
  788. 37
  789. ],
  790. [
  791. 37,
  792. 38,
  793. 36
  794. ],
  795. [
  796. 31,
  797. 39,
  798. 22
  799. ],
  800. [
  801. 22,
  802. 21,
  803. 31
  804. ],
  805. [
  806. 31,
  807. 15,
  808. 36
  809. ],
  810. [
  811. 36,
  812. 39,
  813. 31
  814. ],
  815. [
  816. 75,
  817. 69,
  818. 26
  819. ],
  820. [
  821. 26,
  822. 80,
  823. 75
  824. ],
  825. [
  826. 75,
  827. 80,
  828. 38
  829. ],
  830. [
  831. 38,
  832. 37,
  833. 75
  834. ],
  835. [
  836. 38,
  837. 80,
  838. 39
  839. ],
  840. [
  841. 39,
  842. 36,
  843. 38
  844. ],
  845. [
  846. 39,
  847. 80,
  848. 26
  849. ],
  850. [
  851. 26,
  852. 22,
  853. 39
  854. ]
  855. ]
  856. },
  857. {
  858. "color": [
  859. 215,
  860. 193,
  861. 179
  862. ],
  863. "faces": [
  864. [
  865. 21,
  866. 20,
  867. 24
  868. ],
  869. [
  870. 24,
  871. 31,
  872. 21
  873. ],
  874. [
  875. 69,
  876. 71,
  877. 70
  878. ],
  879. [
  880. 71,
  881. 69,
  882. 75
  883. ]
  884. ]
  885. },
  886. {
  887. "color": [
  888. 192,
  889. 173,
  890. 158
  891. ],
  892. "faces": [
  893. [
  894. 19,
  895. 20,
  896. 21
  897. ],
  898. [
  899. 21,
  900. 22,
  901. 19
  902. ],
  903. [
  904. 20,
  905. 19,
  906. 23
  907. ],
  908. [
  909. 23,
  910. 24,
  911. 20
  912. ],
  913. [
  914. 23,
  915. 25,
  916. 24
  917. ],
  918. [
  919. 19,
  920. 22,
  921. 26
  922. ],
  923. [
  924. 26,
  925. 27,
  926. 19
  927. ],
  928. [
  929. 23,
  930. 28,
  931. 29
  932. ],
  933. [
  934. 23,
  935. 29,
  936. 30
  937. ],
  938. [
  939. 25,
  940. 23,
  941. 30
  942. ],
  943. [
  944. 29,
  945. 51,
  946. 52
  947. ],
  948. [
  949. 52,
  950. 30,
  951. 29
  952. ],
  953. [
  954. 27,
  955. 26,
  956. 69
  957. ],
  958. [
  959. 69,
  960. 70,
  961. 27
  962. ],
  963. [
  964. 70,
  965. 71,
  966. 72
  967. ],
  968. [
  969. 72,
  970. 27,
  971. 70
  972. ],
  973. [
  974. 72,
  975. 71,
  976. 73
  977. ],
  978. [
  979. 51,
  980. 74,
  981. 72
  982. ],
  983. [
  984. 52,
  985. 51,
  986. 72
  987. ],
  988. [
  989. 73,
  990. 52,
  991. 72
  992. ],
  993. [
  994. 19,
  995. 27,
  996. 74
  997. ],
  998. [
  999. 74,
  1000. 28,
  1001. 19
  1002. ],
  1003. [
  1004. 51,
  1005. 29,
  1006. 28
  1007. ],
  1008. [
  1009. 28,
  1010. 74,
  1011. 51
  1012. ],
  1013. [
  1014. 74,
  1015. 27,
  1016. 72
  1017. ],
  1018. [
  1019. 28,
  1020. 23,
  1021. 19
  1022. ]
  1023. ]
  1024. },
  1025. {
  1026. "color": [
  1027. 205,
  1028. 97,
  1029. 22
  1030. ],
  1031. "faces": [
  1032. [
  1033. 24,
  1034. 34,
  1035. 18
  1036. ],
  1037. [
  1038. 16,
  1039. 13,
  1040. 12
  1041. ],
  1042. [
  1043. 12,
  1044. 17,
  1045. 16
  1046. ],
  1047. [
  1048. 13,
  1049. 16,
  1050. 11
  1051. ],
  1052. [
  1053. 71,
  1054. 68,
  1055. 76
  1056. ],
  1057. [
  1058. 40,
  1059. 67,
  1060. 66
  1061. ],
  1062. [
  1063. 66,
  1064. 65,
  1065. 40
  1066. ],
  1067. [
  1068. 65,
  1069. 64,
  1070. 40
  1071. ]
  1072. ]
  1073. },
  1074. {
  1075. "color": [
  1076. 35,
  1077. 52,
  1078. 71
  1079. ],
  1080. "faces": [
  1081. [
  1082. 11,
  1083. 12,
  1084. 13
  1085. ],
  1086. [
  1087. 64,
  1088. 65,
  1089. 66
  1090. ]
  1091. ]
  1092. },
  1093. {
  1094. "color": [
  1095. 228,
  1096. 117,
  1097. 31
  1098. ],
  1099. "faces": [
  1100. [
  1101. 14,
  1102. 15,
  1103. 11
  1104. ],
  1105. [
  1106. 11,
  1107. 16,
  1108. 14
  1109. ],
  1110. [
  1111. 17,
  1112. 12,
  1113. 18
  1114. ],
  1115. [
  1116. 41,
  1117. 64,
  1118. 37
  1119. ],
  1120. [
  1121. 67,
  1122. 68,
  1123. 66
  1124. ]
  1125. ]
  1126. },
  1127. {
  1128. "color": [
  1129. 226,
  1130. 118,
  1131. 27
  1132. ],
  1133. "faces": [
  1134. [
  1135. 35,
  1136. 4,
  1137. 42
  1138. ],
  1139. [
  1140. 4,
  1141. 1,
  1142. 42
  1143. ],
  1144. [
  1145. 42,
  1146. 43,
  1147. 44
  1148. ],
  1149. [
  1150. 44,
  1151. 35,
  1152. 42
  1153. ],
  1154. [
  1155. 45,
  1156. 43,
  1157. 42
  1158. ],
  1159. [
  1160. 42,
  1161. 10,
  1162. 45
  1163. ],
  1164. [
  1165. 30,
  1166. 32,
  1167. 24
  1168. ],
  1169. [
  1170. 24,
  1171. 25,
  1172. 30
  1173. ],
  1174. [
  1175. 30,
  1176. 33,
  1177. 32
  1178. ],
  1179. [
  1180. 33,
  1181. 30,
  1182. 10
  1183. ],
  1184. [
  1185. 44,
  1186. 43,
  1187. 46
  1188. ],
  1189. [
  1190. 43,
  1191. 45,
  1192. 47
  1193. ],
  1194. [
  1195. 47,
  1196. 46,
  1197. 43
  1198. ],
  1199. [
  1200. 48,
  1201. 47,
  1202. 45
  1203. ],
  1204. [
  1205. 45,
  1206. 30,
  1207. 48
  1208. ],
  1209. [
  1210. 30,
  1211. 45,
  1212. 10
  1213. ],
  1214. [
  1215. 49,
  1216. 42,
  1217. 0
  1218. ],
  1219. [
  1220. 8,
  1221. 7,
  1222. 42
  1223. ],
  1224. [
  1225. 50,
  1226. 42,
  1227. 7
  1228. ],
  1229. [
  1230. 50,
  1231. 10,
  1232. 42
  1233. ],
  1234. [
  1235. 1,
  1236. 0,
  1237. 42
  1238. ],
  1239. [
  1240. 42,
  1241. 9,
  1242. 8
  1243. ],
  1244. [
  1245. 42,
  1246. 49,
  1247. 9
  1248. ],
  1249. [
  1250. 64,
  1251. 41,
  1252. 40
  1253. ],
  1254. [
  1255. 57,
  1256. 59,
  1257. 79
  1258. ],
  1259. [
  1260. 79,
  1261. 81,
  1262. 57
  1263. ],
  1264. [
  1265. 57,
  1266. 81,
  1267. 56
  1268. ],
  1269. [
  1270. 82,
  1271. 79,
  1272. 35
  1273. ],
  1274. [
  1275. 35,
  1276. 44,
  1277. 82
  1278. ],
  1279. [
  1280. 81,
  1281. 79,
  1282. 82
  1283. ],
  1284. [
  1285. 82,
  1286. 83,
  1287. 81
  1288. ],
  1289. [
  1290. 84,
  1291. 63,
  1292. 81
  1293. ],
  1294. [
  1295. 81,
  1296. 83,
  1297. 84
  1298. ],
  1299. [
  1300. 44,
  1301. 46,
  1302. 85
  1303. ],
  1304. [
  1305. 85,
  1306. 82,
  1307. 44
  1308. ],
  1309. [
  1310. 52,
  1311. 73,
  1312. 71
  1313. ],
  1314. [
  1315. 71,
  1316. 78,
  1317. 52
  1318. ],
  1319. [
  1320. 52,
  1321. 78,
  1322. 77
  1323. ],
  1324. [
  1325. 77,
  1326. 63,
  1327. 52
  1328. ],
  1329. [
  1330. 82,
  1331. 85,
  1332. 83
  1333. ],
  1334. [
  1335. 83,
  1336. 85,
  1337. 86
  1338. ],
  1339. [
  1340. 86,
  1341. 84,
  1342. 83
  1343. ],
  1344. [
  1345. 87,
  1346. 52,
  1347. 84
  1348. ],
  1349. [
  1350. 84,
  1351. 86,
  1352. 87
  1353. ],
  1354. [
  1355. 52,
  1356. 63,
  1357. 84
  1358. ],
  1359. [
  1360. 88,
  1361. 53,
  1362. 81
  1363. ],
  1364. [
  1365. 62,
  1366. 81,
  1367. 60
  1368. ],
  1369. [
  1370. 89,
  1371. 60,
  1372. 81
  1373. ],
  1374. [
  1375. 89,
  1376. 81,
  1377. 63
  1378. ],
  1379. [
  1380. 56,
  1381. 81,
  1382. 53
  1383. ],
  1384. [
  1385. 81,
  1386. 62,
  1387. 61
  1388. ],
  1389. [
  1390. 81,
  1391. 61,
  1392. 88
  1393. ],
  1394. [
  1395. 48,
  1396. 87,
  1397. 86
  1398. ],
  1399. [
  1400. 86,
  1401. 47,
  1402. 48
  1403. ],
  1404. [
  1405. 47,
  1406. 86,
  1407. 85
  1408. ],
  1409. [
  1410. 85,
  1411. 46,
  1412. 47
  1413. ],
  1414. [
  1415. 48,
  1416. 30,
  1417. 52
  1418. ],
  1419. [
  1420. 52,
  1421. 87,
  1422. 48
  1423. ]
  1424. ]
  1425. }
  1426. ]
  1427. }
  1428.  
  1429. },{}],2:[function(require,module,exports){
  1430. var perspective = require('gl-mat4/perspective')
  1431. var multiply = require('gl-mat4/multiply')
  1432. var lookAt = require('gl-mat4/lookAt')
  1433. var invert = require('gl-mat4/invert')
  1434. var rotate = require('gl-mat4/rotate')
  1435. var transform = require('gl-vec3/transformMat4')
  1436. var foxJSON = require('./fox.json')
  1437.  
  1438. var SVG_NS = 'http://w...content-available-to-author-only...3.org/2000/svg'
  1439.  
  1440. function createNode (type) {
  1441. return document.createElementNS(SVG_NS, type)
  1442. }
  1443.  
  1444. function setAttribute (node, attribute, value) {
  1445. node.setAttributeNS(null, attribute, value)
  1446. }
  1447.  
  1448. module.exports = function createLogo (options_) {
  1449. var options = options_ || {}
  1450.  
  1451. var followCursor = !!options.followMouse
  1452. var slowDrift = !!options.slowDrift
  1453. var shouldRender = true
  1454.  
  1455. var DISTANCE = 400
  1456. var lookCurrent = [0, 0]
  1457. var lookRate = 0.3
  1458.  
  1459. var width = options.width || 400
  1460. var height = options.height || 400
  1461. var container = createNode('svg')
  1462.  
  1463. if (!options.pxNotRatio) {
  1464. width = (window.innerWidth * (options.width || 0.25)) | 0
  1465. height = ((window.innerHeight * options.height) || width) | 0
  1466. if ('minWidth' in options && width < options.minWidth) {
  1467. width = options.minWidth
  1468. height = (options.minWidth * options.height / options.width) | 0
  1469. }
  1470. }
  1471.  
  1472. setAttribute(container, 'width', width + 'px')
  1473. setAttribute(container, 'height', height + 'px')
  1474.  
  1475. var mouse = {
  1476. x: 0,
  1477. y: 0
  1478. }
  1479. window.addEventListener('mousemove', function (ev) {
  1480. if (followCursor) {
  1481. var target = {
  1482. x: ev.clientX,
  1483. y: ev.clientY,
  1484. }
  1485. setLookAt(target)
  1486. }
  1487. })
  1488.  
  1489. function setLookAt(target) {
  1490. var bounds = container.getBoundingClientRect()
  1491. mouse.x = 1.0 - 2.0 * (target.x - bounds.left) / bounds.width
  1492. mouse.y = 1.0 - 2.0 * (target.y - bounds.top) / bounds.height
  1493. }
  1494.  
  1495. document.body.appendChild(container)
  1496.  
  1497. var NUM_VERTS = foxJSON.positions.length
  1498.  
  1499. var positions = new Float32Array(3 * NUM_VERTS)
  1500. var transformed = new Float32Array(3 * NUM_VERTS)
  1501.  
  1502. ;(function () {
  1503. var pp = foxJSON.positions
  1504. var ptr = 0
  1505. for (var i = 0; i < pp.length; ++i) {
  1506. var p = pp[i]
  1507. for (var j = 0; j < 3; ++j) {
  1508. positions[ptr++] = p[j]
  1509. }
  1510. }
  1511. })()
  1512.  
  1513. function Polygon (svg, indices) {
  1514. this.svg = svg
  1515. this.indices = indices
  1516. this.zIndex = 0
  1517. }
  1518.  
  1519. var polygons = (function () {
  1520. var polygons = []
  1521. for (var i = 0; i < foxJSON.chunks.length; ++i) {
  1522. var chunk = foxJSON.chunks[i]
  1523. var color = 'rgb(' + chunk.color + ')'
  1524. var faces = chunk.faces
  1525. for (var j = 0; j < faces.length; ++j) {
  1526. var f = faces[j]
  1527. var polygon = createNode('polygon')
  1528. setAttribute(
  1529. polygon,
  1530. 'fill',
  1531. color)
  1532. setAttribute(
  1533. polygon,
  1534. 'stroke',
  1535. color)
  1536. setAttribute(
  1537. polygon,
  1538. 'points',
  1539. '0,0, 10,0, 0,10')
  1540. container.appendChild(polygon)
  1541. polygons.push(new Polygon(polygon, f))
  1542. }
  1543. }
  1544. return polygons
  1545. })()
  1546.  
  1547. var computeMatrix = (function () {
  1548. var objectCenter = new Float32Array(3)
  1549. var up = new Float32Array([0, 1, 0])
  1550. var projection = new Float32Array(16)
  1551. var model = new Float32Array(16)
  1552. var view = lookAt(
  1553. new Float32Array(16),
  1554. new Float32Array([0, 0, DISTANCE]),
  1555. objectCenter,
  1556. up)
  1557. var invView = invert(new Float32Array(16), view)
  1558. var invProjection = new Float32Array(16)
  1559. var target = new Float32Array(3)
  1560. var transformed = new Float32Array(16)
  1561.  
  1562. var X = new Float32Array([1, 0, 0])
  1563. var Y = new Float32Array([0, 1, 0])
  1564. var Z = new Float32Array([0, 0, 1])
  1565.  
  1566. return function () {
  1567. var rect = container.getBoundingClientRect()
  1568. var viewportWidth = rect.width
  1569. var viewportHeight = rect.height
  1570. perspective(
  1571. projection,
  1572. Math.PI / 4.0,
  1573. viewportWidth / viewportHeight,
  1574. 100.0,
  1575. 1000.0)
  1576. invert(invProjection, projection)
  1577. target[0] = lookCurrent[0]
  1578. target[1] = lookCurrent[1]
  1579. target[2] = 1.2
  1580. transform(target, target, invProjection)
  1581. transform(target, target, invView)
  1582. lookAt(
  1583. model,
  1584. objectCenter,
  1585. target,
  1586. up)
  1587. if (slowDrift) {
  1588. var time = (Date.now() / 1000.0)
  1589. rotate(model, model, 0.1 + (Math.sin(time / 3) * 0.2), X)
  1590. rotate(model, model, -0.1 + (Math.sin(time / 2) * 0.03), Z)
  1591. rotate(model, model, 0.5 + (Math.sin(time / 3) * 0.2), Y)
  1592. }
  1593.  
  1594. multiply(transformed, projection, view)
  1595. multiply(transformed, transformed, model)
  1596.  
  1597. return transformed
  1598. }
  1599. })()
  1600.  
  1601. function updatePositions (M) {
  1602. var m00 = M[0]
  1603. var m01 = M[1]
  1604. var m02 = M[2]
  1605. var m03 = M[3]
  1606. var m10 = M[4]
  1607. var m11 = M[5]
  1608. var m12 = M[6]
  1609. var m13 = M[7]
  1610. var m20 = M[8]
  1611. var m21 = M[9]
  1612. var m22 = M[10]
  1613. var m23 = M[11]
  1614. var m30 = M[12]
  1615. var m31 = M[13]
  1616. var m32 = M[14]
  1617. var m33 = M[15]
  1618.  
  1619. for (var i = 0; i < NUM_VERTS; ++i) {
  1620. var x = positions[3 * i]
  1621. var y = positions[3 * i + 1]
  1622. var z = positions[3 * i + 2]
  1623.  
  1624. var tw = x * m03 + y * m13 + z * m23 + m33
  1625. transformed[3 * i] =
  1626. (x * m00 + y * m10 + z * m20 + m30) / tw
  1627. transformed[3 * i + 1] =
  1628. (x * m01 + y * m11 + z * m21 + m31) / tw
  1629. transformed[3 * i + 2] =
  1630. (x * m02 + y * m12 + z * m22 + m32) / tw
  1631. }
  1632. }
  1633.  
  1634. function compareZ (a, b) {
  1635. return b.zIndex - a.zIndex
  1636. }
  1637.  
  1638. var toDraw = []
  1639. function updateFaces () {
  1640. var i
  1641. var rect = container.getBoundingClientRect()
  1642. var w = rect.width
  1643. var h = rect.height
  1644. toDraw.length = 0
  1645. for (i = 0; i < polygons.length; ++i) {
  1646. var poly = polygons[i]
  1647. var indices = poly.indices
  1648.  
  1649. var i0 = indices[0]
  1650. var i1 = indices[1]
  1651. var i2 = indices[2]
  1652. var ax = transformed[3 * i0]
  1653. var ay = transformed[3 * i0 + 1]
  1654. var bx = transformed[3 * i1]
  1655. var by = transformed[3 * i1 + 1]
  1656. var cx = transformed[3 * i2]
  1657. var cy = transformed[3 * i2 + 1]
  1658. var det = (bx - ax) * (cy - ay) - (by - ay) * (cx - ax)
  1659. if (det < 0) {
  1660. continue
  1661. }
  1662.  
  1663. var points = []
  1664. var zmax = -Infinity
  1665. var zmin = Infinity
  1666. var element = poly.svg
  1667. for (var j = 0; j < 3; ++j) {
  1668. var idx = indices[j]
  1669. points.push(
  1670. 0.5 * w * (1.0 - transformed[3 * idx]) + ',' +
  1671. 0.5 * h * (1.0 - transformed[3 * idx + 1]))
  1672. var z = transformed[3 * idx + 2]
  1673. zmax = Math.max(zmax, z)
  1674. zmin = Math.min(zmin, z)
  1675. }
  1676. poly.zIndex = zmax + 0.25 * zmin
  1677. var joinedPoints = points.join(' ')
  1678.  
  1679. if (joinedPoints.indexOf('NaN') === -1) {
  1680. setAttribute(element, 'points', joinedPoints)
  1681. }
  1682.  
  1683. toDraw.push(poly)
  1684. }
  1685. toDraw.sort(compareZ)
  1686. container.innerHTML = ''
  1687. for (i = 0; i < toDraw.length; ++i) {
  1688. container.appendChild(toDraw[i].svg)
  1689. }
  1690. }
  1691.  
  1692. function renderScene () {
  1693. if (!shouldRender) return
  1694. window.requestAnimationFrame(renderScene)
  1695.  
  1696. var li = (1.0 - lookRate)
  1697. var bounds = container.getBoundingClientRect()
  1698.  
  1699. lookCurrent[0] = li * lookCurrent[0] + lookRate * mouse.x
  1700. lookCurrent[1] = li * lookCurrent[1] + lookRate * mouse.y + 0.085
  1701.  
  1702. var matrix = computeMatrix()
  1703. updatePositions(matrix)
  1704. updateFaces()
  1705. }
  1706.  
  1707. renderScene()
  1708.  
  1709. return {
  1710. container: container,
  1711. lookAt: setLookAt,
  1712. setFollowMouse: setFollowMouse,
  1713. stopAnimation: stopAnimation,
  1714. startAnimation: startAnimation,
  1715. }
  1716.  
  1717. function stopAnimation() {
  1718. shouldRender = false
  1719. }
  1720.  
  1721. function startAnimation() {
  1722. shouldRender = true
  1723. }
  1724.  
  1725. function setFollowMouse (state) {
  1726. followCursor = state
  1727. }
  1728.  
  1729. }
  1730.  
  1731. },{"./fox.json":1,"gl-mat4/invert":4,"gl-mat4/lookAt":5,"gl-mat4/multiply":6,"gl-mat4/perspective":7,"gl-mat4/rotate":8,"gl-vec3/transformMat4":9}],3:[function(require,module,exports){
  1732. module.exports = identity;
  1733.  
  1734. /**
  1735.  * Set a mat4 to the identity matrix
  1736.  *
  1737.  * @param {mat4} out the receiving matrix
  1738.  * @returns {mat4} out
  1739.  */
  1740. function identity(out) {
  1741. out[0] = 1;
  1742. out[1] = 0;
  1743. out[2] = 0;
  1744. out[3] = 0;
  1745. out[4] = 0;
  1746. out[5] = 1;
  1747. out[6] = 0;
  1748. out[7] = 0;
  1749. out[8] = 0;
  1750. out[9] = 0;
  1751. out[10] = 1;
  1752. out[11] = 0;
  1753. out[12] = 0;
  1754. out[13] = 0;
  1755. out[14] = 0;
  1756. out[15] = 1;
  1757. return out;
  1758. };
  1759. },{}],4:[function(require,module,exports){
  1760. module.exports = invert;
  1761.  
  1762. /**
  1763.  * Inverts a mat4
  1764.  *
  1765.  * @param {mat4} out the receiving matrix
  1766.  * @param {mat4} a the source matrix
  1767.  * @returns {mat4} out
  1768.  */
  1769. function invert(out, a) {
  1770. var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
  1771. a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
  1772. a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
  1773. a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
  1774.  
  1775. b00 = a00 * a11 - a01 * a10,
  1776. b01 = a00 * a12 - a02 * a10,
  1777. b02 = a00 * a13 - a03 * a10,
  1778. b03 = a01 * a12 - a02 * a11,
  1779. b04 = a01 * a13 - a03 * a11,
  1780. b05 = a02 * a13 - a03 * a12,
  1781. b06 = a20 * a31 - a21 * a30,
  1782. b07 = a20 * a32 - a22 * a30,
  1783. b08 = a20 * a33 - a23 * a30,
  1784. b09 = a21 * a32 - a22 * a31,
  1785. b10 = a21 * a33 - a23 * a31,
  1786. b11 = a22 * a33 - a23 * a32,
  1787.  
  1788. // Calculate the determinant
  1789. det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
  1790.  
  1791. if (!det) {
  1792. return null;
  1793. }
  1794. det = 1.0 / det;
  1795.  
  1796. out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
  1797. out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
  1798. out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
  1799. out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
  1800. out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
  1801. out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
  1802. out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
  1803. out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
  1804. out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
  1805. out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
  1806. out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
  1807. out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
  1808. out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
  1809. out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
  1810. out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
  1811. out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
  1812.  
  1813. return out;
  1814. };
  1815. },{}],5:[function(require,module,exports){
  1816. var identity = require('./identity');
  1817.  
  1818. module.exports = lookAt;
  1819.  
  1820. /**
  1821.  * Generates a look-at matrix with the given eye position, focal point, and up axis
  1822.  *
  1823.  * @param {mat4} out mat4 frustum matrix will be written into
  1824.  * @param {vec3} eye Position of the viewer
  1825.  * @param {vec3} center Point the viewer is looking at
  1826.  * @param {vec3} up vec3 pointing up
  1827.  * @returns {mat4} out
  1828.  */
  1829. function lookAt(out, eye, center, up) {
  1830. var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,
  1831. eyex = eye[0],
  1832. eyey = eye[1],
  1833. eyez = eye[2],
  1834. upx = up[0],
  1835. upy = up[1],
  1836. upz = up[2],
  1837. centerx = center[0],
  1838. centery = center[1],
  1839. centerz = center[2];
  1840.  
  1841. if (Math.abs(eyex - centerx) < 0.000001 &&
  1842. Math.abs(eyey - centery) < 0.000001 &&
  1843. Math.abs(eyez - centerz) < 0.000001) {
  1844. return identity(out);
  1845. }
  1846.  
  1847. z0 = eyex - centerx;
  1848. z1 = eyey - centery;
  1849. z2 = eyez - centerz;
  1850.  
  1851. len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);
  1852. z0 *= len;
  1853. z1 *= len;
  1854. z2 *= len;
  1855.  
  1856. x0 = upy * z2 - upz * z1;
  1857. x1 = upz * z0 - upx * z2;
  1858. x2 = upx * z1 - upy * z0;
  1859. len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);
  1860. if (!len) {
  1861. x0 = 0;
  1862. x1 = 0;
  1863. x2 = 0;
  1864. } else {
  1865. len = 1 / len;
  1866. x0 *= len;
  1867. x1 *= len;
  1868. x2 *= len;
  1869. }
  1870.  
  1871. y0 = z1 * x2 - z2 * x1;
  1872. y1 = z2 * x0 - z0 * x2;
  1873. y2 = z0 * x1 - z1 * x0;
  1874.  
  1875. len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);
  1876. if (!len) {
  1877. y0 = 0;
  1878. y1 = 0;
  1879. y2 = 0;
  1880. } else {
  1881. len = 1 / len;
  1882. y0 *= len;
  1883. y1 *= len;
  1884. y2 *= len;
  1885. }
  1886.  
  1887. out[0] = x0;
  1888. out[1] = y0;
  1889. out[2] = z0;
  1890. out[3] = 0;
  1891. out[4] = x1;
  1892. out[5] = y1;
  1893. out[6] = z1;
  1894. out[7] = 0;
  1895. out[8] = x2;
  1896. out[9] = y2;
  1897. out[10] = z2;
  1898. out[11] = 0;
  1899. out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
  1900. out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
  1901. out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
  1902. out[15] = 1;
  1903.  
  1904. return out;
  1905. };
  1906. },{"./identity":3}],6:[function(require,module,exports){
  1907. module.exports = multiply;
  1908.  
  1909. /**
  1910.  * Multiplies two mat4's
  1911.  *
  1912.  * @param {mat4} out the receiving matrix
  1913.  * @param {mat4} a the first operand
  1914.  * @param {mat4} b the second operand
  1915.  * @returns {mat4} out
  1916.  */
  1917. function multiply(out, a, b) {
  1918. var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
  1919. a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
  1920. a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
  1921. a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
  1922.  
  1923. // Cache only the current line of the second matrix
  1924. var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
  1925. out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
  1926. out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
  1927. out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
  1928. out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
  1929.  
  1930. b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];
  1931. out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
  1932. out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
  1933. out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
  1934. out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
  1935.  
  1936. b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];
  1937. out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
  1938. out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
  1939. out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
  1940. out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
  1941.  
  1942. b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];
  1943. out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
  1944. out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
  1945. out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
  1946. out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
  1947. return out;
  1948. };
  1949. },{}],7:[function(require,module,exports){
  1950. module.exports = perspective;
  1951.  
  1952. /**
  1953.  * Generates a perspective projection matrix with the given bounds
  1954.  *
  1955.  * @param {mat4} out mat4 frustum matrix will be written into
  1956.  * @param {number} fovy Vertical field of view in radians
  1957.  * @param {number} aspect Aspect ratio. typically viewport width/height
  1958.  * @param {number} near Near bound of the frustum
  1959.  * @param {number} far Far bound of the frustum
  1960.  * @returns {mat4} out
  1961.  */
  1962. function perspective(out, fovy, aspect, near, far) {
  1963. var f = 1.0 / Math.tan(fovy / 2),
  1964. nf = 1 / (near - far);
  1965. out[0] = f / aspect;
  1966. out[1] = 0;
  1967. out[2] = 0;
  1968. out[3] = 0;
  1969. out[4] = 0;
  1970. out[5] = f;
  1971. out[6] = 0;
  1972. out[7] = 0;
  1973. out[8] = 0;
  1974. out[9] = 0;
  1975. out[10] = (far + near) * nf;
  1976. out[11] = -1;
  1977. out[12] = 0;
  1978. out[13] = 0;
  1979. out[14] = (2 * far * near) * nf;
  1980. out[15] = 0;
  1981. return out;
  1982. };
  1983. },{}],8:[function(require,module,exports){
  1984. module.exports = rotate;
  1985.  
  1986. /**
  1987.  * Rotates a mat4 by the given angle
  1988.  *
  1989.  * @param {mat4} out the receiving matrix
  1990.  * @param {mat4} a the matrix to rotate
  1991.  * @param {Number} rad the angle to rotate the matrix by
  1992.  * @param {vec3} axis the axis to rotate around
  1993.  * @returns {mat4} out
  1994.  */
  1995. function rotate(out, a, rad, axis) {
  1996. var x = axis[0], y = axis[1], z = axis[2],
  1997. len = Math.sqrt(x * x + y * y + z * z),
  1998. s, c, t,
  1999. a00, a01, a02, a03,
  2000. a10, a11, a12, a13,
  2001. a20, a21, a22, a23,
  2002. b00, b01, b02,
  2003. b10, b11, b12,
  2004. b20, b21, b22;
  2005.  
  2006. if (Math.abs(len) < 0.000001) { return null; }
  2007.  
  2008. len = 1 / len;
  2009. x *= len;
  2010. y *= len;
  2011. z *= len;
  2012.  
  2013. s = Math.sin(rad);
  2014. c = Math.cos(rad);
  2015. t = 1 - c;
  2016.  
  2017. a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
  2018. a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
  2019. a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
  2020.  
  2021. // Construct the elements of the rotation matrix
  2022. b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;
  2023. b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;
  2024. b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;
  2025.  
  2026. // Perform rotation-specific matrix multiplication
  2027. out[0] = a00 * b00 + a10 * b01 + a20 * b02;
  2028. out[1] = a01 * b00 + a11 * b01 + a21 * b02;
  2029. out[2] = a02 * b00 + a12 * b01 + a22 * b02;
  2030. out[3] = a03 * b00 + a13 * b01 + a23 * b02;
  2031. out[4] = a00 * b10 + a10 * b11 + a20 * b12;
  2032. out[5] = a01 * b10 + a11 * b11 + a21 * b12;
  2033. out[6] = a02 * b10 + a12 * b11 + a22 * b12;
  2034. out[7] = a03 * b10 + a13 * b11 + a23 * b12;
  2035. out[8] = a00 * b20 + a10 * b21 + a20 * b22;
  2036. out[9] = a01 * b20 + a11 * b21 + a21 * b22;
  2037. out[10] = a02 * b20 + a12 * b21 + a22 * b22;
  2038. out[11] = a03 * b20 + a13 * b21 + a23 * b22;
  2039.  
  2040. if (a !== out) { // If the source and destination differ, copy the unchanged last row
  2041. out[12] = a[12];
  2042. out[13] = a[13];
  2043. out[14] = a[14];
  2044. out[15] = a[15];
  2045. }
  2046. return out;
  2047. };
  2048. },{}],9:[function(require,module,exports){
  2049. module.exports = transformMat4;
  2050.  
  2051. /**
  2052.  * Transforms the vec3 with a mat4.
  2053.  * 4th vector component is implicitly '1'
  2054.  *
  2055.  * @param {vec3} out the receiving vector
  2056.  * @param {vec3} a the vector to transform
  2057.  * @param {mat4} m matrix to transform with
  2058.  * @returns {vec3} out
  2059.  */
  2060. function transformMat4(out, a, m) {
  2061. var x = a[0], y = a[1], z = a[2],
  2062. w = m[3] * x + m[7] * y + m[11] * z + m[15]
  2063. w = w || 1.0
  2064. out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w
  2065. out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w
  2066. out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w
  2067. return out
  2068. }
  2069. },{}],10:[function(require,module,exports){
  2070. var ModelViewer = require('metamask-logo')
  2071. var isMobile = !!detectMobile()
  2072.  
  2073. injectMascot()
  2074.  
  2075. function injectMascot(){
  2076. // get container from DOM
  2077. var container = document.getElementById('logo-container')
  2078.  
  2079. if (!container) return
  2080.  
  2081. // To render with fixed dimensions:
  2082. var viewer = ModelViewer({
  2083.  
  2084. // Dictates whether width & height are px or multiplied
  2085. pxNotRatio: false,
  2086. width: 0.10,
  2087. height: 0.10,
  2088. minWidth: 200,
  2089.  
  2090. followMouse: !isMobile,
  2091. slowDrift: isMobile,
  2092. })
  2093.  
  2094. // add viewer to DOM
  2095. container.appendChild(viewer.container)
  2096.  
  2097. }
  2098.  
  2099. function detectMobile() {
  2100. return (
  2101. navigator.userAgent.match(/Android/i)
  2102. || navigator.userAgent.match(/webOS/i)
  2103. || navigator.userAgent.match(/iPhone/i)
  2104. || navigator.userAgent.match(/iPad/i)
  2105. || navigator.userAgent.match(/iPod/i)
  2106. || navigator.userAgent.match(/BlackBerry/i)
  2107. || navigator.userAgent.match(/Windows Phone/i)
  2108. )
  2109. }
  2110.  
  2111.  
  2112. },{"metamask-logo":2}]},{},[10]);
  2113. // your code goes here
Runtime error #stdin #stdout #stderr 0s 172608KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:2101:0 ReferenceError: navigator is not defined