@uptimizr/dashboard 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +4 -4
- package/out/__next._full.txt +10 -10
- package/out/__next._head.txt +4 -4
- package/out/__next._index.txt +3 -3
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{2h051-1hu4co_.js → 0-0hui1_v3h8b.js} +9 -9
- package/out/_next/static/chunks/{2dqg85hsevk3c.js → 0-tzsd_n-ywom.js} +4 -4
- package/out/_next/static/chunks/00g5suuoa-_wn.js +1 -0
- package/out/_next/static/chunks/00o9hr_3hd0r8.js +1 -0
- package/out/_next/static/chunks/{0jxklh_ayjd4b.js → 00xc-0pj7on2s.js} +12 -12
- package/out/_next/static/chunks/01fh3_bncbe5u.js +1 -0
- package/out/_next/static/chunks/01urdkl1j8o6l.js +1 -0
- package/out/_next/static/chunks/{2j-sax2xfdv7l.js → 026vw95s88gsy.js} +1 -1
- package/out/_next/static/chunks/02eui3ctddbd2.js +1 -0
- package/out/_next/static/chunks/{3kr1polwvt6o_.js → 03zip1uidm6x9.js} +1 -1
- package/out/_next/static/chunks/{3gi0f1kg72xsf.js → 04_3ri5emyfcu.js} +1 -1
- package/out/_next/static/chunks/04c4nksb5y9r-.js +1 -0
- package/out/_next/static/chunks/04g-l-_b4payc.js +1 -0
- package/out/_next/static/chunks/04j9pexbmysdy.js +1 -0
- package/out/_next/static/chunks/{1rcfy_gzean3n.js → 055baac5e-c2o.js} +1 -1
- package/out/_next/static/chunks/05bdni_jrobq1.js +1 -0
- package/out/_next/static/chunks/05o0tb8l_htmw.js +1 -0
- package/out/_next/static/chunks/{3d5yb9ybkz7hx.js → 05uqfgf-hh-p5.js} +1 -1
- package/out/_next/static/chunks/06f-0kw8s0mqo.js +3 -0
- package/out/_next/static/chunks/{18r387bj9iv0j.js → 077eo-0dhbxz-.js} +1 -1
- package/out/_next/static/chunks/{18k-0jn63_5ie.js → 07z6p262h5hgl.js} +1 -1
- package/out/_next/static/chunks/{08bm3ye5govev.js → 08m_4cihfmik8.js} +1 -1
- package/out/_next/static/chunks/08obqw64faj8j.js +1 -0
- package/out/_next/static/chunks/{2k4s5rt7-l8jr.js → 099ilz3dmm1jw.js} +1 -1
- package/out/_next/static/chunks/09ppu_k464q-n.js +1 -0
- package/out/_next/static/chunks/{1rne-b-ktit5c.js → 0av6n_6q6kzo3.js} +2 -2
- package/out/_next/static/chunks/0bgcaf2x51kms.js +1 -0
- package/out/_next/static/chunks/{0ptp4ne7j6yg6.js → 0bj_310rugcn1.js} +11 -11
- package/out/_next/static/chunks/0c5d3qn2mb3ew.js +1 -0
- package/out/_next/static/chunks/{2gtebfttq1v0o.js → 0dck67in84de0.js} +1 -1
- package/out/_next/static/chunks/0dg4wxz-6u5lo.js +1 -0
- package/out/_next/static/chunks/{2apt1vh-7rl2l.js → 0dva036n8ab62.js} +1 -1
- package/out/_next/static/chunks/{159u-hx80yfaw.js → 0erga_bzezbza.js} +1 -1
- package/out/_next/static/chunks/0f0-i105odxqd.js +1 -0
- package/out/_next/static/chunks/{1fvlbwp6r93wo.js → 0g2wngc6oe7fd.js} +24 -24
- package/out/_next/static/chunks/0gyeqz9pagssf.js +1 -0
- package/out/_next/static/chunks/0i82k-t0fbn8f.js +1 -0
- package/out/_next/static/chunks/0kzw45f61wm3j.js +1 -0
- package/out/_next/static/chunks/0l8bfa2xewq69.js +1 -0
- package/out/_next/static/chunks/{390fogn9oz13i.js → 0n-zml1gn0o1u.js} +1 -1
- package/out/_next/static/chunks/{44gsjajjdhf51.js → 0n92hec_jb_-_.js} +1 -1
- package/out/_next/static/chunks/{2s0dwzg7kq36n.js → 0okbyggxe6mx5.js} +1 -1
- package/out/_next/static/chunks/{0h-ohf4gntwtj.js → 0pv2wirx45e1m.js} +1 -1
- package/out/_next/static/chunks/0qxd_8t3nca36.js +1 -0
- package/out/_next/static/chunks/0s1jghzw8jufz.js +1 -0
- package/out/_next/static/chunks/{0ngai1_zxwsk8.js → 0s84ekz_f9ngx.js} +1 -1
- package/out/_next/static/chunks/{16d4a4iopj2if.js → 0t89-lfct-7m6.js} +5 -5
- package/out/_next/static/chunks/0ti58h622yo-_.js +2 -0
- package/out/_next/static/chunks/{29v8falcmjvev.js → 0tn-9w46cwydp.js} +32 -32
- package/out/_next/static/chunks/0u8yr4k1y6m2t.js +1 -0
- package/out/_next/static/chunks/0ubxyut5rr600.js +1 -0
- package/out/_next/static/chunks/{3_bzxvqtk1t53.js → 0uxdbfa8gv6tk.js} +12 -12
- package/out/_next/static/chunks/0vso09vdz38sr.js +1 -0
- package/out/_next/static/chunks/{0_tqu60oxaj7q.js → 0w-hm7g7trtjg.js} +1 -1
- package/out/_next/static/chunks/0wbw9h7rsis2r.js +1 -0
- package/out/_next/static/chunks/{3sbm1ak54_2ep.js → 0wq_9f98weoe3.js} +1 -1
- package/out/_next/static/chunks/0y4e49hpuucdi.js +1 -0
- package/out/_next/static/chunks/{0ioyy42h35hnd.js → 0yvevihll7sz-.js} +1 -1
- package/out/_next/static/chunks/{0zcdc17ie6lmh.js → 0zf26k6juhlzo.js} +50 -18
- package/out/_next/static/chunks/{3sg4zff4-h3t1.js → 1-b44873bjsdw.js} +1 -1
- package/out/_next/static/chunks/1-c3a1vnl8v1q.js +1 -0
- package/out/_next/static/chunks/1-xf86jgea22y.js +1 -0
- package/out/_next/static/chunks/10b0qqdnb_nox.js +1 -0
- package/out/_next/static/chunks/{2ib62lnqqaf4p.js → 11p92pnn5el0v.js} +1 -1
- package/out/_next/static/chunks/{06ljadw2-i91-.js → 12kdmh0h_mboy.js} +1 -1
- package/out/_next/static/chunks/141tngxsk32hq.js +1 -0
- package/out/_next/static/chunks/14ijcpo72av4r.js +1 -0
- package/out/_next/static/chunks/16hdip1drt8o-.js +1 -0
- package/out/_next/static/chunks/{3g5ae-38cepwm.js → 17aahvhpls1l7.js} +199 -199
- package/out/_next/static/chunks/{17d1isrw8gtnb.js → 18txc1wwwu9f9.js} +1 -1
- package/out/_next/static/chunks/{2716si10ouwu-.js → 18wa83g0qfh-b.js} +1 -1
- package/out/_next/static/chunks/19dp8nr4uygg2.js +5 -0
- package/out/_next/static/chunks/1_8acnu6_-qe-.js +1 -0
- package/out/_next/static/chunks/1__nujzr9e352.js +3 -0
- package/out/_next/static/chunks/1bmyq1b0by7ug.js +1 -0
- package/out/_next/static/chunks/{1wyr4at61q29n.js → 1ccn725by19i1.js} +1 -1
- package/out/_next/static/chunks/{0f_nv15a8q415.js → 1d1tpj9nm1nhf.js} +1 -1
- package/out/_next/static/chunks/1dfwa563iciz3.js +1 -0
- package/out/_next/static/chunks/1di5enkavl9vx.js +4 -0
- package/out/_next/static/chunks/{006nix8mv66z_.js → 1e_-_7biavwmb.js} +1 -1
- package/out/_next/static/chunks/{1y12bjsbq18_t.js → 1ephzzweysylq.js} +34 -34
- package/out/_next/static/chunks/1fwsjnd1y-lx_.js +1 -0
- package/out/_next/static/chunks/{2z9ot-w1x60fv.js → 1fyh50hjt7hi_.js} +1 -1
- package/out/_next/static/chunks/1gaexq_suxai0.js +1 -0
- package/out/_next/static/chunks/1gtj_l5ame5mw.js +1 -0
- package/out/_next/static/chunks/{1--aypw9o8yng.js → 1gvdmbr65lpud.js} +39 -39
- package/out/_next/static/chunks/{02tc9r3sc7fgc.js → 1ho02fc091nj2.js} +1 -1
- package/out/_next/static/chunks/{3v0td-ziuai2i.js → 1hsvckd0sgdgr.js} +1 -1
- package/out/_next/static/chunks/1i4f3n_2_3ery.js +1 -0
- package/out/_next/static/chunks/1j7e3qpjuj89a.js +1 -0
- package/out/_next/static/chunks/{2btqzk0tj0gz6.js → 1mrvp94tietcv.js} +1 -1
- package/out/_next/static/chunks/{3vxkkhs0vi_xa.js → 1mvadj46owrck.js} +1 -1
- package/out/_next/static/chunks/{1b2tkk7e_2o0k.js → 1n_gxvu31aofy.js} +2 -2
- package/out/_next/static/chunks/{0gblbgw7w7r9w.js → 1nasz7q3tvb53.js} +1 -1
- package/out/_next/static/chunks/{2_7dp91937mqi.js → 1ng-fqh2_n984.js} +1 -1
- package/out/_next/static/chunks/{0x4-zyy8pzmlq.js → 1nqojcig-0m3c.js} +1 -1
- package/out/_next/static/chunks/1o3ggu95lfu6i.js +1 -0
- package/out/_next/static/chunks/{2dolerz81xb52.js → 1og49_atcksim.js} +1 -1
- package/out/_next/static/chunks/{0c2k-gvwph4qs.js → 1oljzgz5jistn.js} +1 -1
- package/out/_next/static/chunks/1ozi46t8jajqh.js +1 -0
- package/out/_next/static/chunks/{1w9xu1qa9-wmv.js → 1ph0tfo-4hl-f.js} +1 -1
- package/out/_next/static/chunks/{17dmbt396_tyq.js → 1qjsgebn9m-0l.js} +1 -1
- package/out/_next/static/chunks/{168r9r65o9jnc.js → 1qsut_e3msg0l.js} +1 -1
- package/out/_next/static/chunks/{3efuvh_35yhes.js → 1qxhgauuomthl.js} +39 -39
- package/out/_next/static/chunks/{2w7yf7ouyrlkb.js → 1rb8wewjbdisv.js} +1 -1
- package/out/_next/static/chunks/1rr74xxjtckyv.js +1 -0
- package/out/_next/static/chunks/{1kl5xxohpr6-4.js → 1solqr18og2ot.js} +1 -1
- package/out/_next/static/chunks/{2rjc8yn50ducj.js → 1t2exh89lnazc.js} +34 -34
- package/out/_next/static/chunks/{0_ux41xcoea3u.js → 1t7nl8rx7mabd.js} +40 -40
- package/out/_next/static/chunks/{3fx3sriw1w3sa.js → 1tt1bbry-4f-6.js} +1 -1
- package/out/_next/static/chunks/{0ufakw529sr9d.js → 1upkv4ltuh3s5.js} +40 -40
- package/out/_next/static/chunks/{2npk7tr63h7rl.js → 1uu55ejvi7q5u.js} +1 -1
- package/out/_next/static/chunks/{2cvvxifoedn6j.js → 1ux1rpe-n1mai.js} +1 -1
- package/out/_next/static/chunks/{091ll-lp6spu3.js → 1vmpltnr0cyos.js} +1 -1
- package/out/_next/static/chunks/1x99m91nt1m3b.js +1 -0
- package/out/_next/static/chunks/1xbzxfeq9789f.js +1 -0
- package/out/_next/static/chunks/1ybiu-rkt50_1.js +1 -0
- package/out/_next/static/chunks/{3y9c26fv1poq_.js → 2-hdejef-mpka.js} +199 -199
- package/out/_next/static/chunks/{22qzld31fbhbv.js → 2-p206i_ihx09.js} +1 -1
- package/out/_next/static/chunks/{340pg0qkv5tqq.js → 20qelrstvz9_n.js} +1 -1
- package/out/_next/static/chunks/21at65obnoo8z.js +1 -0
- package/out/_next/static/chunks/21ko5mxfderw0.js +1 -0
- package/out/_next/static/chunks/21muzwu43o8xg.js +1 -0
- package/out/_next/static/chunks/{3he9bxsc67ivq.js → 22ja7c3gk0_ko.js} +1 -1
- package/out/_next/static/chunks/{0mqi0xn_c010j.js → 22rl_arnzs-ve.js} +1 -1
- package/out/_next/static/chunks/23d-hvrwpixpm.js +1 -0
- package/out/_next/static/chunks/{2yzui3v-besdu.js → 255knovck7pv2.js} +4 -4
- package/out/_next/static/chunks/2569rrrffvm2w.js +31 -0
- package/out/_next/static/chunks/{229mkx-mtfcgf.js → 25gf6xn9u1c57.js} +1 -1
- package/out/_next/static/chunks/{2vmybybb3dvia.js → 267q_eg-c6f6m.js} +1 -1
- package/out/_next/static/chunks/{0e7xuupmrw4-e.js → 28ndw4nsw2t_4.js} +1 -1
- package/out/_next/static/chunks/{0m3yjobjg36ce.js → 29gv2swsp7tzu.js} +1 -1
- package/out/_next/static/chunks/29o74k0d6hkdf.js +1 -0
- package/out/_next/static/chunks/{0kr-bd6fuqc2s.js → 2bm95r0011asw.js} +1 -1
- package/out/_next/static/chunks/2btabnibkm0db.js +1 -0
- package/out/_next/static/chunks/2c--awgkdcikq.js +1 -0
- package/out/_next/static/chunks/{2ab-99frxpah-.js → 2c2dspoukng-5.js} +1 -1
- package/out/_next/static/chunks/{0zo4x1j8ug-kb.js → 2e46-2ubc90do.js} +5 -5
- package/out/_next/static/chunks/2ep7mjbaoeou0.js +1 -0
- package/out/_next/static/chunks/{1kq86iv41cet4.js → 2ezgqm7atphi6.js} +1 -1
- package/out/_next/static/chunks/{1bv97vf67p_ri.js → 2ftp5xmq_w23j.js} +35 -35
- package/out/_next/static/chunks/{38g9jpxjoxn2x.js → 2g_1ov-0j2kwd.js} +1 -1
- package/out/_next/static/chunks/2gfjzq_vjea4w.js +1 -0
- package/out/_next/static/chunks/{1tdg_eolxlcdl.js → 2h5hase6ewoyc.js} +1 -1
- package/out/_next/static/chunks/{0m0n7kjzscx0y.js → 2h5nvlgky7fpa.js} +1 -1
- package/out/_next/static/chunks/{17dabmbnkkplu.js → 2i82rmjta9ijs.js} +1 -1
- package/out/_next/static/chunks/2ies66gmou203.js +1 -0
- package/out/_next/static/chunks/2jenu2eek9viz.js +1 -0
- package/out/_next/static/chunks/{3043pprgv9ors.js → 2khh_pmm224k5.js} +23 -23
- package/out/_next/static/chunks/2kv9_bt15v83g.js +1 -0
- package/out/_next/static/chunks/{0msckddycfy76.js → 2luaj_cf5f19-.js} +1 -1
- package/out/_next/static/chunks/2mgmvz66gh5ub.js +1 -0
- package/out/_next/static/chunks/2nwlqtv3vrzcv.js +1 -0
- package/out/_next/static/chunks/{18ss4ls60s31e.js → 2o8k8x5zcepfy.js} +1 -1
- package/out/_next/static/chunks/{1e1zozntzsx42.js → 2pbgsq7vvtk8_.js} +1 -1
- package/out/_next/static/chunks/{0b7-mrrg7ryj2.js → 2pcdnd4nzcw4c.js} +1 -1
- package/out/_next/static/chunks/2q0rz76kj6h5z.js +1 -0
- package/out/_next/static/chunks/{3w1a2o8nevap8.js → 2rjfrjhp4kjev.js} +18 -18
- package/out/_next/static/chunks/2si5cg3hl5dtf.js +4 -0
- package/out/_next/static/chunks/2uhrhq35bki6u.js +1 -0
- package/out/_next/static/chunks/{1l12hkz1g7uhf.js → 2ymtumj-hfrjo.js} +1 -1
- package/out/_next/static/chunks/{2yr9wt421xdjr.js → 2z9mdtudj8crz.js} +17 -17
- package/out/_next/static/chunks/{1iaxzjly2pap1.js → 2zdzgmacaoor9.js} +1 -1
- package/out/_next/static/chunks/{0mk8tangq9equ.js → 2zpn7010iqgsy.js} +1 -1
- package/out/_next/static/chunks/2zyjw8g4tiu51.js +1 -0
- package/out/_next/static/chunks/{2kn_dqzbyabtn.js → 3-_08i4_7yhno.js} +1 -1
- package/out/_next/static/chunks/3-irhmtm1q5qw.js +1 -0
- package/out/_next/static/chunks/3-k74vn9exnb6.js +1 -0
- package/out/_next/static/chunks/{18avgwx9nlxp9.js → 3-x7522okdy-7.js} +1 -1
- package/out/_next/static/chunks/{1ll0ta8a2qx1p.js → 309f81l5ucsb_.js} +16 -16
- package/out/_next/static/chunks/{1f1vq3goue1w4.js → 31ei992g8gqz9.js} +1 -1
- package/out/_next/static/chunks/{0i9oqg-xbq-a9.js → 32vaw89wdwv5_.js} +1 -1
- package/out/_next/static/chunks/34y7nx6qmat06.js +1 -0
- package/out/_next/static/chunks/{1f92k-xa0pl-3.js → 35aagg46wp139.js} +1 -1
- package/out/_next/static/chunks/36rqw8h6ildpl.js +1 -0
- package/out/_next/static/chunks/{0zwkmsojeuekb.js → 380ivzcfb4o_3.js} +4 -4
- package/out/_next/static/chunks/{01aeari2x_tlz.js → 3a_khw6q6pyh1.js} +1 -1
- package/out/_next/static/chunks/3c_31f20z4jrl.js +1 -0
- package/out/_next/static/chunks/3ckp70rgr63u9.js +1 -0
- package/out/_next/static/chunks/{08rk1dp1wb-gm.js → 3d76e_yd8l_0x.js} +38 -38
- package/out/_next/static/chunks/{2p8dbh81chhon.js → 3ed24zmt8qfys.js} +1 -1
- package/out/_next/static/chunks/3ez20hi1mxw0w.js +1 -0
- package/out/_next/static/chunks/3fdx-rnos5ft-.js +1 -0
- package/out/_next/static/chunks/3fgfbxxb-j_bn.js +4 -0
- package/out/_next/static/chunks/{03st_hmor6qju.js → 3go-mst7n3udd.js} +1 -1
- package/out/_next/static/chunks/{3d0ejsnhbzi-j.js → 3gyyjsot8mdav.js} +1 -1
- package/out/_next/static/chunks/{2t9zu9v_g9kr9.js → 3iwf5yeurp57i.js} +3 -3
- package/out/_next/static/chunks/{0rruvj1cyflrh.js → 3k-gz8qf-mj-p.js} +1 -1
- package/out/_next/static/chunks/{2enlv4yy0t-9j.js → 3kalvwsf11-ss.js} +12 -12
- package/out/_next/static/chunks/3lehc5pujwhsz.js +1 -0
- package/out/_next/static/chunks/{05l3dluxivcor.js → 3m0ytnc241yfz.js} +1 -1
- package/out/_next/static/chunks/3mpe7c3iyxn5h.js +1 -0
- package/out/_next/static/chunks/{0tl8j9f8lt0yf.js → 3mvaub8qjdyuc.js} +1 -1
- package/out/_next/static/chunks/{0k79ryqehst0b.js → 3n-7bcmfbh299.js} +48 -18
- package/out/_next/static/chunks/{38ea9kqlbxt86.js → 3nw7u4bie0-g6.js} +1 -1
- package/out/_next/static/chunks/3qatb38-tk_gd.js +1 -0
- package/out/_next/static/chunks/3tdcdi_utmoy_.js +1 -0
- package/out/_next/static/chunks/{3x6wpv_z5m6rz.js → 3tdzweqszru4y.js} +1 -1
- package/out/_next/static/chunks/3tt_ir_va6262.js +1 -0
- package/out/_next/static/chunks/{39lxb7c--3_2u.js → 3w4qettzp7khe.js} +32 -32
- package/out/_next/static/chunks/{2op88btas-hl8.js → 3w_umk1xtj6to.js} +1 -1
- package/out/_next/static/chunks/{1kmsg9ef5djl3.js → 3y_51bmdnc0ey.js} +1 -1
- package/out/_next/static/chunks/{1ajmblsp0wj0_.js → 3yr66ufoli71t.js} +1 -1
- package/out/_next/static/chunks/{348hdbpkkcq_2.js → 3z4suna4kq4j5.js} +20 -20
- package/out/_next/static/chunks/{1y20bv6vl4ylk.js → 41qxc142snm22.js} +1 -1
- package/out/_next/static/chunks/{404f_93w2e8ty.js → 41yy4p3-rtyz1.js} +1 -1
- package/out/_next/static/chunks/{3fz7tc-4j13uv.js → 425epvuw3yy-n.js} +21 -21
- package/out/_next/static/chunks/{1t60cososq7b0.js → 43hwl25uke0l_.js} +1 -1
- package/out/_next/static/chunks/43qmngblcab8f.js +1 -0
- package/out/_next/static/chunks/{2bn9u9r0rfhvc.js → 442e2l3jzxd-_.js} +1 -1
- package/out/_next/static/chunks/{turbopack-16ab30_1p4vhq.js → turbopack-3r8yn0j92tqw_.js} +1 -1
- package/out/_not-found/__next._full.txt +8 -8
- package/out/_not-found/__next._head.txt +4 -4
- package/out/_not-found/__next._index.txt +3 -3
- package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +8 -8
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +10 -10
- package/out/_next/static/chunks/0-29qf-q72olu.js +0 -1
- package/out/_next/static/chunks/0-tk5ptli--r0.js +0 -1
- package/out/_next/static/chunks/0296l8lzd69ns.js +0 -1
- package/out/_next/static/chunks/04pk6n3z75dcy.js +0 -1
- package/out/_next/static/chunks/06m_64ysu9kn0.js +0 -1
- package/out/_next/static/chunks/09p5fltt7o3to.js +0 -1
- package/out/_next/static/chunks/0fxfsshoxnnh6.js +0 -4
- package/out/_next/static/chunks/0g6u34xkzrpjn.js +0 -1
- package/out/_next/static/chunks/0g7p8zp2kxve5.js +0 -1
- package/out/_next/static/chunks/0gwa154w_0wuh.js +0 -1
- package/out/_next/static/chunks/0h1o0cr3327tt.js +0 -1
- package/out/_next/static/chunks/0jf3n5n5yrr4o.js +0 -1
- package/out/_next/static/chunks/0k9-8s-jof_gw.js +0 -1
- package/out/_next/static/chunks/0kcbdjbdxu_wa.js +0 -1
- package/out/_next/static/chunks/0l3wwyl93sqh9.js +0 -1
- package/out/_next/static/chunks/0ngiuj5k-or6g.js +0 -1
- package/out/_next/static/chunks/0nx_t8iq-324h.js +0 -1
- package/out/_next/static/chunks/0oap0o8a8a_cl.js +0 -1
- package/out/_next/static/chunks/0ostjlqtwkhqr.js +0 -1
- package/out/_next/static/chunks/0vddljjnmozzx.js +0 -1
- package/out/_next/static/chunks/0w0sx062qmcsh.js +0 -1
- package/out/_next/static/chunks/0x6i6e6863tir.js +0 -1
- package/out/_next/static/chunks/1--kelnig7pxx.js +0 -1
- package/out/_next/static/chunks/1-ud6hztxiazp.js +0 -1
- package/out/_next/static/chunks/10v4rskkrjgd_.js +0 -1
- package/out/_next/static/chunks/117ys3lltfmcu.js +0 -1
- package/out/_next/static/chunks/13oqt2aoms4f6.js +0 -1
- package/out/_next/static/chunks/14klj_i6-l-10.js +0 -1
- package/out/_next/static/chunks/17ev44x54_jrd.js +0 -1
- package/out/_next/static/chunks/17svumd4o0qnc.js +0 -1
- package/out/_next/static/chunks/17v12p4sfraa0.js +0 -1
- package/out/_next/static/chunks/1a7cup181rjod.js +0 -1
- package/out/_next/static/chunks/1ek5rtpo6rxev.js +0 -1
- package/out/_next/static/chunks/1evp209qbr4cr.js +0 -5
- package/out/_next/static/chunks/1fa265388524p.js +0 -1
- package/out/_next/static/chunks/1g3z43o3h-024.js +0 -31
- package/out/_next/static/chunks/1g_27texazqcj.js +0 -1
- package/out/_next/static/chunks/1j--a56ji33_x.js +0 -1
- package/out/_next/static/chunks/1oara6fkfvgs3.js +0 -1
- package/out/_next/static/chunks/1par9m038tiov.js +0 -1
- package/out/_next/static/chunks/1vkww9l6lgqag.js +0 -1
- package/out/_next/static/chunks/1vpcaaf-0dn7q.js +0 -1
- package/out/_next/static/chunks/1vzmzrjhlm1q5.js +0 -1
- package/out/_next/static/chunks/1zcrrq1fx8g2y.js +0 -4
- package/out/_next/static/chunks/245h82k-g1nxr.js +0 -1
- package/out/_next/static/chunks/24cqjhy669845.js +0 -1
- package/out/_next/static/chunks/259xlbe69b9tc.js +0 -1
- package/out/_next/static/chunks/25ctnyh7njp-d.js +0 -4
- package/out/_next/static/chunks/286ggpetqnwyo.js +0 -3
- package/out/_next/static/chunks/28f1onw3nywbz.js +0 -1
- package/out/_next/static/chunks/28ycc-1519hl2.js +0 -1
- package/out/_next/static/chunks/2dhv35o59yzao.js +0 -1
- package/out/_next/static/chunks/2ey30qeaob985.js +0 -1
- package/out/_next/static/chunks/2f0r-df7tb3pu.js +0 -1
- package/out/_next/static/chunks/2gh4z57fem0_v.js +0 -1
- package/out/_next/static/chunks/2h1uw3cluvmmo.js +0 -1
- package/out/_next/static/chunks/2kje_jvmwsvwo.js +0 -1
- package/out/_next/static/chunks/2l_oqx9idxcs8.js +0 -1
- package/out/_next/static/chunks/2reukv9c7cq_9.js +0 -1
- package/out/_next/static/chunks/2vaoftqgc44cg.js +0 -1
- package/out/_next/static/chunks/2y75diyxqlhzl.js +0 -1
- package/out/_next/static/chunks/2zljunurdji0q.js +0 -1
- package/out/_next/static/chunks/34gp3hvr3j6um.js +0 -1
- package/out/_next/static/chunks/34rcp8qrbp522.js +0 -3
- package/out/_next/static/chunks/38wksra3d_k-4.js +0 -1
- package/out/_next/static/chunks/3ajhvedcs_lzb.js +0 -1
- package/out/_next/static/chunks/3bsvp8qhjqdu0.js +0 -1
- package/out/_next/static/chunks/3g4e2txsrb2p2.js +0 -1
- package/out/_next/static/chunks/3g_h_00xs9u59.js +0 -1
- package/out/_next/static/chunks/3hr-mlwi78nov.js +0 -1
- package/out/_next/static/chunks/3l6t8b3addlw7.js +0 -1
- package/out/_next/static/chunks/3mwoauxszd3mn.js +0 -1
- package/out/_next/static/chunks/3ovd8o_usay7j.js +0 -1
- package/out/_next/static/chunks/3pdpaqzwhhijn.js +0 -1
- package/out/_next/static/chunks/3pyggl13glbdc.js +0 -1
- package/out/_next/static/chunks/3rl45k759wfi1.js +0 -1
- package/out/_next/static/chunks/3urd7r018nel4.js +0 -1
- package/out/_next/static/chunks/3vaho-xrtuchd.js +0 -2
- package/out/_next/static/chunks/3wqs57qehored.js +0 -1
- package/out/_next/static/chunks/40acif2eh_unv.js +0 -1
- package/out/_next/static/chunks/413o2v11bygt5.js +0 -1
- package/out/_next/static/chunks/4227p7752rnny.js +0 -1
- package/out/_next/static/chunks/42oyfkhdvb-u3.js +0 -1
- /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_buildManifest.js +0 -0
- /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58667,39316,e=>{"use strict";var t=e.i(10534),i=e.i(75053),n=e.i(35270);class o{constructor(e,t,i){this.name=e,this.from=t,this.to=i}clone(){return new o(this.name,this.from,this.to)}}e.s(["AnimationRange",0,o],39316);var a=e.i(98491),r=e.i(95180),s=e.i(72491),l=e.i(95397),u=e.i(48477);let c=Object.freeze(new t.Quaternion(0,0,0,0)),h=Object.freeze(t.Vector3.Zero()),T=Object.freeze(t.Vector2.Zero()),m=Object.freeze(r.Size.Zero()),A=Object.freeze(i.Color3.Black()),p=Object.freeze(new i.Color4(0,0,0,0)),_={key:0,repeatCount:0,loopMode:2};class d{static _PrepareAnimation(e,n,o,a,s,l,u,c){let h;if(!isNaN(parseFloat(s))&&isFinite(s)?h=d.ANIMATIONTYPE_FLOAT:s instanceof t.Quaternion?h=d.ANIMATIONTYPE_QUATERNION:s instanceof t.Vector3?h=d.ANIMATIONTYPE_VECTOR3:s instanceof t.Vector2?h=d.ANIMATIONTYPE_VECTOR2:s instanceof i.Color3?h=d.ANIMATIONTYPE_COLOR3:s instanceof i.Color4?h=d.ANIMATIONTYPE_COLOR4:s instanceof r.Size&&(h=d.ANIMATIONTYPE_SIZE),void 0==h)return null;let T=new d(e,n,o,h,u);return T.setKeys([{frame:0,value:s},{frame:a,value:l}]),void 0!==c&&T.setEasingFunction(c),T}get runtimeAnimations(){return this._runtimeAnimations}get hasRunningRuntimeAnimations(){for(let e of this._runtimeAnimations)if(!e.isStopped())return!0;return!1}constructor(e,t,i,n,o,a){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=o,this.enableBlending=a,this._easingFunction=null,this._runtimeAnimations=[],this._events=[],this.blendingSpeed=.01,this._ranges={},this._coreAnimation=null,this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===o?d.ANIMATIONLOOPMODE_CYCLE:o,this.uniqueId=d._UniqueIdGenerator++}toString(e){let t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";let e=!0;for(let i in this._ranges)e||(t+=", "),e=!1,t+=i;t+="}"}return t}addEvent(e){this._events.push(e),this._events.sort((e,t)=>e.frame-t.frame)}removeEvents(e){for(let t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)}getEvents(){return this._events}createRange(e,t,i){this._ranges[e]||(this._ranges[e]=new o(e,t,i))}deleteRange(e,t=!0){let i=this._ranges[e];if(i){if(t){let e=i.from,t=i.to;for(let i=this._keys.length-1;i>=0;i--)this._keys[i].frame>=e&&this._keys[i].frame<=t&&this._keys.splice(i,1)}this._ranges[e]=null}}getRange(e){return this._ranges[e]}getKeys(){return this._keys}getHighestFrame(){let e=0;for(let t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e}getEasingFunction(){return this._easingFunction}setEasingFunction(e){this._easingFunction=e}floatInterpolateFunction(e,t,i){return(0,n.Lerp)(e,t,i)}floatInterpolateFunctionWithTangents(e,t,i,o,a){return(0,n.Hermite)(e,t,i,o,a)}quaternionInterpolateFunction(e,i,n){return t.Quaternion.Slerp(e,i,n)}quaternionInterpolateFunctionWithTangents(e,i,n,o,a){return t.Quaternion.Hermite(e,i,n,o,a).normalize()}vector3InterpolateFunction(e,i,n){return t.Vector3.Lerp(e,i,n)}vector3InterpolateFunctionWithTangents(e,i,n,o,a){return t.Vector3.Hermite(e,i,n,o,a)}vector2InterpolateFunction(e,i,n){return t.Vector2.Lerp(e,i,n)}vector2InterpolateFunctionWithTangents(e,i,n,o,a){return t.Vector2.Hermite(e,i,n,o,a)}sizeInterpolateFunction(e,t,i){return r.Size.Lerp(e,t,i)}color3InterpolateFunction(e,t,n){return i.Color3.Lerp(e,t,n)}color3InterpolateFunctionWithTangents(e,t,n,o,a){return i.Color3.Hermite(e,t,n,o,a)}color4InterpolateFunction(e,t,n){return i.Color4.Lerp(e,t,n)}color4InterpolateFunctionWithTangents(e,t,n,o,a){return i.Color4.Hermite(e,t,n,o,a)}_getKeyValue(e){return"function"==typeof e?e():e}evaluate(e){return _.key=0,this._interpolate(e,_)}_interpolate(e,t,i=!1){let n;if(t.loopMode===d.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;let o=this._keys;if(this._coreAnimation)n=this._coreAnimation._key;else{let a=o.length;for(n=t.key;n>=0&&e<o[n].frame;)--n;for(;n+1<=a-1&&e>=o[n+1].frame;)++n;if(t.key=n,n<0)return i?void 0:this._getKeyValue(o[0].value);if(n+1>a-1)return i?void 0:this._getKeyValue(o[a-1].value);this._key=n}let a=o[n],r=o[n+1];if(i&&(e===a.frame||e===r.frame))return;let s=this._getKeyValue(a.value),l=this._getKeyValue(r.value);if(1===a.interpolation)if(r.frame>e)return s;else return l;let u=void 0!==a.outTangent&&void 0!==r.inTangent,_=r.frame-a.frame,O=(e-a.frame)/_,M=a.easingFunction||this.getEasingFunction();switch(M&&(O=M.ease(O)),this.dataType){case d.ANIMATIONTYPE_FLOAT:{let e=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*_,l,r.inTangent*_,O):this.floatInterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return(t.offsetValue??0)*t.repeatCount+e}break}case d.ANIMATIONTYPE_QUATERNION:{let e=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.quaternionInterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:break;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.addInPlace((t.offsetValue||c).scale(t.repeatCount))}return e}case d.ANIMATIONTYPE_VECTOR3:{let e=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.vector3InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||h).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_VECTOR2:{let e=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.vector2InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||T).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_SIZE:switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return this.sizeInterpolateFunction(s,l,O);case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return this.sizeInterpolateFunction(s,l,O).add((t.offsetValue||m).scale(t.repeatCount))}break;case d.ANIMATIONTYPE_COLOR3:{let e=u?this.color3InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.color3InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||A).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_COLOR4:{let e=u?this.color4InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.color4InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||p).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:if(d.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,O,t.workValue);return s;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return s}}return 0}matrixInterpolateFunction(e,i,n,o){return d.AllowMatrixDecomposeForInterpolation?o?(t.Matrix.DecomposeLerpToRef(e,i,n,o),o):t.Matrix.DecomposeLerp(e,i,n):o?(t.Matrix.LerpToRef(e,i,n,o),o):t.Matrix.Lerp(e,i,n)}clone(e=!1){let t=new d(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys,!1,e),this._ranges)for(let e in t._ranges={},this._ranges){let i=this._ranges[e];i&&(t._ranges[e]=i.clone())}return t}setKeys(e,t=!1,i=!1){if(t)this._keys=e;else if(this._keys=e.slice(0),i)for(let e=0;e<this._keys.length;e++){let t=this._keys[e];this._keys[e]={frame:t.frame,value:t.value.clone?t.value.clone():t.value,inTangent:t.inTangent&&t.inTangent.clone?t.inTangent.clone():t.inTangent,outTangent:t.outTangent&&t.outTangent.clone?t.outTangent.clone():t.outTangent,interpolation:t.interpolation,lockedTangent:t.lockedTangent,easingFunction:t.easingFunction}}}createKeyForFrame(e){_.key=0;let t=this._interpolate(e,_,!0);if(!t)return this._keys[_.key].frame===e?_.key:_.key+1;let i={frame:e,value:t.clone?t.clone():t};return this._keys.splice(_.key+1,0,i),_.key+1}serialize(){let e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;let t=this.dataType;e.keys=[];let i=this.getKeys();for(let n=0;n<i.length;n++){let o=i[n],a={};switch(a.frame=o.frame,t){case d.ANIMATIONTYPE_FLOAT:a.values=[o.value],void 0!==o.inTangent&&a.values.push(o.inTangent),void 0!==o.outTangent&&(void 0===o.inTangent&&a.values.push(void 0),a.values.push(o.outTangent)),void 0!==o.interpolation&&(void 0===o.inTangent&&a.values.push(void 0),void 0===o.outTangent&&a.values.push(void 0),a.values.push(o.interpolation));break;case d.ANIMATIONTYPE_QUATERNION:case d.ANIMATIONTYPE_MATRIX:case d.ANIMATIONTYPE_VECTOR3:case d.ANIMATIONTYPE_COLOR3:case d.ANIMATIONTYPE_COLOR4:a.values=o.value.asArray(),void 0!=o.inTangent&&a.values.push(o.inTangent.asArray()),void 0!=o.outTangent&&(void 0===o.inTangent&&a.values.push(void 0),a.values.push(o.outTangent.asArray())),void 0!==o.interpolation&&(void 0===o.inTangent&&a.values.push(void 0),void 0===o.outTangent&&a.values.push(void 0),a.values.push(o.interpolation))}e.keys.push(a)}for(let t in e.ranges=[],this._ranges){let i=this._ranges[t];if(!i)continue;let n={};n.name=t,n.from=i.from,n.to=i.to,e.ranges.push(n)}return e}static _UniversalLerp(e,t,i){let n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t}}function O(e,i,n,o=!1,a){let r,s=e;(r="object"==typeof i?i:{referenceFrame:i??0,range:n,cloneOriginalAnimation:o,clonedAnimationName:a}).cloneOriginalAnimation&&((s=e.clone()).name=r.clonedAnimationName||s.name);let l=s.getKeys();if(!l.length)return s;let u=r.referenceFrame&&r.referenceFrame>=0?r.referenceFrame:0,c=0,h=l[0],T=l.length-1,m=l[T],A={referenceValue:h.value,referencePosition:t.TmpVectors.Vector3[0],referenceQuaternion:t.TmpVectors.Quaternion[0],referenceScaling:t.TmpVectors.Vector3[1],keyPosition:t.TmpVectors.Vector3[2],keyQuaternion:t.TmpVectors.Quaternion[1],keyScaling:t.TmpVectors.Vector3[3]},p=h.frame,M=m.frame;if(r.range){let e=s.getRange(r.range);e&&(p=e.from,M=e.to)}else p=r.fromFrame??p,M=r.toFrame??M;p!==h.frame&&(c=s.createKeyForFrame(p)),M!==m.frame&&(T=s.createKeyForFrame(M));let g=s.getKeys();if(1===g.length){let e=s._getKeyValue(g[0]);A.referenceValue=e.clone?e.clone():e}else if(u<=h.frame){let e=s._getKeyValue(h.value);A.referenceValue=e.clone?e.clone():e}else if(u>=m.frame){let e=s._getKeyValue(m.value);A.referenceValue=e.clone?e.clone():e}else{_.key=0;let e=s._interpolate(u,_);A.referenceValue=e.clone?e.clone():e}s.dataType===d.ANIMATIONTYPE_QUATERNION?A.referenceValue.normalize().conjugateInPlace():s.dataType===d.ANIMATIONTYPE_MATRIX&&(A.referenceValue.decompose(A.referenceScaling,A.referenceQuaternion,A.referencePosition),A.referenceQuaternion.normalize().conjugateInPlace());let f=Number.MAX_VALUE,I=r.clipKeys?[]:null;for(let e=c;e<=T;e++){let i=g[e];if((I||r.cloneOriginalAnimation)&&(i={frame:i.frame,value:i.value.clone?i.value.clone():i.value,inTangent:i.inTangent,outTangent:i.outTangent,interpolation:i.interpolation,lockedTangent:i.lockedTangent,easingFunction:i.easingFunction},I&&(f===Number.MAX_VALUE&&(f=i.frame),i.frame-=f,I.push(i))),!e||s.dataType===d.ANIMATIONTYPE_FLOAT||i.value!==h.value)switch(s.dataType){case d.ANIMATIONTYPE_MATRIX:i.value.decompose(A.keyScaling,A.keyQuaternion,A.keyPosition),A.keyPosition.subtractInPlace(A.referencePosition),A.keyScaling.divideInPlace(A.referenceScaling),A.referenceQuaternion.multiplyToRef(A.keyQuaternion,A.keyQuaternion),t.Matrix.ComposeToRef(A.keyScaling,A.keyQuaternion,A.keyPosition,i.value);break;case d.ANIMATIONTYPE_QUATERNION:A.referenceValue.multiplyToRef(i.value,i.value);break;case d.ANIMATIONTYPE_VECTOR2:case d.ANIMATIONTYPE_VECTOR3:case d.ANIMATIONTYPE_COLOR3:case d.ANIMATIONTYPE_COLOR4:i.value.subtractToRef(A.referenceValue,i.value);break;case d.ANIMATIONTYPE_SIZE:i.value.width-=A.referenceValue.width,i.value.height-=A.referenceValue.height;break;default:i.value-=A.referenceValue}}return I&&s.setKeys(I,!0),s}function M(e,t,i,n){let o=new d(e+"Animation",e,i,t,d.ANIMATIONLOOPMODE_CONSTANT);return o.setEasingFunction(n),o}function g(e,t,i,n,o,a,r,s,l,u,c){let h=d._PrepareAnimation(e,i,n,o,a,r,s,l);return h&&(t.getScene&&(c=t.getScene()),c)?c.beginDirectAnimation(t,[h],0,o,h.loopMode!==d.ANIMATIONLOOPMODE_CONSTANT,1,u):null}function f(e,t,i,n,o,a,r,s,l,u,c){let h=d._PrepareAnimation(e,n,o,a,r,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,a,1===h.loopMode,1,c):null}function I(e,t,i,n,o,a,r,s,l,u){let c=d._PrepareAnimation(e,i,n,o,a,r,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,o,1===c.loopMode,1,u)):null}function N(e,t,i,n,o,a,r,s=null,l=!0,u){if(r<=0)return i[e]=t,s&&s(),null;let c=r/1e3*o;return a.setKeys(u??[{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:c,value:t}]),i.animations||(i.animations=[]),i.animations.push(a),n.beginAnimation(i,0,c,!1,1,s??void 0,void 0,l)}function y(e,t){l.SerializationHelper.AppendSerializedAnimations(e,t)}function R(e){let n,o,a=new d(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,s=[];for(e.enableBlending&&(a.enableBlending=e.enableBlending),e.blendingSpeed&&(a.blendingSpeed=e.blendingSpeed),o=0;o<e.keys.length;o++){let a,l,u,c=e.keys[o];switch(r){case d.ANIMATIONTYPE_FLOAT:n=c.values[0],c.values.length>=2&&(a=c.values[1]),c.values.length>=3&&(l=c.values[2]),c.values.length>=4&&(u=c.values[3]);break;case d.ANIMATIONTYPE_QUATERNION:if(n=t.Quaternion.FromArray(c.values),c.values.length>=8){let e=t.Quaternion.FromArray(c.values.slice(4,8));e.equals(t.Quaternion.Zero())||(a=e)}if(c.values.length>=12){let e=t.Quaternion.FromArray(c.values.slice(8,12));e.equals(t.Quaternion.Zero())||(l=e)}c.values.length>=13&&(u=c.values[12]);break;case d.ANIMATIONTYPE_MATRIX:n=t.Matrix.FromArray(c.values),c.values.length>=17&&(u=c.values[16]);break;case d.ANIMATIONTYPE_COLOR3:n=i.Color3.FromArray(c.values),c.values[3]&&(a=i.Color3.FromArray(c.values[3])),c.values[4]&&(l=i.Color3.FromArray(c.values[4])),c.values[5]&&(u=c.values[5]);break;case d.ANIMATIONTYPE_COLOR4:n=i.Color4.FromArray(c.values),c.values[4]&&(a=i.Color4.FromArray(c.values[4])),c.values[5]&&(l=i.Color4.FromArray(c.values[5])),c.values[6]&&(u=i.Color4.FromArray(c.values[6]));break;case d.ANIMATIONTYPE_VECTOR3:default:n=t.Vector3.FromArray(c.values),c.values[3]&&(a=t.Vector3.FromArray(c.values[3])),c.values[4]&&(l=t.Vector3.FromArray(c.values[4])),c.values[5]&&(u=c.values[5])}let h={};h.frame=c.frame,h.value=n,void 0!=a&&(h.inTangent=a),void 0!=l&&(h.outTangent=l),void 0!=u&&(h.interpolation=u),s.push(h)}if(a.setKeys(s),e.ranges)for(o=0;o<e.ranges.length;o++)n=e.ranges[o],a.createRange(n.name,n.from,n.to);return a}async function E(e,t){return await new Promise((i,n)=>{let o=new s.WebRequest;o.addEventListener("readystatechange",()=>{if(4==o.readyState)if(200==o.status){let t=JSON.parse(o.responseText);if(t.animations&&(t=t.animations),t.length){let e=[];for(let i of t)e.push(R(i));i(e)}else{let n=R(t);e&&(n.name=e),i(n)}}else n("Unable to load the animation")}),o.open("GET",t),o.send()})}async function x(e){let t=this?.SnippetUrl??d.SnippetUrl;return await new Promise((i,n)=>{let o=new s.WebRequest;o.addEventListener("readystatechange",()=>{if(4==o.readyState)if(200==o.status){let t=JSON.parse(JSON.parse(o.responseText).jsonPayload);if(t.animations){let n=JSON.parse(t.animations),o=[];for(let t of n.animations){let i=R(t);i.snippetId=e,o.push(i)}i(o)}else{let n=R(JSON.parse(t.animation));n.snippetId=e,i(n)}}else n("Unable to load the snippet "+e)}),o.open("GET",t+"/"+e.replace(/#/g,"/")),o.send()})}d._UniqueIdGenerator=0,d.AllowMatricesInterpolation=!1,d.AllowMatrixDecomposeForInterpolation=!0,d.InheritOriginalValueFromActiveAnimations=!1,d.SnippetUrl="https://snippet.babylonjs.com",d.ANIMATIONTYPE_FLOAT=0,d.ANIMATIONTYPE_VECTOR3=1,d.ANIMATIONTYPE_QUATERNION=2,d.ANIMATIONTYPE_MATRIX=3,d.ANIMATIONTYPE_COLOR3=4,d.ANIMATIONTYPE_COLOR4=7,d.ANIMATIONTYPE_VECTOR2=5,d.ANIMATIONTYPE_SIZE=6,d.ANIMATIONLOOPMODE_RELATIVE=0,d.ANIMATIONLOOPMODE_CYCLE=1,d.ANIMATIONLOOPMODE_CONSTANT=2,d.ANIMATIONLOOPMODE_YOYO=4,d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT=5;let P=!1;e.s(["Animation",0,d,"AnimationCreateAnimation",0,M,"AnimationMakeAnimationAdditive",0,O,"AnimationParse",0,R,"RegisterAnimation",0,function(){P||(P=!0,d.Parse=R,d.ParseFromFileAsync=E,d.ParseFromSnippetAsync=x,d.CreateFromSnippetAsync=x,d.CreateAnimation=M,d.CreateAndStartAnimation=g,d.CreateAndStartHierarchyAnimation=f,d.CreateMergeAndStartAnimation=I,d.MakeAnimationAdditive=O,d.TransitionTo=N,d.AppendSerializedAnimations=y,(0,u.RegisterClass)("BABYLON.Animation",d),a.Node._AnimationRangeFactory=(e,t,i)=>new o(e,t,i))},"_StaticOffsetValueColor3",0,A,"_StaticOffsetValueColor4",0,p,"_StaticOffsetValueQuaternion",0,c,"_StaticOffsetValueSize",0,m,"_StaticOffsetValueVector2",0,T,"_StaticOffsetValueVector3",0,h],58667)},14975,e=>{"use strict";var t,i=e.i(10534),n=e.i(27745),o=e.i(98491),a=e.i(54670);class r extends o.Node{get _matrix(){return this._compose(),this._localMatrix}set _matrix(e){(e.updateFlag!==this._localMatrix.updateFlag||this._needToCompose)&&(this._needToCompose=!1,this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose())}constructor(e,t,n=null,o=null,a=null,r=null,s=null){super(e,t.getScene(),!1),this.name=e,this.children=[],this.animations=[],this._index=null,this._scalingDeterminant=1,this._needToDecompose=!0,this._needToCompose=!1,this._linkedTransformNode=null,this._waitingTransformNodeId=null,this._waitingTransformNodeUniqueId=null,this._skeleton=t,this._localMatrix=o?.clone()??i.Matrix.Identity(),this._restMatrix=a??this._localMatrix.clone(),this._bindMatrix=r??this._localMatrix.clone(),this._index=s,this._absoluteMatrix=new i.Matrix,this._absoluteBindMatrix=new i.Matrix,this._absoluteInverseBindMatrix=new i.Matrix,this._finalMatrix=new i.Matrix,t.bones.push(this),this.setParent(n,!1),this._updateAbsoluteBindMatrices()}getClassName(){return"Bone"}getSkeleton(){return this._skeleton}get parent(){return this._parentNode}getParent(){return this.parent}getChildren(){return this.children}getIndex(){return null===this._index?this.getSkeleton().bones.indexOf(this):this._index}set parent(e){this.setParent(e)}setParent(e,t=!0){if(this.parent!==e){if(this.parent){let e=this.parent.children.indexOf(this);-1!==e&&this.parent.children.splice(e,1)}this._parentNode=e,this.parent&&this.parent.children.push(this),t&&this._updateAbsoluteBindMatrices(),this.markAsDirty()}}getLocalMatrix(){return this._compose(),this._localMatrix}getBindMatrix(){return this._bindMatrix}getBaseMatrix(){return this.getBindMatrix()}getRestMatrix(){return this._restMatrix}getRestPose(){return this.getRestMatrix()}setRestMatrix(e){this._restMatrix.copyFrom(e)}setRestPose(e){this.setRestMatrix(e)}getBindPose(){return this.getBindMatrix()}setBindMatrix(e){this.updateMatrix(e)}setBindPose(e){this.setBindMatrix(e)}getFinalMatrix(){return this._finalMatrix}getWorldMatrix(){return this.getFinalMatrix()}returnToRest(){if(this._linkedTransformNode){let e=i.TmpVectors.Vector3[0],t=i.TmpVectors.Quaternion[0],n=i.TmpVectors.Vector3[1];this.getRestMatrix().decompose(e,t,n),this._linkedTransformNode.position.copyFrom(n),this._linkedTransformNode.rotationQuaternion=this._linkedTransformNode.rotationQuaternion??i.Quaternion.Identity(),this._linkedTransformNode.rotationQuaternion.copyFrom(t),this._linkedTransformNode.scaling.copyFrom(e)}else this._matrix=this._restMatrix}getAbsoluteInverseBindMatrix(){return this._absoluteInverseBindMatrix}getInvertedAbsoluteTransform(){return this.getAbsoluteInverseBindMatrix()}getAbsoluteMatrix(){return this._skeleton.computeAbsoluteMatrices(),this._absoluteMatrix}getAbsoluteTransform(){return this.getAbsoluteMatrix()}linkTransformNode(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++}getTransformNode(){return this._linkedTransformNode}get position(){return this._decompose(),this._localPosition}set position(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()}get rotation(){return this.getRotation()}set rotation(e){this.setRotation(e)}get rotationQuaternion(){return this._decompose(),this._localRotation}set rotationQuaternion(e){this.setRotationQuaternion(e)}get scaling(){return this.getScale()}set scaling(e){this.setScale(e)}get animationPropertiesOverride(){return this._skeleton.animationPropertiesOverride}_decompose(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=i.Vector3.Zero(),this._localRotation=i.Quaternion.Zero(),this._localPosition=i.Vector3.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))}_compose(){if(this._needToCompose){if(!this._localScaling){this._needToCompose=!1;return}this._needToCompose=!1,i.Matrix.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix)}}updateMatrix(e,t=!0,i=!0){this._bindMatrix.copyFrom(e),t&&this._updateAbsoluteBindMatrices(),i?this._matrix=e:this.markAsDirty()}_updateAbsoluteBindMatrices(e,t=!0){if(e||(e=this._bindMatrix),this.parent?e.multiplyToRef(this.parent._absoluteBindMatrix,this._absoluteBindMatrix):this._absoluteBindMatrix.copyFrom(e),this._absoluteBindMatrix.invertToRef(this._absoluteInverseBindMatrix),t)for(let e=0;e<this.children.length;e++)this.children[e]._updateAbsoluteBindMatrices();this._scalingDeterminant=0>this._absoluteBindMatrix.determinant()?-1:1}markAsDirty(){return this._currentRenderId++,this._childUpdateId++,this._skeleton._markAsDirty(),this}_markAsDirtyAndCompose(){this.markAsDirty(),this._needToCompose=!0}_markAsDirtyAndDecompose(){this.markAsDirty(),this._needToDecompose=!0}_updatePosition(e,t=0,n,o=!0){let a=this.getLocalMatrix();if(0==t)o?(a.addAtIndex(12,e.x),a.addAtIndex(13,e.y),a.addAtIndex(14,e.z)):a.setTranslationFromFloats(e.x,e.y,e.z);else{let t=r._TmpMats[0],s=r._TmpVecs[0];this.parent?(t.copyFrom(this.parent.getAbsoluteMatrix()),n&&t.multiplyToRef(n.getWorldMatrix(),t)):i.Matrix.IdentityToRef(t),o&&t.setTranslationFromFloats(0,0,0),t.invert(),i.Vector3.TransformCoordinatesToRef(e,t,s),o?(a.addAtIndex(12,s.x),a.addAtIndex(13,s.y),a.addAtIndex(14,s.z)):a.setTranslationFromFloats(s.x,s.y,s.z)}this._markAsDirtyAndDecompose()}translate(e,t=0,i){this._updatePosition(e,t,i,!0)}setPosition(e,t=0,i){this._updatePosition(e,t,i,!1)}setAbsolutePosition(e,t){this.setPosition(e,1,t)}scale(e,t,n,o=!1){let a=this.getLocalMatrix(),s=r._TmpMats[0];for(let o of(i.Matrix.ScalingToRef(e,t,n,s),s.multiplyToRef(a,a),s.invert(),this.children)){let i=o.getLocalMatrix();i.multiplyToRef(s,i),i.multiplyAtIndex(12,e),i.multiplyAtIndex(13,t),i.multiplyAtIndex(14,n),o._markAsDirtyAndDecompose()}if(this._markAsDirtyAndDecompose(),o)for(let i of this.children)i.scale(e,t,n,o)}setScale(e){this._decompose(),this._localScaling.copyFrom(e),this._markAsDirtyAndCompose()}getScale(){return this._decompose(),this._localScaling}getScaleToRef(e){this._decompose(),e.copyFrom(this._localScaling)}setYawPitchRoll(e,t,n,o=0,a){if(0===o){let s=r._TmpQuat;i.Quaternion.RotationYawPitchRollToRef(e,t,n,s),this.setRotationQuaternion(s,o,a);return}let s=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(s,a))return;let l=r._TmpMats[1];i.Matrix.RotationYawPitchRollToRef(e,t,n,l),s.multiplyToRef(l,l),this._rotateWithMatrix(l,o,a)}rotate(e,t,n=0,o){let a=r._TmpMats[0];a.setTranslationFromFloats(0,0,0),i.Matrix.RotationAxisToRef(e,t,a),this._rotateWithMatrix(a,n,o)}setAxisAngle(e,t,n=0,o){if(0===n){let a=r._TmpQuat;i.Quaternion.RotationAxisToRef(e,t,a),this.setRotationQuaternion(a,n,o);return}let a=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(a,o))return;let s=r._TmpMats[1];i.Matrix.RotationAxisToRef(e,t,s),a.multiplyToRef(s,s),this._rotateWithMatrix(s,n,o)}setRotation(e,t=0,i){this.setYawPitchRoll(e.y,e.x,e.z,t,i)}setRotationQuaternion(e,t=0,n){if(0===t){this._decompose(),this._localRotation.copyFrom(e),this._markAsDirtyAndCompose();return}let o=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(o,n))return;let a=r._TmpMats[1];i.Matrix.FromQuaternionToRef(e,a),o.multiplyToRef(a,a),this._rotateWithMatrix(a,t,n)}setRotationMatrix(e,t=0,n){if(0===t){let o=r._TmpQuat;i.Quaternion.FromRotationMatrixToRef(e,o),this.setRotationQuaternion(o,t,n);return}let o=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(o,n))return;let a=r._TmpMats[1];a.copyFrom(e),o.multiplyToRef(e,a),this._rotateWithMatrix(a,t,n)}_rotateWithMatrix(e,t=0,i){let n=this.getLocalMatrix(),o=n.m[12],a=n.m[13],s=n.m[14],l=this.getParent(),u=r._TmpMats[3],c=r._TmpMats[4];l&&1==t?(i?(u.copyFrom(i.getWorldMatrix()),l.getAbsoluteMatrix().multiplyToRef(u,u)):u.copyFrom(l.getAbsoluteMatrix()),c.copyFrom(u),c.invert(),n.multiplyToRef(u,n),n.multiplyToRef(e,n),n.multiplyToRef(c,n)):1==t&&i?(u.copyFrom(i.getWorldMatrix()),c.copyFrom(u),c.invert(),n.multiplyToRef(u,n),n.multiplyToRef(e,n),n.multiplyToRef(c,n)):n.multiplyToRef(e,n),n.setTranslationFromFloats(o,a,s),this._markAsDirtyAndDecompose()}_getAbsoluteInverseMatrixUnscaledToRef(e,t){let n=r._TmpMats[2];return e.copyFrom(this.getAbsoluteMatrix()),t?(e.multiplyToRef(t.getWorldMatrix(),e),i.Matrix.ScalingToRef(t.scaling.x,t.scaling.y,t.scaling.z,n)):i.Matrix.IdentityToRef(n),e.invert(),!isNaN(e.m[0])&&(n.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyToRef(n,e),!0)}getPosition(e=0,t=null){let n=i.Vector3.Zero();return this.getPositionToRef(e,t,n),n}getPositionToRef(e=0,t,i){if(0==e){let e=this.getLocalMatrix();i.x=e.m[12],i.y=e.m[13],i.z=e.m[14]}else{let e=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&e.multiplyToRef(t.getWorldMatrix(),e),i.x=e.m[12],i.y=e.m[13],i.z=e.m[14]}}getAbsolutePosition(e=null){let t=i.Vector3.Zero();return this.getPositionToRef(1,e,t),t}getAbsolutePositionToRef(e,t){this.getPositionToRef(1,e,t)}computeAbsoluteMatrices(){if(this._compose(),this.parent)this._localMatrix.multiplyToRef(this.parent._absoluteMatrix,this._absoluteMatrix);else{this._absoluteMatrix.copyFrom(this._localMatrix);let e=this._skeleton.getPoseMatrix();e&&this._absoluteMatrix.multiplyToRef(e,this._absoluteMatrix)}let e=this.children,t=e.length;for(let i=0;i<t;i++)e[i].computeAbsoluteMatrices()}computeAbsoluteTransforms(){this.computeAbsoluteMatrices()}getDirection(e,t=null){let n=i.Vector3.Zero();return this.getDirectionToRef(e,t,n),n}getDirectionToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),i.Vector3.TransformNormalToRef(e,o,n),n.normalize()}getRotation(e=0,t=null){let n=i.Vector3.Zero();return this.getRotationToRef(e,t,n),n}getRotationToRef(e=0,t=null,i){let n=r._TmpQuat;this.getRotationQuaternionToRef(e,t,n),n.toEulerAnglesToRef(i)}getRotationQuaternion(e=0,t=null){let n=i.Quaternion.Identity();return this.getRotationQuaternionToRef(e,t,n),n}getRotationQuaternionToRef(e=0,t=null,i){if(0==e)this._decompose(),i.copyFrom(this._localRotation);else{let e=r._TmpMats[0],n=this.getAbsoluteMatrix();t?n.multiplyToRef(t.getWorldMatrix(),e):e.copyFrom(n),e.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyAtIndex(1,this._scalingDeterminant),e.multiplyAtIndex(2,this._scalingDeterminant),e.decompose(void 0,i,void 0)}}getRotationMatrix(e=0,t){let n=i.Matrix.Identity();return this.getRotationMatrixToRef(e,t,n),n}getRotationMatrixToRef(e=0,t,i){if(0==e)this.getLocalMatrix().getRotationMatrixToRef(i);else{let e=r._TmpMats[0],n=this.getAbsoluteMatrix();t?n.multiplyToRef(t.getWorldMatrix(),e):e.copyFrom(n),e.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyAtIndex(1,this._scalingDeterminant),e.multiplyAtIndex(2,this._scalingDeterminant),e.getRotationMatrixToRef(i)}}getAbsolutePositionFromLocal(e,t=null){let n=i.Vector3.Zero();return this.getAbsolutePositionFromLocalToRef(e,t,n),n}getAbsolutePositionFromLocalToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),i.Vector3.TransformCoordinatesToRef(e,o,n)}getLocalPositionFromAbsolute(e,t=null){let n=i.Vector3.Zero();return this.getLocalPositionFromAbsoluteToRef(e,t,n),n}getLocalPositionFromAbsoluteToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),o.invert(),i.Vector3.TransformCoordinatesToRef(e,o,n)}setCurrentPoseAsRest(){this.setRestMatrix(this.getLocalMatrix())}dispose(){this._linkedTransformNode=null;let e=this._skeleton.bones.indexOf(this);if(-1!==e&&this._skeleton.bones.splice(e,1),this._parentNode&&this._parentNode.children){let e=this._parentNode.children,t=e.indexOf(this);-1!==t&&e.splice(t,1)}super.dispose()}}r._TmpVecs=(0,n.BuildArray)(2,i.Vector3.Zero),r._TmpQuat=i.Quaternion.Identity(),r._TmpMats=(0,n.BuildArray)(5,i.Matrix.Identity),(t=r.prototype).copyAnimationRange??(t.copyAnimationRange=(0,a._MissingSideEffect)("Bone","copyAnimationRange")),e.s(["Bone",0,r])}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20307,31008,68934,18851,7642,5313,28885,e=>{"use strict";var t,i,s,r,n,a,o,l,h,c,u,p,d,f,_,g,m,b,S,C,E,y,x,F,A,v,D,P,O,T,R,M,B,k,w,I,L,U,N,V,G,W,H,q,z,j,$,Z,K,Q,X,Y,J,ee,et,ei,es,er,en,ea,eo,el,eh,ec,eu,ep,ed,ef,e_,eg,em,eb,eS,eC,eE,ey,ex,eF,eA,ev,eD,eP,eO,eT,eR,eM,eB,ek,ew,eI,eL,eU,eN,eV,eG,eW,eH,eq,ez,ej,e$,eZ,eK,eQ,eX,eY,eJ,e0=e.i(57554),e1=e.i(83464),e2=e.i(1719),e3=e.i(75865);class e4{constructor(){this._valueCache={},this.vertexCompilationError=null,this.fragmentCompilationError=null,this.programLinkError=null,this.programValidationError=null,this._isDisposed=!1}get isAsync(){return this.isParallelCompiled}get isReady(){return!!this.program&&(!this.isParallelCompiled||this.engine._isRenderingStateCompiled(this))}_handlesSpectorRebuildCallback(e){e&&this.program&&e(this.program)}setEngine(e){this.engine=e}_fillEffectInformation(e,t,i,s,r,n,a,o){let l,h=this.engine;if(h.supportsUniformBuffers)for(let i in t)e.bindUniformBlock(i,t[i]);for(this.engine.getUniforms(this,i).forEach((e,t)=>{s[i[t]]=e}),this._uniforms=s,l=0;l<r.length;l++)null==e.getUniform(r[l])&&(r.splice(l,1),l--);for(let e of(r.forEach((e,t)=>{n[e]=t}),h.getAttributes(this,a)))o.push(e)}dispose(){this._uniforms={},this._isDisposed=!0}_cacheMatrix(e,t){let i=this._valueCache[e],s=t.updateFlag;return(void 0===i||i!==s)&&(this._valueCache[e]=s,!0)}_cacheFloat2(e,t,i){let s=this._valueCache[e];if(!s||2!==s.length)return s=[t,i],this._valueCache[e]=s,!0;let r=!1;return s[0]!==t&&(s[0]=t,r=!0),s[1]!==i&&(s[1]=i,r=!0),r}_cacheFloat3(e,t,i,s){let r=this._valueCache[e];if(!r||3!==r.length)return r=[t,i,s],this._valueCache[e]=r,!0;let n=!1;return r[0]!==t&&(r[0]=t,n=!0),r[1]!==i&&(r[1]=i,n=!0),r[2]!==s&&(r[2]=s,n=!0),n}_cacheFloat4(e,t,i,s,r){let n=this._valueCache[e];if(!n||4!==n.length)return n=[t,i,s,r],this._valueCache[e]=n,!0;let a=!1;return n[0]!==t&&(n[0]=t,a=!0),n[1]!==i&&(n[1]=i,a=!0),n[2]!==s&&(n[2]=s,a=!0),n[3]!==r&&(n[3]=r,a=!0),a}setInt(e,t){let i=this._valueCache[e];(void 0===i||i!==t)&&this.engine.setInt(this._uniforms[e],t)&&(this._valueCache[e]=t)}setInt2(e,t,i){this._cacheFloat2(e,t,i)&&!this.engine.setInt2(this._uniforms[e],t,i)&&(this._valueCache[e]=null)}setInt3(e,t,i,s){this._cacheFloat3(e,t,i,s)&&!this.engine.setInt3(this._uniforms[e],t,i,s)&&(this._valueCache[e]=null)}setInt4(e,t,i,s,r){this._cacheFloat4(e,t,i,s,r)&&!this.engine.setInt4(this._uniforms[e],t,i,s,r)&&(this._valueCache[e]=null)}setIntArray(e,t){this._valueCache[e]=null,this.engine.setIntArray(this._uniforms[e],t)}setIntArray2(e,t){this._valueCache[e]=null,this.engine.setIntArray2(this._uniforms[e],t)}setIntArray3(e,t){this._valueCache[e]=null,this.engine.setIntArray3(this._uniforms[e],t)}setIntArray4(e,t){this._valueCache[e]=null,this.engine.setIntArray4(this._uniforms[e],t)}setUInt(e,t){let i=this._valueCache[e];(void 0===i||i!==t)&&this.engine.setUInt(this._uniforms[e],t)&&(this._valueCache[e]=t)}setUInt2(e,t,i){this._cacheFloat2(e,t,i)&&!this.engine.setUInt2(this._uniforms[e],t,i)&&(this._valueCache[e]=null)}setUInt3(e,t,i,s){this._cacheFloat3(e,t,i,s)&&!this.engine.setUInt3(this._uniforms[e],t,i,s)&&(this._valueCache[e]=null)}setUInt4(e,t,i,s,r){this._cacheFloat4(e,t,i,s,r)&&!this.engine.setUInt4(this._uniforms[e],t,i,s,r)&&(this._valueCache[e]=null)}setUIntArray(e,t){this._valueCache[e]=null,this.engine.setUIntArray(this._uniforms[e],t)}setUIntArray2(e,t){this._valueCache[e]=null,this.engine.setUIntArray2(this._uniforms[e],t)}setUIntArray3(e,t){this._valueCache[e]=null,this.engine.setUIntArray3(this._uniforms[e],t)}setUIntArray4(e,t){this._valueCache[e]=null,this.engine.setUIntArray4(this._uniforms[e],t)}setArray(e,t){this._valueCache[e]=null,this.engine.setArray(this._uniforms[e],t)}setArray2(e,t){this._valueCache[e]=null,this.engine.setArray2(this._uniforms[e],t)}setArray3(e,t){this._valueCache[e]=null,this.engine.setArray3(this._uniforms[e],t)}setArray4(e,t){this._valueCache[e]=null,this.engine.setArray4(this._uniforms[e],t)}setMatrices(e,t){t&&(this._valueCache[e]=null,this.engine.setMatrices(this._uniforms[e],t))}setMatrix(e,t){this._cacheMatrix(e,t)&&!this.engine.setMatrices(this._uniforms[e],t.asArray())&&(this._valueCache[e]=null)}setMatrix3x3(e,t){this._valueCache[e]=null,this.engine.setMatrix3x3(this._uniforms[e],t)}setMatrix2x2(e,t){this._valueCache[e]=null,this.engine.setMatrix2x2(this._uniforms[e],t)}setFloat(e,t){let i=this._valueCache[e];(void 0===i||i!==t)&&this.engine.setFloat(this._uniforms[e],t)&&(this._valueCache[e]=t)}setVector2(e,t){this._cacheFloat2(e,t.x,t.y)&&!this.engine.setFloat2(this._uniforms[e],t.x,t.y)&&(this._valueCache[e]=null)}setFloat2(e,t,i){this._cacheFloat2(e,t,i)&&!this.engine.setFloat2(this._uniforms[e],t,i)&&(this._valueCache[e]=null)}setVector3(e,t){this._cacheFloat3(e,t.x,t.y,t.z)&&!this.engine.setFloat3(this._uniforms[e],t.x,t.y,t.z)&&(this._valueCache[e]=null)}setFloat3(e,t,i,s){this._cacheFloat3(e,t,i,s)&&!this.engine.setFloat3(this._uniforms[e],t,i,s)&&(this._valueCache[e]=null)}setVector4(e,t){this._cacheFloat4(e,t.x,t.y,t.z,t.w)&&!this.engine.setFloat4(this._uniforms[e],t.x,t.y,t.z,t.w)&&(this._valueCache[e]=null)}setQuaternion(e,t){this._cacheFloat4(e,t.x,t.y,t.z,t.w)&&!this.engine.setFloat4(this._uniforms[e],t.x,t.y,t.z,t.w)&&(this._valueCache[e]=null)}setFloat4(e,t,i,s,r){this._cacheFloat4(e,t,i,s,r)&&!this.engine.setFloat4(this._uniforms[e],t,i,s,r)&&(this._valueCache[e]=null)}setColor3(e,t){this._cacheFloat3(e,t.r,t.g,t.b)&&!this.engine.setFloat3(this._uniforms[e],t.r,t.g,t.b)&&(this._valueCache[e]=null)}setColor4(e,t,i){this._cacheFloat4(e,t.r,t.g,t.b,i)&&!this.engine.setFloat4(this._uniforms[e],t.r,t.g,t.b,i)&&(this._valueCache[e]=null)}setDirectColor4(e,t){this._cacheFloat4(e,t.r,t.g,t.b,t.a)&&!this.engine.setFloat4(this._uniforms[e],t.r,t.g,t.b,t.a)&&(this._valueCache[e]=null)}_getVertexShaderCode(){return this.vertexShader?this.engine._getShaderSource(this.vertexShader):null}_getFragmentShaderCode(){return this.fragmentShader?this.engine._getShaderSource(this.fragmentShader):null}}var e7=e.i(25746);let e5={};function e8(e,t,i=""){return i+(t?t+"\n":"")+e}function e6(e,t,i,s,r,n,a){return(a||e5.loadFile||e7.LoadFile)(e,t,i,s,r,n)}function e9(e,t,i,s){if(e){t?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,i?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER,s?e.USE_EXACT_SRGB_CONVERSIONS="":delete e.USE_EXACT_SRGB_CONVERSIONS;return}{let e="";return t&&(e+="#define IS_NDC_HALF_ZRANGE"),i&&(e&&(e+="\n"),e+="#define USE_REVERSE_DEPTHBUFFER"),s&&(e&&(e+="\n"),e+="#define USE_EXACT_SRGB_CONVERSIONS"),e}}e.s(["EngineFunctionContext",0,e5,"_ConcatenateShader",0,e8,"_GetGlobalDefines",0,e9,"_LoadFile",0,e6,"allocateAndCopyTypedBuffer",0,function(e,t,i=!1,s){switch(e){case 3:{let e=new Int8Array(t);return s&&e.set(new Int8Array(s)),e}case 0:{let e=new Uint8Array(t);return s&&e.set(new Uint8Array(s)),e}case 4:{let e=new Int16Array("number"!=typeof t?t:i?t/2:t);return s&&e.set(new Int16Array(s)),e}case 5:case 8:case 9:case 10:case 2:{let e=new Uint16Array("number"!=typeof t?t:i?t/2:t);return s&&e.set(new Uint16Array(s)),e}case 6:{let e=new Int32Array("number"!=typeof t?t:i?t/4:t);return s&&e.set(new Int32Array(s)),e}case 7:case 11:case 12:case 13:case 14:case 15:{let e=new Uint32Array("number"!=typeof t?t:i?t/4:t);return s&&e.set(new Uint32Array(s)),e}case 1:{let e=new Float32Array("number"!=typeof t?t:i?t/4:t);return s&&e.set(new Float32Array(s)),e}}let r=new Uint8Array(t);return s&&r.set(new Uint8Array(s)),r}],31008);let te=new WeakMap,tt={_webGLVersion:2,cachedPipelines:{}};function ti(e){let t=te.get(e);if(!t){if(!e)return tt;t={_webGLVersion:e.TEXTURE_BINDING_3D?2:1,_context:e,parallelShaderCompile:e.getExtension("KHR_parallel_shader_compile")||void 0,cachedPipelines:{}},te.set(e,t)}return t}function ts(e,t,i,s,r,n){let a=ti(s);return n||(n=a._createShaderProgramInjection??tn),n(e,to(t,"vertex",s,a._contextWasLost),to(i,"fragment",s,a._contextWasLost),s,r,a.validateShaderPrograms)}function tr(e,t,i,s,r,n=null,a){var o,l,h,c,u,p,d,f,_,g,m,b;let S=ti(r);a||(a=S._createShaderProgramInjection??tn);let C=S._webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"";return a(e,(o=t,l="vertex",h=s,c=C,u=r,p=S._contextWasLost,to(e8(o,h,c),l,u,p)),(d=i,f="fragment",_=s,g=C,m=r,b=S._contextWasLost,to(e8(d,_,g),f,m,b)),r,n,S.validateShaderPrograms)}function tn(e,t,i,s,r=null,n){let a=s.createProgram();if(e.program=a,!a)throw Error("Unable to create program");return s.attachShader(a,t),s.attachShader(a,i),s.linkProgram(a),e.context=s,e.vertexShader=t,e.fragmentShader=i,e.isParallelCompiled||ta(e,s,n),a}function ta(e,t,i){let s=e.context,r=e.vertexShader,n=e.fragmentShader,a=e.program;if(!s.getProgramParameter(a,s.LINK_STATUS)){if(!t.getShaderParameter(r,t.COMPILE_STATUS)){let i=t.getShaderInfoLog(r);if(i)throw e.vertexCompilationError=i,Error("VERTEX SHADER "+i)}if(!t.getShaderParameter(n,t.COMPILE_STATUS)){let i=t.getShaderInfoLog(n);if(i)throw e.fragmentCompilationError=i,Error("FRAGMENT SHADER "+i)}let i=s.getProgramInfoLog(a);if(i)throw e.programLinkError=i,Error(i)}if(i&&(s.validateProgram(a),!s.getProgramParameter(a,s.VALIDATE_STATUS))){let t=s.getProgramInfoLog(a);if(t)throw e.programValidationError=t,Error(t)}s.deleteShader(r),s.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)}function to(e,t,i,s){let r=i.createShader("vertex"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!r){let e,r=i.NO_ERROR;for(;(e=i.getError())!==i.NO_ERROR;)r=e;throw Error(`Something went wrong while creating a gl ${t} shader object. gl error=${r}, gl isContextLost=${i.isContextLost()}, _contextWasLost=${s}`)}return i.shaderSource(r,e),i.compileShader(r),r}e.s(["_createShaderProgram",0,tn,"_executeWhenRenderingStateIsCompiled",0,function(e,t){if(!e.isParallelCompiled)return void t(e);let i=e.onCompiled;e.onCompiled=()=>{i?.(),t(e)}},"_finalizePipelineContext",0,ta,"_isRenderingStateCompiled",0,function(e,t,i){if(e._isDisposed)return!1;let s=ti(t);return!!(s&&s.parallelShaderCompile&&s.parallelShaderCompile.COMPLETION_STATUS_KHR&&e.program&&t.getProgramParameter(e.program,s.parallelShaderCompile.COMPLETION_STATUS_KHR))&&(ta(e,t,i),!0)},"_preparePipelineContext",0,function(e,t,i,s,r,n,a,o,l,h="",c,u,p){let d=ti(e.context);u||(u=d.createRawShaderProgramInjection??ts),p||(p=d.createShaderProgramInjection??tr),s?e.program=u(e,t,i,e.context,l):e.program=p(e,t,i,o,e.context,l),e.program.__SPECTOR_rebuildProgram=a,c()},"_setProgram",0,function(e,t){t.useProgram(e)},"createPipelineContext",0,function(e,t){let i=new e4,s=ti(e);return s.parallelShaderCompile&&!s.disableParallelShaderCompile&&(i.isParallelCompiled=!0),i.context=s._context,i},"createRawShaderProgram",0,ts,"createShaderProgram",0,tr,"deleteStateObject",0,function(e){te.delete(e)},"getStateObject",0,ti],68934);class tl{constructor(){this.children=[]}isValid(e){return!0}process(e,t,i){let s="";if(this.line){let i=this.line,r=t.processor;if(r){r.lineProcessor&&(i=r.lineProcessor(i,t.isFragment,t.processingContext));let s=t.processor?.attributeKeywordName??"attribute",n=t.isFragment&&t.processor?.varyingFragmentKeywordName?t.processor?.varyingFragmentKeywordName:!t.isFragment&&t.processor?.varyingVertexKeywordName?t.processor?.varyingVertexKeywordName:"varying";!t.isFragment&&r.attributeProcessor&&this.line.startsWith(s)?i=r.attributeProcessor(this.line,e,t.processingContext):r.varyingProcessor&&(r.varyingCheck?.(this.line,t.isFragment)||!r.varyingCheck&&this.line.startsWith(n))?i=r.varyingProcessor(this.line,t.isFragment,e,t.processingContext):r.uniformProcessor&&r.uniformRegexp&&r.uniformRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(i=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):r.uniformBufferProcessor&&r.uniformBufferRegexp&&r.uniformBufferRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(i=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0):r.textureProcessor&&r.textureRegexp&&r.textureRegexp.test(this.line)?i=r.textureProcessor(this.line,t.isFragment,e,t.processingContext):(r.uniformProcessor||r.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer&&(/uniform\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?r.uniformProcessor&&(i=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):r.uniformBufferProcessor&&(i=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)),t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,r.endOfUniformBufferProcessor&&(i=r.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}s+=i+"\n"}for(let r of this.children)s+=r.process(e,t,i);return this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true",i[this.additionalDefineKey]=e[this.additionalDefineKey]),s}}class th{constructor(){this._lines=[]}get currentLine(){return this._lines[this.lineIndex]}get canRead(){return this.lineIndex<this._lines.length-1}set lines(e){for(let t of(this._lines.length=0,e)){if(!t||"\r"===t)continue;if("#"===t[0]){this._lines.push(t);continue}let e=t.trim();if(!e)continue;if(e.startsWith("//")){this._lines.push(t);continue}let i=e.indexOf(";");if(-1===i)this._lines.push(e);else if(i===e.length-1)e.length>1&&this._lines.push(e);else{let e=t.split(";");for(let t=0;t<e.length;t++){let i=e[t];i&&(i=i.trim())&&this._lines.push(i+(t!==e.length-1?";":""))}}}}}class tc extends tl{process(e,t,i){for(let s=0;s<this.children.length;s++){let r=this.children[s];if(r.isValid(e))return r.process(e,t,i)}return""}}class tu extends tl{isValid(e){return this.testExpression.isTrue(e)}}class tp{isTrue(e){return!0}static postfixToInfix(e){let t=[];for(let i of e)if(void 0===tp._OperatorPriority[i])t.push(i);else{let e=t[t.length-1],s=t[t.length-2];t.length-=2,t.push(`(${s}${i}${e})`)}return t[t.length-1]}static infixToPostfix(e){let t=tp._InfixToPostfixCache.get(e);if(t)return t.accessTime=Date.now(),t.result;if(!e.includes("&&")&&!e.includes("||")&&!e.includes(")")&&!e.includes("("))return[e];let i=[],s=-1,r=()=>{""!==(h=h.trim())&&(i.push(h),h="")},n=e=>{s<tp._Stack.length-1&&(tp._Stack[++s]=e)},a=()=>tp._Stack[s],o=()=>-1===s?"!!INVALID EXPRESSION!!":tp._Stack[s--],l=0,h="";for(;l<e.length;){let t=e.charAt(l),c=l<e.length-1?e.substring(l,2+l):"";if("("===t)h="",n(t);else if(")"===t){for(r();-1!==s&&"("!==a();)i.push(o());o()}else if(tp._OperatorPriority[c]>1){for(r();-1!==s&&tp._OperatorPriority[a()]>=tp._OperatorPriority[c];)i.push(o());n(c),l++}else h+=t;l++}for(r();-1!==s;)"("===a()?o():i.push(o());return tp._InfixToPostfixCache.size>=tp.InfixToPostfixCacheLimitSize&&tp.ClearCache(),tp._InfixToPostfixCache.set(e,{result:i,accessTime:Date.now()}),i}static ClearCache(){let e=Array.from(tp._InfixToPostfixCache.entries()).sort((e,t)=>e[1].accessTime-t[1].accessTime);for(let t=0;t<tp.InfixToPostfixCacheCleanupSize;t++)tp._InfixToPostfixCache.delete(e[t][0])}}tp.InfixToPostfixCacheLimitSize=5e4,tp.InfixToPostfixCacheCleanupSize=25e3,tp._InfixToPostfixCache=new Map,tp._OperatorPriority={")":0,"(":1,"||":2,"&&":3},tp._Stack=["","","","","","","","","","","","","","","","","","","",""];class td extends tp{constructor(e,t=!1){super(),this.define=e,this.not=t}isTrue(e){let t=void 0!==e[this.define];return this.not&&(t=!t),t}}class tf extends tp{isTrue(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)}}class t_ extends tp{isTrue(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)}}class tg extends tp{constructor(e,t,i){super(),this.define=e,this.operand=t,this.testValue=i}toString(){return`${this.define} ${this.operand} ${this.testValue}`}isTrue(e){let t=!1,i=parseInt(void 0!=e[this.define]?e[this.define]:this.define),s=parseInt(void 0!=e[this.testValue]?e[this.testValue]:this.testValue);if(isNaN(i)||isNaN(s))return!1;switch(this.operand){case">":t=i>s;break;case"<":t=i<s;break;case"<=":t=i<=s;break;case">=":t=i>=s;break;case"==":t=i===s;break;case"!=":t=i!==s}return t}}let tm=/defined\s*?\((.+?)\)/g,tb=/defined\s*?\[(.+?)\]/g,tS=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g,tC=/__decl__/,tE=/light\{X\}.(\w*)/g,ty=/\{X\}/g,tx=[],tF=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;function tA(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)}function tv(e,t,i,s){t.processor?.preProcessShaderCode&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),tM(e,t,e=>{t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e,t.defines)),i(function(e,t,i){var s;let r,n,a=function(e,t){if(t.processor?.noPrecision)return e;let i=t.shouldUseHighPrecisionShader;return -1===e.indexOf("precision highp float")?e=i?"precision highp float;\n"+e:"precision mediump float;\n"+e:i||(e=e.replace("precision highp float","precision mediump float")),e}(e,t);if(!t.processor||0===t.processor.shaderLanguage&&-1!==a.indexOf("#version 3")&&(a=a.replace("#version 300 es",""),!t.processor.parseGLES3))return a;let o=t.defines,l=function(e,t){let i=e.defines,s={};for(let e of i){let t=e.replace("#define","").replace(";","").trim().split(" ");s[t[0]]=t.length>1?t[1]:""}return e.processor?.shaderLanguage===0&&(s.GL_ES="true"),s.__VERSION__=e.version,s[e.platformName]="true",e9(s,t?.isNDCHalfZRange,t?.useReverseDepthBuffer,t?.useExactSrgbConversions),s}(t,i);t.processor.preProcessor&&(a=t.processor.preProcessor(a,o,l,t.isFragment,t.processingContext));let h={};return s=a,r=new tl,(n=new th).lineIndex=-1,n.lines=s.split("\n"),tR(n,r,h),a=r.process(l,t,h),t.processor.postProcessor&&(a=t.processor.postProcessor(a,o,t.isFragment,t.processingContext,i?{drawBuffersExtensionDisabled:!i.getCaps().drawBuffersExtension}:{},l,h)),i?._features.needShaderCodeInlining&&(a=i.inlineShaderCode(a)),a}(e,t,s),e)})}function tD(e,t,i){return i.processor&&i.processor.finalizeShaders?i.processor.finalizeShaders(e,t,i.processingContext):{vertexCode:e,fragmentCode:t}}function tP(e){let t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new td(t[1].trim(),"!"===e[0]);let i="",s=0;for(i of["==","!=",">=","<=","<",">"])if((s=e.indexOf(i))>-1)break;if(-1===s)return new td(e);let r=e.substring(0,s).trim(),n=e.substring(s+i.length).trim();return new tg(r,i,n)}function tO(e,t){let i=new tu,s=e.substring(0,t),r=e.substring(t);return r=r.substring(0,(r.indexOf("//")+1||r.length+1)-1).trim(),"#ifdef"===s?i.testExpression=new td(r):"#ifndef"===s?i.testExpression=new td(r,!0):i.testExpression=function(e){e=e.replace(tm,"defined[$1]");let t=tp.infixToPostfix(e),i=[];for(let e of t)if("||"!==e&&"&&"!==e)i.push(e);else if(i.length>=2){let t=i[i.length-1],s=i[i.length-2];i.length-=2;let r="&&"==e?new t_:new tf;"string"==typeof t&&(t=t.replace(tb,"defined($1)")),"string"==typeof s&&(s=s.replace(tb,"defined($1)")),r.leftOperand="string"==typeof s?tP(s):s,r.rightOperand="string"==typeof t?tP(t):t,i.push(r)}let s=i[i.length-1];return"string"==typeof s&&(s=s.replace(tb,"defined($1)")),"string"==typeof s?tP(s):s}(r),i}function tT(e,t,i,s){let r;for(;tR(e,i,s);){let n=(r=e.currentLine).substring(0,5).toLowerCase();if("#else"===n){let i=new tl;t.children.push(i),tR(e,i,s);return}if("#elif"===n){let e=tO(r,5);t.children.push(e),i=e}}}function tR(e,t,i){for(;e.canRead;){e.lineIndex++;let s=e.currentLine;if(s.indexOf("#")>=0){let r=tF.exec(s);if(r&&r.length){switch(r[0]){case"#ifdef":{let r=new tc;t.children.push(r);let n=tO(s,6);r.children.push(n),tT(e,r,n,i);break}case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":{let r=new tc;t.children.push(r);let n=tO(s,7);r.children.push(n),tT(e,r,n,i);break}case"#if":{let r=new tc,n=tO(s,3);t.children.push(r),r.children.push(n),tT(e,r,n,i)}}continue}}let r=new tl;if(r.line=s,t.children.push(r),"#"===s[0]&&"d"===s[1]){let e=s.replace(";","").split(" ");r.additionalDefineKey=e[1],3===e.length&&(r.additionalDefineValue=e[2])}}return!1}function tM(e,t,i){let s;for(tx.length=0;null!==(s=tS.exec(e));)tx.push(s);let r=[e],n=!1;for(let e of tx){let s=e[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(tC,""),t.supportsUniformBuffers&&(s=s.replace("Vertex","Ubo").replace("Fragment","Ubo")),s+="Declaration"),t.includesShadersStore[s]){let i=t.includesShadersStore[s];if(e[2]){let t=e[3].split(",");for(let e=0;e<t.length;e+=2){let s=RegExp(t[e],"g"),r=t[e+1];i=i.replace(s,r)}}if(e[4]){let s=e[5];if(-1!==s.indexOf("..")){let e=s.split(".."),r=parseInt(e[0]),n=parseInt(e[1]),a=i.slice(0);i="",isNaN(n)&&(n=t.indexParameters[e[1]]);for(let e=r;e<n;e++)t.supportsUniformBuffers||(a=a.replace(tE,(e,t)=>t+"{X}")),i+=a.replace(ty,e.toString())+"\n"}else t.supportsUniformBuffers||(i=i.replace(tE,(e,t)=>t+"{X}")),i=i.replace(ty,s)}let a=[];for(let t of r){let s=t.split(e[0]);for(let e=0;e<s.length-1;e++)a.push(s[e]),a.push(i);a.push(s[s.length-1])}r=a,n=n||i.indexOf("#include<")>=0||i.indexOf("#include <")>=0}else{let e=t.shadersRepository+"ShadersInclude/"+s+".fx";(0,e7.LoadFile)(e,e=>{t.includesShadersStore[s]=e,tM(r.join(""),t,i)});return}}tx.length=0;let a=r.join("");n?tM(a.toString(),t,i):i(a)}function tB(e,t){return ti(t).cachedPipelines[e]}function tk(e){let t=e._name,i=e.context;if(t&&i){let e=ti(i),s=e.cachedPipelines[t];s?.dispose(),delete e.cachedPipelines[t]}}function tw(e,t,i,s,r,n,a){let o,l,h=(0,e3.IsWindowObjectExist)()?n?.getHostDocument():null;o="string"==typeof t?t:"string"==typeof t.vertexSource?"source:"+t.vertexSource:"string"==typeof t.vertexElement?h?.getElementById(t.vertexElement)||t.vertexElement:t.vertex||t,l="string"==typeof t?t:"string"==typeof t.fragmentSource?"source:"+t.fragmentSource:"string"==typeof t.fragmentElement?h?.getElementById(t.fragmentElement)||t.fragmentElement:t.fragment||t;let c=[void 0,void 0],u=()=>{if(c[0]&&c[1]){let[o,l]=c;tA(e),tv(o,e,(o,h)=>{a&&(a._vertexSourceCodeBeforeMigration=h),i&&(o=i("vertex",o)),e.isFragment=!0,tv(l,e,(n,l)=>{var h,c,u,p;a&&(a._fragmentSourceCodeBeforeMigration=l),i&&(n=i("fragment",n));let d=tD(o,n,e);e=null;let f=(h=d.vertexCode,c=d.fragmentCode,u=t,p=r,u?{vertexSourceCode:(1===p?"//":"")+"#define SHADER_NAME vertex:"+(u.vertexElement||u.vertex||u.spectorName||u)+"\n"+h,fragmentSourceCode:(1===p?"//":"")+"#define SHADER_NAME fragment:"+(u.fragmentElement||u.fragment||u.spectorName||u)+"\n"+c}:{vertexSourceCode:h,fragmentSourceCode:c});s?.(f.vertexSourceCode,f.fragmentSourceCode)},n)},n)}};tI(o,"Vertex","",e=>{a&&(a._rawVertexSourceCode=e),c[0]=e,u()},r),tI(l,"Fragment","Pixel",e=>{a&&(a._rawFragmentSourceCode=e),c[1]=e,u()},r)}function tI(e,t,i,s,r,n){let a;if("u">typeof HTMLElement&&e instanceof HTMLElement)return void s((0,e3.GetDOMTextContent)(e));if("source:"===e.substring(0,7))return void s(e.substring(7));if("base64:"===e.substring(0,7))return void s(window.atob(e.substring(7)));let o=e2.ShaderStore.GetShadersStore(r);if(o[e+t+"Shader"])return void s(o[e+t+"Shader"]);if(i&&o[e+i+"Shader"])return void s(o[e+i+"Shader"]);if(a="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:e2.ShaderStore.GetShadersRepository(r)+e,!(n=n||e6))throw Error("loadFileInjection is not defined");n(a+"."+t.toLowerCase()+".fx",s)}e7.LoadFile,e.s(["Finalize",0,tD,"Initialize",0,tA,"Process",0,tv,"ProcessIncludes",0,tM],18851);let tL=(e,t,i,s)=>{try{let r=e.context?ti(e.context):null;r&&(r.disableParallelShaderCompile=e.disableParallelCompilation);let n=e.existingPipelineContext||t(e.shaderProcessingContext);return n._name=e.name,e.name&&r&&(r.cachedPipelines[e.name]=n),i(n,e.vertex,e.fragment,!!e.createAsRaw,"","",e.rebuildRebind,e.defines,e.transformFeedbackVaryings,"",()=>{s(n,()=>{e.onRenderingStateCompiled?.(n)})}),n}catch(e){throw e1.Logger.Error("Error compiling effect"),e}};e.s(["_ProcessShaderCode",0,tw,"createAndPreparePipelineContext",0,tL,"getCachedPipeline",0,tB,"resetCachedPipeline",0,tk],7642);var tU=e.i(4775),tN=e.i(54670);class tV{static get ShadersRepository(){return e2.ShaderStore.ShadersRepository}static set ShadersRepository(e){e2.ShaderStore.ShadersRepository=e}get isDisposed(){return this._isDisposed}get onBindObservable(){return this._onBindObservable||(this._onBindObservable=new e0.Observable),this._onBindObservable}get shaderLanguage(){return this._shaderLanguage}constructor(e,t,i,s=null,r,n=null,a=null,o=null,l=null,h,c="",u=0,p){let d;this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new e0.Observable,this.onErrorObservable=new e0.Observable,this._onBindObservable=null,this._isDisposed=!1,this._refCount=1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._disableParallelShaderCompilation=!1,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._vertexSourceCodeBeforeMigration="",this._fragmentSourceCodeBeforeMigration="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._processCodeAfterIncludes=void 0,this._processFinalCode=null,this._onReleaseEffectsObserver=null,this.name=e,this._key=c;const f=this._key.replace(/\r/g,"").replace(/\n/g,"|");if(t.attributes){if(this._engine=i,this._attributesNames=t.attributes,this._uniformsNames=t.uniformsNames.concat(t.samplers),this._samplerList=t.samplers.slice(),this.defines=t.defines,this.onError=t.onError,this.onCompiled=t.onCompiled,this._fallbacks=t.fallbacks,this._indexParameters=t.indexParameters,this._transformFeedbackVaryings=t.transformFeedbackVaryings||null,this._multiTarget=!!t.multiTarget,this._shaderLanguage=t.shaderLanguage??0,this._disableParallelShaderCompilation=!!t.disableParallelShaderCompilation,t.uniformBuffersNames){this._uniformBuffersNamesList=t.uniformBuffersNames.slice();for(let e=0;e<t.uniformBuffersNames.length;e++)this._uniformBuffersNames[t.uniformBuffersNames[e]]=e}this._processFinalCode=t.processFinalCode??null,this._processCodeAfterIncludes=t.processCodeAfterIncludes??void 0,p=t.extraInitializationsAsync,d=t.existingPipelineContext}else this._engine=r,this.defines=null==n?"":n,this._uniformsNames=i.concat(s),this._samplerList=s?s.slice():[],this._attributesNames=t,this._uniformBuffersNamesList=[],this._shaderLanguage=u,this.onError=l,this.onCompiled=o,this._indexParameters=h,this._fallbacks=a;"WEBGL2"===this._engine.shaderPlatformName&&(d=tB(f,this._engine._gl)??d),this._attributeLocationByName={},this.uniqueId=tV._UniqueIdSeed++,d?(this._pipelineContext=d,this._pipelineContext.setEngine(this._engine),this._onRenderingStateCompiled(this._pipelineContext),this._pipelineContext.program&&(this._pipelineContext.program.__SPECTOR_rebuildProgram=this._rebuildProgram.bind(this))):this._processShaderCodeAsync(null,!1,null,p).catch(e=>{let t=e?.message??String(e),i=Error(`Effect async shader preparation failed for "${String(this.name)}": ${t}`);e&&"string"==typeof e.stack&&(i.stack=`${i.message}
|
|
2
|
-
Caused by: ${e.stack}`),this._processCompilationErrors(i)}),this._onReleaseEffectsObserver=this._engine.onReleaseEffectsObservable.addOnce(()=>{this._onReleaseEffectsObserver=null,this.isDisposed||this.dispose(!0)})}async _processShaderCodeAsync(e=null,t=!1,i=null,s){s&&await s(),this._processingContext=i||this._engine._getShaderProcessingContext(this._shaderLanguage,!1),tw({defines:this.defines.split("\n"),indexParameters:this._indexParameters,isFragment:!1,shouldUseHighPrecisionShader:this._engine._shouldUseHighPrecisionShader,processor:e??this._engine._getShaderProcessor(this._shaderLanguage),supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:e2.ShaderStore.GetShadersRepository(this._shaderLanguage),includesShadersStore:e2.ShaderStore.GetIncludesShadersStore(this._shaderLanguage),version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:this._processingContext,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,processCodeAfterIncludes:this._processCodeAfterIncludes},this.name,this._processFinalCode,(e,i)=>{this._vertexSourceCode=e,this._fragmentSourceCode=i,this._prepareEffect(t)},this._shaderLanguage,this._engine,this)}get key(){return this._key}isReady(){try{return this._isReadyInternal()}catch{return!1}}_isReadyInternal(){return!!this._engine.isDisposed||!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady}getEngine(){return this._engine}getPipelineContext(){return this._pipelineContext}getAttributesNames(){return this._attributesNames}getAttributeLocation(e){return this._attributes[e]}getAttributeLocationByName(e){return this._attributeLocationByName[e]}getAttributesCount(){return this._attributes.length}getUniformIndex(e){return this._uniformsNames.indexOf(e)}getUniform(e){return this._uniforms[e]}getSamplers(){return this._samplerList}getUniformNames(){return this._uniformsNames}getUniformBuffersNames(){return this._uniformBuffersNamesList}getIndexParameters(){return this._indexParameters}getCompilationError(){return this._compilationError}allFallbacksProcessed(){return this._allFallbacksProcessed}async whenCompiledAsync(){return await new Promise(e=>{this.executeWhenCompiled(e)})}executeWhenCompiled(e){this.isReady()?e(this):(this.onCompileObservable.add(t=>{e(t)}),(!this._pipelineContext||this._pipelineContext.isAsync)&&this._checkIsReady(null))}_checkIsReady(e){(0,tU._RetryWithInterval)(()=>this._isReadyInternal()||this._isDisposed,()=>{},t=>{this._processCompilationErrors(t,e)},16,12e4,!0,` - Effect: ${"string"==typeof this.name?this.name:this.key}`)}get vertexSourceCode(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:this._pipelineContext?._getVertexShaderCode()??this._vertexSourceCode}get fragmentSourceCode(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:this._pipelineContext?._getFragmentShaderCode()??this._fragmentSourceCode}get vertexSourceCodeBeforeMigration(){return this._vertexSourceCodeBeforeMigration}get fragmentSourceCodeBeforeMigration(){return this._fragmentSourceCodeBeforeMigration}get rawVertexSourceCode(){return this._rawVertexSourceCode}get rawFragmentSourceCode(){return this._rawFragmentSourceCode}getPipelineGenerationOptions(){return{platformName:this._engine.shaderPlatformName,shaderLanguage:this._shaderLanguage,shaderNameOrContent:this.name,key:this._key,defines:this.defines.split("\n"),addGlobalDefines:!1,extendedProcessingOptions:{indexParameters:this._indexParameters,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,supportsUniformBuffers:this._engine.supportsUniformBuffers},extendedCreatePipelineOptions:{transformFeedbackVaryings:this._transformFeedbackVaryings,createAsRaw:!!(this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride)}}}_rebuildProgram(e,t,i,s){this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=(e,t)=>{s&&s(t)},this.onCompiled=()=>{let e=this.getEngine().scenes;if(e)for(let t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(127);this._pipelineContext._handlesSpectorRebuildCallback?.(i)},this._fallbacks=null,this._prepareEffect()}_onRenderingStateCompiled(e){if(this._pipelineContext=e,this._pipelineContext.setEngine(this._engine),this._attributes=[],this._pipelineContext._fillEffectInformation(this,this._uniformBuffersNames,this._uniformsNames,this._uniforms,this._samplerList,this._samplers,this._attributesNames,this._attributes),this._attributesNames)for(let e=0;e<this._attributesNames.length;e++){let t=this._attributesNames[e];this._attributeLocationByName[t]=this._attributes[e]}this._engine.bindSamplers(this),this._compilationError="",this._isReady=!0,this.onCompiled&&this.onCompiled(this),this.onCompileObservable.notifyObservers(this),this.onCompileObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh(),tV.AutomaticallyClearCodeCache&&this.clearCodeCache()}_prepareEffect(e=!1){let t=this._pipelineContext;this._isReady=!1;try{let i=!!(this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride),s=i?null:this.defines,r=i?this._vertexSourceCodeOverride:this._vertexSourceCode,n=i?this._fragmentSourceCodeOverride:this._fragmentSourceCode,a=this._engine;this._pipelineContext=tL({existingPipelineContext:e?t:null,vertex:r,fragment:n,context:"WEBGL2"===a.shaderPlatformName||"WEBGL1"===a.shaderPlatformName?a._gl:void 0,rebuildRebind:(e,t,i,s)=>this._rebuildProgram(e,t,i,s),defines:s,transformFeedbackVaryings:this._transformFeedbackVaryings,name:this._key.replace(/\r/g,"").replace(/\n/g,"|"),createAsRaw:i,disableParallelCompilation:this._disableParallelShaderCompilation,shaderProcessingContext:this._processingContext,onRenderingStateCompiled:i=>{t&&!e&&this._engine._deletePipelineContext(t),i&&this._onRenderingStateCompiled(i)}},this._engine.createPipelineContext.bind(this._engine),this._engine._preparePipelineContextAsync.bind(this._engine),this._engine._executeWhenRenderingStateIsCompiled.bind(this._engine)),this._pipelineContext.isAsync&&this._checkIsReady(t)}catch(e){this._processCompilationErrors(e,t)}}_getShaderCodeAndErrorLine(e,t,i){let s=null;if(t&&e){let r=t.match(i?/FRAGMENT SHADER ERROR: 0:(\d+?):/:/VERTEX SHADER ERROR: 0:(\d+?):/);if(r&&2===r.length){let t=parseInt(r[1]),n=e.split("\n",-1);n.length>=t&&(s=`Offending line [${t}] in ${i?"fragment":"vertex"} code: ${n[t-1]}`)}}return[e,s]}_processCompilationErrors(e,t=null){this._compilationError="string"==typeof e?.stack?e.stack:e?.message??String(e);let i=this._attributesNames,s=this._fallbacks;if(e1.Logger.Error("Unable to compile effect:"),e1.Logger.Error(`Uniforms: ${this._uniformsNames.join(" ")}`),e1.Logger.Error(`Attributes: ${i.join(" ")}`),e1.Logger.Error("Defines:\n"+this.defines),tV.LogShaderCodeOnCompilationError){let e,t=null,i=null;this._pipelineContext?._getVertexShaderCode()&&([e,t]=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1),e&&(e1.Logger.Error("Vertex code:"),e1.Logger.Error(e))),this._pipelineContext?._getFragmentShaderCode()&&([e,i]=this._getShaderCodeAndErrorLine(this._pipelineContext?._getFragmentShaderCode(),this._compilationError,!0),e&&(e1.Logger.Error("Fragment code:"),e1.Logger.Error(e))),t&&e1.Logger.Error(t),i&&e1.Logger.Error(i)}e1.Logger.Error("Error: "+this._compilationError);let r=()=>{this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this._engine.onEffectErrorObservable.notifyObservers({effect:this,errors:this._compilationError})};t&&(this._pipelineContext=t,this._isReady=!0,r()),s?(this._pipelineContext=null,s.hasMoreFallbacks?(this._allFallbacksProcessed=!1,e1.Logger.Error("Trying next fallback."),this.defines=s.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,r(),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):(this._allFallbacksProcessed=!0,t||r())}get isSupported(){return""===this._compilationError}_bindTexture(e,t){this._engine._bindTexture(this._samplers[e],t,e)}setTexture(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)}setTextureArray(e,t){let i=e+"Ex";if(-1===this._samplerList.indexOf(i+"0")){let s=this._samplerList.indexOf(e);for(let e=1;e<t.length;e++){let t=i+(e-1).toString();this._samplerList.splice(s+e,0,t)}let r=0;for(let e of this._samplerList)this._samplers[e]=r,r+=1}this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t,e)}bindUniformBuffer(e,t){let i=this._uniformBuffersNames[t];void 0===i||tV._BaseCache[i]===e&&this._engine._features.useUBOBindingCache||(tV._BaseCache[i]=e,this._engine.bindUniformBufferBase(e,i,t))}bindUniformBlock(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)}setInt(e,t){return this._pipelineContext.setInt(e,t),this}setInt2(e,t,i){return this._pipelineContext.setInt2(e,t,i),this}setInt3(e,t,i,s){return this._pipelineContext.setInt3(e,t,i,s),this}setInt4(e,t,i,s,r){return this._pipelineContext.setInt4(e,t,i,s,r),this}setIntArray(e,t){return this._pipelineContext.setIntArray(e,t),this}setIntArray2(e,t){return this._pipelineContext.setIntArray2(e,t),this}setIntArray3(e,t){return this._pipelineContext.setIntArray3(e,t),this}setIntArray4(e,t){return this._pipelineContext.setIntArray4(e,t),this}setUInt(e,t){return this._pipelineContext.setUInt(e,t),this}setUInt2(e,t,i){return this._pipelineContext.setUInt2(e,t,i),this}setUInt3(e,t,i,s){return this._pipelineContext.setUInt3(e,t,i,s),this}setUInt4(e,t,i,s,r){return this._pipelineContext.setUInt4(e,t,i,s,r),this}setUIntArray(e,t){return this._pipelineContext.setUIntArray(e,t),this}setUIntArray2(e,t){return this._pipelineContext.setUIntArray2(e,t),this}setUIntArray3(e,t){return this._pipelineContext.setUIntArray3(e,t),this}setUIntArray4(e,t){return this._pipelineContext.setUIntArray4(e,t),this}setFloatArray(e,t){return this._pipelineContext.setArray(e,t),this}setFloatArray2(e,t){return this._pipelineContext.setArray2(e,t),this}setFloatArray3(e,t){return this._pipelineContext.setArray3(e,t),this}setFloatArray4(e,t){return this._pipelineContext.setArray4(e,t),this}setArray(e,t){return this._pipelineContext.setArray(e,t),this}setArray2(e,t){return this._pipelineContext.setArray2(e,t),this}setArray3(e,t){return this._pipelineContext.setArray3(e,t),this}setArray4(e,t){return this._pipelineContext.setArray4(e,t),this}setMatrices(e,t){return this._pipelineContext.setMatrices(e,t),this}setMatrix(e,t){return this._pipelineContext.setMatrix(e,t),this}setMatrix3x3(e,t){return this._pipelineContext.setMatrix3x3(e,t),this}setMatrix2x2(e,t){return this._pipelineContext.setMatrix2x2(e,t),this}setFloat(e,t){return this._pipelineContext.setFloat(e,t),this}setBool(e,t){return this._pipelineContext.setInt(e,+!!t),this}setVector2(e,t){return this._pipelineContext.setVector2(e,t),this}setFloat2(e,t,i){return this._pipelineContext.setFloat2(e,t,i),this}setVector3(e,t){return this._pipelineContext.setVector3(e,t),this}setFloat3(e,t,i,s){return this._pipelineContext.setFloat3(e,t,i,s),this}setVector4(e,t){return this._pipelineContext.setVector4(e,t),this}setQuaternion(e,t){return this._pipelineContext.setQuaternion(e,t),this}setFloat4(e,t,i,s,r){return this._pipelineContext.setFloat4(e,t,i,s,r),this}setColor3(e,t){return this._pipelineContext.setColor3(e,t),this}setColor4(e,t,i){return this._pipelineContext.setColor4(e,t,i),this}setDirectColor4(e,t){return this._pipelineContext.setDirectColor4(e,t),this}clearCodeCache(){this._vertexSourceCode="",this._fragmentSourceCode="",this._fragmentSourceCodeBeforeMigration="",this._vertexSourceCodeBeforeMigration=""}dispose(e=!1){if(e)this._refCount=0;else{if(tV.PersistentMode)return;this._refCount--}this._refCount>0||this._isDisposed||(this._onReleaseEffectsObserver&&(this._engine.onReleaseEffectsObservable.remove(this._onReleaseEffectsObserver),this._onReleaseEffectsObserver=null),this._pipelineContext&&tk(this._pipelineContext),this._engine._releaseEffect(this),this.clearCodeCache(),this._isDisposed=!0)}static RegisterShader(e,t,i,s=0){t&&(e2.ShaderStore.GetShadersStore(s)[`${e}PixelShader`]=t),i&&(e2.ShaderStore.GetShadersStore(s)[`${e}VertexShader`]=i)}static ResetCache(){tV._BaseCache={}}}tV.LogShaderCodeOnCompilationError=!0,tV.PersistentMode=!1,tV.AutomaticallyClearCodeCache=!1,tV._UniqueIdSeed=0,tV._BaseCache={},tV.ShadersStore=e2.ShaderStore.ShadersStore,tV.IncludesShadersStore=e2.ShaderStore.IncludesShadersStore,(t=tV.prototype).setDepthStencilTexture??(t.setDepthStencilTexture=(0,tN._MissingSideEffect)("Effect","setDepthStencilTexture")),(i=tV.prototype).setTextureFromPostProcess??(i.setTextureFromPostProcess=(0,tN._MissingSideEffect)("Effect","setTextureFromPostProcess")),(s=tV.prototype).setTextureFromPostProcessOutput??(s.setTextureFromPostProcessOutput=(0,tN._MissingSideEffect)("Effect","setTextureFromPostProcessOutput")),e.s(["Effect",0,tV],5313);var tG=e.i(47867),tW=e.i(7438),tH=e.i(85240);class tq{constructor(e=!0){this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,e&&this.reset()}get isDirty(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty}get zOffset(){return this._zOffset}set zOffset(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)}get zOffsetUnits(){return this._zOffsetUnits}set zOffsetUnits(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0)}get cullFace(){return this._cullFace}set cullFace(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)}get cull(){return this._cull}set cull(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)}get depthFunc(){return this._depthFunc}set depthFunc(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)}get depthMask(){return this._depthMask}set depthMask(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)}get depthTest(){return this._depthTest}set depthTest(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)}get frontFace(){return this._frontFace}set frontFace(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)}reset(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1}apply(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset||this.zOffsetUnits?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,this.zOffsetUnits)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))}}class tz{get isDirty(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty}get func(){return this._func}set func(e){this._func!==e&&(this._func=e,this._isStencilFuncDirty=!0)}get backFunc(){return this._func}set backFunc(e){this._backFunc!==e&&(this._backFunc=e,this._isStencilFuncDirty=!0)}get funcRef(){return this._funcRef}set funcRef(e){this._funcRef!==e&&(this._funcRef=e,this._isStencilFuncDirty=!0)}get funcMask(){return this._funcMask}set funcMask(e){this._funcMask!==e&&(this._funcMask=e,this._isStencilFuncDirty=!0)}get opStencilFail(){return this._opStencilFail}set opStencilFail(e){this._opStencilFail!==e&&(this._opStencilFail=e,this._isStencilOpDirty=!0)}get opDepthFail(){return this._opDepthFail}set opDepthFail(e){this._opDepthFail!==e&&(this._opDepthFail=e,this._isStencilOpDirty=!0)}get opStencilDepthPass(){return this._opStencilDepthPass}set opStencilDepthPass(e){this._opStencilDepthPass!==e&&(this._opStencilDepthPass=e,this._isStencilOpDirty=!0)}get backOpStencilFail(){return this._backOpStencilFail}set backOpStencilFail(e){this._backOpStencilFail!==e&&(this._backOpStencilFail=e,this._isStencilOpDirty=!0)}get backOpDepthFail(){return this._backOpDepthFail}set backOpDepthFail(e){this._backOpDepthFail!==e&&(this._backOpDepthFail=e,this._isStencilOpDirty=!0)}get backOpStencilDepthPass(){return this._backOpStencilDepthPass}set backOpStencilDepthPass(e){this._backOpStencilDepthPass!==e&&(this._backOpStencilDepthPass=e,this._isStencilOpDirty=!0)}get mask(){return this._mask}set mask(e){this._mask!==e&&(this._mask=e,this._isStencilMaskDirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this._isStencilTestDirty=!0)}constructor(e=!0){this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.useStencilGlobalOnly=!1,e&&this.reset()}reset(){this.stencilMaterial=void 0,this.stencilGlobal?.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0}apply(e){if(!e)return;let t=!this.useStencilGlobalOnly&&!!this.stencilMaterial?.enabled;this.enabled=t?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.func=t?this.stencilMaterial.func:this.stencilGlobal.func,this.backFunc=t?this.stencilMaterial.backFunc:this.stencilGlobal.backFunc,this.funcRef=t?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=t?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.opStencilFail=t?this.stencilMaterial.opStencilFail:this.stencilGlobal.opStencilFail,this.opDepthFail=t?this.stencilMaterial.opDepthFail:this.stencilGlobal.opDepthFail,this.opStencilDepthPass=t?this.stencilMaterial.opStencilDepthPass:this.stencilGlobal.opStencilDepthPass,this.backOpStencilFail=t?this.stencilMaterial.backOpStencilFail:this.stencilGlobal.backOpStencilFail,this.backOpDepthFail=t?this.stencilMaterial.backOpDepthFail:this.stencilGlobal.backOpDepthFail,this.backOpStencilDepthPass=t?this.stencilMaterial.backOpStencilDepthPass:this.stencilGlobal.backOpStencilDepthPass,this.mask=t?this.stencilMaterial.mask:this.stencilGlobal.mask,this.isDirty&&(this._isStencilTestDirty&&(this.enabled?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.mask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFuncSeparate(e.FRONT,this.func,this.funcRef,this.funcMask),e.stencilFuncSeparate(e.BACK,this.backFunc,this.funcRef,this.funcMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOpSeparate(e.FRONT,this.opStencilFail,this.opDepthFail,this.opStencilDepthPass),e.stencilOpSeparate(e.BACK,this.backOpStencilFail,this.backOpDepthFail,this.backOpStencilDepthPass),this._isStencilOpDirty=!1))}}class tj{constructor(){this.reset()}reset(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.func=tj.ALWAYS,this.opStencilFail=tj.KEEP,this.opDepthFail=tj.KEEP,this.opStencilDepthPass=tj.REPLACE,this.backFunc=tj.ALWAYS,this.backOpStencilFail=tj.KEEP,this.backOpDepthFail=tj.KEEP,this.backOpStencilDepthPass=tj.REPLACE}get stencilFunc(){return this.func}set stencilFunc(e){this.func=e}get stencilBackFunc(){return this.backFunc}set stencilBackFunc(e){this.backFunc=e}get stencilFuncRef(){return this.funcRef}set stencilFuncRef(e){this.funcRef=e}get stencilFuncMask(){return this.funcMask}set stencilFuncMask(e){this.funcMask=e}get stencilOpStencilFail(){return this.opStencilFail}set stencilOpStencilFail(e){this.opStencilFail=e}get stencilOpDepthFail(){return this.opDepthFail}set stencilOpDepthFail(e){this.opDepthFail=e}get stencilOpStencilDepthPass(){return this.opStencilDepthPass}set stencilOpStencilDepthPass(e){this.opStencilDepthPass=e}get stencilBackOpStencilFail(){return this.backOpStencilFail}set stencilBackOpStencilFail(e){this.backOpStencilFail=e}get stencilBackOpDepthFail(){return this.backOpDepthFail}set stencilBackOpDepthFail(e){this.backOpDepthFail=e}get stencilBackOpStencilDepthPass(){return this.backOpStencilDepthPass}set stencilBackOpStencilDepthPass(e){this.backOpStencilDepthPass=e}get stencilMask(){return this.mask}set stencilMask(e){this.mask=e}get stencilTest(){return this.enabled}set stencilTest(e){this.enabled=e}}tj.ALWAYS=519,tj.KEEP=7680,tj.REPLACE=7681;class t${constructor(e){this._supportBlendParametersPerTarget=e,this._blendFunctionParameters=Array(32),this._blendEquationParameters=Array(16),this._blendConstants=[,,,,],this._isBlendConstantsDirty=!1,this._alphaBlend=Array(8).fill(!1),this._numTargetEnabled=0,this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this.reset()}get isDirty(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty||this._isBlendEquationParametersDirty}get alphaBlend(){return this._numTargetEnabled>0}set alphaBlend(e){this.setAlphaBlend(e)}setAlphaBlend(e,t=0){this._alphaBlend[t]!==e&&(e?this._numTargetEnabled++:this._numTargetEnabled--,this._alphaBlend[t]=e,this._isAlphaBlendDirty=!0)}setAlphaBlendConstants(e,t,i,s){(this._blendConstants[0]!==e||this._blendConstants[1]!==t||this._blendConstants[2]!==i||this._blendConstants[3]!==s)&&(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=s,this._isBlendConstantsDirty=!0)}setAlphaBlendFunctionParameters(e,t,i,s,r=0){let n=4*r;(this._blendFunctionParameters[n+0]!==e||this._blendFunctionParameters[n+1]!==t||this._blendFunctionParameters[n+2]!==i||this._blendFunctionParameters[n+3]!==s)&&(this._blendFunctionParameters[n+0]=e,this._blendFunctionParameters[n+1]=t,this._blendFunctionParameters[n+2]=i,this._blendFunctionParameters[n+3]=s,this._isBlendFunctionParametersDirty=!0)}setAlphaEquationParameters(e,t,i=0){let s=2*i;(this._blendEquationParameters[s+0]!==e||this._blendEquationParameters[s+1]!==t)&&(this._blendEquationParameters[s+0]=e,this._blendEquationParameters[s+1]=t,this._isBlendEquationParametersDirty=!0)}reset(){this._alphaBlend.fill(!1),this._numTargetEnabled=0,this._blendFunctionParameters.fill(null),this._blendEquationParameters.fill(null),this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1}apply(e,t=1){if(this.isDirty){if(this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1),1===t||!this._supportBlendParametersPerTarget){this._isAlphaBlendDirty&&(this._alphaBlend[0]?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1);return}if(this._isAlphaBlendDirty){for(let i=0;i<t;i++){let t=i<this._numTargetEnabled?i:0;this._alphaBlend[t]?e.enableIndexed(e.BLEND,i):e.disableIndexed(e.BLEND,i)}this._isAlphaBlendDirty=!1}if(this._isBlendFunctionParametersDirty){for(let i=0;i<t;i++){let t=i<this._numTargetEnabled?4*i:0;e.blendFuncSeparateIndexed(i,this._blendFunctionParameters[t+0],this._blendFunctionParameters[t+1],this._blendFunctionParameters[t+2],this._blendFunctionParameters[t+3])}this._isBlendFunctionParametersDirty=!1}if(this._isBlendEquationParametersDirty){for(let i=0;i<t;i++){let t=i<this._numTargetEnabled?2*i:0;e.blendEquationSeparateIndexed(i,this._blendEquationParameters[t+0],this._blendEquationParameters[t+1])}this._isBlendEquationParametersDirty=!1}}}setAlphaMode(e,t){let i=32774;switch(e){case 0:break;case 7:this.setAlphaBlendFunctionParameters(1,771,1,1,t);break;case 8:case 14:this.setAlphaBlendFunctionParameters(1,771,1,771,t);break;case 2:this.setAlphaBlendFunctionParameters(770,771,1,1,t);break;case 6:this.setAlphaBlendFunctionParameters(1,1,0,1,t);break;case 1:this.setAlphaBlendFunctionParameters(770,1,0,1,t);break;case 3:this.setAlphaBlendFunctionParameters(0,769,1,1,t);break;case 4:this.setAlphaBlendFunctionParameters(774,0,1,1,t);break;case 5:this.setAlphaBlendFunctionParameters(770,769,1,1,t);break;case 9:this.setAlphaBlendFunctionParameters(32769,32770,32771,32772,t);break;case 10:this.setAlphaBlendFunctionParameters(1,769,1,771,t);break;case 11:this.setAlphaBlendFunctionParameters(1,1,1,1,t);break;case 12:this.setAlphaBlendFunctionParameters(772,1,0,0,t);break;case 13:this.setAlphaBlendFunctionParameters(775,769,773,771,t);break;case 15:this.setAlphaBlendFunctionParameters(1,1,1,0,t);break;case 16:this.setAlphaBlendFunctionParameters(775,769,0,1,t);break;case 17:this.setAlphaBlendFunctionParameters(770,771,1,771,t);break;case 18:this.setAlphaBlendFunctionParameters(1,1,1,1,t),i=32775;break;case 19:this.setAlphaBlendFunctionParameters(1,1,1,1,t),i=32776;break;case 20:this.setAlphaBlendFunctionParameters(1,35065,0,1,t)}this.setAlphaEquationParameters(i,i,t)}}e.s(["AlphaState",0,t$],28885);var tZ=e.i(58727);function tK(e,t){if(t){let{requestAnimationFrame:i}=t;if("function"==typeof i)return i(e)}if((0,e3.IsWindowObjectExist)()){let{requestAnimationFrame:i}=t||window;if("function"==typeof i)return i(e)}else if("function"==typeof requestAnimationFrame)return requestAnimationFrame(e);return setTimeout(e,16)}class tQ{get frameId(){return this._frameId}get isWebGPU(){return this._isWebGPU}_getShaderProcessor(e){return this._shaderProcessor}_resetAlphaMode(){this._alphaMode.fill(-1),this._alphaEquation.fill(-1)}get shaderPlatformName(){return this._shaderPlatformName}_clearEmptyResources(){this._emptyTexture=null,this._emptyCubeTexture=null,this._emptyTexture3D=null,this._emptyTexture2DArray=null}get useReverseDepthBuffer(){return this._useReverseDepthBuffer}set useReverseDepthBuffer(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,e?this._depthCullingState.depthFunc=518:this._depthCullingState.depthFunc=515)}setColorWrite(e){e!==this._colorWrite&&(this._colorWriteChanged=!0,this._colorWrite=e)}getColorWrite(){return this._colorWrite}get depthCullingState(){return this._depthCullingState}get alphaState(){return this._alphaState}get stencilState(){return this._stencilState}get stencilStateComposer(){return this._stencilStateComposer}_getGlobalDefines(e){if(e){this.isNDCHalfZRange?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,this.useReverseDepthBuffer?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER,this.useExactSrgbConversions?e.USE_EXACT_SRGB_CONVERSIONS="":delete e.USE_EXACT_SRGB_CONVERSIONS;return}{let e="";return this.isNDCHalfZRange&&(e+="#define IS_NDC_HALF_ZRANGE"),this.useReverseDepthBuffer&&(e&&(e+="\n"),e+="#define USE_REVERSE_DEPTHBUFFER"),this.useExactSrgbConversions&&(e&&(e+="\n"),e+="#define USE_EXACT_SRGB_CONVERSIONS"),e}}_rebuildInternalTextures(){for(let e of this._internalTexturesCache.slice())e._rebuild()}_rebuildRenderTargetWrappers(){for(let e of this._renderTargetWrapperCache.slice())e.textures?.some(e=>15===e.source)||e._rebuild()}_rebuildEffects(){for(let e in this._compiledEffects){let t=this._compiledEffects[e];t._pipelineContext=null,t._prepareEffect()}tV.ResetCache()}_rebuildGraphicsResources(){this.wipeCaches(!0),this._rebuildEffects(),this._rebuildComputeEffects?.(),this._rebuildBuffers(),this._rebuildInternalTextures(),this._rebuildTextures(),this._rebuildRenderTargetWrappers(),this.wipeCaches(!0)}_flagContextRestored(){e1.Logger.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1}_restoreEngineAfterContextLost(e){setTimeout(()=>{this._clearEmptyResources();let t=this._depthCullingState.depthTest,i=this._depthCullingState.depthFunc,s=this._depthCullingState.depthMask,r=this._stencilState.stencilTest;e(),this._rebuildGraphicsResources(),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=i,this._depthCullingState.depthMask=s,this._stencilState.stencilTest=r,this._flagContextRestored()},0)}get isDisposed(){return this._isDisposed}get snapshotRendering(){return!1}set snapshotRendering(e){}get snapshotRenderingMode(){return 0}set snapshotRenderingMode(e){}getClassName(){return"AbstractEngine"}get emptyTexture(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,5,!1,!1,1)),this._emptyTexture}get emptyTexture3D(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,5,!1,!1,1)),this._emptyTexture3D}get emptyTexture2DArray(){return this._emptyTexture2DArray||(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,5,!1,!1,1)),this._emptyTexture2DArray}get emptyCubeTexture(){if(!this._emptyCubeTexture){let e=new Uint8Array(4);this._emptyCubeTexture=this.createRawCubeTexture([e,e,e,e,e,e],1,5,0,!1,!1,1)}return this._emptyCubeTexture}get activeRenderLoops(){return this._activeRenderLoops}stopRenderLoop(e){if(!e){this._activeRenderLoops.length=0,this._cancelFrame();return}let t=this._activeRenderLoops.indexOf(e);t>=0&&(this._activeRenderLoops.splice(t,1),0==this._activeRenderLoops.length&&this._cancelFrame())}_cancelFrame(){if(this.customAnimationFrameRequester){if(0!==this._frameHandler){this._frameHandler=0;let{cancelAnimationFrame:e}=this.customAnimationFrameRequester;e&&e(this.customAnimationFrameRequester.requestID),delete this.customAnimationFrameRequester.requestID}return}if(0!==this._frameHandler){let e=this._frameHandler;if(this._frameHandler=0,(0,e3.IsWindowObjectExist)()){let{cancelAnimationFrame:t}=this.getHostWindow()||window;if("function"==typeof t)return t(e)}else if("function"==typeof cancelAnimationFrame)return cancelAnimationFrame(e);return clearTimeout(e)}}beginFrame(){this.onBeginFrameObservable.notifyObservers(this)}endFrame(){this._frameId++,this.onEndFrameObservable.notifyObservers(this)}get maxFPS(){return this._maxFPS}set maxFPS(e){if(this._maxFPS=e,void 0!==e){if(e<=0){this._minFrameTime=Number.MAX_VALUE;return}this._minFrameTime=1e3/e}}_isOverFrameTime(e){if(!e||void 0===this._maxFPS)return!1;let t=e-this._lastFrameTime;return this._lastFrameTime=e,this._renderAccumulator+=t,this._renderAccumulator<this._minFrameTime||(this._renderAccumulator-=this._minFrameTime,this._renderAccumulator>this._minFrameTime&&(this._renderAccumulator=this._minFrameTime),!1)}_processFrame(e){if(this._frameHandler=0,!this._contextWasLost&&!this._isOverFrameTime(e)){let e=!0;(this.isDisposed||!this.renderEvenInBackground&&this._windowIsBackground)&&(e=!1),e&&(this.beginFrame(),this.skipFrameRender||this._renderViews()||this._renderFrame(),this.endFrame())}}_renderLoop(e){this._processFrame(e),this._activeRenderLoops.length>0&&0===this._frameHandler&&this._queueNewFrameForRenderLoop()}_renderFrame(){for(let e=0;e<this._activeRenderLoops.length;e++)(0,this._activeRenderLoops[e])()}_renderViews(){return!1}_queueNewFrame(e,t){return tK(e,t)}_queueNewFrameForRenderLoop(){this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())}runRenderLoop(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),1===this._activeRenderLoops.length&&0===this._frameHandler&&this._queueNewFrameForRenderLoop())}getDepthBuffer(){return this._depthCullingState.depthTest}setDepthBuffer(e){this._depthCullingState.depthTest=e}setZOffset(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e}getZOffset(){let e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e}setZOffsetUnits(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e}getZOffsetUnits(){let e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e}getHostWindow(){return(0,e3.IsWindowObjectExist)()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null}get compatibilityMode(){return this._compatibilityMode}set compatibilityMode(e){this._compatibilityMode=!0}_rebuildTextures(){for(let e of this.scenes)e._rebuildTextures();for(let e of this._virtualScenes)e._rebuildTextures()}_releaseRenderTargetWrapper(e){let t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)}get currentViewport(){return this._cachedViewport}setViewport(e,t,i){let s=t||this.getRenderWidth(),r=i||this.getRenderHeight(),n=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(n*s,a*r,s*e.width,r*e.height)}createCanvasImage(){return document.createElement("img")}createCanvasPath2D(e){return new Path2D(e)}get description(){let e=this.name+this.version;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e}_createTextureBase(e,t,i,s,r=3,n=null,a=null,o,l,h=null,c=null,u=null,p=null,d,f,_){let g="data:"===(e=e||"").substring(0,5),m="blob:"===e.substring(0,5),b=g&&-1!==e.indexOf(";base64,"),S=c||new tZ.InternalTexture(this,1);S!==c&&(S.label=e.substring(0,60));let C=e;!this._transformTextureUrl||b||c||h||(e=this._transformTextureUrl(e)),C!==e&&(S._originalUrl=C);let E=e.lastIndexOf("."),y=p||(E>-1?e.substring(E).toLowerCase():"");y.indexOf("?")>-1&&(y=y.split("?")[0]);let x=tQ.GetCompatibleTextureLoader(y,d);s&&s.addPendingData(S),S.url=e,S.generateMipMaps=!t,S.samplingMode=r,S.invertY=i,S._useSRGBBuffer=this._getUseSRGBBuffer(!!_,t),this._doNotHandleContextLost||(S._buffer=h);let F=null;n&&!c&&(F=S.onLoadedObservable.add(n)),c||this._internalTexturesCache.push(S);let A=(i,c)=>{s&&s.removePendingData(S),e===C?(F&&S.onLoadedObservable.remove(F),tG.EngineStore.UseFallbackTexture&&e!==tG.EngineStore.FallbackTexture&&this._createTextureBase(tG.EngineStore.FallbackTexture,t,S.invertY,s,r,null,a,o,l,h,S),i=(i||"Unknown error")+(tG.EngineStore.UseFallbackTexture?" - Fallback texture was used":""),S.onErrorObservable.notifyObservers({message:i,exception:c}),a&&a(i,c)):(e1.Logger.Warn(`Failed to load ${e}, falling back to ${C}`),this._createTextureBase(C,t,S.invertY,s,r,n,a,o,l,h,S,u,p,d,f,_))};if(x){let t=async e=>{(await x).loadData(e,S,(e,t,i,n,a,l)=>{l?A("TextureLoader failed to load data"):o(S,y,s,{width:e,height:t},S.invertY,!i,n,()=>(a(),!1),r)},f)};if(h){let e=async e=>{try{await t(e)}catch(e){A("Failed to parse texture data",e)}};h instanceof ArrayBuffer?e(new Uint8Array(h)):ArrayBuffer.isView(h)?e(h):a&&a("Unable to load: only ArrayBuffer or ArrayBufferView is supported",null)}else this._loadFile(e,async e=>{try{await t(new Uint8Array(e))}catch(e){A("Failed to parse texture data",e)}},void 0,s?s.offlineProvider:void 0,!0,(e,t)=>{A("Unable to load "+(e&&e.responseURL,t))})}else{let i=e=>{m&&!this._doNotHandleContextLost&&(S._buffer=e),o(S,y,s,e,S.invertY,t,!1,l,r)};!g||b?h&&("string"==typeof h.decoding||h.close)?i(h):(0,e7.LoadImage)(e||"",i,A,s?s.offlineProvider:null,d,S.invertY&&this._features.needsInvertingBitmap?{imageOrientation:"flipY"}:void 0,this):"string"==typeof h||h instanceof ArrayBuffer||ArrayBuffer.isView(h)||h instanceof Blob?(0,e7.LoadImage)(h,i,A,s?s.offlineProvider:null,d,S.invertY&&this._features.needsInvertingBitmap?{imageOrientation:"flipY"}:void 0,this):h&&i(h)}return S}_rebuildBuffers(){for(let e of this._uniformBuffers)e._rebuildAfterContextLost()}get _shouldUseHighPrecisionShader(){return!!(this._caps.highPrecisionShaderSupported&&this._highPrecisionShadersAllowed)}getHostDocument(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:(0,e3.IsDocumentAvailable)()?document:null}getLoadedTexturesCache(){return this._internalTexturesCache}clearInternalTexturesCache(){this._internalTexturesCache.length=0}getCaps(){return this._caps}resetTextureCache(){for(let e in this._boundTexturesCache)Object.prototype.hasOwnProperty.call(this._boundTexturesCache,e)&&(this._boundTexturesCache[e]=null);this._currentTextureChannel=-1}get name(){return this._name}set name(e){this._name=e}static get NpmPackage(){return"babylonjs@9.14.0"}static get Version(){return"9.14.0"}getRenderingCanvas(){return this._renderingCanvas}getAudioContext(){return this._audioContext}getAudioDestination(){return this._audioDestination}setHardwareScalingLevel(e){this._hardwareScalingLevel=e,this.resize()}getHardwareScalingLevel(){return this._hardwareScalingLevel}get doNotHandleContextLost(){return this._doNotHandleContextLost}set doNotHandleContextLost(e){this._doNotHandleContextLost=e}get isStencilEnable(){return this._isStencilEnable}getCreationOptions(){return this._creationOptions}constructor(e,t,i){this._colorWrite=!0,this._colorWriteChanged=!0,this._depthCullingState=new tq,this._stencilStateComposer=new tz,this._stencilState=new tj,this._alphaState=new t$(!1),this._alphaMode=Array(8).fill(-1),this._alphaEquation=Array(8).fill(-1),this._activeRequests=[],this._badOS=!1,this._badDesktopOS=!1,this._compatibilityMode=!0,this._internalTexturesCache=[],this._currentRenderTarget=null,this._boundTexturesCache={},this._activeChannel=0,this._currentTextureChannel=-1,this._viewportCached={x:0,y:0,z:0,w:0},this._isWebGPU=!1,this._enableGPUDebugMarkers=!1,this.onCanvasBlurObservable=new e0.Observable,this.onCanvasFocusObservable=new e0.Observable,this.onNewSceneAddedObservable=new e0.Observable,this.onResizeObservable=new e0.Observable,this.onCanvasPointerOutObservable=new e0.Observable,this.onEffectErrorObservable=new e0.Observable,this.disablePerformanceMonitorInBackground=!1,this.disableVertexArrayObjects=!1,this._frameId=0,this.hostInformation={isMobile:!1},this.isFullscreen=!1,this.enableOfflineSupport=!1,this.disableManifestCheck=!1,this.disableContextMenu=!0,this.currentRenderPassId=0,this.isPointerLock=!1,this.postProcesses=[],this.canvasTabIndex=1,this._contextWasLost=!1,this._useReverseDepthBuffer=!1,this.isNDCHalfZRange=!1,this.hasOriginBottomLeft=!0,this._renderTargetWrapperCache=[],this._compiledEffects={},this._isDisposed=!1,this.scenes=[],this._virtualScenes=[],this.onBeforeTextureInitObservable=new e0.Observable,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this._frameHandler=0,this._activeRenderLoops=[],this.customAnimationFrameRequester=null,this._windowIsBackground=!1,this._boundRenderFunction=e=>this._renderLoop(e),this._lastFrameTime=0,this._renderAccumulator=0,this.skipFrameRender=!1,this.onBeforeShaderCompilationObservable=new e0.Observable,this.onAfterShaderCompilationObservable=new e0.Observable,this.onBeginFrameObservable=new e0.Observable,this.onEndFrameObservable=new e0.Observable,this._transformTextureUrl=null,this._uniformBuffers=[],this._storageBuffers=[],this._highPrecisionShadersAllowed=!0,this.onContextLostObservable=new e0.Observable,this.onContextRestoredObservable=new e0.Observable,this._name="",this.premultipliedAlpha=!0,this.adaptToDeviceRatio=!1,this._lastDevicePixelRatio=1,this._doNotHandleContextLost=!1,this.cullBackFaces=null,this._renderPassNames=["main"],this._fps=60,this._deltaTime=0,this._deterministicLockstep=!1,this._lockstepMaxSteps=4,this._timeStep=1/60,this.onDisposeObservable=new e0.Observable,this.onReleaseEffectsObservable=new e0.Observable,tG.EngineStore.Instances.push(this),this.startTime=tH.PrecisionDate.Now,this._stencilStateComposer.stencilGlobal=this._stencilState,tW.PerformanceConfigurator.SetMatrixPrecision(!!t.useLargeWorldRendering||!!t.useHighPrecisionMatrix),(0,e3.IsNavigatorAvailable)()&&navigator.userAgent&&(this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),t.antialias=e??t.antialias,t.deterministicLockstep=t.deterministicLockstep??!1,t.lockstepMaxSteps=t.lockstepMaxSteps??4,t.timeStep=t.timeStep??1/60,t.stencil=t.stencil??!0,this._audioContext=t.audioEngineOptions?.audioContext??null,this._audioDestination=t.audioEngineOptions?.audioDestination??null,this.premultipliedAlpha=t.premultipliedAlpha??!0,this._doNotHandleContextLost=!!t.doNotHandleContextLost,this._isStencilEnable=!!t.stencil,this.useExactSrgbConversions=t.useExactSrgbConversions??!1,this.canvasTabIndex=t.canvasTabIndex??this.canvasTabIndex;const s=(0,e3.IsWindowObjectExist)()&&window.devicePixelRatio||1,r=t.limitDeviceRatio||s;i=i||t.adaptToDeviceRatio||!1,this.adaptToDeviceRatio=i,this._hardwareScalingLevel=i?1/Math.min(r,s):1,this._lastDevicePixelRatio=s,this._creationOptions=t}resize(e=!1){let t,i;if(this.adaptToDeviceRatio){let e=(0,e3.IsWindowObjectExist)()&&window.devicePixelRatio||1,t=this._lastDevicePixelRatio/e;this._lastDevicePixelRatio=e,this._hardwareScalingLevel*=t}if((0,e3.IsWindowObjectExist)()&&(0,e3.IsDocumentAvailable)())if(this._renderingCanvas){let e=this._renderingCanvas.getBoundingClientRect?.();t=this._renderingCanvas.clientWidth||e?.width||this._renderingCanvas.width*this._hardwareScalingLevel||100,i=this._renderingCanvas.clientHeight||e?.height||this._renderingCanvas.height*this._hardwareScalingLevel||100}else t=window.innerWidth,i=window.innerHeight;else t=this._renderingCanvas?this._renderingCanvas.width:100,i=this._renderingCanvas?this._renderingCanvas.height:100;this.setSize(t/this._hardwareScalingLevel,i/this._hardwareScalingLevel,e)}setSize(e,t,i=!1){if(!this._renderingCanvas||(e|=0,t|=0,!i&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t))return!1;if(this._renderingCanvas.width=e,this._renderingCanvas.height=t,this.scenes){for(let e=0;e<this.scenes.length;e++){let t=this.scenes[e];for(let e=0;e<t.cameras.length;e++)t.cameras[e]._currentRenderId=0}this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this)}return!0}createRawTexture(e,t,i,s,r,n,a,o,l,h,c,u){throw(0,tN._WarnImport)("engine.rawTexture")}createRawCubeTexture(e,t,i,s,r,n,a,o){throw(0,tN._WarnImport)("engine.rawTexture")}createRawTexture3D(e,t,i,s,r,n,a,o,l,h,c){throw(0,tN._WarnImport)("engine.rawTexture")}createRawTexture2DArray(e,t,i,s,r,n,a,o,l,h,c,u){throw(0,tN._WarnImport)("engine.rawTexture")}_sharedInit(e){this._renderingCanvas=e}_setupMobileChecks(){navigator&&navigator.userAgent&&(this._checkForMobile=()=>{let e=navigator.userAgent;this.hostInformation.isMobile=-1!==e.indexOf("Mobile")||-1!==e.indexOf("Mac")&&(0,e3.IsDocumentAvailable)()&&"ontouchend"in document},this._checkForMobile(),(0,e3.IsWindowObjectExist)()&&window.addEventListener("resize",this._checkForMobile))}createVideoElement(e){return document.createElement("video")}_reportDrawCall(e=1){this._drawCalls?.addCount(e,!1)}getFps(){return this._fps}getDeltaTime(){return this._deltaTime}isDeterministicLockStep(){return this._deterministicLockstep}getLockstepMaxSteps(){return this._lockstepMaxSteps}getTimeStep(){return 1e3*this._timeStep}_createImageBitmapFromSource(e,t){throw Error("createImageBitmapFromSource is not implemented")}createImageBitmap(e,t){return createImageBitmap(e,t)}resizeImageBitmap(e,t,i){throw Error("resizeImageBitmap is not implemented")}getFontOffset(e){throw Error("getFontOffset is not implemented")}static _CreateCanvas(e,t){if("u"<typeof document)return new OffscreenCanvas(e,t);let i=document.createElement("canvas");return i.width=e,i.height=t,i}createCanvas(e,t){return tQ._CreateCanvas(e,t)}static _FileToolsLoadImage(e,t,i,s,r,n,a){return(0,e7.LoadImage)(e,t,i,s,r,n,a)}_loadFile(e,t,i,s,r,n){let a=e6(e,t,i,s,r,n);return this._activeRequests.push(a),a.onCompleteObservable.add(()=>{let e=this._activeRequests.indexOf(a);-1!==e&&this._activeRequests.splice(e,1)}),a}static _FileToolsLoadFile(e,t,i,s,r,n){return e5.loadFile?e5.loadFile(e,t,i,s,r,n):(0,e7.LoadFile)(e,t,i,s,r,n)}dispose(){for(this.releaseEffects(),this._isDisposed=!0,this.stopRenderLoop(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._renderingCanvas=null,this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(;this.scenes.length;)this.scenes[0].dispose();for(;this._virtualScenes.length;)this._virtualScenes[0].dispose();for(let e of(this.releaseComputeEffects?.(),tV.ResetCache(),this._activeRequests))e.abort();this._boundRenderFunction=null,this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onNewSceneAddedObservable.clear(),this.onEffectErrorObservable.clear(),(0,e3.IsWindowObjectExist)()&&window.removeEventListener("resize",this._checkForMobile);let e=tG.EngineStore.Instances.indexOf(this);e>=0&&tG.EngineStore.Instances.splice(e,1),tG.EngineStore.Instances.length||(tG.EngineStore.OnEnginesDisposedObservable.notifyObservers(this),tG.EngineStore.OnEnginesDisposedObservable.clear()),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()}static DefaultLoadingScreenFactory(e){throw(0,tN._WarnImport)("LoadingScreen")}static MarkAllMaterialsAsDirty(e,t){for(let i=0;i<tG.EngineStore.Instances.length;i++){let s=tG.EngineStore.Instances[i];for(let i=0;i<s.scenes.length;i++)s.scenes[i].markAllMaterialsAsDirty(e,t)}}static GetCompatibleTextureLoader(e,t){return null}}tQ._RenderPassIdCounter=0,tQ._RescalePostProcessFactory=null,tQ.CollisionsEpsilon=.001,tQ.QueueNewFrame=tK,(r=tQ.prototype).setAlphaEquation??(r.setAlphaEquation=(0,tN._MissingSideEffect)("AbstractEngine","setAlphaEquation")),(n=tQ.prototype).createCubeTextureBase??(n.createCubeTextureBase=(0,tN._MissingSideEffect)("AbstractEngine","createCubeTextureBase")),(a=tQ.prototype).getInputElement??(a.getInputElement=(0,tN._MissingSideEffect)("AbstractEngine","getInputElement")),(o=tQ.prototype).getRenderingCanvasClientRect??(o.getRenderingCanvasClientRect=(0,tN._MissingSideEffect)("AbstractEngine","getRenderingCanvasClientRect")),(l=tQ.prototype).getInputElementClientRect??(l.getInputElementClientRect=(0,tN._MissingSideEffect)("AbstractEngine","getInputElementClientRect")),(h=tQ.prototype).getAspectRatio??(h.getAspectRatio=(0,tN._MissingSideEffect)("AbstractEngine","getAspectRatio")),(c=tQ.prototype).getScreenAspectRatio??(c.getScreenAspectRatio=(0,tN._MissingSideEffect)("AbstractEngine","getScreenAspectRatio")),(u=tQ.prototype).switchFullscreen??(u.switchFullscreen=(0,tN._MissingSideEffect)("AbstractEngine","switchFullscreen")),(p=tQ.prototype).enterFullscreen??(p.enterFullscreen=(0,tN._MissingSideEffect)("AbstractEngine","enterFullscreen")),(d=tQ.prototype).exitFullscreen??(d.exitFullscreen=(0,tN._MissingSideEffect)("AbstractEngine","exitFullscreen")),(f=tQ.prototype).displayLoadingUI??(f.displayLoadingUI=(0,tN._MissingSideEffect)("AbstractEngine","displayLoadingUI")),(_=tQ.prototype).hideLoadingUI??(_.hideLoadingUI=(0,tN._MissingSideEffect)("AbstractEngine","hideLoadingUI")),(g=tQ.prototype).createQuery??(g.createQuery=(0,tN._MissingSideEffect)("AbstractEngine","createQuery")),(m=tQ.prototype).deleteQuery??(m.deleteQuery=(0,tN._MissingSideEffect)("AbstractEngine","deleteQuery")),(b=tQ.prototype).isQueryResultAvailable??(b.isQueryResultAvailable=(0,tN._MissingSideEffect)("AbstractEngine","isQueryResultAvailable")),(S=tQ.prototype).getQueryResult??(S.getQueryResult=(0,tN._MissingSideEffect)("AbstractEngine","getQueryResult")),(C=tQ.prototype).beginOcclusionQuery??(C.beginOcclusionQuery=(0,tN._MissingSideEffect)("AbstractEngine","beginOcclusionQuery")),(E=tQ.prototype).endOcclusionQuery??(E.endOcclusionQuery=(0,tN._MissingSideEffect)("AbstractEngine","endOcclusionQuery")),(y=tQ.prototype).getRenderPassNames??(y.getRenderPassNames=(0,tN._MissingSideEffect)("AbstractEngine","getRenderPassNames")),(x=tQ.prototype).getCurrentRenderPassName??(x.getCurrentRenderPassName=(0,tN._MissingSideEffect)("AbstractEngine","getCurrentRenderPassName")),(F=tQ.prototype).createRenderPassId??(F.createRenderPassId=(0,tN._MissingSideEffect)("AbstractEngine","createRenderPassId")),(A=tQ.prototype).releaseRenderPassId??(A.releaseRenderPassId=(0,tN._MissingSideEffect)("AbstractEngine","releaseRenderPassId")),(v=tQ.prototype).getDepthFunction??(v.getDepthFunction=(0,tN._MissingSideEffect)("AbstractEngine","getDepthFunction")),(D=tQ.prototype).setDepthFunction??(D.setDepthFunction=(0,tN._MissingSideEffect)("AbstractEngine","setDepthFunction")),(P=tQ.prototype).setDepthFunctionToGreater??(P.setDepthFunctionToGreater=(0,tN._MissingSideEffect)("AbstractEngine","setDepthFunctionToGreater")),(O=tQ.prototype).setDepthFunctionToGreaterOrEqual??(O.setDepthFunctionToGreaterOrEqual=(0,tN._MissingSideEffect)("AbstractEngine","setDepthFunctionToGreaterOrEqual")),(T=tQ.prototype).setDepthFunctionToLess??(T.setDepthFunctionToLess=(0,tN._MissingSideEffect)("AbstractEngine","setDepthFunctionToLess")),(R=tQ.prototype).setDepthFunctionToLessOrEqual??(R.setDepthFunctionToLessOrEqual=(0,tN._MissingSideEffect)("AbstractEngine","setDepthFunctionToLessOrEqual")),(M=tQ.prototype).getDepthWrite??(M.getDepthWrite=(0,tN._MissingSideEffect)("AbstractEngine","getDepthWrite")),(B=tQ.prototype).setDepthWrite??(B.setDepthWrite=(0,tN._MissingSideEffect)("AbstractEngine","setDepthWrite")),(k=tQ.prototype).setAlphaConstants??(k.setAlphaConstants=(0,tN._MissingSideEffect)("AbstractEngine","setAlphaConstants")),(w=tQ.prototype).getAlphaMode??(w.getAlphaMode=(0,tN._MissingSideEffect)("AbstractEngine","getAlphaMode")),(I=tQ.prototype).getAlphaEquation??(I.getAlphaEquation=(0,tN._MissingSideEffect)("AbstractEngine","getAlphaEquation")),(L=tQ.prototype).getStencilOperationPass??(L.getStencilOperationPass=(0,tN._MissingSideEffect)("AbstractEngine","getStencilOperationPass")),(U=tQ.prototype).getStencilBackOperationPass??(U.getStencilBackOperationPass=(0,tN._MissingSideEffect)("AbstractEngine","getStencilBackOperationPass")),(N=tQ.prototype).getStencilBuffer??(N.getStencilBuffer=(0,tN._MissingSideEffect)("AbstractEngine","getStencilBuffer")),(V=tQ.prototype).setStencilBuffer??(V.setStencilBuffer=(0,tN._MissingSideEffect)("AbstractEngine","setStencilBuffer")),(G=tQ.prototype).getStencilMask??(G.getStencilMask=(0,tN._MissingSideEffect)("AbstractEngine","getStencilMask")),(W=tQ.prototype).setStencilMask??(W.setStencilMask=(0,tN._MissingSideEffect)("AbstractEngine","setStencilMask")),(H=tQ.prototype).getStencilFunction??(H.getStencilFunction=(0,tN._MissingSideEffect)("AbstractEngine","getStencilFunction")),(q=tQ.prototype).getStencilBackFunction??(q.getStencilBackFunction=(0,tN._MissingSideEffect)("AbstractEngine","getStencilBackFunction")),(z=tQ.prototype).getStencilFunctionReference??(z.getStencilFunctionReference=(0,tN._MissingSideEffect)("AbstractEngine","getStencilFunctionReference")),(j=tQ.prototype).getStencilFunctionMask??(j.getStencilFunctionMask=(0,tN._MissingSideEffect)("AbstractEngine","getStencilFunctionMask")),($=tQ.prototype).setStencilFunction??($.setStencilFunction=(0,tN._MissingSideEffect)("AbstractEngine","setStencilFunction")),(Z=tQ.prototype).setStencilBackFunction??(Z.setStencilBackFunction=(0,tN._MissingSideEffect)("AbstractEngine","setStencilBackFunction")),(K=tQ.prototype).setStencilFunctionReference??(K.setStencilFunctionReference=(0,tN._MissingSideEffect)("AbstractEngine","setStencilFunctionReference")),(Q=tQ.prototype).setStencilFunctionMask??(Q.setStencilFunctionMask=(0,tN._MissingSideEffect)("AbstractEngine","setStencilFunctionMask")),(X=tQ.prototype).getStencilOperationFail??(X.getStencilOperationFail=(0,tN._MissingSideEffect)("AbstractEngine","getStencilOperationFail")),(Y=tQ.prototype).getStencilBackOperationFail??(Y.getStencilBackOperationFail=(0,tN._MissingSideEffect)("AbstractEngine","getStencilBackOperationFail")),(J=tQ.prototype).getStencilOperationDepthFail??(J.getStencilOperationDepthFail=(0,tN._MissingSideEffect)("AbstractEngine","getStencilOperationDepthFail")),(ee=tQ.prototype).getStencilBackOperationDepthFail??(ee.getStencilBackOperationDepthFail=(0,tN._MissingSideEffect)("AbstractEngine","getStencilBackOperationDepthFail")),(et=tQ.prototype).setStencilOperationFail??(et.setStencilOperationFail=(0,tN._MissingSideEffect)("AbstractEngine","setStencilOperationFail")),(ei=tQ.prototype).setStencilBackOperationFail??(ei.setStencilBackOperationFail=(0,tN._MissingSideEffect)("AbstractEngine","setStencilBackOperationFail")),(es=tQ.prototype).setStencilOperationDepthFail??(es.setStencilOperationDepthFail=(0,tN._MissingSideEffect)("AbstractEngine","setStencilOperationDepthFail")),(er=tQ.prototype).setStencilBackOperationDepthFail??(er.setStencilBackOperationDepthFail=(0,tN._MissingSideEffect)("AbstractEngine","setStencilBackOperationDepthFail")),(en=tQ.prototype).setStencilOperationPass??(en.setStencilOperationPass=(0,tN._MissingSideEffect)("AbstractEngine","setStencilOperationPass")),(ea=tQ.prototype).setStencilBackOperationPass??(ea.setStencilBackOperationPass=(0,tN._MissingSideEffect)("AbstractEngine","setStencilBackOperationPass")),(eo=tQ.prototype).cacheStencilState??(eo.cacheStencilState=(0,tN._MissingSideEffect)("AbstractEngine","cacheStencilState")),(el=tQ.prototype).restoreStencilState??(el.restoreStencilState=(0,tN._MissingSideEffect)("AbstractEngine","restoreStencilState")),(eh=tQ.prototype).createDepthStencilTexture??(eh.createDepthStencilTexture=(0,tN._MissingSideEffect)("AbstractEngine","createDepthStencilTexture")),(ec=tQ.prototype).setCompressedTextureExclusions??(ec.setCompressedTextureExclusions=(0,tN._MissingSideEffect)("AbstractEngine","setCompressedTextureExclusions")),(eu=tQ.prototype).setTextureFormatToUse??(eu.setTextureFormatToUse=(0,tN._MissingSideEffect)("AbstractEngine","setTextureFormatToUse")),(ep=tQ.prototype).getGPUFrameTimeCounter??(ep.getGPUFrameTimeCounter=(0,tN._MissingSideEffect)("AbstractEngine","getGPUFrameTimeCounter")),(ed=tQ.prototype).captureGPUFrameTime??(ed.captureGPUFrameTime=(0,tN._MissingSideEffect)("AbstractEngine","captureGPUFrameTime")),(ef=tQ.prototype).registerView??(ef.registerView=(0,tN._MissingSideEffect)("AbstractEngine","registerView")),(e_=tQ.prototype).unRegisterView??(e_.unRegisterView=(0,tN._MissingSideEffect)("AbstractEngine","unRegisterView")),(eg=tQ.prototype).setAlphaMode??(eg.setAlphaMode=(0,tN._MissingSideEffect)("AbstractEngine","setAlphaMode")),(em=tQ.prototype).createComputeEffect??(em.createComputeEffect=(0,tN._MissingSideEffect)("AbstractEngine","createComputeEffect")),(eb=tQ.prototype).createComputePipelineContext??(eb.createComputePipelineContext=(0,tN._MissingSideEffect)("AbstractEngine","createComputePipelineContext")),(eS=tQ.prototype).createComputeContext??(eS.createComputeContext=(0,tN._MissingSideEffect)("AbstractEngine","createComputeContext")),(eC=tQ.prototype).computeDispatch??(eC.computeDispatch=(0,tN._MissingSideEffect)("AbstractEngine","computeDispatch")),(eE=tQ.prototype).computeDispatchIndirect??(eE.computeDispatchIndirect=(0,tN._MissingSideEffect)("AbstractEngine","computeDispatchIndirect")),(ey=tQ.prototype).areAllComputeEffectsReady??(ey.areAllComputeEffectsReady=(0,tN._MissingSideEffect)("AbstractEngine","areAllComputeEffectsReady")),(ex=tQ.prototype).releaseComputeEffects??(ex.releaseComputeEffects=(0,tN._MissingSideEffect)("AbstractEngine","releaseComputeEffects")),(eF=tQ.prototype).createCubeTexture??(eF.createCubeTexture=(0,tN._MissingSideEffect)("AbstractEngine","createCubeTexture")),(eA=tQ.prototype).generateMipMapsForCubemap??(eA.generateMipMapsForCubemap=(0,tN._MissingSideEffect)("AbstractEngine","generateMipMapsForCubemap")),(ev=tQ.prototype).updateDynamicIndexBuffer??(ev.updateDynamicIndexBuffer=(0,tN._MissingSideEffect)("AbstractEngine","updateDynamicIndexBuffer")),(eD=tQ.prototype).updateDynamicVertexBuffer??(eD.updateDynamicVertexBuffer=(0,tN._MissingSideEffect)("AbstractEngine","updateDynamicVertexBuffer")),(eP=tQ.prototype).createDynamicTexture??(eP.createDynamicTexture=(0,tN._MissingSideEffect)("AbstractEngine","createDynamicTexture")),(eO=tQ.prototype).updateDynamicTexture??(eO.updateDynamicTexture=(0,tN._MissingSideEffect)("AbstractEngine","updateDynamicTexture")),(eT=tQ.prototype).unBindMultiColorAttachmentFramebuffer??(eT.unBindMultiColorAttachmentFramebuffer=(0,tN._MissingSideEffect)("AbstractEngine","unBindMultiColorAttachmentFramebuffer")),(eR=tQ.prototype).createMultipleRenderTarget??(eR.createMultipleRenderTarget=(0,tN._MissingSideEffect)("AbstractEngine","createMultipleRenderTarget")),(eM=tQ.prototype).updateMultipleRenderTargetTextureSampleCount??(eM.updateMultipleRenderTargetTextureSampleCount=(0,tN._MissingSideEffect)("AbstractEngine","updateMultipleRenderTargetTextureSampleCount")),(eB=tQ.prototype).generateMipMapsMultiFramebuffer??(eB.generateMipMapsMultiFramebuffer=(0,tN._MissingSideEffect)("AbstractEngine","generateMipMapsMultiFramebuffer")),(ek=tQ.prototype).resolveMultiFramebuffer??(ek.resolveMultiFramebuffer=(0,tN._MissingSideEffect)("AbstractEngine","resolveMultiFramebuffer")),(ew=tQ.prototype).bindAttachments??(ew.bindAttachments=(0,tN._MissingSideEffect)("AbstractEngine","bindAttachments")),(eI=tQ.prototype).buildTextureLayout??(eI.buildTextureLayout=(0,tN._MissingSideEffect)("AbstractEngine","buildTextureLayout")),(eL=tQ.prototype).restoreSingleAttachment??(eL.restoreSingleAttachment=(0,tN._MissingSideEffect)("AbstractEngine","restoreSingleAttachment")),(eU=tQ.prototype).restoreSingleAttachmentForRenderTarget??(eU.restoreSingleAttachmentForRenderTarget=(0,tN._MissingSideEffect)("AbstractEngine","restoreSingleAttachmentForRenderTarget")),(eN=tQ.prototype).createPrefilteredCubeTexture??(eN.createPrefilteredCubeTexture=(0,tN._MissingSideEffect)("AbstractEngine","createPrefilteredCubeTexture")),(eV=tQ.prototype).updateRawTexture??(eV.updateRawTexture=(0,tN._MissingSideEffect)("AbstractEngine","updateRawTexture")),(eG=tQ.prototype).updateRawCubeTexture??(eG.updateRawCubeTexture=(0,tN._MissingSideEffect)("AbstractEngine","updateRawCubeTexture")),(eW=tQ.prototype).createRawCubeTextureFromUrl??(eW.createRawCubeTextureFromUrl=(0,tN._MissingSideEffect)("AbstractEngine","createRawCubeTextureFromUrl")),(eH=tQ.prototype).updateRawTexture3D??(eH.updateRawTexture3D=(0,tN._MissingSideEffect)("AbstractEngine","updateRawTexture3D")),(eq=tQ.prototype).updateRawTexture2DArray??(eq.updateRawTexture2DArray=(0,tN._MissingSideEffect)("AbstractEngine","updateRawTexture2DArray")),(ez=tQ.prototype).createRenderTargetTexture??(ez.createRenderTargetTexture=(0,tN._MissingSideEffect)("AbstractEngine","createRenderTargetTexture")),(ej=tQ.prototype).updateRenderTargetTextureSampleCount??(ej.updateRenderTargetTextureSampleCount=(0,tN._MissingSideEffect)("AbstractEngine","updateRenderTargetTextureSampleCount")),(e$=tQ.prototype).createRenderTargetCubeTexture??(e$.createRenderTargetCubeTexture=(0,tN._MissingSideEffect)("AbstractEngine","createRenderTargetCubeTexture")),(eZ=tQ.prototype).setDepthStencilTexture??(eZ.setDepthStencilTexture=(0,tN._MissingSideEffect)("AbstractEngine","setDepthStencilTexture")),(eK=tQ.prototype).updateVideoTexture??(eK.updateVideoTexture=(0,tN._MissingSideEffect)("AbstractEngine","updateVideoTexture")),(eQ=tQ.prototype).createRawCubeTexture??(eQ.createRawCubeTexture=(0,tN._MissingSideEffect)("AbstractEngine","createRawCubeTexture")),(eX=tQ.prototype).createEffectForParticles??(eX.createEffectForParticles=(0,tN._MissingSideEffect)("AbstractEngine","createEffectForParticles")),(eY=tQ.prototype).setTextureFromPostProcess??(eY.setTextureFromPostProcess=(0,tN._MissingSideEffect)("AbstractEngine","setTextureFromPostProcess")),(eJ=tQ.prototype).setTextureFromPostProcessOutput??(eJ.setTextureFromPostProcessOutput=(0,tN._MissingSideEffect)("AbstractEngine","setTextureFromPostProcessOutput")),Object.getOwnPropertyDescriptor(tQ.prototype,"loadingScreen")||Object.defineProperty(tQ.prototype,"loadingScreen",(0,tN._MissingSideEffectProperty)("AbstractEngine","loadingScreen")),Object.getOwnPropertyDescriptor(tQ.prototype,"loadingUIText")||Object.defineProperty(tQ.prototype,"loadingUIText",(0,tN._MissingSideEffectProperty)("AbstractEngine","loadingUIText")),Object.getOwnPropertyDescriptor(tQ.prototype,"loadingUIBackgroundColor")||Object.defineProperty(tQ.prototype,"loadingUIBackgroundColor",(0,tN._MissingSideEffectProperty)("AbstractEngine","loadingUIBackgroundColor")),Object.getOwnPropertyDescriptor(tQ.prototype,"inputElement")||Object.defineProperty(tQ.prototype,"inputElement",(0,tN._MissingSideEffectProperty)("AbstractEngine","inputElement")),Object.getOwnPropertyDescriptor(tQ.prototype,"activeView")||Object.defineProperty(tQ.prototype,"activeView",(0,tN._MissingSideEffectProperty)("AbstractEngine","activeView")),Object.getOwnPropertyDescriptor(tQ.prototype,"views")||Object.defineProperty(tQ.prototype,"views",(0,tN._MissingSideEffectProperty)("AbstractEngine","views")),e.s(["AbstractEngine",0,tQ],20307)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1719,e=>{"use strict";class t{static GetShadersRepository(e=0){return 0===e?t.ShadersRepository:t.ShadersRepositoryWGSL}static GetShadersStore(e=0){return 0===e?t.ShadersStore:t.ShadersStoreWGSL}static GetIncludesShadersStore(e=0){return 0===e?t.IncludesShadersStore:t.IncludesShadersStoreWGSL}}t.ShadersRepository="src/Shaders/",t.ShadersStore={},t.IncludesShadersStore={},t.ShadersRepositoryWGSL="src/ShadersWGSL/",t.ShadersStoreWGSL={},t.IncludesShadersStoreWGSL={},e.s(["ShaderStore",0,t])},91095,e=>{"use strict";var t,s,r,i,a=e.i(10534);(t=r||(r={}))[t.LOCAL=0]="LOCAL",t[t.WORLD=1]="WORLD",t[t.BONE=2]="BONE";class o{}o.X=new a.Vector3(1,0,0),o.Y=new a.Vector3(0,1,0),o.Z=new a.Vector3(0,0,1),(s=i||(i={}))[s.X=0]="X",s[s.Y=1]="Y",s[s.Z=2]="Z",e.s(["Axis",0,o,"Coordinate",0,i,"Space",0,r])},16475,e=>{"use strict";var t=e.i(38677);class s{static GetPlanes(e){let r=[];for(let e=0;e<6;e++)r.push(new t.Plane(0,0,0,0));return s.GetPlanesToRef(e,r),r}static GetNearPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[2],t.normal.y=s[7]+s[6],t.normal.z=s[11]+s[10],t.d=s[15]+s[14],t.normalize()}static GetFarPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[2],t.normal.y=s[7]-s[6],t.normal.z=s[11]-s[10],t.d=s[15]-s[14],t.normalize()}static GetLeftPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[0],t.normal.y=s[7]+s[4],t.normal.z=s[11]+s[8],t.d=s[15]+s[12],t.normalize()}static GetRightPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[0],t.normal.y=s[7]-s[4],t.normal.z=s[11]-s[8],t.d=s[15]-s[12],t.normalize()}static GetTopPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[1],t.normal.y=s[7]-s[5],t.normal.z=s[11]-s[9],t.d=s[15]-s[13],t.normalize()}static GetBottomPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[1],t.normal.y=s[7]+s[5],t.normal.z=s[11]+s[9],t.d=s[15]+s[13],t.normalize()}static GetPlanesToRef(e,t){s.GetNearPlaneToRef(e,t[0]),s.GetFarPlaneToRef(e,t[1]),s.GetLeftPlaneToRef(e,t[2]),s.GetRightPlaneToRef(e,t[3]),s.GetTopPlaneToRef(e,t[4]),s.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let s=0;s<6;s++)if(0>t[s].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,s])},66476,e=>{"use strict";var t=e.i(10534),s=e.i(65703);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,r=!0){let i;if(!this.pickedMesh||r&&!this.pickedMesh.isVerticesDataPresent(s.VertexBuffer.NormalKind))return null;let a=this.pickedMesh.getIndices();a?.length===0&&(a=null);let o=t.TmpVectors.Vector3[0],n=t.TmpVectors.Vector3[1],c=t.TmpVectors.Vector3[2];if(r){let e=this.pickedMesh.getVerticesData(s.VertexBuffer.NormalKind),r=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId],o):o.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),h=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+1],n):n.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),l=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+2],c):c.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);r=r.scale(this.bu),h=h.scale(this.bv),l=l.scale(1-this.bu-this.bv),i=new t.Vector3(r.x+h.x+l.x,r.y+h.y+l.y,r.z+h.z+l.z)}else{let e=this.pickedMesh.getVerticesData(s.VertexBuffer.PositionKind),r=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId],o):o.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),h=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+1],n):n.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),l=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+2],c):c.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),d=r.subtract(h),f=l.subtract(h);i=t.Vector3.Cross(d,f)}let h=(e,s)=>{if(-1!==this.thinInstanceIndex){let r=e._thinInstanceDataStorage.matrixData,i=this.thinInstanceIndex<<4;if(r&&r.length>i){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(r,i,e),t.Vector3.TransformNormalToRef(s,e,s)}}let r=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(r),(r=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),r.invert(),r.transposeToRef(t.TmpVectors.Matrix[1]),r=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(s,r,s)};if(e&&h(this.pickedMesh,i),this.ray){let s=t.TmpVectors.Vector3[0].copyFrom(i);e||h(this.pickedMesh,s),t.Vector3.Dot(s,this.ray.direction)>0&&i.negateInPlace()}return i.normalize(),i}getTextureCoordinates(e=s.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let r=this.pickedMesh.getIndices();if(!r)return null;let i=this.pickedMesh.getVerticesData(e);if(!i)return null;let a=t.Vector2.FromArray(i,2*r[3*this.faceId]),o=t.Vector2.FromArray(i,2*r[3*this.faceId+1]),n=t.Vector2.FromArray(i,2*r[3*this.faceId+2]);return a=a.scale(this.bu),o=o.scale(this.bv),n=n.scale(1-this.bu-this.bv),new t.Vector2(a.x+o.x+n.x,a.y+o.y+n.y)}}])},10952,e=>{"use strict";class t{constructor(e,t,s,r){this.x=e,this.y=t,this.width=s,this.height=r}toGlobal(e,s){return new t(this.x*e,this.y*s,this.width*e,this.height*s)}toGlobalToRef(e,t,s){return s.x=this.x*e,s.y=this.y*t,s.width=this.width*e,s.height=this.height*t,this}clone(){return new t(this.x,this.y,this.width,this.height)}}e.s(["Viewport",0,t])},21834,e=>{"use strict";e.s(["useOpenGLOrientationForUV",()=>!1])},52572,e=>{"use strict";var t=e.i(4775);e.s(["DrawWrapper",0,class{static GetEffect(e){return void 0===e.getPipelineContext?e.effect:e}constructor(e,t=!0){this._wasPreviouslyReady=!1,this._forceRebindOnNextCall=!0,this._wasPreviouslyUsingInstances=null,this.effect=null,this.defines=null,this.drawContext=e.createDrawContext(),t&&(this.materialContext=e.createMaterialContext())}setEffect(e,t,s=!0){this.effect=e,void 0!==t&&(this.defines=t),s&&this.drawContext?.reset()}dispose(e=!1){if(this.effect){let s=this.effect;e?s.dispose():t.TimingTools.SetImmediate(()=>{s.getEngine().onEndFrameObservable.addOnce(()=>{s.dispose()})}),this.effect=null}this.drawContext?.dispose()}}])},4812,e=>{"use strict";e.s(["IntersectionInfo",0,class{constructor(e,t,s){this.bu=e,this.bv=t,this.distance=s,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},15298,e=>{"use strict";class t{static get ForceFullSceneLoadingForIncremental(){return t._ForceFullSceneLoadingForIncremental}static set ForceFullSceneLoadingForIncremental(e){t._ForceFullSceneLoadingForIncremental=e}static get ShowLoadingScreen(){return t._ShowLoadingScreen}static set ShowLoadingScreen(e){t._ShowLoadingScreen=e}static get loggingLevel(){return t._LoggingLevel}static set loggingLevel(e){t._LoggingLevel=e}static get CleanBoneMatrixWeights(){return t._CleanBoneMatrixWeights}static set CleanBoneMatrixWeights(e){t._CleanBoneMatrixWeights=e}}t._ForceFullSceneLoadingForIncremental=!1,t._ShowLoadingScreen=!0,t._CleanBoneMatrixWeights=!1,t._LoggingLevel=0,e.s(["SceneLoaderFlags",0,t])},94198,e=>{"use strict";(0,e.i(79124).RegisterMesh)(),e.s([])},95758,e=>{"use strict";e.i(94198);var t=e.i(79124);e.s(["Mesh",()=>t.Mesh,"RegisterMesh",()=>t.RegisterMesh,"_CreationDataStorage",()=>t._CreationDataStorage,"_InstancesBatch",()=>t._InstancesBatch])},71261,e=>{e.v(t=>Promise.all(["static/chunks/0m0n7kjzscx0y.js"].map(t=>e.l(t))).then(()=>t(76549)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17255,e=>{"use strict";e.i(89718);var t,r,s,i,a,o,n=e.i(75053),u=e.i(16147),l=e.i(40220),h=e.i(57554),c=e.i(65703),_=e.i(93127),f=e.i(52344),m=e.i(67374),p=e.i(74040),g=e.i(29711);class x{constructor(e){this.name=_.SceneComponentConstants.NAME_PROCEDURALTEXTURE,this.scene=e}register(){this.scene._beforeClearStage.registerStep(_.SceneComponentConstants.STEP_BEFORECLEAR_PROCEDURALTEXTURE,this,this._beforeClear)}rebuild(){}dispose(){}_beforeClear(){if(this.scene.proceduralTexturesEnabled){g.Tools.StartPerformanceCounter("Procedural textures",this.scene.proceduralTextures.length>0);for(let e=0;e<this.scene.proceduralTextures.length;e++){let t=this.scene.proceduralTextures[e];t._shouldRender()&&t.render()}g.Tools.EndPerformanceCounter("Procedural textures",this.scene.proceduralTextures.length>0)}}}var d=e.i(47867),T=e.i(52572);class R extends m.Texture{get shaderLanguage(){return this._shaderLanguage}constructor(e,t,r,s,i=null,a=!0,o=!1,n=0){super(null,s,!a),this.isEnabled=!0,this.autoClear=!0,this.onGeneratedObservable=new h.Observable,this.onBeforeGenerationObservable=new h.Observable,this.nodeMaterialSource=null,this.defines="",this._textures={},this._currentRefreshId=-1,this._frameId=-1,this._refreshRate=1,this._vertexBuffers={},this._uniforms=[],this._samplers=[],this._floats={},this._ints={},this._floatsArrays={},this._colors3={},this._colors4={},this._vectors2={},this._vectors3={},this._vectors4={},this._matrices={},this._fallbackTextureUsed=!1,this._cachedDefines=null,this._contentUpdateId=-1,this._rtWrapper=null,null===i||i instanceof m.Texture?(this._options={},this._fallbackTexture=i):(this._options=i,this._fallbackTexture=i.fallbackTexture??null),this._shaderLanguage=this._options.shaderLanguage??0;let u=(s=this.getScene()||d.EngineStore.LastCreatedScene)._getComponent(_.SceneComponentConstants.NAME_PROCEDURALTEXTURE);u||(u=new x(s),s._addComponent(u)),this._options.skipSceneRegistration||s.proceduralTextures.push(this),this._fullEngine=s.getEngine(),this.name=e,this.isRenderTarget=!0,this._size=t,this._textureType=n,this._generateMipMaps=a,this._drawWrapper=new T.DrawWrapper(this._fullEngine),this.setFragment(r);const l=this._createRtWrapper(o,t,a,n);this._texture=l.texture;const f=[];f.push(1,1),f.push(-1,1),f.push(-1,-1),f.push(1,-1),this._vertexBuffers[c.VertexBuffer.PositionKind]=new c.VertexBuffer(this._fullEngine,f,c.VertexBuffer.PositionKind,!1,!1,2),this._createIndexBuffer()}_createRtWrapper(e,t,r,s){return e?(this._rtWrapper=this._fullEngine.createRenderTargetCubeTexture(t,{generateMipMaps:r,generateDepthBuffer:!1,generateStencilBuffer:!1,type:s,...this._options}),this.setFloat("face",0)):(this._rtWrapper=this._fullEngine.createRenderTargetTexture(t,{generateMipMaps:r,generateDepthBuffer:!1,generateStencilBuffer:!1,type:s,...this._options}),this._rtWrapper.is3D&&(this.setFloat("layer",0),this.setInt("layerNum",0))),this._rtWrapper}getEffect(){return this._drawWrapper.effect}_setEffect(e){this._drawWrapper.effect=e}getContent(){return this._contentData&&this._frameId===this._contentUpdateId||(this._contentData?this._contentData.then(e=>{this._contentData=this.readPixels(0,0,e),this._contentUpdateId=this._frameId}):(this._contentData=this.readPixels(0,0),this._contentUpdateId=this._frameId)),this._contentData}_createIndexBuffer(){let e=this._fullEngine,t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)}_rebuild(){let e=this._vertexBuffers[c.VertexBuffer.PositionKind];e&&e._rebuild(),this._createIndexBuffer(),this.refreshRate===p.RenderTargetTexture.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=p.RenderTargetTexture.REFRESHRATE_RENDER_ONCE)}reset(){this._drawWrapper.effect?.dispose(),this._drawWrapper.effect=null,this._cachedDefines=null}_getDefines(){return this.defines}executeWhenReady(e){if(this.isReady())return void e(this);let t=this.getEffect();t&&t.executeWhenCompiled(()=>{e(this)})}isReady(){let t=this._fullEngine;if(this.nodeMaterialSource)return this._drawWrapper.effect?.isReady()??!1;if(!this._fragment)return!1;if(this._fallbackTextureUsed)return!0;if(!this._texture)return!1;let r=this._getDefines();if(this._drawWrapper.effect&&r===this._cachedDefines&&this._drawWrapper.effect.isReady())return!0;let s={vertex:"procedural",fragmentElement:this._fragment.fragmentElement,fragmentSource:this._fragment.fragmentSource,fragment:"string"==typeof this._fragment?this._fragment:void 0};return this._cachedDefines!==r&&(this._cachedDefines=r,this._drawWrapper.effect=t.createEffect(s,[c.VertexBuffer.PositionKind],this._uniforms,this._samplers,r,void 0,void 0,()=>{this._rtWrapper?.dispose(),this._rtWrapper=this._texture=null,this._fallbackTexture&&(this._texture=this._fallbackTexture._texture,this._texture&&this._texture.incrementReferences()),this._fallbackTextureUsed=!0},void 0,this._shaderLanguage,async()=>{this._options.extraInitializationsAsync?1===this.shaderLanguage?await Promise.all([e.A(746),this._options.extraInitializationsAsync()]):await Promise.all([e.A(34446),this._options.extraInitializationsAsync()]):1===this.shaderLanguage?await e.A(746):await e.A(34446)})),this._drawWrapper.effect.isReady()}resetRefreshCounter(){this._currentRefreshId=-1}setFragment(e){this._fragment=e}get refreshRate(){return this._refreshRate}set refreshRate(e){this._refreshRate=e,this.resetRefreshCounter()}_shouldRender(){return this.isEnabled&&this.isReady()&&this._texture?!this._fallbackTextureUsed&&(-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,this._frameId++,!0):(this._currentRefreshId++,!1)):(this._texture&&(this._texture.isReady=!1),!1)}getRenderSize(){return this._size}resize(e,t){if(this._fallbackTextureUsed||!this._rtWrapper||!this._texture)return;let r=this._texture.isCube;this._rtWrapper.dispose();let s=this._createRtWrapper(r,e,t,this._textureType);this._texture=s.texture,this._size=e,this._generateMipMaps=t}_checkUniform(e){-1===this._uniforms.indexOf(e)&&this._uniforms.push(e)}setTexture(e,t){return -1===this._samplers.indexOf(e)&&this._samplers.push(e),this._textures[e]=t,this}setFloat(e,t){return this._checkUniform(e),this._floats[e]=t,this}setInt(e,t){return this._checkUniform(e),this._ints[e]=t,this}setFloats(e,t){return this._checkUniform(e),this._floatsArrays[e]=t,this}setColor3(e,t){return this._checkUniform(e),this._colors3[e]=t,this}setColor4(e,t){return this._checkUniform(e),this._colors4[e]=t,this}setVector2(e,t){return this._checkUniform(e),this._vectors2[e]=t,this}setVector3(e,t){return this._checkUniform(e),this._vectors3[e]=t,this}setVector4(e,t){return this._checkUniform(e),this._vectors4[e]=t,this}setMatrix(e,t){return this._checkUniform(e),this._matrices[e]=t,this}render(e){let t=this.getScene();if(!t)return;let r=this._fullEngine;if(r.enableEffect(this._drawWrapper),this.onBeforeGenerationObservable.notifyObservers(this),r.setState(!1),!this.nodeMaterialSource){for(let e in this._textures)this._drawWrapper.effect.setTexture(e,this._textures[e]);for(let e in this._ints)this._drawWrapper.effect.setInt(e,this._ints[e]);for(let e in this._floats)this._drawWrapper.effect.setFloat(e,this._floats[e]);for(let e in this._floatsArrays)this._drawWrapper.effect.setArray(e,this._floatsArrays[e]);for(let e in this._colors3)this._drawWrapper.effect.setColor3(e,this._colors3[e]);for(let e in this._colors4){let t=this._colors4[e];this._drawWrapper.effect.setFloat4(e,t.r,t.g,t.b,t.a)}for(let e in this._vectors2)this._drawWrapper.effect.setVector2(e,this._vectors2[e]);for(let e in this._vectors3)this._drawWrapper.effect.setVector3(e,this._vectors3[e]);for(let e in this._vectors4)this._drawWrapper.effect.setVector4(e,this._vectors4[e]);for(let e in this._matrices)this._drawWrapper.effect.setMatrix(e,this._matrices[e])}if(!this._texture||!this._rtWrapper)return;r._enableGPUDebugMarkers&&r._debugPushGroup?.(`procedural texture generation for ${this.name}`);let s=r.currentViewport;if(this.isCube)for(let e=0;e<6;e++)r.bindFramebuffer(this._rtWrapper,e,void 0,void 0,!0),r.bindBuffers(this._vertexBuffers,this._indexBuffer,this._drawWrapper.effect),this._drawWrapper.effect.setFloat("face",e),this.autoClear&&r.clear(t.clearColor,!0,!1,!1),r.drawElementsType(f.Material.TriangleFillMode,0,6),r.unBindFramebuffer(this._rtWrapper,!0);else{let e=1;this._rtWrapper.is3D?e=this._rtWrapper.depth:this._rtWrapper.is2DArray&&(e=this._rtWrapper.layers);for(let s=0;s<e;s++){if(r.bindFramebuffer(this._rtWrapper,0,void 0,void 0,!0,0,s),r.bindBuffers(this._vertexBuffers,this._indexBuffer,this._drawWrapper.effect),this._rtWrapper.is3D||this._rtWrapper.is2DArray)for(let t in this._drawWrapper.effect?.setFloat("layer",1!==e?s/(e-1):0),this._drawWrapper.effect?.setInt("layerNum",s),this._textures)this._drawWrapper.effect.setTexture(t,this._textures[t]);this.autoClear&&r.clear(t.clearColor,!0,!1,!1),r.drawElementsType(f.Material.TriangleFillMode,0,6),r.unBindFramebuffer(this._rtWrapper,!this._generateMipMaps)}}s&&r.setViewport(s),this.isCube&&r.generateMipMapsForCubemap(this._texture,!0),r._enableGPUDebugMarkers&&r._debugPopGroup?.(),this.onGenerated&&this.onGenerated(),this.onGeneratedObservable.notifyObservers(this)}clone(){let e=this.getSize(),t=new R(this.name,e.width,this._fragment,this.getScene(),this._fallbackTexture,this._generateMipMaps);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,t}dispose(){let e=this.getScene();if(!e)return;let t=e.proceduralTextures.indexOf(this);t>=0&&e.proceduralTextures.splice(t,1);let r=this._vertexBuffers[c.VertexBuffer.PositionKind];r&&(r.dispose(),this._vertexBuffers[c.VertexBuffer.PositionKind]=null),this._indexBuffer&&this._fullEngine._releaseBuffer(this._indexBuffer)&&(this._indexBuffer=null),this.onGeneratedObservable.clear(),this.onBeforeGenerationObservable.clear(),super.dispose()}}function C(e,t,r,s){let i={texture:e,factor:t};return r&&(i.channel=r),s&&(i.colorSpace=s),i}function b(e){return e.factor??new n.Color4(1,1,1,1)}function A(e){let t=0,r=512;for(let s of e)if(s.texture){let e=s.texture.getSize(),i=Math.max(e.width,e.height);i>t&&(t=i,r=e.width===e.height?i:e)}return r}function y(e){return!e.getTextureMatrix().isIdentity()}function W(e){if(e.length<=1)return!0;let t=e[0].getTextureMatrix();for(let r=1;r<e.length;r++)if(!t.equals(e[r].getTextureMatrix()))return!1;return!0}function w(e,t,r){t.coordinatesIndex=e.coordinatesIndex,t.wrapU=e.wrapU,t.wrapV=e.wrapV,r&&(t.uOffset=e.uOffset??0,t.vOffset=e.vOffset??0,t.uScale=e.uScale??1,t.vScale=e.vScale??1,t.wAng=e.wAng??0)}function S(e){switch(e){case o.R:return"R";case o.G:return"G";case o.B:return"B";case o.A:return"A";default:return""}}function B(e){let t=[];return e&a.R||t.push("OUTPUT_MASK_R_ZERO"),e&a.G||t.push("OUTPUT_MASK_G_ZERO"),e&a.B||t.push("OUTPUT_MASK_B_ZERO"),e&a.A||t.push("OUTPUT_MASK_A_ONE"),t}function E(e,t){return new n.Color4(t&a.R?e.r:0,t&a.G?e.g:0,t&a.B?e.b:0,t&a.A?e.a:1)}function v(e,t,r){let s=[];return e.texture&&(s.push(`OPERAND_${t}_TEXTURE`),r&&y(e.texture)&&s.push(`OPERAND_${t}_MATRIX`),e.colorSpace&&s.push(`OPERAND_${t}_SRGB`),e.channel&&s.push(`OPERAND_${t}_CHANNEL_${S(e.channel)}`)),void 0===e.factor&&e.texture||s.push(`OPERAND_${t}_FACTOR`),s}function M(e,t,r,s,i){t.texture&&(e.setTexture(r,t.texture),i&&y(t.texture)&&e.setMatrix(`${r}Matrix`,t.texture.getTextureMatrix())),void 0===t.factor&&t.texture||e.setColor4(s,b(t))}function G(t,r,s,a,o=i.Linear){let n={type:0,format:5,samplingMode:2,generateDepthBuffer:!1,generateMipMaps:!1,gammaSpace:o===i.SRGB,shaderLanguage:+!!a.getEngine().isWebGPU,extraInitializationsAsync:async()=>{a.getEngine().isWebGPU?await Promise.all([e.A(21504)]):await Promise.all([e.A(65812)])},skipSceneRegistration:!0},u=new R(t,s,"textureProcessor",a,n);return u.refreshRate=-1,u.defines=r.length>0?"#define "+r.join("\n#define ")+"\n":"",u}async function D(e){return await new Promise((t,r)=>{e.executeWhenReady(()=>{try{e.render(),t()}catch(e){r(e instanceof Error?e:Error(String(e)))}})})}async function O(e,t,r,s,i,a){if(!t.texture&&!r.texture){var o,u;let e=(o=b(t),u=b(r),new n.Color4(o.r*u.r,o.g*u.g,o.b*u.b,o.a*u.a));return{texture:null,factor:a?E(e,a):e}}let l=[];t.texture&&l.push(t.texture),r.texture&&l.push(r.texture);let h=W(l),c=!h,_=[...v(t,"A",c),...v(r,"B",c),...a?B(a):[]];i&&_.push("OUTPUT_SRGB");let f=G(e,_,A([t,r]),s,i);M(f,t,"textureA","factorA",c),M(f,r,"textureB","factorB",c);try{await D(f)}catch(e){throw t.dispose?.(),r.dispose?.(),e}t.dispose?.(),r.dispose?.(),w(l[0],f,h);let m={texture:f,dispose:()=>f.dispose()};return i&&(m.colorSpace=i),m}async function k(e,t,r,s,i,a,o){var u,l,h;let c;if(!t.texture&&!r.texture&&!s.texture){let e=(u=b(t),l=b(r),h=b(s),new n.Color4(u.r+(l.r-u.r)*h.r,u.g+(l.g-u.g)*h.g,u.b+(l.b-u.b)*h.b,u.a+(l.a-u.a)*h.a));return{texture:null,factor:o?E(e,o):e}}let _=[];t.texture&&_.push(t.texture),r.texture&&_.push(r.texture),s.texture&&_.push(s.texture);let f=W(_),m=!f,p=["OP_LERP",...v(t,"A",m),...v(r,"B",m),...(c=[],s.texture&&(c.push("LERP_T_TEXTURE"),m&&y(s.texture)&&c.push("LERP_T_MATRIX"),void 0!==s.factor&&c.push("LERP_T_FACTOR"),s.colorSpace&&c.push("LERP_T_SRGB"),s.channel&&c.push(`LERP_T_CHANNEL_${S(s.channel)}`)),c),...o?B(o):[]];a&&p.push("OUTPUT_SRGB");let g=G(e,p,A([t,r,s]),i,a);M(g,t,"textureA","factorA",m),M(g,r,"textureB","factorB",m),s.texture?(g.setTexture("textureT",s.texture),m&&y(s.texture)&&g.setMatrix("textureTMatrix",s.texture.getTextureMatrix()),void 0!==s.factor&&g.setColor4("factorT",s.factor)):g.setColor4("factorT",b(s));try{await D(g)}catch(e){throw t.dispose?.(),r.dispose?.(),s.dispose?.(),e}t.dispose?.(),r.dispose?.(),s.dispose?.(),w(_[0],g,f);let x={texture:g,dispose:()=>g.dispose()};return a&&(x.colorSpace=a),x}async function F(e,t,r,s=a.RGBA,i,o){let u;if(!t.texture){let e=b(t),r=new n.Color4(s&a.R?1-e.r:e.r,s&a.G?1-e.g:e.g,s&a.B?1-e.b:e.b,s&a.A?1-e.a:e.a);return{texture:null,factor:o?E(r,o):r}}let l=[...v(t,"A",!1),...(u=["OP_INVERT"],s&a.R&&u.push("INVERT_R"),s&a.G&&u.push("INVERT_G"),s&a.B&&u.push("INVERT_B"),s&a.A&&u.push("INVERT_A"),u),...o?B(o):[]];i&&l.push("OUTPUT_SRGB");let h=G(e,l,A([t]),r,i);M(h,t,"textureA","factorA",!1);try{await D(h)}catch(e){throw t.dispose?.(),e}t.dispose?.(),w(t.texture,h,!0);let c={texture:h,dispose:()=>h.dispose()};return i&&(c.colorSpace=i),c}async function I(e,t,r,s=!1,i,a){if(!t.texture){let e=b(t),r=s?Math.max(e.r,e.g,e.b,e.a):Math.max(e.r,e.g,e.b),i=new n.Color4(r,r,r,s?r:e.a);return{texture:null,factor:a?E(i,a):i}}let o=[...v(t,"A",!1),"OP_CHANNEL_MAX",...a?B(a):[]];s&&o.push("CHANNEL_MAX_INCLUDE_ALPHA"),i&&o.push("OUTPUT_SRGB");let u=G(e,o,A([t]),r,i);M(u,t,"textureA","factorA",!1);try{await D(u)}catch(e){throw t.dispose?.(),e}t.dispose?.(),w(t.texture,u,!0);let l={texture:u,dispose:()=>u.dispose()};return i&&(l.colorSpace=i),l}async function P(e,t,r,s,i,a){if(!t.texture){let e=function(e,t){switch(t){case o.R:return new n.Color4(e.r,e.r,e.r,e.a);case o.G:return new n.Color4(e.g,e.g,e.g,e.a);case o.B:return new n.Color4(e.b,e.b,e.b,e.a);case o.A:return new n.Color4(e.a,e.a,e.a,e.a);default:return e}}(b(t),r);return{texture:null,factor:a?E(e,a):e}}return await O(e,{...t,channel:r},{texture:null,factor:new n.Color4(1,1,1,1)},s,i,a)}(0,u.__decorate)([(0,l.serialize)()],R.prototype,"isEnabled",void 0),(0,u.__decorate)([(0,l.serialize)()],R.prototype,"autoClear",void 0),(0,u.__decorate)([(0,l.serialize)()],R.prototype,"_generateMipMaps",void 0),(0,u.__decorate)([(0,l.serialize)()],R.prototype,"_size",void 0),(0,u.__decorate)([(0,l.serialize)()],R.prototype,"refreshRate",null),(t=i||(i={}))[t.Linear=0]="Linear",t[t.SRGB=1]="SRGB",(r=a||(a={}))[r.R=1]="R",r[r.G=2]="G",r[r.B=4]="B",r[r.A=8]="A",r[r.RGB=7]="RGB",r[r.RGBA=15]="RGBA",(s=o||(o={}))[s.RGBA=0]="RGBA",s[s.R=1]="R",s[s.G=2]="G",s[s.B=3]="B",s[s.A=4]="A",e.s(["OpenPBRMaterialLoadingAdapter",0,class{constructor(e){this._specWorkflow=!1,this._diffuseTransmissionTint=n.Color3.White(),this._diffuseTransmissionTintTexture=null,this._material=e}get material(){return this._material}get isUnlit(){return this._material.unlit}set isUnlit(e){this._material.unlit=e}set backFaceCulling(e){this._material.backFaceCulling=e}get backFaceCulling(){return this._material.backFaceCulling}set twoSidedLighting(e){this._material.twoSidedLighting=e}get twoSidedLighting(){return this._material.twoSidedLighting}set alphaCutOff(e){this._material.alphaCutOff=e}get alphaCutOff(){return this._material.alphaCutOff}set useAlphaFromBaseColorTexture(e){this._material._useAlphaFromBaseColorTexture=e}get useAlphaFromBaseColorTexture(){return this._material._useAlphaFromBaseColorTexture}get transparencyAsAlphaCoverage(){return!1}set transparencyAsAlphaCoverage(e){}set baseColor(e){this._material.baseColor=e}get baseColor(){return this._material.baseColor}set baseColorTexture(e){this._material.baseColorTexture=e}get baseColorTexture(){return this._material.baseColorTexture}set baseDiffuseRoughness(e){this._material.baseDiffuseRoughness=e}get baseDiffuseRoughness(){return this._material.baseDiffuseRoughness}set baseDiffuseRoughnessTexture(e){this._material.baseDiffuseRoughnessTexture=e}get baseDiffuseRoughnessTexture(){return this._material.baseDiffuseRoughnessTexture}set baseMetalness(e){this._material.baseMetalness=e}get baseMetalness(){return this._material.baseMetalness}set baseMetalnessTexture(e){this._material.baseMetalnessTexture=e}get baseMetalnessTexture(){return this._material.baseMetalnessTexture}set useRoughnessFromMetallicTextureGreen(e){this._material._useRoughnessFromMetallicTextureGreen=e}set useMetallicFromMetallicTextureBlue(e){this._material._useMetallicFromMetallicTextureBlue=e}enableSpecularEdgeColor(e=!1){}configureSpecularGlossiness(){this._specWorkflow=!0}set specularWeight(e){this._material.specularWeight=e}get specularWeight(){return this._material.specularWeight}set specularWeightTexture(e){this._material.specularColorTexture===e?(this._material.specularWeightTexture=null,this._material._useSpecularWeightFromSpecularColorTexture=!0,this._material._useSpecularWeightFromAlpha=!0):this._material.specularWeightTexture=e}get specularWeightTexture(){return this._material.specularWeightTexture}set specularColor(e){this._material.specularColor=e}get specularColor(){return this._material.specularColor}set specularColorTexture(e){this._material.specularColorTexture=e,this._material.specularWeightTexture===this._material.specularColorTexture&&(this._material.specularWeightTexture=null,this._material._useSpecularWeightFromSpecularColorTexture=!0,this._material._useSpecularWeightFromAlpha=!0)}get specularColorTexture(){return this._material.specularColorTexture}set specularRoughness(e){this._material.specularRoughness=e}get specularRoughness(){return this._material.specularRoughness}set specularRoughnessTexture(e){this._material.specularRoughnessTexture=e}get specularRoughnessTexture(){return this._material.specularRoughnessTexture}set specularIor(e){this._material.specularIor=e}get specularIor(){return this._material.specularIor}set glossiness(e){this._material.specularRoughness=Math.max(1-e,0)}get glossiness(){return 1-this._material.specularRoughness}set emissionColor(e){this._material.emissionColor=e}get emissionColor(){return this._material.emissionColor}set emissionLuminance(e){this._material.emissionLuminance=e}get emissionLuminance(){return this._material.emissionLuminance}set emissionColorTexture(e){this._material.emissionColorTexture=e}get emissionColorTexture(){return this._material.emissionColorTexture}set ambientOcclusionTexture(e){this._material.ambientOcclusionTexture=e}get ambientOcclusionTexture(){return this._material.ambientOcclusionTexture}set ambientOcclusionTextureStrength(e){let t=this._material.ambientOcclusionTexture;t&&(t.level=e)}get ambientOcclusionTextureStrength(){let e=this._material.ambientOcclusionTexture;return e?.level??1}configureCoat(){}set coatWeight(e){this._material.coatWeight=e}get coatWeight(){return this._material.coatWeight}set coatWeightTexture(e){this._material.coatWeightTexture=e}get coatWeightTexture(){return this._material.coatWeightTexture}set coatColor(e){this._material.coatColor=e}get coatColor(){return this._material.coatColor}set coatColorTexture(e){this._material.coatColorTexture=e}set coatRoughness(e){this._material.coatRoughness=e}get coatRoughness(){return this._material.coatRoughness}set coatRoughnessTexture(e){this._material.coatRoughnessTexture=e,e&&(this._material._useCoatRoughnessFromGreenChannel=!0)}get coatRoughnessTexture(){return this._material.coatRoughnessTexture}set coatIor(e){this._material.coatIor=e}get coatIor(){return this._material.coatIor}set coatDarkening(e){this._material.coatDarkening=e}get coatDarkening(){return this._material.coatDarkening}set coatDarkeningTexture(e){this._material.coatDarkeningTexture=e}set coatRoughnessAnisotropy(e){this._material.coatRoughnessAnisotropy=e}get coatRoughnessAnisotropy(){return this._material.coatRoughnessAnisotropy}set geometryCoatTangentAngle(e){this._material.geometryCoatTangentAngle=e}set geometryCoatTangentTexture(e){this._material.geometryCoatTangentTexture=e,e&&(this._material._useCoatRoughnessAnisotropyFromTangentTexture=!0)}get geometryCoatTangentTexture(){return this._material.geometryCoatTangentTexture}configureTransmission(){this._material.geometryThinWalled=1,this._material.transmissionDepth=0}set transmissionWeight(e){this._material.transmissionWeight=e}set transmissionWeightTexture(e){this._material.transmissionWeightTexture=e}get transmissionWeightTexture(){return this._material.transmissionWeightTexture}get transmissionWeight(){return this._material.transmissionWeight}set transmissionScatter(e){this._material.transmissionScatter=e}get transmissionScatter(){return this._material.transmissionScatter}set transmissionScatterTexture(e){this._material.transmissionScatterTexture=e}get transmissionScatterTexture(){return this._material.transmissionScatterTexture}set transmissionScatterAnisotropy(e){this._material.transmissionScatterAnisotropy=e}set transmissionDispersionAbbeNumber(e){this._material.transmissionDispersionAbbeNumber=e}set transmissionDispersionScale(e){this._material.transmissionDispersionScale=e}set transmissionDepth(e){e!==Number.MAX_VALUE||0!==this._material.transmissionDepth?this._material.transmissionDepth=e:this._material.transmissionDepth=0}get transmissionDepth(){return this._material.transmissionDepth}set transmissionColor(e){e.equals(n.Color3.White())||(this._material.transmissionColor=e)}get transmissionColor(){return this._material.transmissionColor}get refractionBackgroundTexture(){return this._material.backgroundRefractionTexture}set refractionBackgroundTexture(e){this._material.backgroundRefractionTexture=e}configureVolume(){this._material.geometryThinWalled=0}set geometryThinWalled(e){this._material.geometryThinWalled=+!!e}get geometryThinWalled(){return!!this._material.geometryThinWalled}set volumeThicknessTexture(e){this._material.geometryThicknessTexture=e,this._material._useGeometryThicknessFromGreenChannel=!0}set volumeThickness(e){this._material.geometryThickness=e}configureSubsurface(){this._material.geometryThinWalled=1,this._material.subsurfaceScatterAnisotropy=1}set subsurfaceWeight(e){this._material.subsurfaceWeight=e}get subsurfaceWeight(){return this._material.subsurfaceWeight}set subsurfaceWeightTexture(e){this._material.subsurfaceWeightTexture=e,this._material._useSubsurfaceWeightFromTextureAlpha=!0}get subsurfaceWeightTexture(){return this._material.subsurfaceWeightTexture}set subsurfaceColor(e){this._material.subsurfaceColor=e}set subsurfaceColorTexture(e){this._material.subsurfaceColorTexture=e}set diffuseTransmissionTint(e){this._diffuseTransmissionTint=e}get diffuseTransmissionTint(){return this._diffuseTransmissionTint}set diffuseTransmissionTintTexture(e){this._diffuseTransmissionTintTexture=e}get subsurfaceRadius(){return this._material.subsurfaceRadius}set subsurfaceRadius(e){this._material.subsurfaceRadius=e}get subsurfaceRadiusScale(){return this._material.subsurfaceRadiusScale}set subsurfaceRadiusScale(e){this._material.subsurfaceRadiusScale=e}set subsurfaceScatterAnisotropy(e){this._material.subsurfaceScatterAnisotropy=e}isTranslucent(){return this.transmissionWeight>0||this.subsurfaceWeight>0}configureFuzz(){}set fuzzWeight(e){this._material.fuzzWeight=e}set fuzzWeightTexture(e){this._material.fuzzWeightTexture=e}set fuzzColor(e){this._material.fuzzColor=e}set fuzzColorTexture(e){this._material.fuzzColorTexture=e}set fuzzRoughness(e){this._material.fuzzRoughness=e}set fuzzRoughnessTexture(e){this._material.fuzzRoughnessTexture=e,this._material._useFuzzRoughnessFromTextureAlpha=!0}set specularRoughnessAnisotropy(e){this._material.specularRoughnessAnisotropy=e}get specularRoughnessAnisotropy(){return this._material.specularRoughnessAnisotropy}set geometryTangentAngle(e){this._material.geometryTangentAngle=e}set geometryTangentTexture(e){this._material.geometryTangentTexture=e,this._material._useSpecularRoughnessAnisotropyFromTangentTexture=!0}get geometryTangentTexture(){return this._material.geometryTangentTexture}configureGltfStyleAnisotropy(e=!0){this._material._useGltfStyleAnisotropy=e}set thinFilmWeight(e){this._material.thinFilmWeight=e}set thinFilmIor(e){this._material.thinFilmIor=e}set thinFilmThicknessMinimum(e){this._material.thinFilmThicknessMin=e/1e3}set thinFilmThicknessMaximum(e){this._material.thinFilmThickness=e/1e3}set thinFilmWeightTexture(e){this._material.thinFilmWeightTexture=e}set thinFilmThicknessTexture(e){this._material.thinFilmThicknessTexture=e,this._material._useThinFilmThicknessFromTextureGreen=!0}set unlit(e){this._material.unlit=e}set geometryOpacity(e){this._material.geometryOpacity=e}get geometryOpacity(){return this._material.geometryOpacity}set geometryNormalTexture(e){this._material.geometryNormalTexture=e}get geometryNormalTexture(){return this._material.geometryNormalTexture}setNormalMapInversions(e,t){}set geometryCoatNormalTexture(e){this._material.geometryCoatNormalTexture=e}get geometryCoatNormalTexture(){return this._material.geometryCoatNormalTexture}set geometryCoatNormalTextureScale(e){this._material.geometryCoatNormalTexture&&(this._material.geometryCoatNormalTexture.level=e)}async finalizeAsync(e){if(this._diffuseTransmissionTint&&!this._diffuseTransmissionTint.equals(n.Color3.White())||this._diffuseTransmissionTintTexture){if(this._material.geometryThinWalled)this.subsurfaceColor=this._diffuseTransmissionTint,this.subsurfaceColorTexture=this._diffuseTransmissionTintTexture;else if(await this.copySurfaceToCoatAsync(e,this.subsurfaceWeight,this.subsurfaceWeightTexture,o.A,this._diffuseTransmissionTint,this._diffuseTransmissionTintTexture,!0),e._disposed)return}if(this.transmissionWeight>0){if(this._material.geometryThinWalled||0===this._material.transmissionDepth)this._material.transmissionColor=this._material.baseColor,this._material.transmissionColorTexture=this._material.baseColorTexture;else if((!this.baseColor.equals(n.Color3.White())||null!==this.baseColorTexture)&&(await this.copySurfaceToCoatAsync(e,this.transmissionWeight,this.transmissionWeightTexture,o.R,this.baseColor,this.baseColorTexture,!1),e._disposed))return}if(this._specWorkflow){let t=await F("newRoughnessTexture ("+this._material.name+")",await P("glossiness ("+this._material.name+")",C(this.specularColorTexture,new n.Color4(this.specularColor.r,this.specularColor.g,this.specularColor.b,this.glossiness),o.A,i.Linear),o.A,this._material.getScene(),i.Linear,a.R),this._material.getScene(),a.R,i.Linear,a.R);if(e._disposed)return void t.texture?.dispose();this.specularRoughnessTexture=t.texture,this.specularRoughness=t.factor?t.factor.r:1;let r=await I("metallicTexture ("+this._material.name+")",C(this.specularColorTexture,this.specularColor.toColor4(),o.RGBA,i.Linear),this._material.getScene(),!1,i.SRGB,a.RGB);if(e._disposed)return void r.texture?.dispose();this.baseMetalnessTexture=r.texture,this.baseMetalness=r.factor?r.factor.r:1;let s=await k("newBaseColor ("+this._material.name+")",C(this.baseColorTexture,this.baseColor.toColor4(),o.RGBA,i.Linear),C(this.specularColorTexture,this.specularColor.toColor4(),o.RGBA,i.Linear),{...r,dispose:void 0,colorSpace:i.Linear},this._material.getScene(),i.SRGB,a.RGB);if(e._disposed)return void s.texture?.dispose();let u=this.baseColorTexture;u?.dispose(),this.baseColorTexture=s.texture,this.baseColor=s.factor?new n.Color3(s.factor.r,s.factor.g,s.factor.b):n.Color3.White();let l=this.specularColorTexture;l?.dispose(),this.specularColorTexture=null}}async copySurfaceToCoatAsync(e,t,r,s,a,u,l=!1){let h=this._material.coatWeight,c=this._material.coatWeightTexture,_=this._material.coatColor.clone(),f=this._material.coatColorTexture,m=this._material.geometryCoatNormalTexture,p=new n.Color4(h,h,h,h),g=new n.Color4(t,t,t,t);this.coatWeightTexture=null,this.coatWeight=1;let x=await Promise.allSettled([k("lerpExistingCoat",C(null,new n.Color4(1,1,1,1)),C(f,_.toColor4(),o.RGBA,i.SRGB),C(c,p,o.R),this._material.getScene(),i.SRGB),k("lerpSurfaceColor",C(null,new n.Color4(1,1,1,1)),C(u,a.toColor4(),o.RGBA,i.SRGB),C(r,g,s),this._material.getScene(),i.SRGB)]),d=x.find(e=>"rejected"===e.status);if(d){for(let e of x)"fulfilled"===e.status&&e.value.texture?.dispose();throw d.reason}let[T,R]=x.map(e=>e.value);if(e._disposed){T.texture?.dispose(),R.texture?.dispose();return}let b=await O("newCoatColor ("+this._material.name+")",T,R,this._material.getScene(),i.SRGB);if(e._disposed)return void b.texture?.dispose();b.texture?(this.coatColorTexture=b.texture,this.coatColor=n.Color3.White()):b.factor&&(this.coatColorTexture=null,this.coatColor.fromArray([b.factor.r,b.factor.g,b.factor.b]));let A=await k("newCoatIor ("+this._material.name+")",C(null,new n.Color4(this._material.specularIor,this._material.specularIor,this._material.specularIor,1),o.R),C(null,new n.Color4(this.coatIor,this.coatIor,this.coatIor,1),o.R),C(c,p,o.R),this._material.getScene());if(e._disposed)return void A.texture?.dispose();this.coatIor=A.factor?A.factor.r:this.coatIor;let y=await k("newCoatRoughness ("+this._material.name+")",C(this.specularRoughnessTexture,new n.Color4(this.specularRoughness,this.specularRoughness,this.specularRoughness,1),o.G),C(this.coatRoughnessTexture,new n.Color4(this.coatRoughness,this.coatRoughness,this.coatRoughness,1),o.G),C(c,p,o.R),this._material.getScene());if(e._disposed)return void y.texture?.dispose();this.coatRoughness=y.factor?y.factor.r:1,this.coatRoughnessTexture=y.texture;let W=await k("newCoatDarkening ("+this._material.name+")",C(null,new n.Color4(0,0,0,1),o.R),C(null,new n.Color4(this.coatDarkening,this.coatDarkening,this.coatDarkening,1),o.R),C(c,p,o.R),this._material.getScene());if(e._disposed)return void W.texture?.dispose();if(this.coatDarkening=W.factor?W.factor.r:this.coatDarkening,l){let t=await k("newSpecularRoughness ("+this._material.name+")",C(this.specularRoughnessTexture,new n.Color4(this._material.specularRoughness,this._material.specularRoughness,this._material.specularRoughness,1),o.G),C(null,new n.Color4(1,1,1,1),o.R),C(r,g,s),this._material.getScene());if(e._disposed)return void t.texture?.dispose();this.specularRoughness=t.factor?t.factor.r:1,this.specularRoughnessTexture=t.texture}if(m||this.geometryNormalTexture){let t=await k("newCoatNormal ("+this._material.name+")",C(this.geometryNormalTexture,this.geometryNormalTexture?new n.Color4(1,1,1,1):new n.Color4(.5,.5,1,1),o.RGBA),C(m,m?new n.Color4(1,1,1,1):new n.Color4(.5,.5,1,1),o.RGBA),C(c,p,o.R),this._material.getScene());if(e._disposed)return void t.texture?.dispose();t.texture&&(this.geometryCoatNormalTexture=t.texture)}}}],17255)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(e,t,n){let s=()=>{let t=e.pick(e.pointerX,e.pointerY);t?.hit&&t.pickedPoint&&n.setTarget(t.pickedPoint)};return t.addEventListener("dblclick",s),()=>t.removeEventListener("dblclick",s)},"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(e,t){e.setTarget(t.target),e.alpha=t.alpha,e.beta=t.beta,e.radius=t.radius},"stepZoom",0,function(e,t){let n=e.lowerRadiusLimit??.01,s=e.upperRadiusLimit??1/0;e.radius=Math.min(s,Math.max(n,e.radius*t))}],2348);var n=e.i(28100);e.s(["ZoomButtons",0,function({onZoom:e,onReset:s}){let a="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,n.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,n.jsx)("button",{type:"button","aria-label":"Zoom in",className:a,onClick:()=>e(t),children:"+"}),(0,n.jsx)("button",{type:"button","aria-label":"Zoom out",className:a,onClick:()=>e(1.2),children:"−"}),s?(0,n.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:a,onClick:s,children:(0,n.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,n.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},25476,e=>{"use strict";e.s(["attachMeshHover",0,function(e,t,n){let s=0,a=null,i=t=>{let i=t.offsetX,l=t.offsetY;s||(s=requestAnimationFrame(()=>{var t,o;let r;s=0;let c=e.pick(i,l,e=>e.isPickable&&e.isEnabled()),u=c?.pickedMesh?(t=c.pickedMesh,o=c.thinInstanceIndex??-1,(r=t.metadata)?o>=0&&r.hoverLabels?r.hoverLabels[o]??null:r.hoverLabel??null:null):null;u?n({label:u,x:i,y:l}):null!==a&&n(null),a=u}))},l=()=>{s&&(cancelAnimationFrame(s),s=0),null!==a&&(a=null,n(null))};return t.addEventListener("pointermove",i),t.addEventListener("pointerleave",l),()=>{t.removeEventListener("pointermove",i),t.removeEventListener("pointerleave",l),s&&cancelAnimationFrame(s)}}])},19399,e=>{"use strict";var t=e.i(28100),n=e.i(11623),s=e.i(20880);let a="__other_sp__",i="__other_mesh__";function l(e){return`${e[0]}|${e[1]}|${e[2]}`}function o(e,t){return t<=1?0:1.4-e/(t-1)*2.8}var r=e.i(56054),c=e.i(2348),u=e.i(25476),h=e.i(18637),d=e.i(2413);let m="__all__",p={maxStandpoints:6,maxMeshes:10,maxRibbons:70};function b(e,t){return`${e}|${t}`}function f(e){let t=e.aabb;return[(t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2]}function g(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Math.abs(t)}function x({label:e,value:n,onChange:s,allLabel:a,options:i}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,t.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,t.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:n,onChange:e=>s(e.target.value),children:[(0,t.jsx)("option",{value:m,children:a}),i.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}function v({active:e,onClick:n,children:s,disabled:a=!1,title:i}){return(0,t.jsx)("button",{type:"button",onClick:n,disabled:a,title:i,className:`rounded px-2 py-0.5 font-medium transition ${a?"cursor-not-allowed text-fg-muted/40":e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:s})}function k({standpoints:e,proxyMeshes:s,selectedKey:a,onSelect:i}){let l=(0,n.useRef)(null),o=(0,n.useMemo)(()=>e.filter(e=>e.origin),[e]),r=(0,n.useMemo)(()=>{let e=1/0,t=-1/0,n=1/0,a=-1/0,i=(s,i)=>{e=Math.min(e,s),t=Math.max(t,s),n=Math.min(n,i),a=Math.max(a,i)};for(let e of s)i(e.aabb[0],e.aabb[2]),i(e.aabb[3],e.aabb[5]);for(let e of o)i(e.origin[0],e.origin[2]);return Number.isFinite(e)?(t-e<.001&&(e-=1,t+=1),a-n<.001&&(n-=1,a+=1),{minX:e,maxX:t,minZ:n,maxZ:a}):{minX:-1,maxX:1,minZ:-1,maxZ:1}},[s,o]),c=(0,n.useMemo)(()=>{let e=Math.min(134/(r.maxX-r.minX),94/(r.maxZ-r.minZ));return(t,n)=>[8+(t-r.minX)*e,8+(n-r.minZ)*e]},[r]),u=(0,n.useMemo)(()=>o.reduce((e,t)=>Math.max(e,t.count),1),[o]);return(0,n.useEffect)(()=>{let e=l.current,t=e?.getContext("2d");if(!t)return;let n=window.devicePixelRatio||1;for(let a of(e.width=150*n,e.height=110*n,t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,150,110),t.fillStyle="rgba(8,10,14,0.85)",t.fillRect(0,0,150,110),t.strokeStyle="rgba(120,140,170,0.35)",t.lineWidth=1,s)){let[e,n]=c(a.aabb[0],a.aabb[2]),[s,i]=c(a.aabb[3],a.aabb[5]);t.strokeRect(Math.min(e,s),Math.min(n,i),Math.abs(s-e),Math.abs(i-n))}for(let e of o){let[n,s]=c(e.origin[0],e.origin[2]),i=2+e.count/u*4,l=e.key===a;t.beginPath(),t.arc(n,s,i,0,2*Math.PI),t.fillStyle=l?"rgba(242,115,242,1)":"rgba(242,115,242,0.55)",t.fill(),l&&(t.beginPath(),t.arc(n,s,i+2.5,0,2*Math.PI),t.strokeStyle="rgba(255,255,255,0.9)",t.lineWidth=1.5,t.stroke())}},[s,o,c,u,a]),(0,t.jsxs)("div",{className:"absolute right-3 top-3 rounded-md border border-edge bg-ink/80 p-1 backdrop-blur",children:[(0,t.jsx)("div",{className:"px-1 pb-0.5 text-[10px] font-medium text-fg-muted",children:"Standpoints (top view)"}),(0,t.jsx)("canvas",{ref:l,className:"h-27.5 w-37.5 cursor-pointer rounded",onClick:e=>{let t=l.current;if(!t||0===o.length)return;let n=t.getBoundingClientRect(),s=(e.clientX-n.left)/n.width*150,a=(e.clientY-n.top)/n.height*110,r=null,u=1/0;for(let e of o){let[t,n]=c(e.origin[0],e.origin[2]),i=(t-s)**2+(n-a)**2;i<u&&(u=i,r=e)}r&&u<=196&&i(r.key)}})]})}e.s(["FlowSankey3DView",0,function({links:j,gridSize:w,proxyMeshes:z=[],maxLinks:M=80,baseUrl:y,apiKey:_,flowQuery:$,hasFirstPerson:I=!1}){let C=(0,n.useRef)(null),P=(0,n.useRef)(null),B=(0,n.useRef)(null),[R,S]=(0,n.useState)("loading"),[L,q]=(0,n.useState)(null),[A,N]=(0,n.useState)(m),[E,O]=(0,n.useState)(m),[Z,T]=(0,n.useState)(m),[F,V]=(0,n.useState)("aggregate"),[W,X]=(0,n.useState)(null),[H,D]=(0,n.useState)("all"),[U,K]=(0,n.useState)(j),Y=!!(y&&$),G=(0,n.useMemo)(()=>$?JSON.stringify($):"",[$]),J=(0,n.useRef)(!1);(0,n.useEffect)(()=>{!J.current&&I&&(D("first-person"),J.current=!0)},[I]),(0,n.useEffect)(()=>{I&&"viewer"===H&&D("first-person")},[I,H]),(0,n.useEffect)(()=>{Y||K(j)},[j,Y]),(0,n.useEffect)(()=>{if(!y||!$)return;let e=!1,t=new s.CollectorApi(y,_??""),n="all"===H?void 0:H;return t.flowHeatmap({...$,bins:w,limit:400,groupByOrigin:!0,cameraMode:n}).then(t=>{e||K(t)}).catch(()=>{e||K([])}),()=>{e=!0}},[y,_,G,H,w]);let Q=(0,n.useMemo)(()=>{let e=new Map;for(let t of U){if(!t.originVoxel)continue;let n=l(t.originVoxel),s=t.origin,a=e.get(n);a?(a.count+=t.count,s&&(a.ox+=s[0]*t.count,a.oy+=s[1]*t.count,a.oz+=s[2]*t.count,a.wsum+=t.count)):e.set(n,{key:n,voxel:t.originVoxel,count:t.count,ox:s?s[0]*t.count:0,oy:s?s[1]*t.count:0,oz:s?s[2]*t.count:0,wsum:s?t.count:0})}return[...e.values()].map(e=>({key:e.key,voxel:e.voxel,count:e.count,origin:e.wsum>0?[e.ox/e.wsum,e.oy/e.wsum,e.oz/e.wsum]:void 0})).sort((e,t)=>t.count-e.count)},[U]),ee=Q.length>0,et=(0,n.useMemo)(()=>Z===m?null:Q.find(e=>e.key===Z)??null,[Q,Z]),en=(0,n.useMemo)(()=>(function(e,t,n,s){let r=e.filter(e=>e.originVoxel);if(0===r.length)return{standpoints:[],gazes:[],meshes:[],ribbons:[],maxCount:1};let c=t.slice(0,Math.max(1,s.maxStandpoints)),u=new Set(c.map(e=>e.key)),h=e=>{let t=e.originVoxel?l(e.originVoxel):a;return u.has(t)?t:a},d=new Map;for(let e of r)d.set(e.mesh,(d.get(e.mesh)??0)+e.count);let m=new Set([...d.entries()].sort((e,t)=>t[1]-e[1]).slice(0,Math.max(1,s.maxMeshes)).map(([e])=>e)),p=e=>m.has(e)?e:i,b=new Map;for(let e of r){let t=h(e),n=p(e.mesh),s=`${t}|${e.azimuth_bin}|${e.elevation_bin}|${n}`,a=b.get(s);a?a.count+=e.count:b.set(s,{standpointId:t,gazeId:`${t}|${e.azimuth_bin}|${e.elevation_bin}`,meshId:n,azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})}let f=[...b.values()].sort((e,t)=>t.count-e.count),g=f.slice(0,Math.max(1,s.maxRibbons)),x=f.slice(Math.max(1,s.maxRibbons));if(x.length>0){let e=new Map(g.map(e=>[`${e.standpointId}|${e.azimuthBin}|${e.elevationBin}|${i}`,e]));for(let t of x){let n=`${t.standpointId}|${t.azimuthBin}|${t.elevationBin}|${i}`,s=e.get(n);if(s)s.count+=t.count;else{let s={standpointId:t.standpointId,gazeId:t.gazeId,meshId:i,azimuthBin:t.azimuthBin,elevationBin:t.elevationBin,count:t.count};e.set(n,s),g.push(s)}}}let v=new Set(g.map(e=>e.standpointId)),k=new Set(g.map(e=>e.meshId)),j=[...c.filter(e=>v.has(e.key)).map(e=>e.key),...v.has(a)?[a]:[]],w=j.map((e,t)=>{let n=c.find(t=>t.key===e),s=g.filter(t=>t.standpointId===e).reduce((e,t)=>e+t.count,0);return{id:e,kind:"standpoint",pos:[-2.6,o(t,j.length),0],count:s,label:n?`[${n.voxel[0]}, ${n.voxel[1]}, ${n.voxel[2]}]`:"Other standpoints",isOther:e===a}}),z=new Map(w.map(e=>[e.id,e.pos[1]])),M=new Map;for(let e of g)M.set(e.meshId,(M.get(e.meshId)??0)+e.count);let y=[...k].sort((e,t)=>(M.get(t)??0)-(M.get(e)??0));y.sort((e,t)=>(e===i)-(t===i));let _=y.map((e,t)=>({id:e,kind:"mesh",pos:[2.6,o(t,y.length),0],count:M.get(e)??0,label:e===i?"Other meshes":e,isOther:e===i})),$=new Map;for(let e of g){let t=$.get(e.gazeId);t?t.count+=e.count:$.set(e.gazeId,{az:e.azimuthBin,el:e.elevationBin,sp:e.standpointId,count:e.count})}let I=[...$.entries()].map(([e,t])=>{let s=z.get(t.sp)??0,a=(t.az+.5)/n-.5;return{id:e,kind:"gaze",pos:[0,s+((t.el+.5)/n-.5)*.85,1.6*a],count:t.count,label:`(${t.az}, ${t.el})`,isOther:!1}}),C=g.reduce((e,t)=>Math.max(e,t.count),1);return{standpoints:w,gazes:I,meshes:_,ribbons:g,maxCount:C}})(U,Q,w,p),[U,Q,w]),es="twostage"===F&ⅇ(0,n.useEffect)(()=>{"twostage"!==F||ee||V("aggregate")},[F,ee]);let ea=(0,n.useMemo)(()=>{if(Z!==m&&ee)return U.filter(e=>e.originVoxel&&l(e.originVoxel)===Z);if(!ee)return U;let e=new Map;for(let t of U){let n=`${t.azimuth_bin}|${t.elevation_bin}|${t.mesh}`,s=e.get(n);s?s.count+=t.count:e.set(n,{azimuth_bin:t.azimuth_bin,elevation_bin:t.elevation_bin,mesh:t.mesh,count:t.count})}return[...e.values()]},[U,Z,ee]),ei=(0,n.useMemo)(()=>[...ea].sort((e,t)=>t.count-e.count).slice(0,Math.max(1,M)),[ea,M]),el=(0,n.useMemo)(()=>{let e=new Map;for(let t of ei)e.set(t.mesh,(e.get(t.mesh)??0)+t.count);return[...e.entries()].sort((e,t)=>t[1]-e[1])},[ei]),eo=(0,n.useMemo)(()=>{let e=new Map;for(let t of ei){let n=b(t.azimuth_bin,t.elevation_bin),s=e.get(n);s?s.count+=t.count:e.set(n,{azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[ei]);(0,n.useEffect)(()=>{!es&&A!==m&&(el.some(([e])=>e===A)||N(m))},[es,A,el]),(0,n.useEffect)(()=>{!es&&E!==m&&(eo.some(e=>b(e.azimuthBin,e.elevationBin)===E)||O(m))},[es,E,eo]),(0,n.useEffect)(()=>{!es&&Z!==m&&(Q.some(e=>e.key===Z)||T(m))},[es,Z,Q]),(0,n.useEffect)(()=>{N(m),O(m),T(m)},[F]);let er=(0,n.useMemo)(()=>es?en.ribbons.filter(e=>{let t=Z===m||e.standpointId===Z,n=E===m||b(e.azimuthBin,e.elevationBin)===E,s=A===m||e.meshId===A;return t&&n&&s}).length:ei.filter(e=>{let t=E===m||b(e.azimuth_bin,e.elevation_bin)===E,n=A===m||e.mesh===A;return t&&n}).length,[es,en,ei,A,E,Z]),ec=es?en.ribbons.length:ei.length,eu=(0,n.useMemo)(()=>es?en.standpoints.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):Q.slice(0,24).map(e=>({value:e.key,label:`[${e.voxel[0]}, ${e.voxel[1]}, ${e.voxel[2]}] \xb7 ${e.count}`})),[es,en,Q]),eh=(0,n.useMemo)(()=>{if(es){let e=new Map;for(let t of en.ribbons){let n=b(t.azimuthBin,t.elevationBin),s=e.get(n);s?s.count+=t.count:e.set(n,{az:t.azimuthBin,el:t.elevationBin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count).map(e=>({value:b(e.az,e.el),label:`(${e.az}, ${e.el}) \xb7 ${e.count}`}))}return eo.map(e=>({value:b(e.azimuthBin,e.elevationBin),label:`(${e.azimuthBin}, ${e.elevationBin}) \xb7 ${e.count}`}))},[es,en,eo]),ed=(0,n.useMemo)(()=>es?en.meshes.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):el.map(([e,t])=>({value:e,label:`${e} \xb7 ${t}`})),[es,en,el]),em=(0,n.useRef)(ei);em.current=ei;let ep=(0,n.useRef)(en);ep.current=en;let eb=(0,n.useRef)(z);eb.current=z;let ef=(0,n.useRef)(el);ef.current=el;let eg=(0,n.useRef)(A);eg.current=A;let ex=(0,n.useRef)(E);ex.current=E;let ev=(0,n.useRef)(Z);ev.current=Z;let ek=(0,n.useRef)(et);ek.current=et;let ej=(0,n.useRef)(null),ew=es?en.ribbons.length>0:ei.length>0;return(0,n.useEffect)(()=>{let t=C.current;if(!t)return;if(!ew)return void S("empty");let n=!1,s=null;return S("loading"),q(null),(async()=>{try{let a,[{Engine:i},{Scene:l},{ArcRotateCamera:o},{HemisphericLight:h},{Vector3:d,Color3:p,Color4:x},{MeshBuilder:v},{StandardMaterial:k}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(18561)]);if(n)return;let j=new i(t,!0,{preserveDrawingBuffer:!1}),z=new l(j);z.clearColor=new x(.04,.05,.07,1);let M=[],y=()=>{for(let e of M)e.dispose();M=[]};if(es){let e=d.Zero();(a=new o("ts-cam",Math.PI/2,Math.PI/2.4,8.5,e,z)).attachControl(t,!0),(0,c.disableWheelZoom)(a),P.current=a,B.current={target:e,alpha:a.alpha,beta:a.beta,radius:a.radius},new h("ts-light",new d(.3,1,.2),z);let n={standpoint:[.95,.45,.95],gaze:[.45,.75,1],mesh:[1,.82,.42]},s={standpoint:.26,gaze:.13,mesh:.22},i=(e,t,n)=>{let s=e[0],a=e[1],i=e[2],l=t[0],o=t[1],r=t[2],c=[(s+l)/2,(a+o)/2+n,(i+r)/2],u=[];for(let e=0;e<=12;e++){let t=e/12,n=1-t;u.push(new d(n*n*s+2*n*t*c[0]+t*t*l,n*n*a+2*n*t*c[1]+t*t*o,n*n*i+2*n*t*c[2]+t*t*r))}return u},l=()=>{y();let e=ep.current;if(0===e.ribbons.length)return;let t=ev.current,a=ex.current,l=eg.current,o=e=>{let n=t===m||e.standpointId===t,s=a===m||b(e.azimuthBin,e.elevationBin)===a,i=l===m||e.meshId===l;return n&&s&&i},c=t!==m||a!==m||l!==m,u=new Set;for(let t of e.ribbons)o(t)&&(u.add(t.standpointId),u.add(t.gazeId),u.add(t.meshId));let h=[...e.standpoints,...e.gazes,...e.meshes],f=new Map(h.map(e=>[e.id,e.pos])),g=new Map(h.map(e=>[e.id,e.label]));for(let e of h){let t=v.CreateSphere(`ts-node-${e.kind}-${e.id}`,{diameter:s[e.kind],segments:8},z);t.position=new d(e.pos[0],e.pos[1],e.pos[2]);let a=new k(`ts-node-mat-${e.kind}-${e.id}`,z);a.disableLighting=!0;let[i,l,o]=n[e.kind];a.emissiveColor=new p(i,l,o),a.alpha=!c||u.has(e.id)?1:.2,t.material=a,t.isPickable=!0,t.metadata={hoverLabel:e.label},M.push(t,a)}for(let t of e.ribbons){let n=f.get(t.standpointId),s=f.get(t.gazeId),a=f.get(t.meshId);if(!n||!s||!a)continue;let l=t.count/e.maxCount,u=.18+.5*l,h=[...i(n,s,u),...i(s,a,u).slice(1)],d=o(t),[m,b,x]=(0,r.heatRgb)(l),j=v.CreateTube(`ts-link-${t.standpointId}-${t.gazeId}-${t.meshId}`,{path:h,radius:(d?1:.4)*(.012+.04*l),tessellation:8,cap:0,sideOrientation:0},z),w=new k(`ts-link-mat-${t.standpointId}-${t.gazeId}-${t.meshId}`,z);w.disableLighting=!0,w.emissiveColor=new p(m,b,x),w.alpha=d?.35+.65*l:c?.06:.18,j.material=w,j.isPickable=!0,j.metadata={hoverLabel:g.get(t.meshId)??t.meshId},M.push(j,w)}};ej.current=l,l()}else{let e=new Map;for(let t of eb.current)e.set(t.name,f(t));let n=new Map,s=ef.current.map(([e])=>e).filter(t=>!e.has(t));for(let e=0;e<s.length;e++){let t=s[e],a=g(t),i=e/Math.max(1,s.length)*Math.PI*2+a%100/100*.35;n.set(t,[2.2*Math.cos(i),-.35+(a%7-3)*.06,2.2*Math.sin(i)])}for(let[t,s]of e.entries())n.set(t,s);let i=0,l=0,u=0,x=0;for(let e of n.values())i+=e[0],l+=e[1],u+=e[2],x++;let j=new d(i/Math.max(1,x),l/Math.max(1,x),u/Math.max(1,x)),_=1.8;for(let e of n.values()){let t=e[0]-j.x,n=e[1]-j.y,s=e[2]-j.z;_=Math.max(_,Math.sqrt(t*t+n*n+s*s))}let $=.75*_+1,I=Math.max(1,_/1.8);(a=new o("flow-cam",Math.PI/4,Math.PI/3,3.4*_,j,z)).attachControl(t,!0),(0,c.disableWheelZoom)(a),P.current=a,B.current={target:j,alpha:a.alpha,beta:a.beta,radius:a.radius},new h("flow-light",new d(.3,1,.2),z);let C=v.CreateSphere("flow-source-dome",{diameter:2*$,segments:20},z);C.position=j;let R=new k("flow-source-dome-mat",z);R.wireframe=!0,R.disableLighting=!0,R.emissiveColor=new p(.16,.2,.28),R.alpha=.35,C.material=R,C.isPickable=!1;let S=()=>{y();let e=em.current;if(0===e.length)return;let t=eg.current,n=ex.current,s=ek.current,a=new Map;for(let e of eb.current)a.set(e.name,f(e));let i=new Map,l=ef.current.map(([e])=>e).filter(e=>!a.has(e));for(let e=0;e<l.length;e++){let t=l[e],n=g(t),s=e/Math.max(1,l.length)*Math.PI*2+n%100/100*.35;i.set(t,[2.2*Math.cos(s),-.35+(n%7-3)*.06,2.2*Math.sin(s)])}for(let[e,t]of a.entries())i.set(e,t);let o=e.reduce((e,t)=>Math.max(e,t.count),1),c=new k("flow-source-node",z);c.disableLighting=!0,c.emissiveColor=new p(.45,.75,1);let u=new k("flow-target-node",z);u.disableLighting=!0,u.emissiveColor=new p(1,.82,.42),M.push(c,u);let h=new Set,x=new Set,_=e=>{let s=n===m||b(e.azimuth_bin,e.elevation_bin)===n,a=t===m||e.mesh===t;return s&&a},C=new Set,P=new Set;for(let t of e)_(t)&&(C.add(b(t.azimuth_bin,t.elevation_bin)),P.add(t.mesh));for(let s of e){let e=`${s.azimuth_bin}|${s.elevation_bin}`,a=i.get(s.mesh);if(!a)continue;let l=_(s),b=(s.azimuth_bin+.5)/w*Math.PI*2-Math.PI,f=(s.elevation_bin+.5)/w*Math.PI-Math.PI/2,g=Math.cos(f),y=g*Math.cos(b),B=Math.sin(f),R=g*Math.sin(b),S=new d(j.x+y*$,j.y+B*$,j.z+R*$),L=new d(a[0],a[1],a[2]);if(!h.has(e)){let s=v.CreateSphere(`flow-src-${e}`,{diameter:.12*I,segments:6},z);s.position=S;let a=c.clone(`flow-src-mat-${e}`);a.alpha=C.has(e)||t===m&&n===m?1:.22,s.material=a,s.isPickable=!1,h.add(e),M.push(s,a)}if(!x.has(s.mesh)){let e=v.CreateSphere(`flow-target-${s.mesh}`,{diameter:.2*I,segments:7},z);e.position=L;let a=u.clone(`flow-target-mat-${s.mesh}`);a.alpha=P.has(s.mesh)||t===m&&n===m?1:.22,e.material=a,e.isPickable=!0,e.metadata={hoverLabel:s.mesh},x.add(s.mesh),M.push(e,a)}let q=S.add(L).scale(.5),A=q.subtract(j),N=Math.sqrt(A.x*A.x+A.y*A.y+A.z*A.z),E=N>1e-6?A.x/N:0,O=N>1e-6?A.y/N:1,Z=N>1e-6?A.z/N:0,T=(.35+s.count/o*.75)*I,F=new d(q.x+E*T,q.y+O*T+.12*I,q.z+Z*T),V=[];for(let e=0;e<=18;e++){let t=e/18,n=1-t;V.push(new d(n*n*S.x+2*n*t*F.x+t*t*L.x,n*n*S.y+2*n*t*F.y+t*t*L.y,n*n*S.z+2*n*t*F.z+t*t*L.z))}let W=s.count/o,[X,H,D]=(0,r.heatRgb)(W),U=v.CreateTube(`flow-link-${s.mesh}-${e}`,{path:V,radius:(l?1:.4)*(.012+.04*W)*I,tessellation:8,cap:0,sideOrientation:0},z),K=new k(`flow-link-mat-${s.mesh}-${e}`,z);K.disableLighting=!0,K.emissiveColor=new p(X,H,D),K.alpha=l?.35+.65*W:.08,U.material=K,U.isPickable=!0,U.metadata={hoverLabel:s.mesh},M.push(U,K)}let B=s?.origin;if(B){let e=new d(B[0],B[1],B[2]),t=v.CreateSphere("flow-standpoint",{diameter:.26*I,segments:10},z);t.position=e;let n=new k("flow-standpoint-mat",z);n.disableLighting=!0,n.emissiveColor=new p(.95,.45,.95),t.material=n,t.isPickable=!1;let s=v.CreateLines("flow-standpoint-stem",{points:[e,new d(e.x,j.y,e.z)]},z);s.color=new p(.95,.45,.95),s.isPickable=!1,M.push(t,n,s)}};ej.current=S,S()}j.runRenderLoop(()=>z.render());let _=()=>j.resize();window.addEventListener("resize",_);let $=(0,u.attachMeshHover)(z,t,X),I=(0,c.attachDoubleClickFocus)(z,t,a);S("ready"),s=()=>{window.removeEventListener("resize",_),$(),I(),X(null),ej.current=null,P.current=null,B.current=null,y(),z.dispose(),j.dispose()}}catch(e){if(n)return;S("error"),q(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,s?.()}},[es,w,ew]),(0,n.useEffect)(()=>{ej.current?.()},[ei,en,z,A,E,Z,et]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:C,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),W?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:W.x+12,top:W.y+12},children:W.label}):null,"ready"===R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex flex-wrap gap-2",children:[ee?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(v,{active:!es,onClick:()=>V("aggregate"),children:"Aggregate"}),(0,t.jsx)(v,{active:es,onClick:()=>V("twostage"),children:"Two-stage"})]}):null,Y?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(v,{active:"first-person"===H,onClick:()=>D("first-person"),children:"Walk"}),(0,t.jsx)(v,{active:"viewer"===H,onClick:()=>D("viewer"),disabled:I,title:I?"Orbit (viewer) flow isn't available for walkable scenes":void 0,children:"Orbit"}),(0,t.jsx)(v,{active:"all"===H,onClick:()=>D("all"),children:"All"})]}):null,ee?(0,t.jsx)(x,{label:"Standpoint",value:Z,onChange:T,allLabel:"All standpoints",options:eu}):null,(0,t.jsx)(x,{label:es?"Gaze":"Source",value:E,onChange:O,allLabel:es?"All gaze sectors":"All sources",options:eh}),(0,t.jsx)(x,{label:"Mesh",value:A,onChange:N,allLabel:"All meshes",options:ed})]}),es?(0,t.jsx)(k,{standpoints:Q,proxyMeshes:z,selectedKey:Z,onSelect:e=>T(t=>t===e?m:e)}):null,(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex max-w-[20rem] flex-col items-end gap-2",children:[Y&&!I?(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg-muted backdrop-blur",children:["Orbit-dominated scene — viewer ",(0,t.jsx)("em",{children:"position"})," adds little here. Use the"," ",(0,t.jsx)("strong",{children:"View dome"})," (§7.5) above for where viewers looked."]}):null,(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:["Active links: ",er,"/",ec]})]}),(0,t.jsx)(d.ZoomButtons,{onZoom:e=>P.current&&(0,c.stepZoom)(P.current,e),onReset:()=>P.current&&B.current&&(0,c.resetFocus)(P.current,B.current)}),(0,t.jsx)(h.HeatLegend,{title:"Flow volume",lowLabel:"fewer links",highLabel:"dominant links",note:es?"Three columns: standpoint → gaze sector → mesh. Top standpoints/meshes are kept; the tail folds into an “Other” node. Pick a standpoint (or click the minimap), gaze sector, or mesh to emphasize matching ribbons.":"Each arc aggregates clicks from one camera-direction bin to a mesh. Pick a source or mesh to emphasize matching links and dim the rest."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===R?"Rendering…":"empty"===R?"No aggregate flow links in range.":"error"===R?L??"Flow view unavailable.":null})]})}],19399)},3905,e=>{e.v(t=>Promise.all(["static/chunks/3pdpaqzwhhijn.js","static/chunks/08bm3ye5govev.js","static/chunks/0g6u34xkzrpjn.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2gh4z57fem0_v.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0g7p8zp2kxve5.js"].map(t=>e.l(t))).then(()=>t(66232)))},94432,e=>{e.v(t=>Promise.all(["static/chunks/2kje_jvmwsvwo.js","static/chunks/1j--a56ji33_x.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vpcaaf-0dn7q.js"].map(t=>e.l(t))).then(()=>t(92494)))},59694,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/245h82k-g1nxr.js","static/chunks/3ovd8o_usay7j.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3pyggl13glbdc.js"].map(t=>e.l(t))).then(()=>t(67186)))},88004,e=>{e.v(t=>Promise.all(["static/chunks/2p8dbh81chhon.js","static/chunks/1oara6fkfvgs3.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(15768)))},27940,e=>{e.v(t=>Promise.all(["static/chunks/0w0sx062qmcsh.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(23235)))},27124,e=>{e.v(t=>Promise.all(["static/chunks/1par9m038tiov.js","static/chunks/1j--a56ji33_x.js","static/chunks/2j-sax2xfdv7l.js","static/chunks/340pg0qkv5tqq.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/0gwa154w_0wuh.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3pyggl13glbdc.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/01aeari2x_tlz.js"].map(t=>e.l(t))).then(()=>t(70928)))},14074,e=>{e.v(t=>Promise.all(["static/chunks/1zcrrq1fx8g2y.js","static/chunks/1tdg_eolxlcdl.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/0vddljjnmozzx.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0f_nv15a8q415.js","static/chunks/3g_h_00xs9u59.js","static/chunks/2npk7tr63h7rl.js","static/chunks/25ctnyh7njp-d.js"].map(t=>e.l(t))).then(()=>t(87566)))},18561,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/1vkww9l6lgqag.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/117ys3lltfmcu.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js"].map(t=>e.l(t))).then(()=>t(85106)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1719,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},91095,t=>{"use strict";var e,r,n,s,a=t.i(10534);(e=n||(n={}))[e.LOCAL=0]="LOCAL",e[e.WORLD=1]="WORLD",e[e.BONE=2]="BONE";class i{}i.X=new a.Vector3(1,0,0),i.Y=new a.Vector3(0,1,0),i.Z=new a.Vector3(0,0,1),(r=s||(s={}))[r.X=0]="X",r[r.Y=1]="Y",r[r.Z=2]="Z",t.s(["Axis",0,i,"Coordinate",0,s,"Space",0,n])},16475,t=>{"use strict";var e=t.i(38677);class r{static GetPlanes(t){let n=[];for(let t=0;t<6;t++)n.push(new e.Plane(0,0,0,0));return r.GetPlanesToRef(t,n),n}static GetNearPlaneToRef(t,e){let r=t.m;e.normal.x=r[3]+r[2],e.normal.y=r[7]+r[6],e.normal.z=r[11]+r[10],e.d=r[15]+r[14],e.normalize()}static GetFarPlaneToRef(t,e){let r=t.m;e.normal.x=r[3]-r[2],e.normal.y=r[7]-r[6],e.normal.z=r[11]-r[10],e.d=r[15]-r[14],e.normalize()}static GetLeftPlaneToRef(t,e){let r=t.m;e.normal.x=r[3]+r[0],e.normal.y=r[7]+r[4],e.normal.z=r[11]+r[8],e.d=r[15]+r[12],e.normalize()}static GetRightPlaneToRef(t,e){let r=t.m;e.normal.x=r[3]-r[0],e.normal.y=r[7]-r[4],e.normal.z=r[11]-r[8],e.d=r[15]-r[12],e.normalize()}static GetTopPlaneToRef(t,e){let r=t.m;e.normal.x=r[3]-r[1],e.normal.y=r[7]-r[5],e.normal.z=r[11]-r[9],e.d=r[15]-r[13],e.normalize()}static GetBottomPlaneToRef(t,e){let r=t.m;e.normal.x=r[3]+r[1],e.normal.y=r[7]+r[5],e.normal.z=r[11]+r[9],e.d=r[15]+r[13],e.normalize()}static GetPlanesToRef(t,e){r.GetNearPlaneToRef(t,e[0]),r.GetFarPlaneToRef(t,e[1]),r.GetLeftPlaneToRef(t,e[2]),r.GetRightPlaneToRef(t,e[3]),r.GetTopPlaneToRef(t,e[4]),r.GetBottomPlaneToRef(t,e[5])}static IsPointInFrustum(t,e){for(let r=0;r<6;r++)if(0>e[r].dotCoordinate(t))return!1;return!0}}t.s(["Frustum",0,r])},66476,t=>{"use strict";var e=t.i(10534),r=t.i(65703);t.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(t=!1,n=!0){let s;if(!this.pickedMesh||n&&!this.pickedMesh.isVerticesDataPresent(r.VertexBuffer.NormalKind))return null;let a=this.pickedMesh.getIndices();a?.length===0&&(a=null);let i=e.TmpVectors.Vector3[0],o=e.TmpVectors.Vector3[1],h=e.TmpVectors.Vector3[2];if(n){let t=this.pickedMesh.getVerticesData(r.VertexBuffer.NormalKind),n=a?e.Vector3.FromArrayToRef(t,3*a[3*this.faceId],i):i.copyFromFloats(t[3*this.faceId*3],t[3*this.faceId*3+1],t[3*this.faceId*3+2]),c=a?e.Vector3.FromArrayToRef(t,3*a[3*this.faceId+1],o):o.copyFromFloats(t[(3*this.faceId+1)*3],t[(3*this.faceId+1)*3+1],t[(3*this.faceId+1)*3+2]),f=a?e.Vector3.FromArrayToRef(t,3*a[3*this.faceId+2],h):h.copyFromFloats(t[(3*this.faceId+2)*3],t[(3*this.faceId+2)*3+1],t[(3*this.faceId+2)*3+2]);n=n.scale(this.bu),c=c.scale(this.bv),f=f.scale(1-this.bu-this.bv),s=new e.Vector3(n.x+c.x+f.x,n.y+c.y+f.y,n.z+c.z+f.z)}else{let t=this.pickedMesh.getVerticesData(r.VertexBuffer.PositionKind),n=a?e.Vector3.FromArrayToRef(t,3*a[3*this.faceId],i):i.copyFromFloats(t[3*this.faceId*3],t[3*this.faceId*3+1],t[3*this.faceId*3+2]),c=a?e.Vector3.FromArrayToRef(t,3*a[3*this.faceId+1],o):o.copyFromFloats(t[(3*this.faceId+1)*3],t[(3*this.faceId+1)*3+1],t[(3*this.faceId+1)*3+2]),f=a?e.Vector3.FromArrayToRef(t,3*a[3*this.faceId+2],h):h.copyFromFloats(t[(3*this.faceId+2)*3],t[(3*this.faceId+2)*3+1],t[(3*this.faceId+2)*3+2]),u=n.subtract(c),l=f.subtract(c);s=e.Vector3.Cross(u,l)}let c=(t,r)=>{if(-1!==this.thinInstanceIndex){let n=t._thinInstanceDataStorage.matrixData,s=this.thinInstanceIndex<<4;if(n&&n.length>s){let t=e.TmpVectors.Matrix[0];e.Matrix.FromArrayToRef(n,s,t),e.Vector3.TransformNormalToRef(r,t,r)}}let n=t.getWorldMatrix();t.nonUniformScaling&&(e.TmpVectors.Matrix[0].copyFrom(n),(n=e.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),n.invert(),n.transposeToRef(e.TmpVectors.Matrix[1]),n=e.TmpVectors.Matrix[1]),e.Vector3.TransformNormalToRef(r,n,r)};if(t&&c(this.pickedMesh,s),this.ray){let r=e.TmpVectors.Vector3[0].copyFrom(s);t||c(this.pickedMesh,r),e.Vector3.Dot(r,this.ray.direction)>0&&s.negateInPlace()}return s.normalize(),s}getTextureCoordinates(t=r.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(t))return null;let n=this.pickedMesh.getIndices();if(!n)return null;let s=this.pickedMesh.getVerticesData(t);if(!s)return null;let a=e.Vector2.FromArray(s,2*n[3*this.faceId]),i=e.Vector2.FromArray(s,2*n[3*this.faceId+1]),o=e.Vector2.FromArray(s,2*n[3*this.faceId+2]);return a=a.scale(this.bu),i=i.scale(this.bv),o=o.scale(1-this.bu-this.bv),new e.Vector2(a.x+i.x+o.x,a.y+i.y+o.y)}}])},10952,t=>{"use strict";class e{constructor(t,e,r,n){this.x=t,this.y=e,this.width=r,this.height=n}toGlobal(t,r){return new e(this.x*t,this.y*r,this.width*t,this.height*r)}toGlobalToRef(t,e,r){return r.x=this.x*t,r.y=this.y*e,r.width=this.width*t,r.height=this.height*e,this}clone(){return new e(this.x,this.y,this.width,this.height)}}t.s(["Viewport",0,e])},21834,t=>{"use strict";t.s(["useOpenGLOrientationForUV",()=>!1])},52572,t=>{"use strict";var e=t.i(4775);t.s(["DrawWrapper",0,class{static GetEffect(t){return void 0===t.getPipelineContext?t.effect:t}constructor(t,e=!0){this._wasPreviouslyReady=!1,this._forceRebindOnNextCall=!0,this._wasPreviouslyUsingInstances=null,this.effect=null,this.defines=null,this.drawContext=t.createDrawContext(),e&&(this.materialContext=t.createMaterialContext())}setEffect(t,e,r=!0){this.effect=t,void 0!==e&&(this.defines=e),r&&this.drawContext?.reset()}dispose(t=!1){if(this.effect){let r=this.effect;t?r.dispose():e.TimingTools.SetImmediate(()=>{r.getEngine().onEndFrameObservable.addOnce(()=>{r.dispose()})}),this.effect=null}this.drawContext?.dispose()}}])},4812,t=>{"use strict";t.s(["IntersectionInfo",0,class{constructor(t,e,r){this.bu=t,this.bv=e,this.distance=r,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},15298,t=>{"use strict";class e{static get ForceFullSceneLoadingForIncremental(){return e._ForceFullSceneLoadingForIncremental}static set ForceFullSceneLoadingForIncremental(t){e._ForceFullSceneLoadingForIncremental=t}static get ShowLoadingScreen(){return e._ShowLoadingScreen}static set ShowLoadingScreen(t){e._ShowLoadingScreen=t}static get loggingLevel(){return e._LoggingLevel}static set loggingLevel(t){e._LoggingLevel=t}static get CleanBoneMatrixWeights(){return e._CleanBoneMatrixWeights}static set CleanBoneMatrixWeights(t){e._CleanBoneMatrixWeights=t}}e._ForceFullSceneLoadingForIncremental=!1,e._ShowLoadingScreen=!0,e._CleanBoneMatrixWeights=!1,e._LoggingLevel=0,t.s(["SceneLoaderFlags",0,e])},98159,37540,94498,t=>{"use strict";t.s([],37540);var e=t.i(10534),r=t.i(83464),n=t.i(45515),s=t.i(79124),a=t.i(65703);let i="bakedVertexAnimationSettingsInstanced";function o(t){let e=t.bakedVertexAnimationManager?.texture?.getInternalTexture()?._bufferView;return e instanceof Float32Array||e instanceof Uint16Array}let h=!1;function c(){h||(h=!0,s.Mesh.prototype.thinInstanceAdd=function(t,e=!0){if(!this.getScene().getEngine().getCaps().instancedArrays)return r.Logger.Error("Thin Instances are not supported on this device as Instanced Array extension not supported"),-1;this._thinInstanceUpdateBufferSize("matrix",Array.isArray(t)?t.length:1);let n=this._thinInstanceDataStorage.instancesCount;if(Array.isArray(t))for(let r=0;r<t.length;++r)this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t[r],r===t.length-1&&e);else this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t,e);return n},s.Mesh.prototype.thinInstanceAddSelf=function(t=!0){return this.thinInstanceAdd(e.Matrix.IdentityReadOnly,t)},s.Mesh.prototype.thinInstanceRegisterAttribute=function(t,e){t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind),this.removeVerticesData(t),this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.strides[t]=e,this._userThinInstanceBuffersStorage.sizes[t]=e*Math.max(32,this._thinInstanceDataStorage.instancesCount),this._userThinInstanceBuffersStorage.data[t]=new Float32Array(this._userThinInstanceBuffersStorage.sizes[t]),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!0,!1,e,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t])},s.Mesh.prototype.thinInstanceSetMatrixAt=function(t,e,r=!0){if(!this._thinInstanceDataStorage.matrixData||t>=this._thinInstanceDataStorage.instancesCount)return!1;let n=this._thinInstanceDataStorage.matrixData;return e.copyToArray(n,16*t),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[t]=e),r&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},s.Mesh.prototype.thinInstanceSetAttributeAt=function(t,e,r,n=!0){return t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind),!!this._userThinInstanceBuffersStorage&&!!this._userThinInstanceBuffersStorage.data[t]&&!(e>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(t,0),this._userThinInstanceBuffersStorage.data[t].set(r,e*this._userThinInstanceBuffersStorage.strides[t]),n&&this.thinInstanceBufferUpdated(t),!0)},Object.defineProperty(s.Mesh.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(t){let e=this._thinInstanceDataStorage.matrixData??this.source?._thinInstanceDataStorage.matrixData;t<=(e?e.length/16:0)&&(this._thinInstanceDataStorage.instancesCount=t)},enumerable:!0,configurable:!0}),s.Mesh.prototype._thinInstanceCreateMatrixBuffer=function(t,e,r=!0){let n=new a.Buffer(this.getEngine(),e,!r,16,!1,!0);for(let e=0;e<4;e++)this.setVerticesBuffer(n.createVertexBuffer(t+e,4*e,4));return n},s.Mesh.prototype.thinInstanceSetBuffer=function(t,e,r=0,n=!0){if(r=r||16,"matrix"===t)this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=e?e.length:32*r,this._thinInstanceDataStorage.matrixData=e,this._thinInstanceDataStorage.worldMatrices=null,null!==e?(this._thinInstanceDataStorage.instancesCount=e.length/r,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",e,n),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)):(this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo());else if("previousMatrix"===t)this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null,this._thinInstanceDataStorage.previousMatrixData=e,null!==e&&(this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",e,n));else if("splatIndex"===t&&e){this._thinInstanceInitializeUserStorage(),this._thinInstanceDataStorage.instancesCount=e.length/r,this._userThinInstanceBuffersStorage.data[t]=e,this._userThinInstanceBuffersStorage.strides[t]=r,this._userThinInstanceBuffersStorage.sizes[t]=e.length;let n=new a.Buffer(this.getEngine(),e,!0,16,!1,!0);this._thinInstanceDataStorage.matrixBuffer=n;for(let e=0;e<4;e++)this.setVerticesBuffer(n.createVertexBuffer(t+e,4*e,4))}else t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind),null===e?this._userThinInstanceBuffersStorage?.data[t]&&(this.removeVerticesData(t),delete this._userThinInstanceBuffersStorage.data[t],delete this._userThinInstanceBuffersStorage.strides[t],delete this._userThinInstanceBuffersStorage.sizes[t],delete this._userThinInstanceBuffersStorage.vertexBuffers[t]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[t]=e,this._userThinInstanceBuffersStorage.strides[t]=r,this._userThinInstanceBuffersStorage.sizes[t]=e.length,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a.VertexBuffer(this.getEngine(),e,t,!n,!1,r,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},s.Mesh.prototype.thinInstanceBufferUpdated=function(t){"matrix"===t?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.matrixBuffer&&!this._thinInstanceDataStorage.matrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount)):"previousMatrix"===t?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.previousMatrixBuffer&&!this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData,0,this._thinInstanceDataStorage.instancesCount)):"splatIndex"===t?this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._userThinInstanceBuffersStorage.data[t],0,this._thinInstanceDataStorage.instancesCount):(t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]&&(this.thinInstanceAllowAutomaticStaticBufferRecreation&&!this._userThinInstanceBuffersStorage.vertexBuffers[t].isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(this._userThinInstanceBuffersStorage.data[t],0)))},s.Mesh.prototype.thinInstancePartialBufferUpdate=function(t,e,r){if("matrix"===t)this._thinInstanceDataStorage.matrixBuffer&&("number"==typeof e?this._thinInstanceDataStorage.matrixBuffer.updateDirectly(new Float32Array(this._thinInstanceDataStorage.matrixData.buffer,this._thinInstanceDataStorage.matrixData.byteOffset+16*r*Float32Array.BYTES_PER_ELEMENT,16*e),16*r):this._thinInstanceDataStorage.matrixBuffer.updateDirectly(e,r));else if(t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]){let n=this._userThinInstanceBuffersStorage.vertexBuffers[t];if("number"==typeof e){let n=new Float32Array(this._userThinInstanceBuffersStorage.data[t].buffer,this._userThinInstanceBuffersStorage.data[t].byteOffset+r*this._userThinInstanceBuffersStorage.strides[t]*Float32Array.BYTES_PER_ELEMENT,e*this._userThinInstanceBuffersStorage.strides[t]);this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(n,r*this._userThinInstanceBuffersStorage.strides[t])}else n.updateDirectly(e,r)}},s.Mesh.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];let t=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=[];for(let r=0;r<this._thinInstanceDataStorage.instancesCount;++r)this._thinInstanceDataStorage.worldMatrices[r]=e.Matrix.FromArray(t,16*r)}return this._thinInstanceDataStorage.worldMatrices},s.Mesh.prototype.thinInstanceRefreshBoundingInfo=function(t=!1,r=!1,s=!1,h=!1){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return;let c=this._thinInstanceDataStorage.boundingVectors;if(t||!this.rawBoundingInfo){if(c.length=0,h&&function(t,r,s){let h=t._userThinInstanceBuffersStorage,c=h?.data[i],f=h?.strides[i];if(!c||!f||f<4||!o(t))return!1;let u=t._thinInstanceDataStorage.matrixData;if(!u)return!1;let l={},d=e.TmpVectors.Vector4[0],I=e.TmpVectors.Vector3[1],g=e.TmpVectors.Vector3[2],S=e.TmpVectors.Vector3[3],x=e.TmpVectors.Vector3[4],m=e.TmpVectors.Vector3[5],B=e.TmpVectors.Vector3[6],p=e.TmpVectors.Matrix[2],_=t.geometry?t.geometry.boundingBias:null,T=t.getTotalVertices();I.setAll(1/0),g.setAll(-1/0),S.setAll(1/0),x.setAll(-1/0);for(let r=0;r<t._thinInstanceDataStorage.instancesCount;++r){let n=r*f;d.set(c[n],c[n+1],c[n+2],c[n+3]);let i=t._getData({applyMorph:s,applyBakedVertexAnimation:!0,bakedVertexAnimationSettings:d,updatePositionsArray:!1,cache:l},null,a.VertexBuffer.PositionKind);if(!i)return!1;m.setAll(1/0),B.setAll(-1/0);for(let t=0;t<3*T;t+=3){let e=i[t],r=i[t+1],n=i[t+2];e<m.x&&(m.x=e),r<m.y&&(m.y=r),n<m.z&&(m.z=n),e>B.x&&(B.x=e),r>B.y&&(B.y=r),n>B.z&&(B.z=n)}_&&(m.x-=m.x*_.x+_.y,m.y-=m.y*_.x+_.y,m.z-=m.z*_.x+_.y,B.x+=B.x*_.x+_.y,B.y+=B.y*_.x+_.y,B.z+=B.z*_.x+_.y),I.minimizeInPlace(m),g.maximizeInPlace(B),e.Matrix.FromArrayToRef(u,16*r,p),_?function(t,r,n,s,a){let i=e.TmpVectors.Vector3[7],o=e.TmpVectors.Vector3[8];for(let h=0;h<2;++h)for(let c=0;c<2;++c)for(let f=0;f<2;++f)i.set(h?r.x:t.x,c?r.y:t.y,f?r.z:t.z),e.Vector3.TransformCoordinatesToRef(i,n,o),s.minimizeInPlace(o),a.maximizeInPlace(o)}(m,B,p,S,x):function(t,r,n,s,a){let i=e.TmpVectors.Vector3[7];for(let o=0;o<3*r;o+=3)e.Vector3.TransformCoordinatesFromFloatsToRef(t[o],t[o+1],t[o+2],n,i),s.minimizeInPlace(i),a.maximizeInPlace(i)}(i,T,p,S,x)}if(!isFinite(I.x)||!isFinite(S.x))return!1;t.getBoundingInfo().reConstruct(S,x),t.rawBoundingInfo=new n.BoundingInfo(I,g);var D=t.rawBoundingInfo;r.length=0;for(let t=0;t<D.boundingBox.vectors.length;++t)r.push(D.boundingBox.vectors[t].clone());return t._updateBoundingInfo(),!0}(this,c,s))return;h&&this.bakedVertexAnimationManager?.isEnabled&&o(this)?this.refreshBoundingInfo({applySkeleton:r,applyMorph:s,applyBakedVertexAnimation:!0,updatePositionsArray:!1}):this.refreshBoundingInfo(r,s);let t=this.getBoundingInfo();this.rawBoundingInfo=new n.BoundingInfo(t.minimum,t.maximum)}let f=this.getBoundingInfo(),u=this._thinInstanceDataStorage.matrixData;if(0===c.length)for(let t=0;t<f.boundingBox.vectors.length;++t)c.push(f.boundingBox.vectors[t].clone());e.TmpVectors.Vector3[0].setAll(1/0),e.TmpVectors.Vector3[1].setAll(-1/0);for(let t=0;t<this._thinInstanceDataStorage.instancesCount;++t){e.Matrix.FromArrayToRef(u,16*t,e.TmpVectors.Matrix[0]);for(let t=0;t<c.length;++t)e.Vector3.TransformCoordinatesToRef(c[t],e.TmpVectors.Matrix[0],e.TmpVectors.Vector3[2]),e.TmpVectors.Vector3[0].minimizeInPlace(e.TmpVectors.Vector3[2]),e.TmpVectors.Vector3[1].maximizeInPlace(e.TmpVectors.Vector3[2])}f.reConstruct(e.TmpVectors.Vector3[0],e.TmpVectors.Vector3[1]),this._updateBoundingInfo()},s.Mesh.prototype._thinInstanceRecreateBuffer=function(t,e=!0){"matrix"===t?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",this._thinInstanceDataStorage.matrixData,e)):"previousMatrix"===t?this._scene.needsPreviousWorldMatrices&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",this._thinInstanceDataStorage.previousMatrixData??this._thinInstanceDataStorage.matrixData,e)):(t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!e,!1,this._userThinInstanceBuffersStorage.strides[t],!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},s.Mesh.prototype._thinInstanceUpdateBufferSize=function(t,e=1){t===a.VertexBuffer.ColorKind&&(t=a.VertexBuffer.ColorInstanceKind);let r="matrix"===t;if(!r&&(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.strides[t]))return;let n=r?16:this._userThinInstanceBuffersStorage.strides[t],s=r?this._thinInstanceDataStorage.matrixBufferSize:this._userThinInstanceBuffersStorage.sizes[t],i=r?this._thinInstanceDataStorage.matrixData:this._userThinInstanceBuffersStorage.data[t],o=(this._thinInstanceDataStorage.instancesCount+e)*n,h=s;for(;h<o;)h*=2;if(!i||s!=h){if(i){let t=new Float32Array(h);t.set(i,0),i=t}else i=new Float32Array(h);r?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",i,!1),this._thinInstanceDataStorage.matrixData=i,this._thinInstanceDataStorage.matrixBufferSize=h,this._scene.needsPreviousWorldMatrices&&!this._thinInstanceDataStorage.previousMatrixData&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",i,!1))):(this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.data[t]=i,this._userThinInstanceBuffersStorage.sizes[t]=h,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a.VertexBuffer(this.getEngine(),i,t,!0,!1,n,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))}},s.Mesh.prototype._thinInstanceInitializeUserStorage=function(){this._userThinInstanceBuffersStorage||(this._userThinInstanceBuffersStorage={data:{},sizes:{},vertexBuffers:{},strides:{}})},s.Mesh.prototype._disposeThinInstanceSpecificData=function(){this._thinInstanceDataStorage?.matrixBuffer&&(this._thinInstanceDataStorage.matrixBuffer.dispose(),this._thinInstanceDataStorage.matrixBuffer=null),this._thinInstanceDataStorage?.previousMatrixBuffer&&(this._thinInstanceDataStorage.previousMatrixBuffer.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null)})}t.s(["RegisterThinInstanceMesh",0,c],94498),c(),t.s([],98159)},50608,t=>{"use strict";t.i(98159),t.i(37540);var e=t.i(94498);t.s(["RegisterThinInstanceMesh",()=>e.RegisterThinInstanceMesh])},71261,t=>{t.v(e=>Promise.all(["static/chunks/0m0n7kjzscx0y.js"].map(e=>t.l(e))).then(()=>e(76549)))}]);
|