@uptimizr/dashboard 0.4.6 → 0.4.7
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 +19 -5
- package/out/__next._full.txt +10 -10
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{2-_a-v1xeo5hb.js → 0-_j1khfoib6l.js} +116 -115
- package/out/_next/static/chunks/{25brs445bjbik.js → 005bbq_px7lke.js} +2 -2
- package/out/_next/static/chunks/00fbhtmui-yxg.js +1 -0
- package/out/_next/static/chunks/017pn-pen381_.js +1 -0
- package/out/_next/static/chunks/01vov6inx1zzt.js +1 -0
- package/out/_next/static/chunks/{2x-7kbwq8tl-o.js → 02qk_wmkf9at-.js} +196 -196
- package/out/_next/static/chunks/03bd5plut08tg.js +1 -0
- package/out/_next/static/chunks/03dwfqmo73w_z.js +1 -0
- package/out/_next/static/chunks/03sn4419dam-h.js +5 -0
- package/out/_next/static/chunks/05ere0-228syf.js +1 -0
- package/out/_next/static/chunks/{1jjw9hxgi2vzi.js → 05h8u5lrypn5m.js} +1 -1
- package/out/_next/static/chunks/{23-y1f_zw56vo.js → 05v-nubi896jg.js} +1 -1
- package/out/_next/static/chunks/05z79zh625ezu.js +1 -0
- package/out/_next/static/chunks/{2xe4bgir5l-9b.js → 060iult6f68_e.js} +504 -504
- package/out/_next/static/chunks/08lvtnv7b1cxp.js +1 -0
- package/out/_next/static/chunks/0_v2luu_qmeid.js +1 -0
- package/out/_next/static/chunks/0ai0zgbgjqb92.js +1 -0
- package/out/_next/static/chunks/0boov9mwycanf.js +1 -0
- package/out/_next/static/chunks/{2mrkv0z2i74pv.js → 0btmk0wmekl02.js} +2 -2
- package/out/_next/static/chunks/0d8x8m2x6ca_m.js +1 -0
- package/out/_next/static/chunks/0dmrdrwtd093b.js +1 -0
- package/out/_next/static/chunks/0e1jfrmioeuws.js +1 -0
- package/out/_next/static/chunks/0e7nlxmneb2j_.js +1 -0
- package/out/_next/static/chunks/0es97pusfxupl.js +1 -0
- package/out/_next/static/chunks/{2fspbfbxbswzd.js → 0fd-0i1yt23kz.js} +1 -1
- package/out/_next/static/chunks/0fxdyvb1w23d1.js +1 -0
- package/out/_next/static/chunks/0fxhc24djjcgq.js +1 -0
- package/out/_next/static/chunks/0gf-ztg86zd80.js +1 -0
- package/out/_next/static/chunks/{287hakn2ijupp.js → 0grasqqf5dw7r.js} +2 -2
- package/out/_next/static/chunks/{161yjxmdz9obc.js → 0hajwk2yd-rwr.js} +1 -1
- package/out/_next/static/chunks/0hk1wg7h4araz.js +1 -0
- package/out/_next/static/chunks/{1aa9g197l4twm.js → 0j74ipw4fps-n.js} +1 -1
- package/out/_next/static/chunks/{1s0dpdqy480hg.js → 0kj-vckdn7t5p.js} +1 -1
- package/out/_next/static/chunks/0lbs5xdyjuzuo.js +1 -0
- package/out/_next/static/chunks/0lep3_bqwfuin.js +1 -0
- package/out/_next/static/chunks/0mp0jh1gj7290.js +1 -0
- package/out/_next/static/chunks/0ngpoj2g5i4kz.js +1 -0
- package/out/_next/static/chunks/0nhljhguceh66.js +1 -0
- package/out/_next/static/chunks/0p6z73afb9dj2.js +1 -0
- package/out/_next/static/chunks/0p9zfmidzqkps.js +1 -0
- package/out/_next/static/chunks/0q75860p8u_ii.js +1 -0
- package/out/_next/static/chunks/{3mmy9zsb7zo-m.js → 0rracz73p38mo.js} +23 -23
- package/out/_next/static/chunks/{3_dm45k0vk1aa.js → 0sw-8gxbg4x0l.js} +565 -565
- package/out/_next/static/chunks/0sx-6rf3eteqn.js +1 -0
- package/out/_next/static/chunks/0thw099xk3_0p.js +3 -0
- package/out/_next/static/chunks/0u85f0dhb4i8e.js +1 -0
- package/out/_next/static/chunks/0uk7kigzm4vi2.js +31 -0
- package/out/_next/static/chunks/0ulufxnsrou61.js +1 -0
- package/out/_next/static/chunks/0xa9dyg6ezzyd.js +2 -0
- package/out/_next/static/chunks/0xvrfvur0p534.js +1 -0
- package/out/_next/static/chunks/{2clevl_9ayd0x.js → 0ybs1u66q26su.js} +1 -1
- package/out/_next/static/chunks/0ydfhk-p6zvm0.js +1 -0
- package/out/_next/static/chunks/{0j2ygtc_-bo3m.js → 0z004fn14pbcu.js} +1 -1
- package/out/_next/static/chunks/{2c8rmxz151fxa.js → 0z9erbl3llr_b.js} +224 -224
- package/out/_next/static/chunks/0zcsxvcvog9ue.js +1 -0
- package/out/_next/static/chunks/0zqgq0lwtz9tn.js +1 -0
- package/out/_next/static/chunks/1-ogak5u00kwa.js +1 -0
- package/out/_next/static/chunks/{3si3migsmvz9o.js → 10_5p5-xf2aoo.js} +1 -1
- package/out/_next/static/chunks/118qlrzdwpfmo.js +1 -0
- package/out/_next/static/chunks/11km5p4gd0ut4.js +1 -0
- package/out/_next/static/chunks/120rl4l29q9xs.js +1 -0
- package/out/_next/static/chunks/{44m1ijc5cv80x.js → 129m5i93ltoym.js} +1 -1
- package/out/_next/static/chunks/12n73o884lyyl.js +1 -0
- package/out/_next/static/chunks/{27z7j17kcrty_.js → 13zcn4lv0qj76.js} +11 -11
- package/out/_next/static/chunks/15jlgfcaeaki9.js +1 -0
- package/out/_next/static/chunks/{374lzksboll-t.js → 15o4_2t-l3rj5.js} +1 -1
- package/out/_next/static/chunks/175st2ogkg_1o.js +1 -0
- package/out/_next/static/chunks/19rsodtu91ja_.js +1 -0
- package/out/_next/static/chunks/1a2ouhup611bz.js +1 -0
- package/out/_next/static/chunks/{2117sv2qzo6yq.js → 1by60_b14x-3o.js} +1 -1
- package/out/_next/static/chunks/{2al9dh3_1ixhv.js → 1cyq7i39885sl.js} +1 -1
- package/out/_next/static/chunks/1d9it6yocgt54.js +1 -0
- package/out/_next/static/chunks/{29_n5j-hg_gsa.js → 1dp1s1t-y7gal.js} +1 -1
- package/out/_next/static/chunks/1dr7gh6xgypl8.js +1 -0
- package/out/_next/static/chunks/{1eirucr9s6-h5.js → 1dt30s_sp8415.js} +1 -1
- package/out/_next/static/chunks/{3vtmucpx25o7q.js → 1e8_jl2cxd3rp.js} +584 -584
- package/out/_next/static/chunks/1f1rek_fxk3of.js +1 -0
- package/out/_next/static/chunks/1f2mna0k5efeq.js +1 -0
- package/out/_next/static/chunks/1gfz3sxwkkg3d.js +1 -0
- package/out/_next/static/chunks/1gr35qeguuws0.js +1 -0
- package/out/_next/static/chunks/{3p03l0z65c8vc.js → 1gttu-n9am66k.js} +253 -253
- package/out/_next/static/chunks/1imi0xwi9hd99.js +1 -0
- package/out/_next/static/chunks/1ka5v5zu0cstt.js +1 -0
- package/out/_next/static/chunks/{3my05px5mv_s5.js → 1l_3oidssbhns.js} +235 -235
- package/out/_next/static/chunks/{0r-x702_jvhud.js → 1m9zc5gm-327d.js} +12 -12
- package/out/_next/static/chunks/1n9nhz-6azcp3.js +3 -0
- package/out/_next/static/chunks/1ncqwe81t_9_x.js +1 -0
- package/out/_next/static/chunks/{3un-w6wutw1qn.js → 1nix_lulkpklo.js} +1 -1
- package/out/_next/static/chunks/1ntqovuz2c217.js +1 -0
- package/out/_next/static/chunks/1pgs-98tfkq9_.js +1 -0
- package/out/_next/static/chunks/1q2z0aeopo8t8.js +1 -0
- package/out/_next/static/chunks/{1x0j78ohufpul.js → 1q4lkgxfnqnew.js} +1 -1
- package/out/_next/static/chunks/{0yd4_xh476fjn.js → 1qg1l7t00nyib.js} +97 -97
- package/out/_next/static/chunks/{2wgh5i70bzelt.js → 1rcdimhu0qhlu.js} +392 -392
- package/out/_next/static/chunks/1rlfg62jxqj3z.js +1 -0
- package/out/_next/static/chunks/1ses023uud001.js +1 -0
- package/out/_next/static/chunks/1t5oynmttpfsw.js +1 -0
- package/out/_next/static/chunks/{39cou9lia_g7l.js → 1t9i20i5-f8ze.js} +1 -1
- package/out/_next/static/chunks/{0rykrf_vofbad.js → 1tgj55b305g4h.js} +1 -1
- package/out/_next/static/chunks/{3rj-5v0j_2-_2.js → 1u8snlm6a7uhi.js} +4 -4
- package/out/_next/static/chunks/{2neieeo9g2u56.js → 1ug4k-1zhr63a.js} +1 -1
- package/out/_next/static/chunks/{3ioxfi3bvznhh.js → 1uh9zgsy69g92.js} +1 -1
- package/out/_next/static/chunks/1vrpzlif-z_p0.js +1 -0
- package/out/_next/static/chunks/{0lwjmr8efrlbt.js → 1vurgl6oz2qey.js} +1 -1
- package/out/_next/static/chunks/1w-qc09n9ijtq.js +1 -0
- package/out/_next/static/chunks/1ycqxcht6x54p.js +1 -0
- package/out/_next/static/chunks/1zj4307ugq0qz.js +1 -0
- package/out/_next/static/chunks/{14e4k-718qadd.js → 1zkd8v-qka--j.js} +163 -168
- package/out/_next/static/chunks/1zm52cjrfrq7c.js +1 -0
- package/out/_next/static/chunks/{3-yhe6rcsjh88.js → 1zm6eo861i3c8.js} +1 -1
- package/out/_next/static/chunks/{06fbalmyyfpsy.js → 1zp9363yfhpom.js} +1 -1
- package/out/_next/static/chunks/1zt1xxovnjhkm.js +1 -0
- package/out/_next/static/chunks/2-3hk_db5fpok.js +1 -0
- package/out/_next/static/chunks/2-bv9a_0zgw1f.js +1 -0
- package/out/_next/static/chunks/{3cp5nmtwxq4gr.js → 209sxygecny37.js} +1 -1
- package/out/_next/static/chunks/{133dqp8_7_yo6.js → 216uiih3_vdfd.js} +1 -1
- package/out/_next/static/chunks/21kfpd_bityxt.js +1 -0
- package/out/_next/static/chunks/{3yk0hzfq5rcs6.js → 22yqh0zlo_vwr.js} +1 -1
- package/out/_next/static/chunks/24ecas0m9tao7.js +3 -0
- package/out/_next/static/chunks/24pq9210rng3f.js +1 -0
- package/out/_next/static/chunks/{184pz6z3dflfm.js → 267prao6fyt22.js} +20 -20
- package/out/_next/static/chunks/26skkagvj1z96.js +1 -0
- package/out/_next/static/chunks/{0i9wa8hjd-5tc.js → 26y9sv8_-ykxf.js} +1 -1
- package/out/_next/static/chunks/2701xfv_07wz_.js +1 -0
- package/out/_next/static/chunks/{39rhmj_32ujyj.js → 271333m8y3k0e.js} +1 -1
- package/out/_next/static/chunks/29rkmguzky-bp.js +1 -0
- package/out/_next/static/chunks/{3qo7e6b73mfxq.js → 2a07so920b6aa.js} +1 -1
- package/out/_next/static/chunks/{1z790xxb46gxy.js → 2a2oy8ryz2tsk.js} +1 -1
- package/out/_next/static/chunks/{2-i29-jdbwww6.js → 2ao-3jzz7yw3p.js} +111 -111
- package/out/_next/static/chunks/2apihn9ra2ufp.js +1 -0
- package/out/_next/static/chunks/2apnpj0-fs9ks.js +1 -0
- package/out/_next/static/chunks/2b481pitl4k85.js +1 -0
- package/out/_next/static/chunks/2bettxaqt3d2p.js +1 -0
- package/out/_next/static/chunks/{1bv-jzy_2jiqs.js → 2c721vfva711t.js} +1 -1
- package/out/_next/static/chunks/{17_jjyx4jz9dd.js → 2d2kl_m64j9cb.js} +1 -1
- package/out/_next/static/chunks/2droqjmvmgj13.js +1 -0
- package/out/_next/static/chunks/2dxbvwbbgpzoq.js +1 -0
- package/out/_next/static/chunks/2eqbsut829r5l.js +1 -0
- package/out/_next/static/chunks/2f3_mzxjh3gso.js +1 -0
- package/out/_next/static/chunks/2fsde0jwi5qtt.js +1 -0
- package/out/_next/static/chunks/{0jap7l5-bskj4.js → 2h249uvhh2sij.js} +12 -12
- package/out/_next/static/chunks/{2as_br1awqk6k.js → 2izok2otbk8-2.js} +496 -496
- package/out/_next/static/chunks/2j120dkh7q3uf.js +1 -0
- package/out/_next/static/chunks/2j2ynchpqh34-.js +1 -0
- package/out/_next/static/chunks/2kj6pzs_wap1v.js +1 -0
- package/out/_next/static/chunks/{2epukrz6paj9n.js → 2kok6zedeeltw.js} +1 -1
- package/out/_next/static/chunks/2lnj9jruy4nrv.js +1 -0
- package/out/_next/static/chunks/{0j0a0wvmmghxj.js → 2lsvk7xcfkarc.js} +1 -1
- package/out/_next/static/chunks/2n-pveub8b_5t.js +1 -0
- package/out/_next/static/chunks/{3puu2_-t0lln9.js → 2n3xu_wbvtj7h.js} +12 -12
- package/out/_next/static/chunks/{1lu7rjfvxj8yj.js → 2of8q0kaeqpf0.js} +1 -1
- package/out/_next/static/chunks/2ofwtw6p08sfz.js +1 -0
- package/out/_next/static/chunks/{1t-yolk97lmot.js → 2phl5ta4iim7l.js} +1 -1
- package/out/_next/static/chunks/2q6l-xdqzgmpf.js +1 -0
- package/out/_next/static/chunks/2q8yg63br2jc9.js +1 -0
- package/out/_next/static/chunks/2r5qgieqldcd9.js +1 -0
- package/out/_next/static/chunks/2r7y401cvjc1s.js +1 -0
- package/out/_next/static/chunks/{1a94whad0y57f.js → 2r96kyeehsji9.js} +1 -1
- package/out/_next/static/chunks/{1gvu5a6ffbs7l.js → 2rmc6ru7mc-kg.js} +1 -1
- package/out/_next/static/chunks/{3_gfl66zf638s.js → 2s6kpclh6ie7o.js} +901 -906
- package/out/_next/static/chunks/{0xzamrecplwzw.js → 2sys9nj8lo3uk.js} +1 -1
- package/out/_next/static/chunks/{336ckqpboqmbn.js → 2tc3e-iqv71y_.js} +1 -1
- package/out/_next/static/chunks/{1t2g1v0ubcsam.js → 2uo6vm7mfgrbf.js} +1 -1
- package/out/_next/static/chunks/{2kmmk9coo9_b0.js → 2urx6fow8c8c9.js} +143 -143
- package/out/_next/static/chunks/2w2k1gveljyb7.js +1 -0
- package/out/_next/static/chunks/{1zmx71cvc6ksk.js → 2w99knknr5i8c.js} +1 -1
- package/out/_next/static/chunks/2w_ptlw-ad8-9.js +4 -0
- package/out/_next/static/chunks/2ws1s9d52ayv8.js +1 -0
- package/out/_next/static/chunks/2x7enks3ydgai.js +1 -0
- package/out/_next/static/chunks/{2_6b9lraq-exh.js → 2y8i7_nxm4r05.js} +5 -5
- package/out/_next/static/chunks/2ydub0t01728d.js +1 -0
- package/out/_next/static/chunks/{29hkkj9raxte9.js → 2z_iab7ozohhq.js} +77 -77
- package/out/_next/static/chunks/3-m_vzabs1uez.js +1 -0
- package/out/_next/static/chunks/{1h1gixjbjkbsl.js → 302qk2fjdrthp.js} +5 -5
- package/out/_next/static/chunks/30bhz7czzs4mf.js +1 -0
- package/out/_next/static/chunks/{3d43gd91r06y6.js → 30n4y_uu8chbh.js} +507 -505
- package/out/_next/static/chunks/{0o0qtv35dqv3i.js → 32_c4mbb6j1l6.js} +239 -239
- package/out/_next/static/chunks/33hp-khdfohdq.js +1 -0
- package/out/_next/static/chunks/{3zv5kyos9vtmm.js → 33i36o_l69sm5.js} +1 -1
- package/out/_next/static/chunks/3527r3jo5fj3i.js +1 -0
- package/out/_next/static/chunks/355dg8yaa94hr.js +1 -0
- package/out/_next/static/chunks/{2h9i_adbqaxs4.js → 35ntbr_c-yx44.js} +1 -1
- package/out/_next/static/chunks/{0cmyc-uvk93kl.js → 35sne1llxnc-m.js} +74 -74
- package/out/_next/static/chunks/36enkx1skkv2-.js +4 -0
- package/out/_next/static/chunks/{0e5dcxmkprebg.js → 3772oce1n3t_g.js} +1 -1
- package/out/_next/static/chunks/37cnbm5ft1mqf.js +1 -0
- package/out/_next/static/chunks/38xdo3cifphut.js +1 -0
- package/out/_next/static/chunks/{0o73w0cn5n_vl.js → 3_dgblylldcgb.js} +1 -1
- package/out/_next/static/chunks/3beawo-qwuk8k.js +1 -0
- package/out/_next/static/chunks/3cj_6sl9kr3e9.js +1 -0
- package/out/_next/static/chunks/3d-i_skta_wes.js +1 -0
- package/out/_next/static/chunks/3df_l2we755bb.js +1 -0
- package/out/_next/static/chunks/{0o1vph7x9shzu.js → 3eve5y7fpzx2h.js} +1 -1
- package/out/_next/static/chunks/3ewgyb4y19w-3.js +1 -0
- package/out/_next/static/chunks/3f3789eh18_oy.js +1 -0
- package/out/_next/static/chunks/{0gk5rnci1hznh.js → 3f8qelpscqfym.js} +2 -2
- package/out/_next/static/chunks/3g3-e9m1en45q.js +1 -0
- package/out/_next/static/chunks/{2kk_vvmr2xm3d.js → 3h6akt2uu05ku.js} +12 -12
- package/out/_next/static/chunks/{2_lw4d7t-xcqi.js → 3huu0tqmxwowu.js} +523 -522
- package/out/_next/static/chunks/3i239y-1hbkm-.js +1 -0
- package/out/_next/static/chunks/{2mjjo0yj-4ro4.js → 3ipx7xbxchsq9.js} +1 -1
- package/out/_next/static/chunks/{3txu-i5qn183a.js → 3j9xvdz55bi4p.js} +321 -321
- package/out/_next/static/chunks/3kp8qmhoi24oz.js +1 -0
- package/out/_next/static/chunks/3ksq69yq-40_r.js +1 -0
- package/out/_next/static/chunks/{3nwaovnpiyrt8.js → 3njwfothmmg7u.js} +3 -3
- package/out/_next/static/chunks/{2iu0_3cx-ny74.js → 3oqxl46ukaojj.js} +11 -11
- package/out/_next/static/chunks/{2oacwtbslo90t.js → 3qn6r8-0u6dij.js} +360 -360
- package/out/_next/static/chunks/3qye1lytea2i8.js +1 -0
- package/out/_next/static/chunks/{0gsh_d0m5xss1.js → 3rlp9yr75liz7.js} +1 -1
- package/out/_next/static/chunks/{3j3ol_d1vsdhx.js → 3sa_hlx3konc7.js} +1 -1
- package/out/_next/static/chunks/3tyo643l62h3m.js +1 -0
- package/out/_next/static/chunks/3tz2tpqa9uvwm.js +1 -0
- package/out/_next/static/chunks/{0_jrfk2u1u3fi.js → 3utpc-fc6_y0f.js} +1 -1
- package/out/_next/static/chunks/3v-0c2aj6c0on.js +1 -0
- package/out/_next/static/chunks/3v6nxa28rxngq.js +1 -0
- package/out/_next/static/chunks/{3twr9ds68-9us.js → 3vbamaoiuk9yj.js} +1 -1
- package/out/_next/static/chunks/3vv99btjc-mky.js +1 -0
- package/out/_next/static/chunks/{22yht3s7c-xih.js → 3w59kt5ztyvoq.js} +1 -1
- package/out/_next/static/chunks/3x02lxdo28u9i.js +1 -0
- package/out/_next/static/chunks/{1my968s78he8g.js → 3xl-op0hwxytg.js} +15 -15
- package/out/_next/static/chunks/3ydnxyc4rvad_.js +1 -0
- package/out/_next/static/chunks/3ylg4gfetwgxw.js +1 -0
- package/out/_next/static/chunks/{0a475u_q5i_dd.js → 3zdtteq-r2fs5.js} +2 -2
- package/out/_next/static/chunks/3zkwt0gybqtgm.js +1 -0
- package/out/_next/static/chunks/{3nr48h9zwum-3.js → 3zs7l4362msjd.js} +1 -1
- package/out/_next/static/chunks/40etabvml_71y.js +1 -0
- package/out/_next/static/chunks/{2xujlsx3stqig.js → 417jkzz0slv9m.js} +1 -1
- package/out/_next/static/chunks/{0ypejzd74ixbw.js → 41b5gpyqbj58m.js} +15 -15
- package/out/_next/static/chunks/41u2-5jayyajf.js +22 -0
- package/out/_next/static/chunks/42gcpy51w7lk1.js +1 -0
- package/out/_next/static/chunks/{2h07np207nlx7.js → 42ymanq326mo7.js} +1 -1
- package/out/_next/static/chunks/{36pz_ews7u0xb.js → 43fp64xnfy646.js} +1 -1
- package/out/_next/static/chunks/43v4y2gu5z9_h.js +1 -0
- package/out/_next/static/chunks/44cer242u-f8v.js +1 -0
- package/out/_next/static/chunks/{0d9pxx1w_zqr9.js → 44zi0gl0a6a8w.js} +1 -1
- package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +1 -0
- package/out/_not-found/__next._full.txt +11 -11
- package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +11 -11
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +9 -9
- package/out/__next._head.txt +0 -6
- package/out/__next._index.txt +0 -5
- package/out/_next/static/chunks/0-k4hp87gwues.js +0 -1
- package/out/_next/static/chunks/0-laj-bivzp4x.js +0 -1
- package/out/_next/static/chunks/04zj0yf1qhk1o.js +0 -1
- package/out/_next/static/chunks/07hgbbqksqd1g.js +0 -1
- package/out/_next/static/chunks/08ou2nvy48e0u.js +0 -1
- package/out/_next/static/chunks/08y5-irjbsiy8.js +0 -1
- package/out/_next/static/chunks/0aad2r4s4wl1x.js +0 -5
- package/out/_next/static/chunks/0gnjtwq-474uc.js +0 -1
- package/out/_next/static/chunks/0ibzpjo0h731v.js +0 -1
- package/out/_next/static/chunks/0j_3k5qhv_mdx.js +0 -1
- package/out/_next/static/chunks/0jis2w2mfx062.js +0 -1
- package/out/_next/static/chunks/0jjvp2slpf7d6.js +0 -1
- package/out/_next/static/chunks/0ko10wo4rc9-b.js +0 -1
- package/out/_next/static/chunks/0lqmvz6k2h_of.js +0 -1
- package/out/_next/static/chunks/0noxyupihh8dk.js +0 -1
- package/out/_next/static/chunks/0p6phe9kjlxn8.js +0 -1
- package/out/_next/static/chunks/0ptxb9dcwsw3o.js +0 -1
- package/out/_next/static/chunks/0q0i4pdyq66gb.js +0 -1
- package/out/_next/static/chunks/0q8pt8fd0ma30.js +0 -1
- package/out/_next/static/chunks/0qqx9aoz8l5d2.js +0 -1
- package/out/_next/static/chunks/0tsk32q-88t_7.js +0 -1
- package/out/_next/static/chunks/0u7577db_ivyr.js +0 -1
- package/out/_next/static/chunks/0unnrt0un064x.js +0 -1
- package/out/_next/static/chunks/0uygtr4mo3h0v.js +0 -1
- package/out/_next/static/chunks/0vf3facit951s.js +0 -1
- package/out/_next/static/chunks/0vzo-8t8c26k9.js +0 -1
- package/out/_next/static/chunks/0xx7_7y5jdlh4.js +0 -1
- package/out/_next/static/chunks/0xyija62b6txc.js +0 -1
- package/out/_next/static/chunks/0zeb37703zcz3.js +0 -1
- package/out/_next/static/chunks/0zu5ato7-1-q9.js +0 -1
- package/out/_next/static/chunks/0zydv7y47dxgh.js +0 -1
- package/out/_next/static/chunks/103x4jwovb6d-.js +0 -1
- package/out/_next/static/chunks/107wfq84g9-kn.js +0 -1
- package/out/_next/static/chunks/10afagk8yn__n.js +0 -1
- package/out/_next/static/chunks/12ory_c78yl31.js +0 -1
- package/out/_next/static/chunks/1365lgwdd4vuo.js +0 -1
- package/out/_next/static/chunks/146ou-ohb_qhs.js +0 -1
- package/out/_next/static/chunks/14orr68xgdykd.js +0 -1
- package/out/_next/static/chunks/15qfoj-vl9thu.js +0 -1
- package/out/_next/static/chunks/166yqx3_qvbpy.js +0 -1
- package/out/_next/static/chunks/16gwjao676ieb.js +0 -1
- package/out/_next/static/chunks/16rmmzhy2p7bw.js +0 -1
- package/out/_next/static/chunks/18h9ugdz6igdb.js +0 -1
- package/out/_next/static/chunks/19d8n5t7ka2fb.js +0 -1
- package/out/_next/static/chunks/1_4hh3dfop93j.js +0 -1
- package/out/_next/static/chunks/1_rbzw3n4fk0g.js +0 -1
- package/out/_next/static/chunks/1bq0fcnt1wy86.js +0 -1
- package/out/_next/static/chunks/1c6mho7e0enta.js +0 -1
- package/out/_next/static/chunks/1dfaheve77dhi.js +0 -1
- package/out/_next/static/chunks/1dgf112ehnhm1.js +0 -1
- package/out/_next/static/chunks/1f07l3q77zat1.js +0 -1
- package/out/_next/static/chunks/1fervgvgv10r-.js +0 -1
- package/out/_next/static/chunks/1fsof7un7igrn.js +0 -1
- package/out/_next/static/chunks/1iel4pzhhh-c3.js +0 -1
- package/out/_next/static/chunks/1iojfx3-g4_n9.js +0 -1
- package/out/_next/static/chunks/1j4c0nvdo5q68.js +0 -3
- package/out/_next/static/chunks/1j4jt5q7px8sy.js +0 -1
- package/out/_next/static/chunks/1k_8olnprvi8r.js +0 -1
- package/out/_next/static/chunks/1l0rt7d4m-xdk.js +0 -5
- package/out/_next/static/chunks/1mt4cnd_d6jvf.js +0 -1
- package/out/_next/static/chunks/1tbes2sv-qzcx.js +0 -1
- package/out/_next/static/chunks/1upy8a5cb75kt.js +0 -1
- package/out/_next/static/chunks/1xed71f608m4b.js +0 -1
- package/out/_next/static/chunks/219n3q-_eengm.js +0 -1
- package/out/_next/static/chunks/21wo3vdr_uby8.js +0 -1
- package/out/_next/static/chunks/25gep78-izw79.js +0 -4
- package/out/_next/static/chunks/26i7dn31afdtm.js +0 -1
- package/out/_next/static/chunks/27hbplu797elx.js +0 -1
- package/out/_next/static/chunks/28i3wgvgn_at1.js +0 -1
- package/out/_next/static/chunks/2992eiy52nazj.js +0 -1
- package/out/_next/static/chunks/29bxq-67oazfg.js +0 -1
- package/out/_next/static/chunks/29ings58w7kp1.js +0 -1
- package/out/_next/static/chunks/2_n0cpkdsjzli.js +0 -1
- package/out/_next/static/chunks/2a3iy701j4r_y.js +0 -1
- package/out/_next/static/chunks/2awr1c_vfsutb.js +0 -1
- package/out/_next/static/chunks/2b5nt7yn-pq3a.js +0 -1
- package/out/_next/static/chunks/2bxe3kjr17tdp.js +0 -1
- package/out/_next/static/chunks/2dvbzar93ooc-.js +0 -1
- package/out/_next/static/chunks/2e-vp0e11g9ew.js +0 -1
- package/out/_next/static/chunks/2exj9-0p6n9x-.js +0 -1
- package/out/_next/static/chunks/2gf8l6hbmt7v3.js +0 -1
- package/out/_next/static/chunks/2jio3sio-_43z.js +0 -1
- package/out/_next/static/chunks/2laz1v9fg2a2z.js +0 -1
- package/out/_next/static/chunks/2pb_uosb-aa8x.js +0 -1
- package/out/_next/static/chunks/2qu-gpm3ux1l6.js +0 -1
- package/out/_next/static/chunks/2rsi6v7qmqx2b.js +0 -1
- package/out/_next/static/chunks/2s4fzgzkwjluu.js +0 -2
- package/out/_next/static/chunks/2tdvuc-27khif.js +0 -1
- package/out/_next/static/chunks/2trolrgd7neax.js +0 -1
- package/out/_next/static/chunks/2uyuafmoe5wi0.js +0 -3
- package/out/_next/static/chunks/2w2e0pxgs-n8f.js +0 -1
- package/out/_next/static/chunks/30y71dxdpv52d.js +0 -1
- package/out/_next/static/chunks/32c-e_v8_2xkf.js +0 -1
- package/out/_next/static/chunks/32oj0iudhp8bm.js +0 -1
- package/out/_next/static/chunks/33p9du6y9eegg.js +0 -1
- package/out/_next/static/chunks/38om-j0h0rryk.js +0 -1
- package/out/_next/static/chunks/38q0enmlg5q9o.js +0 -3
- package/out/_next/static/chunks/39pkya0_bvcaj.js +0 -1
- package/out/_next/static/chunks/3_1zzmx92j9c0.js +0 -1
- package/out/_next/static/chunks/3_earszshuz4n.js +0 -1
- package/out/_next/static/chunks/3ap_uxc8lx7ni.js +0 -1
- package/out/_next/static/chunks/3b6na8zrex8jo.js +0 -1
- package/out/_next/static/chunks/3c0cxt72vilyz.js +0 -1
- package/out/_next/static/chunks/3g78x0pdaoi_4.js +0 -1
- package/out/_next/static/chunks/3gjvl1p-tugfe.js +0 -4
- package/out/_next/static/chunks/3i8iro1gas1vx.js +0 -1
- package/out/_next/static/chunks/3kpqfqr99vo7z.js +0 -1
- package/out/_next/static/chunks/3lladf_wemm-2.js +0 -1
- package/out/_next/static/chunks/3n62hbywoknop.js +0 -1
- package/out/_next/static/chunks/3o_dmzpahx-5g.js +0 -1
- package/out/_next/static/chunks/3r7v7un976sn7.js +0 -1
- package/out/_next/static/chunks/3rl_nhqwew40w.js +0 -1
- package/out/_next/static/chunks/3s7hqij6xp_4e.js +0 -1
- package/out/_next/static/chunks/3t4ys6th6gf2w.js +0 -1
- package/out/_next/static/chunks/3uarw1i1ij1er.js +0 -1
- package/out/_next/static/chunks/3v8kgnjk27wbe.js +0 -1
- package/out/_next/static/chunks/3vu5y270muh-7.js +0 -1
- package/out/_next/static/chunks/3we1khqfexh3x.js +0 -1
- package/out/_next/static/chunks/3z35loj4i-id4.js +0 -1
- package/out/_next/static/chunks/415g3asdds1ac.js +0 -1
- package/out/_next/static/chunks/42lqt7ig40wk5.js +0 -1
- package/out/_next/static/chunks/42s6ghsurq5q7.js +0 -1
- package/out/_next/static/chunks/42yctcfi2rfwr.js +0 -1
- package/out/_next/static/chunks/43_fau1gg69eo.js +0 -1
- package/out/_next/static/chunks/43ywrdzg_7af8.js +0 -31
- package/out/_next/static/chunks/453_bg0lgesmp.js +0 -1
- package/out/_next/static/chunks/turbopack-1s36ieuku1ds3.js +0 -1
- package/out/_not-found/__next._head.txt +0 -6
- package/out/_not-found/__next._index.txt +0 -5
- package/out/_not-found/__next._not-found.txt +0 -5
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_buildManifest.js +0 -0
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8636,e=>{"use strict";var t,i,r=e.i(3864);class s{get wrapU(){return this._cachedWrapU}set wrapU(e){this._cachedWrapU=e}get wrapV(){return this._cachedWrapV}set wrapV(e){this._cachedWrapV=e}get wrapR(){return this._cachedWrapR}set wrapR(e){this._cachedWrapR=e}get anisotropicFilteringLevel(){return this._cachedAnisotropicFilteringLevel}set anisotropicFilteringLevel(e){this._cachedAnisotropicFilteringLevel=e}get comparisonFunction(){return this._comparisonFunction}set comparisonFunction(e){this._comparisonFunction=e}get useMipMaps(){return this._useMipMaps}set useMipMaps(e){this._useMipMaps=e}constructor(){this.samplingMode=-1,this._useMipMaps=!0,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._comparisonFunction=0}setParameters(e=1,t=1,i=1,r=1,s=2,a=0){return this._cachedWrapU=e,this._cachedWrapV=t,this._cachedWrapR=i,this._cachedAnisotropicFilteringLevel=r,this.samplingMode=s,this._comparisonFunction=a,this}compareSampler(e){return this._cachedWrapU===e._cachedWrapU&&this._cachedWrapV===e._cachedWrapV&&this._cachedWrapR===e._cachedWrapR&&this._cachedAnisotropicFilteringLevel===e._cachedAnisotropicFilteringLevel&&this.samplingMode===e.samplingMode&&this._comparisonFunction===e._comparisonFunction&&this._useMipMaps===e._useMipMaps}}(t=i||(i={}))[t.Unknown=0]="Unknown",t[t.Url=1]="Url",t[t.Temp=2]="Temp",t[t.Raw=3]="Raw",t[t.Dynamic=4]="Dynamic",t[t.RenderTarget=5]="RenderTarget",t[t.MultiRenderTarget=6]="MultiRenderTarget",t[t.Cube=7]="Cube",t[t.CubeRaw=8]="CubeRaw",t[t.CubePrefiltered=9]="CubePrefiltered",t[t.Raw3D=10]="Raw3D",t[t.Raw2DArray=11]="Raw2DArray",t[t.DepthStencil=12]="DepthStencil",t[t.CubeRawRGBD=13]="CubeRawRGBD",t[t.Depth=14]="Depth",t[t.External=15]="External";class a extends s{get useMipMaps(){return null===this._useMipMaps?this.generateMipMaps:this._useMipMaps}set useMipMaps(e){this._useMipMaps=e}get uniqueId(){return this._uniqueId}_setUniqueId(e){this._uniqueId=e}getEngine(){return this._engine}get source(){return this._source}constructor(e,t,i=!1){super(),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.is2DArray=!1,this.isMultiview=!1,this.url="",this.generateMipMaps=!1,this._useMipMaps=null,this.mipLevelCount=1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new r.Observable,this.onErrorObservable=new r.Observable,this.onRebuildCallback=null,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._source=0,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._cachedCoordinatesMode=null,this._isDisabled=!1,this._compression=null,this._sphericalPolynomial=null,this._sphericalPolynomialPromise=null,this._sphericalPolynomialComputed=!1,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._useSRGBBuffer=!1,this._creationFlags=0,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._linearSpecularLOD=!1,this._irradianceTexture=null,this._hardwareTexture=null,this._maxLodLevel=null,this._references=1,this._gammaSpace=null,this._premulAlpha=!1,this._dynamicTextureSource=null,this._autoMSAAManagement=!1,this._engine=e,this._source=t,this._uniqueId=a._Counter++,i||(this._hardwareTexture=e._createHardwareTexture())}incrementReferences(){this._references++}updateSize(e,t,i=1){this._engine.updateTextureDimensions(this,e,t,i),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i}_rebuild(){let e;if(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this.onRebuildCallback){let e=this.onRebuildCallback(this),t=t=>{t._swapAndDie(this,!1),this.isReady=e.isReady};e.isAsync?e.proxy.then(t):t(e.proxy);return}switch(this.source){case 2:case 12:case 14:break;case 1:e=this._engine.createTexture(this._originalUrl??this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,e=>{e._swapAndDie(this,!1),this.isReady=!0},null,this._buffer,void 0,this.format,this._extension,void 0,void 0,void 0,this._useSRGBBuffer);return;case 3:if((e=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,this._creationFlags,this._useSRGBBuffer,this.mipLevelCount))._swapAndDie(this,!1),this._bufferViewArray)for(let e=0;e<this._bufferViewArray.length;e++){let t=this._bufferViewArray[e];t&&this._engine.updateRawTexture(this,t,this.format,this.invertY,this._compression,this.type,this._useSRGBBuffer,e)}this.isReady=!0;break;case 10:(e=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case 11:if((e=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,this._creationFlags,this.mipLevelCount))._swapAndDie(this,!1),this._bufferViewArray)for(let e=0;e<this._bufferViewArray.length;e++){let t=this._bufferViewArray[e];t&&this._engine.updateRawTexture2DArray(this,t,this.format,this.invertY,this._compression,this.type,e)}this.isReady=!0;break;case 4:(e=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this,!1),this._dynamicTextureSource&&this._engine.updateDynamicTexture(this,this._dynamicTextureSource,this.invertY,this._premulAlpha,this.format,!0);break;case 7:e=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,()=>{e._swapAndDie(this,!1),this.isReady=!0},null,this.format,this._extension,!1,0,0,null,void 0,this._useSRGBBuffer,ArrayBuffer.isView(this._buffer)?this._buffer:null);return;case 8:(e=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this._originalFormat??this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this,!1),this.isReady=!0;break;case 13:return;case 9:(e=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,e=>{e&&e._swapAndDie(this,!1),this.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial;return}}_swapAndDie(e,t=!0){this._hardwareTexture?.setUsage(e._source,this.generateMipMaps,this.is2DArray,this.isCube,this.is3D,this.width,this.height,this.depth),e._hardwareTexture=this._hardwareTexture,e._setUniqueId(a._Counter++),t&&(e._isRGBD=this._isRGBD),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(e._irradianceTexture&&e._irradianceTexture.dispose(),e._irradianceTexture=this._irradianceTexture);let i=this._engine.getLoadedTexturesCache(),r=i.indexOf(this);-1!==r&&i.splice(r,1),-1===(r=i.indexOf(e))&&i.push(e)}dispose(){this._references--,0===this._references&&(this.onLoadedObservable.clear(),this.onErrorObservable.clear(),this._engine._releaseTexture(this),this._hardwareTexture=null,this._dynamicTextureSource=null)}}a._Counter=0,e.s(["InternalTexture",0,a],8636)},57575,4120,9855,e=>{"use strict";let t;"function"==typeof SuppressedError&&SuppressedError,e.s(["__classPrivateFieldGet",0,function(e,t,i,r){if("a"===i&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(e):r?r.value:t.get(e)},"__classPrivateFieldSet",0,function(e,t,i,r,s){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!s)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,i):s?s.value=i:t.set(e,i),i},"__esDecorate",0,function(e,t,i,r,s,a){function n(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,l=r.kind,h="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,c=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,p=i.length-1;p>=0;p--){var _={};for(var f in r)_[f]="access"===f?{}:r[f];for(var f in r.access)_.access[f]=r.access[f];_.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(n(e||null))};var m=(0,i[p])("accessor"===l?{get:c.get,set:c.set}:c[h],_);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(o=n(m.get))&&(c.get=o),(o=n(m.set))&&(c.set=o),(o=n(m.init))&&s.unshift(o)}else(o=n(m))&&("field"===l?s.unshift(o):c[h]=o)}u&&Object.defineProperty(u,r.name,c),d=!0},"__runInitializers",0,function(e,t,i){for(var r=arguments.length>2,s=0;s<t.length;s++)i=r?t[s].call(e,i):t[s].call(e);return r?i:void 0}],57575);let i="__bjs_serializable__",r=new WeakMap;function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}let a=((t=Symbol.metadata)||Object.defineProperty(Symbol,"metadata",{configurable:!0,writable:!0,value:t=Symbol("Symbol.metadata")}),t);function n(e){if(!e)throw Error(`Decorator metadata is unavailable; the Symbol.metadata (${String(a)}) polyfill must run before decorated classes are evaluated.`);return s(e,i)||(e[i]={}),e[i]}function o(e,t){return(i,r)=>{if(!r.metadata)return;let s=String(r.name),a=n(r.metadata);a[s]||(a[s]={type:e,sourceName:t})}}function l(e,t,i){let r=String(t.name),s=null,a=function(...n){if(null===s){s=e,"u">typeof _native&&_native[r]&&(s=i(_native[r],e));let n=this&&(t.static?this:Object.getPrototypeOf(this));n?.[r]===a&&(n[r]=s)}return s.apply(this,n)};return a}function h(e,t){return l(e,t,e=>e)}e.s(["GetDirectStoreFromMetadata",0,n,"GetMergedStore",0,function(e){let t="function"==typeof e?e:e?.constructor,n=t?t[a]:void 0;if(!n)return{};let o=r.get(n);if(o)return o;let l={},h=[],u=n;for(;u;)h.push(u),u=Object.getPrototypeOf(u);for(let e of h)if(s(e,i)){let t=e[i];for(let e in t)l[e]=t[e]}return r.set(n,l),l}],4120),h.filter=function(e){return(t,i)=>l(t,i,(t,i)=>function(...r){return e(...r)?t(...r):i.apply(this,r)})},e.s(["addAccessorsForMaterialProperty",0,function(e,t=null){return(i,r)=>{let s=t||"_"+String(r.name);return{get(){return this[s]?.value},set(t){"function"==typeof this[s]?.value?.equals&&this[s].value.equals(t)||this[s].value!==t&&(this[s].value=t,this[e]())}}}},"expandToProperty",0,function(e,t=null){return function(e,t=null){return(i,r)=>{let s=t||"_"+String(r.name);return{init(e){return void 0===e&&s in this||(this[s]=e),e},get(){return this[s]},set(t){"function"==typeof this[s]?.equals&&this[s].equals(t)||this[s]!==t&&(this[s]=t,this[e]())}}}}(e,t)},"nativeOverride",0,h,"serialize",0,function(e){return o(0,e)},"serializeAsColor3",0,function(e){return o(2,e)},"serializeAsColor4",0,function(e){return o(8,e)},"serializeAsColorCurves",0,function(e){return o(7,e)},"serializeAsFresnelParameters",0,function(e){return o(3,e)},"serializeAsMatrix",0,function(e){return o(12,e)},"serializeAsMeshReference",0,function(e){return o(6,e)},"serializeAsQuaternion",0,function(e){return o(10,e)},"serializeAsTexture",0,function(e){return o(1,e)},"serializeAsVector2",0,function(e){return o(4,e)},"serializeAsVector3",0,function(e){return o(5,e)}],9855)},2060,77090,e=>{"use strict";var t=e.i(85050);class i{static Eval(e,t){return"true"===(e=e.match(/\([^()]*\)/g)?e.replace(/\([^()]*\)/g,e=>(e=e.slice(1,e.length-1),i._HandleParenthesisContent(e,t))):i._HandleParenthesisContent(e,t))||"false"!==e&&i.Eval(e,t)}static _HandleParenthesisContent(e,t){let r;t=t||(e=>"true"===e);let s=e.split("||");for(let e in s)if(Object.prototype.hasOwnProperty.call(s,e)){let a=i._SimplifyNegation(s[e].trim()),n=a.split("&&");if(n.length>1)for(let e=0;e<n.length;++e){let s=i._SimplifyNegation(n[e].trim());if(!(r="true"!==s&&"false"!==s?"!"===s[0]?!t(s.substring(1)):t(s):"true"===s)){a="false";break}}if(r||"true"===a){r=!0;break}r="true"!==a&&"false"!==a?"!"===a[0]?!t(a.substring(1)):t(a):"true"===a}return r?"true":"false"}static _SimplifyNegation(e){return"!true"===(e=(e=e.replace(/^[\s!]+/,e=>(e=e.replace(/[\s]/g,()=>"")).length%2?"!":"")).trim())?e="false":"!false"===e&&(e="true"),e}}class r{static EnableFor(e){e._tags=e._tags||{},e.hasTags=()=>r.HasTags(e),e.addTags=t=>r.AddTagsTo(e,t),e.removeTags=t=>r.RemoveTagsFrom(e,t),e.matchesTagsQuery=t=>r.MatchesQuery(e,t)}static DisableFor(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery}static HasTags(e){if(!e._tags)return!1;let t=e._tags;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}static GetTags(e,t=!0){if(!e._tags)return null;if(!t)return e._tags;{let t=[];for(let i in e._tags)Object.prototype.hasOwnProperty.call(e._tags,i)&&!0===e._tags[i]&&t.push(i);return t.join(" ")}}static AddTagsTo(e,t){if(t&&"string"==typeof t)for(let i of t.split(" "))r._AddTagTo(e,i)}static _AddTagTo(e,t){""===(t=t.trim())||"true"===t||"false"===t||t.match(/[\s]/)||t.match(/^([!]|([|]|[&]){2})/)||(r.EnableFor(e),e._tags[t]=!0)}static RemoveTagsFrom(e,t){if(!r.HasTags(e))return;let i=t.split(" ");for(let t in i)r._RemoveTagFrom(e,i[t])}static _RemoveTagFrom(e,t){delete e._tags[t]}static MatchesQuery(e,t){return void 0===t||(""===t?r.HasTags(e):i.Eval(t,t=>r.HasTags(e)&&e._tags[t]))}}e.s(["Tags",0,r],77090);var s=e.i(19919),a=e.i(69400),n=e.i(4120);let o=function(e,t,i,s={}){let a=e();r&&r.HasTags(t)&&r.AddTagsTo(a,r.GetTags(t,!0));let o=(0,n.GetMergedStore)(a),h={};for(let e in o){let r=o[e],n=t[e],u=r.type;if(null!=n&&("uniqueId"!==e||l.AllowLoadingUniqueId))switch(u){case 0:case 6:case 9:case 11:"function"==typeof n.slice?a[e]=n.slice():a[e]=n;break;case 1:s.cloneTexturesOnlyOnce&&h[n.uniqueId]?a[e]=h[n.uniqueId]:(a[e]=i||n.isRenderTarget?n:n.clone(),h[n.uniqueId]=a[e]);break;case 2:case 3:case 4:case 5:case 7:case 8:case 10:case 12:case 13:a[e]=i?n:n.clone()}}return a};class l{static AppendSerializedAnimations(e,t){if(e.animations){t.animations=[];for(let i=0;i<e.animations.length;i++){let r=e.animations[i];t.animations.push(r.serialize())}}}static Serialize(e,t){t||(t={}),r&&(t.tags=r.GetTags(e));let i=(0,n.GetMergedStore)(e);for(let r in i){let s=i[r],a=s.sourceName||r,n=s.type,o=e[r];if(null!=o&&("uniqueId"!==r||l.AllowLoadingUniqueId))switch(n){case 0:Array.isArray(o)?t[a]=o.slice():t[a]=o;break;case 1:case 3:case 7:case 9:t[a]=o.serialize();break;case 2:case 4:case 5:case 8:case 10:case 12:case 13:t[a]=o.asArray();break;case 6:case 11:t[a]=o.id}}return t}static ParseProperties(e,t,i,r){r||(r="");let o=(0,n.GetMergedStore)(t);for(let n in o){let h=o[n],u=e[h.sourceName||n],c=h.type;if(null!=u&&("uniqueId"!==n||l.AllowLoadingUniqueId))switch(c){case 0:t[n]=u;break;case 1:i&&(t[n]=l._TextureParser(u,i,r));break;case 2:t[n]=s.Color3.FromArray(u);break;case 3:t[n]=l._FresnelParametersParser(u);break;case 4:t[n]=a.Vector2.FromArray(u);break;case 5:t[n]=a.Vector3.FromArray(u);break;case 6:i&&(t[n]=i.getLastMeshById(u));break;case 7:t[n]=l._ColorCurvesParser(u);break;case 8:t[n]=s.Color4.FromArray(u);break;case 9:t[n]=l._ImageProcessingConfigurationParser(u);break;case 10:t[n]=a.Quaternion.FromArray(u);break;case 11:i&&(t[n]=i.getCameraById(u));break;case 12:t[n]=a.Matrix.FromArray(u);break;case 13:t[n]=a.Vector4.FromArray(u)}}}static Parse(e,t,i,s=null){let a=e();return r&&r.AddTagsTo(a,t.tags),l.ParseProperties(t,a,i,s),a}static Clone(e,t,i={}){return o(e,t,!1,i)}static Instanciate(e,t){return o(e,t,!0)}}l.AllowLoadingUniqueId=!1,l._ImageProcessingConfigurationParser=e=>{throw(0,t._WarnImport)("ImageProcessingConfiguration")},l._FresnelParametersParser=e=>{throw(0,t._WarnImport)("FresnelParameters")},l._ColorCurvesParser=e=>{throw(0,t._WarnImport)("ColorCurves")},l._TextureParser=(e,i,r)=>{throw(0,t._WarnImport)("Texture")},e.s(["SerializationHelper",0,l],2060)},96042,e=>{"use strict";var t=e.i(69400);class i{constructor(e,i,r,s){this.normal=new t.Vector3(e,i,r),this.d=s}asArray(){return[this.normal.x,this.normal.y,this.normal.z,this.d]}clone(){return new i(this.normal.x,this.normal.y,this.normal.z,this.d)}getClassName(){return"Plane"}getHashCode(){let e=this.normal.getHashCode();return 397*e^this.d}normalize(){let e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this}transform(e){let t=i._TmpMatrix;e.invertToRef(t);let r=t.m,s=this.normal.x,a=this.normal.y,n=this.normal.z,o=this.d;return new i(s*r[0]+a*r[1]+n*r[2]+o*r[3],s*r[4]+a*r[5]+n*r[6]+o*r[7],s*r[8]+a*r[9]+n*r[10]+o*r[11],s*r[12]+a*r[13]+n*r[14]+o*r[15])}dotCoordinate(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d}copyFromPoints(e,t,i){let r,s=t.x-e.x,a=t.y-e.y,n=t.z-e.z,o=i.x-e.x,l=i.y-e.y,h=i.z-e.z,u=a*h-n*l,c=n*o-s*h,d=s*l-a*o,p=Math.sqrt(u*u+c*c+d*d);return r=0!==p?1/p:0,this.normal.x=u*r,this.normal.y=c*r,this.normal.z=d*r,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this}isFrontFacingTo(e,i){return t.Vector3.Dot(this.normal,e)<=i}signedDistanceTo(e){return t.Vector3.Dot(e,this.normal)+this.d}static FromArray(e){return new i(e[0],e[1],e[2],e[3])}static FromPoints(e,t,r){let s=new i(0,0,0,0);return s.copyFromPoints(e,t,r),s}static FromPositionAndNormal(e,t){let r=new i(0,0,0,0);return this.FromPositionAndNormalToRef(e,t,r)}static FromPositionAndNormalToRef(e,t,i){return i.normal.copyFrom(t),i.normal.normalize(),i.d=-e.dot(i.normal),i}static SignedDistanceToPlaneFromPositionAndNormal(e,i,r){let s=-(i.x*e.x+i.y*e.y+i.z*e.z);return t.Vector3.Dot(r,i)+s}}i._TmpMatrix=t.Matrix.Identity(),e.s(["Plane",0,i])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67619,t=>{"use strict";class r{static SetMatrixPrecision(t){if(r.MatrixTrackPrecisionChange=!1,t&&!r.MatrixUse64Bits&&r.MatrixTrackedMatrices)for(let t=0;t<r.MatrixTrackedMatrices.length;++t){let e=r.MatrixTrackedMatrices[t],i=e._m;e._m=Array(16);for(let t=0;t<16;++t)e._m[t]=i[t]}r.MatrixUse64Bits=t,r.MatrixCurrentType=r.MatrixUse64Bits?Array:Float32Array,r.MatrixTrackedMatrices=null}}r.MatrixUse64Bits=!1,r.MatrixTrackPrecisionChange=!0,r.MatrixCurrentType=Float32Array,r.MatrixTrackedMatrices=[],t.s(["PerformanceConfigurator",0,r])},63235,t=>{"use strict";function r(t,e=0,i=1){return Math.min(i,Math.max(e,t))}function e(t,r){return t-Math.floor(t/r)*r}function i(t,r){let i=e(r-t,360);return i>180&&(i-=360),i}function s(t,r,e){return Math.abs(r-t)<=e?r:t+Math.sign(r-t)*e}t.s(["Clamp",0,r,"DeltaAngle",0,i,"Denormalize",0,function(t,r,e){return t*(e-r)+r},"ExtractAsInt",0,function(t){return parseInt(t.toString().replace(/\W/g,""))},"Hermite",0,function(t,r,e,i,s){let n=s*s,a=s*n;return t*(2*a-3*n+1)+e*(-2*a+3*n)+r*(a-2*n+s)+i*(a-n)},"Hermite1stDerivative",0,function(t,r,e,i,s){let n=s*s;return(n-s)*6*t+(3*n-4*s+1)*r+(-n+s)*6*e+(3*n-2*s)*i},"HighestCommonFactor",0,function t(r,e){let i=r%e;return 0===i?e:t(e,i)},"ILog2",0,function(t){if(Math.log2)return Math.floor(Math.log2(t));if(t<0)return NaN;if(0===t)return-1/0;let r=0;if(t<1){for(;t<1;)r++,t*=2;r=-r}else if(t>1)for(;t>1;)r++,t=Math.floor(t/2);return r},"InverseLerp",0,function(t,e,i){return t!=e?r((i-t)/(e-t)):0},"Lerp",0,function(t,r,e){return t+(r-t)*e},"LerpAngle",0,function(t,i,s){let n=e(i-t,360);return n>180&&(n-=360),t+n*r(s)},"MoveTowards",0,s,"MoveTowardsAngle",0,function(t,r,e){let n,a=i(t,r);return-e<a&&a<e?n=r:(r=t+a,n=s(t,r,e)),n},"Normalize",0,function(t,r,e){return(t-r)/(e-r)},"NormalizeRadians",0,function(t){return t-2*Math.PI*Math.floor((t+Math.PI)/(2*Math.PI))},"OutsideRange",0,function(t,r,e,i=1401298e-51){return t<r-i||t>e+i},"PercentToRange",0,function(t,r,e){return(e-r)*t+r},"PingPong",0,function(t,r){let i=e(t,2*r);return r-Math.abs(i-r)},"RandomRange",0,function(t,r){return t===r?t:Math.random()*(r-t)+t},"RangeToPercent",0,function(t,r,e){return(t-r)/(e-r)},"Repeat",0,e,"SmoothStep",0,function(t,e,i){let s=r(i);return e*(s=-2*s*s*s+3*s*s)+t*(1-s)},"ToHex",0,function(t){let r=t.toString(16);return t<=15?("0"+r).toUpperCase():r.toUpperCase()},"WithinEpsilon",0,function(t,r,e=1401298e-51){return Math.abs(t-r)<=e}])},23003,3864,t=>{"use strict";let r="u">typeof WeakRef;class e{constructor(t,r=!1,e,i){this.initialize(t,r,e,i)}initialize(t,r=!1,e,i){return this.mask=t,this.skipNextObservers=r,this.target=e,this.currentTarget=i,this}}class i{constructor(t,r,e=null){this.callback=t,this.mask=r,this.scope=e,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1,this._remove=null}remove(t=!1){this._remove&&this._remove(t)}}class s{static FromPromise(t,r){let e=new s;return t.then(t=>{e.notifyObservers(t)}).catch(t=>{if(r)r.notifyObservers(t);else throw t}),e}get observers(){return this._observers}constructor(t,r=!1){this.notifyIfTriggered=r,this._observers=[],this._numObserversMarkedAsDeleted=0,this._hasNotified=!1,this._eventState=new e(0),t&&(this._onObserverAdded=t)}add(t,e=-1,s=!1,n=null,a=!1){if(!t)return null;let h=new i(t,e,n);h.unregisterOnNextCall=a,s?this._observers.unshift(h):this._observers.push(h),this._onObserverAdded&&this._onObserverAdded(h),this._hasNotified&&this.notifyIfTriggered&&void 0!==this._lastNotifiedValue&&this.notifyObserver(h,this._lastNotifiedValue);let o=r?new WeakRef(this):{deref:()=>this};return h._remove=(t=!1)=>{let r=o.deref();r&&(t?r.remove(h):r._remove(h))},h}addOnce(t){return this.add(t,void 0,void 0,void 0,!0)}remove(t){return!!t&&(t._remove=null,-1!==this._observers.indexOf(t)&&(this._deferUnregister(t),!0))}removeCallback(t,r){for(let e=0;e<this._observers.length;e++){let i=this._observers[e];if(!i._willBeUnregistered&&i.callback===t&&(!r||r===i.scope))return this._deferUnregister(i),!0}return!1}_deferUnregister(t){t._willBeUnregistered||(this._numObserversMarkedAsDeleted++,t.unregisterOnNextCall=!1,t._willBeUnregistered=!0,setTimeout(()=>{this._remove(t)},0))}_remove(t,r=!0){if(!t)return!1;let e=this._observers.indexOf(t);return -1!==e&&(r&&this._numObserversMarkedAsDeleted--,this._observers.splice(e,1),!0)}makeObserverTopPriority(t){this._remove(t,!1),this._observers.unshift(t)}makeObserverBottomPriority(t){this._remove(t,!1),this._observers.push(t)}notifyObservers(t,r=-1,e,i,s){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=t),!this._observers.length)return!0;let n=this._eventState;for(let a of(n.mask=r,n.target=e,n.currentTarget=i,n.skipNextObservers=!1,n.lastReturnValue=t,n.userInfo=s,this._observers))if(!a._willBeUnregistered&&(a.mask&r&&(a.unregisterOnNextCall&&this._deferUnregister(a),a.scope?n.lastReturnValue=a.callback.apply(a.scope,[t,n]):n.lastReturnValue=a.callback(t,n)),n.skipNextObservers))return!1;return!0}notifyObserver(t,r,e=-1){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=r),t._willBeUnregistered)return;let i=this._eventState;i.mask=e,i.skipNextObservers=!1,t.unregisterOnNextCall&&this._deferUnregister(t),t.callback(r,i)}hasObservers(){return this._observers.length-this._numObserversMarkedAsDeleted>0}clear(){for(;this._observers.length;){let t=this._observers.pop();t&&(t._remove=null)}this._onObserverAdded=null,this._numObserversMarkedAsDeleted=0,this.cleanLastNotifiedState()}cleanLastNotifiedState(){this._hasNotified=!1,this._lastNotifiedValue=void 0}clone(){let t=new s;return t._observers=this._observers.slice(0),t}hasSpecificMask(t=-1){for(let r of this._observers)if(r.mask&t||r.mask===t)return!0;return!1}}t.s(["Observable",0,s],3864);class n{static get LastCreatedEngine(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]}static get LastCreatedScene(){return this._LastCreatedScene}}n.Instances=[],n.OnEnginesDisposedObservable=new s,n._LastCreatedScene=null,n.UseFallbackTexture=!0,n.FallbackTexture="",t.s(["EngineStore",0,n],23003)},44520,t=>{"use strict";let r={};t.s(["GetClass",0,function(t){return r[t]},"RegisterClass",0,function(t,e){r[t]=e}])},19919,t=>{"use strict";var r=t.i(30672),e=t.i(84106),i=t.i(63235),s=t.i(44520);function n(t){return Math.pow(t,e.ToLinearSpace)}function a(t){return t<=.04045?.0773993808*t:Math.pow(.947867299*(t+.055),2.4)}function h(t){return Math.pow(t,e.ToGammaSpace)}function o(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class l{constructor(t=0,r=0,e=0){this.r=t,this.g=r,this.b=e}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"}getClassName(){return"Color3"}getHashCode(){let t=255*this.r|0;return 397*(t=397*t^255*this.g)^255*this.b}toArray(t,r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,this}fromArray(t,r=0){return l.FromArrayToRef(t,r,this),this}toColor4(t=1){return new u(this.r,this.g,this.b,t)}asArray(){return[this.r,this.g,this.b]}toLuminance(){return .3*this.r+.59*this.g+.11*this.b}multiply(t){return new l(this.r*t.r,this.g*t.g,this.b*t.b)}multiplyToRef(t,r){return r.r=this.r*t.r,r.g=this.g*t.g,r.b=this.b*t.b,r}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyByFloats(t,r,e){return new l(this.r*t,this.g*r,this.b*e)}divide(t){throw ReferenceError("Can not divide a color")}divideToRef(t,r){throw ReferenceError("Can not divide a color")}divideInPlace(t){throw ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.minimizeInPlaceFromFloats(t.r,t.g,t.b)}maximizeInPlace(t){return this.maximizeInPlaceFromFloats(t.r,t.g,t.b)}minimizeInPlaceFromFloats(t,r,e){return this.r=Math.min(t,this.r),this.g=Math.min(r,this.g),this.b=Math.min(e,this.b),this}maximizeInPlaceFromFloats(t,r,e){return this.r=Math.max(t,this.r),this.g=Math.max(r,this.g),this.b=Math.max(e,this.b),this}floorToRef(t){throw ReferenceError("Can not floor a color")}floor(){throw ReferenceError("Can not floor a color")}fractToRef(t){throw ReferenceError("Can not fract a color")}fract(){throw ReferenceError("Can not fract a color")}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b}equalsFloats(t,r,e){return this.equalsToFloats(t,r,e)}equalsToFloats(t,r,e){return this.r===t&&this.g===r&&this.b===e}equalsWithEpsilon(t,r=e.Epsilon){return(0,i.WithinEpsilon)(this.r,t.r,r)&&(0,i.WithinEpsilon)(this.g,t.g,r)&&(0,i.WithinEpsilon)(this.b,t.b,r)}negate(){throw ReferenceError("Can not negate a color")}negateInPlace(){throw ReferenceError("Can not negate a color")}negateToRef(t){throw ReferenceError("Can not negate a color")}scale(t){return new l(this.r*t,this.g*t,this.b*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this}scaleToRef(t,r){return r.r=this.r*t,r.g=this.g*t,r.b=this.b*t,r}scaleAndAddToRef(t,r){return r.r+=this.r*t,r.g+=this.g*t,r.b+=this.b*t,r}clampToRef(t=0,r=1,e){return e.r=(0,i.Clamp)(this.r,t,r),e.g=(0,i.Clamp)(this.g,t,r),e.b=(0,i.Clamp)(this.b,t,r),e}add(t){return new l(this.r+t.r,this.g+t.g,this.b+t.b)}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addInPlaceFromFloats(t,r,e){return this.r+=t,this.g+=r,this.b+=e,this}addToRef(t,r){return r.r=this.r+t.r,r.g=this.g+t.g,r.b=this.b+t.b,r}subtract(t){return new l(this.r-t.r,this.g-t.g,this.b-t.b)}subtractToRef(t,r){return r.r=this.r-t.r,r.g=this.g-t.g,r.b=this.b-t.b,r}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this}subtractFromFloats(t,r,e){return new l(this.r-t,this.g-r,this.b-e)}subtractFromFloatsToRef(t,r,e,i){return i.r=this.r-t,i.g=this.g-r,i.b=this.b-e,i}clone(){return new l(this.r,this.g,this.b)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyFromFloats(t,r,e){return this.r=t,this.g=r,this.b=e,this}set(t,r,e){return this.copyFromFloats(t,r,e)}setAll(t){return this.r=this.g=this.b=t,this}toHexString(){let t=Math.round(255*this.r),r=Math.round(255*this.g),e=Math.round(255*this.b);return"#"+(0,i.ToHex)(t)+(0,i.ToHex)(r)+(0,i.ToHex)(e)}fromHexString(t){return"#"!==t.substring(0,1)||7!==t.length||(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255),this}toHSV(){return this.toHSVToRef(new l)}toHSVToRef(t){let r=this.r,e=this.g,i=this.b,s=Math.max(r,e,i),n=Math.min(r,e,i),a=0,h=0,o=s-n;return 0!==s&&(h=o/s),s!=n&&(s==r?(a=(e-i)/o,e<i&&(a+=6)):s==e?a=(i-r)/o+2:s==i&&(a=(r-e)/o+4),a*=60),t.r=a,t.g=h,t.b=s,t}toLinearSpace(t=!1){let r=new l;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)):(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)),this}toGammaSpace(t=!1){let r=new l;return this.toGammaSpaceToRef(r,t),r}toGammaSpaceToRef(t,r=!1){return r?(t.r=o(this.r),t.g=o(this.g),t.b=o(this.b)):(t.r=h(this.r),t.g=h(this.g),t.b=h(this.b)),this}static HSVtoRGBToRef(t,r,e,i){let s=e*r,n=t/60,a=s*(1-Math.abs(n%2-1)),h=0,o=0,l=0;n>=0&&n<=1?(h=s,o=a):n>=1&&n<=2?(h=a,o=s):n>=2&&n<=3?(o=s,l=a):n>=3&&n<=4?(o=a,l=s):n>=4&&n<=5?(h=a,l=s):n>=5&&n<=6&&(h=s,l=a);let u=e-s;return i.r=h+u,i.g=o+u,i.b=l+u,i}static FromHSV(t,r,e){let i=new l(0,0,0);return l.HSVtoRGBToRef(t,r,e,i),i}static FromHexString(t){return new l(0,0,0).fromHexString(t)}static FromArray(t,r=0){return new l(t[r],t[r+1],t[r+2])}static FromArrayToRef(t,r=0,e){e.r=t[r],e.g=t[r+1],e.b=t[r+2]}static FromInts(t,r,e){return new l(t/255,r/255,e/255)}static Lerp(t,r,e){let i=new l(0,0,0);return l.LerpToRef(t,r,e,i),i}static LerpToRef(t,r,e,i){i.r=t.r+(r.r-t.r)*e,i.g=t.g+(r.g-t.g)*e,i.b=t.b+(r.b-t.b)*e}static Hermite(t,r,e,i,s){let n=s*s,a=s*n,h=2*a-3*n+1,o=-2*a+3*n,u=a-2*n+s,c=a-n;return new l(t.r*h+e.r*o+r.r*u+i.r*c,t.g*h+e.g*o+r.g*u+i.g*c,t.b*h+e.b*o+r.b*u+i.b*c)}static Hermite1stDerivative(t,r,e,i,s){let n=l.Black();return this.Hermite1stDerivativeToRef(t,r,e,i,s,n),n}static Hermite1stDerivativeToRef(t,r,e,i,s,n){let a=s*s;n.r=(a-s)*6*t.r+(3*a-4*s+1)*r.r+(-a+s)*6*e.r+(3*a-2*s)*i.r,n.g=(a-s)*6*t.g+(3*a-4*s+1)*r.g+(-a+s)*6*e.g+(3*a-2*s)*i.g,n.b=(a-s)*6*t.b+(3*a-4*s+1)*r.b+(-a+s)*6*e.b+(3*a-2*s)*i.b}static Red(){return new l(1,0,0)}static Green(){return new l(0,1,0)}static Blue(){return new l(0,0,1)}static Black(){return new l(0,0,0)}static get BlackReadOnly(){return l._BlackReadOnly}static White(){return new l(1,1,1)}static Purple(){return new l(.5,0,.5)}static Magenta(){return new l(1,0,1)}static Yellow(){return new l(1,1,0)}static Gray(){return new l(.5,.5,.5)}static Teal(){return new l(0,1,1)}static Random(){return new l(Math.random(),Math.random(),Math.random())}}l._V8PerformanceHack=new l(.5,.5,.5),l._BlackReadOnly=l.Black();class u{constructor(t=0,r=0,e=0,i=1){this.r=t,this.g=r,this.b=e,this.a=i}asArray(){return[this.r,this.g,this.b,this.a]}toArray(t,r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t[r+3]=this.a,this}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this.a=t[r+3],this}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}add(t){return new u(this.r+t.r,this.g+t.g,this.b+t.b,this.a+t.a)}addToRef(t,r){return r.r=this.r+t.r,r.g=this.g+t.g,r.b=this.b+t.b,r.a=this.a+t.a,r}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this.a+=t.a,this}addInPlaceFromFloats(t,r,e,i){return this.r+=t,this.g+=r,this.b+=e,this.a+=i,this}subtract(t){return new u(this.r-t.r,this.g-t.g,this.b-t.b,this.a-t.a)}subtractToRef(t,r){return r.r=this.r-t.r,r.g=this.g-t.g,r.b=this.b-t.b,r.a=this.a-t.a,r}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this.a-=t.a,this}subtractFromFloats(t,r,e,i){return new u(this.r-t,this.g-r,this.b-e,this.a-i)}subtractFromFloatsToRef(t,r,e,i,s){return s.r=this.r-t,s.g=this.g-r,s.b=this.b-e,s.a=this.a-i,s}scale(t){return new u(this.r*t,this.g*t,this.b*t,this.a*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this.a*=t,this}scaleToRef(t,r){return r.r=this.r*t,r.g=this.g*t,r.b=this.b*t,r.a=this.a*t,r}scaleAndAddToRef(t,r){return r.r+=this.r*t,r.g+=this.g*t,r.b+=this.b*t,r.a+=this.a*t,r}clampToRef(t=0,r=1,e){return e.r=(0,i.Clamp)(this.r,t,r),e.g=(0,i.Clamp)(this.g,t,r),e.b=(0,i.Clamp)(this.b,t,r),e.a=(0,i.Clamp)(this.a,t,r),e}multiply(t){return new u(this.r*t.r,this.g*t.g,this.b*t.b,this.a*t.a)}multiplyToRef(t,r){return r.r=this.r*t.r,r.g=this.g*t.g,r.b=this.b*t.b,r.a=this.a*t.a,r}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this.a*=t.a,this}multiplyByFloats(t,r,e,i){return new u(this.r*t,this.g*r,this.b*e,this.a*i)}divide(t){throw ReferenceError("Can not divide a color")}divideToRef(t,r){throw ReferenceError("Can not divide a color")}divideInPlace(t){throw ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.r=Math.min(this.r,t.r),this.g=Math.min(this.g,t.g),this.b=Math.min(this.b,t.b),this.a=Math.min(this.a,t.a),this}maximizeInPlace(t){return this.r=Math.max(this.r,t.r),this.g=Math.max(this.g,t.g),this.b=Math.max(this.b,t.b),this.a=Math.max(this.a,t.a),this}minimizeInPlaceFromFloats(t,r,e,i){return this.r=Math.min(t,this.r),this.g=Math.min(r,this.g),this.b=Math.min(e,this.b),this.a=Math.min(i,this.a),this}maximizeInPlaceFromFloats(t,r,e,i){return this.r=Math.max(t,this.r),this.g=Math.max(r,this.g),this.b=Math.max(e,this.b),this.a=Math.max(i,this.a),this}floorToRef(t){throw ReferenceError("Can not floor a color")}floor(){throw ReferenceError("Can not floor a color")}fractToRef(t){throw ReferenceError("Can not fract a color")}fract(){throw ReferenceError("Can not fract a color")}negate(){throw ReferenceError("Can not negate a color")}negateInPlace(){throw ReferenceError("Can not negate a color")}negateToRef(t){throw ReferenceError("Can not negate a color")}equalsWithEpsilon(t,r=e.Epsilon){return(0,i.WithinEpsilon)(this.r,t.r,r)&&(0,i.WithinEpsilon)(this.g,t.g,r)&&(0,i.WithinEpsilon)(this.b,t.b,r)&&(0,i.WithinEpsilon)(this.a,t.a,r)}equalsToFloats(t,r,e,i){return this.r===t&&this.g===r&&this.b===e&&this.a===i}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"}getClassName(){return"Color4"}getHashCode(){let t=255*this.r|0;return 397*(t=397*(t=397*t^255*this.g)^255*this.b)^255*this.a}clone(){return new u().copyFrom(this)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}copyFromFloats(t,r,e,i){return this.r=t,this.g=r,this.b=e,this.a=i,this}set(t,r,e,i){return this.copyFromFloats(t,r,e,i)}setAll(t){return this.r=this.g=this.b=this.a=t,this}toHexString(t=!1){let r=Math.round(255*this.r),e=Math.round(255*this.g),s=Math.round(255*this.b);if(t)return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s);let n=Math.round(255*this.a);return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s)+(0,i.ToHex)(n)}fromHexString(t){return"#"!==t.substring(0,1)||9!==t.length&&7!==t.length||(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255,9===t.length&&(this.a=parseInt(t.substring(7,9),16)/255)),this}toLinearSpace(t=!1){let r=new u;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)):(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)),t.a=this.a,this}toGammaSpace(t=!1){let r=new u;return this.toGammaSpaceToRef(r,t),r}toGammaSpaceToRef(t,r=!1){return r?(t.r=o(this.r),t.g=o(this.g),t.b=o(this.b)):(t.r=h(this.r),t.g=h(this.g),t.b=h(this.b)),t.a=this.a,this}static FromHexString(t){return"#"!==t.substring(0,1)||9!==t.length&&7!==t.length?new u(0,0,0,0):new u(0,0,0,1).fromHexString(t)}static Lerp(t,r,e){return u.LerpToRef(t,r,e,new u)}static LerpToRef(t,r,e,i){return i.r=t.r+(r.r-t.r)*e,i.g=t.g+(r.g-t.g)*e,i.b=t.b+(r.b-t.b)*e,i.a=t.a+(r.a-t.a)*e,i}static Hermite(t,r,e,i,s){let n=s*s,a=s*n,h=2*a-3*n+1,o=-2*a+3*n,l=a-2*n+s,c=a-n;return new u(t.r*h+e.r*o+r.r*l+i.r*c,t.g*h+e.g*o+r.g*l+i.g*c,t.b*h+e.b*o+r.b*l+i.b*c,t.a*h+e.a*o+r.a*l+i.a*c)}static Hermite1stDerivative(t,r,e,i,s){let n=new u;return this.Hermite1stDerivativeToRef(t,r,e,i,s,n),n}static Hermite1stDerivativeToRef(t,r,e,i,s,n){let a=s*s;n.r=(a-s)*6*t.r+(3*a-4*s+1)*r.r+(-a+s)*6*e.r+(3*a-2*s)*i.r,n.g=(a-s)*6*t.g+(3*a-4*s+1)*r.g+(-a+s)*6*e.g+(3*a-2*s)*i.g,n.b=(a-s)*6*t.b+(3*a-4*s+1)*r.b+(-a+s)*6*e.b+(3*a-2*s)*i.b,n.a=(a-s)*6*t.a+(3*a-4*s+1)*r.a+(-a+s)*6*e.a+(3*a-2*s)*i.a}static FromColor3(t,r=1){return new u(t.r,t.g,t.b,r)}static FromArray(t,r=0){return new u(t[r],t[r+1],t[r+2],t[r+3])}static FromArrayToRef(t,r=0,e){e.r=t[r],e.g=t[r+1],e.b=t[r+2],e.a=t[r+3]}static FromInts(t,r,e,i){return new u(t/255,r/255,e/255,i/255)}static CheckColors4(t,r){if(t.length===3*r){let r=[];for(let e=0;e<t.length;e+=3){let i=e/3*4;r[i]=t[e],r[i+1]=t[e+1],r[i+2]=t[e+2],r[i+3]=1}return r}return t}}u._V8PerformanceHack=new u(.5,.5,.5,.5);class c{}c.Color3=(0,r.BuildArray)(3,l.Black),c.Color4=(0,r.BuildArray)(3,()=>new u(0,0,0,0));let g=!1;t.s(["Color3",0,l,"Color4",0,u,"RegisterMathColor",0,function(){g||(g=!0,Object.defineProperties(l.prototype,{dimension:{value:[3]},rank:{value:1}}),Object.defineProperties(u.prototype,{dimension:{value:[4]},rank:{value:1}}),(0,s.RegisterClass)("BABYLON.Color3",l),(0,s.RegisterClass)("BABYLON.Color4",u))},"TmpColors",0,c])}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48820,e=>{"use strict";var r=e.i(47150);let o="lod3DPixelShader",t=`precision highp float;precision highp sampler3D;const float GammaEncodePowerApprox=1.0/2.2;varying vec2 vUV;uniform sampler3D textureSampler;uniform float lod;uniform float slice;uniform int gamma;void main(void)
|
|
2
|
-
{ivec3 textureCoordinates=ivec3(vUV*vec2(textureSize(textureSampler,0).xy),int(slice));gl_FragColor=texelFetch(textureSampler,textureCoordinates,int(lod));if (gamma==0) {gl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(GammaEncodePowerApprox));}}
|
|
3
|
-
`;r.ShaderStore.ShadersStore[o]||(r.ShaderStore.ShadersStore[o]=t),e.s(["lod3DPixelShader",0,{name:o,shader:t}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,44449,s=>{"use strict";var e=s.i(84953);(0,e.RegisterDumpTools)(),s.s([],93164),s.i(93164),s.s(["Dispose",()=>e.Dispose,"DumpData",()=>e.DumpData,"DumpDataAsync",()=>e.DumpDataAsync,"DumpFramebuffer",()=>e.DumpFramebuffer,"DumpTools",()=>e.DumpTools,"EncodeImageAsync",()=>e.EncodeImageAsync,"RegisterDumpTools",()=>e.RegisterDumpTools],44449)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62750,t=>{"use strict";var e=t.i(17884),o=t.i(75105);let i="cachedOperationValue",r="cachedExecutionId";class n extends e.FlowGraphBlock{constructor(t,e){super(e),this.value=this.registerDataOutput("value",t),this.isValid=this.registerDataOutput("isValid",o.RichTypeBoolean)}_updateOutputs(t){let e=t._getExecutionVariable(this,r,-1),o=t._getExecutionVariable(this,i,null);if(null!=o&&e===t.executionId)this.isValid.setValue(!0,t),this.value.setValue(o,t);else try{let e=this._doOperation(t);if(null==e)return void this.isValid.setValue(!1,t);t._setExecutionVariable(this,i,e),t._setExecutionVariable(this,r,t.executionId),this.value.setValue(e,t),this.isValid.setValue(!0,t)}catch(e){this.isValid.setValue(!1,t)}}}t.s(["FlowGraphCachedOperationBlock",0,n])},8862,t=>{"use strict";var e=t.i(32304),o=t.i(75105);let i=new RegExp(/\/\{(\w+)\}(?=\/|$)/g);class r{constructor(t,r){this.path=t,this.ownerBlock=r,this.templatedInputs=[];let n=i.exec(t);const a=new Set;for(;n;){const[,s]=n;if(a.has(s))throw Error("Duplicate template variable detected.");a.add(s),this.templatedInputs.push(r.registerDataInput(s,o.RichTypeFlowGraphInteger,new e.FlowGraphInteger(0))),n=i.exec(t)}}getAccessor(t,e){let o=this.path;for(let t of this.templatedInputs){let i=t.getValue(e).value;if("number"!=typeof i||i<0)throw Error("Invalid value for templated input.");o=o.replace(`{${t.name}}`,i.toString())}return t.convert(o)}}var n=t.i(69400),a=t.i(19919),s=t.i(62750),l=t.i(44520);class c extends s.FlowGraphCachedOperationBlock{constructor(t){super(o.RichTypeAny,t),this.config=t,this.object=this.registerDataOutput("object",o.RichTypeAny),this.propertyName=this.registerDataOutput("propertyName",o.RichTypeAny),this.setterFunction=this.registerDataOutput("setFunction",o.RichTypeAny,this._setPropertyValue.bind(this)),this.getterFunction=this.registerDataOutput("getFunction",o.RichTypeAny,this._getPropertyValue.bind(this)),this.generateAnimationsFunction=this.registerDataOutput("generateAnimationsFunction",o.RichTypeAny,this._getInterpolationAnimationPropertyInfo.bind(this)),this.templateComponent=new r(t.jsonPointer,this)}_doOperation(t){let e=this.templateComponent.getAccessor(this.config.pathConverter,t),o=e.info.get(e.object),i=e.info.getTarget?.(e.object),r=e.info.getPropertyName?.[0](e.object);if(i)this.object.setValue(i,t),r&&this.propertyName.setValue(r,t);else throw Error("Object is undefined");return o}_setPropertyValue(t,e,o,i){let r=this.templateComponent.getAccessor(this.config.pathConverter,i),n=r.info.type;n.startsWith("Color")&&(o=u(o,n)),r.info.set?.(o,r.object)}_getPropertyValue(t,e,o){let i=this.templateComponent.getAccessor(this.config.pathConverter,o),r=i.info.type,s=i.info.get(i.object);return r.startsWith("Color")?function(t){if(t instanceof a.Color3)return new n.Vector3(t.r,t.g,t.b);if(t instanceof a.Color4)return new n.Vector4(t.r,t.g,t.b,t.a);throw Error("Invalid color type")}(s):s}_getInterpolationAnimationPropertyInfo(t,e,o){let i=this.templateComponent.getAccessor(this.config.pathConverter,o);return(t,e,o,r)=>{let n=[],a=i.info.type;return a.startsWith("Color")&&(t=t.map(t=>({frame:t.frame,value:u(t.value,a)}))),i.info.interpolation?.forEach((e,a)=>{let s=i.info.getPropertyName?.[a](i.object)||"Animation-interpolation-"+a,l=t;for(let a of(o!==e.type&&(l=t.map(t=>({frame:t.frame,value:e.getValue(void 0,t.value.asArray?t.value.asArray():[t.value],0,1)}))),e.buildAnimations(i.object,s,60,l)))r&&a.babylonAnimation.setEasingFunction(r),n.push(a.babylonAnimation)}),n}}getClassName(){return"FlowGraphJsonPointerParserBlock"}}function u(t,e){return t.getClassName().startsWith("Color")?t:"Color3"===e?new a.Color3(t.x,t.y,t.z):"Color4"===e?new a.Color4(t.x,t.y,t.z,t.w):t}let h=!1;function p(){h||(h=!0,(0,l.RegisterClass)("FlowGraphJsonPointerParserBlock",c))}t.s(["FlowGraphJsonPointerParserBlock",0,c,"RegisterFlowGraphJsonPointerParserBlock",0,p],15905),p(),t.s([],82927),t.i(82927),t.i(15905),t.s(["FlowGraphJsonPointerParserBlock",0,c],8862)}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24032,e=>{"use strict";var t=e.i(20363);class s extends t.Texture{constructor(e,s,r,a,i,n=!0,o=!1,l=3,h=0,u,_,c,p){if(super(null,i,!n,o,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,u),this.format=a,!this._engine)return;this._engine._caps.textureFloatLinearFiltering||1!==h||(l=1),this._engine._caps.textureHalfFloatLinearFiltering||2!==h||(l=1),this._texture=this._engine.createRawTexture(e,s,r,a,n,o,l,null,h,u??0,_??!1,p),this.wrapU=t.Texture.CLAMP_ADDRESSMODE,this.wrapV=t.Texture.CLAMP_ADDRESSMODE,this._waitingForData=!!c&&!e}update(e){this.updateMipLevel(e,0)}updateMipLevel(e,t){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer,t),this._waitingForData=!1}clone(){if(!this._texture)return super.clone();let e=new s(null,this.getSize().width,this.getSize().height,this.format,this.getScene(),this._texture.generateMipMaps,this._invertY,this.samplingMode,this._texture.type,this._texture._creationFlags,this._useSRGBBuffer);return e._texture=this._texture,this._texture.incrementReferences(),e}isReady(){return super.isReady()&&!this._waitingForData}static CreateLuminanceTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,1,a,i,n,o)}static CreateLuminanceAlphaTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,2,a,i,n,o)}static CreateAlphaTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,0,a,i,n,o)}static CreateRGBTexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=0,u=!1){return new s(e,t,r,4,a,i,n,o,l,h,u)}static CreateRGBATexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=0,u=!1,_=!1){return new s(e,t,r,5,a,i,n,o,l,h,u,_)}static CreateRGBAStorageTexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=!1){return new s(e,t,r,5,a,i,n,o,l,1,h)}static CreateRTexture(e,r,a,i,n=!0,o=!1,l=t.Texture.TRILINEAR_SAMPLINGMODE,h=1){return new s(e,r,a,6,i,n,o,l,h)}static CreateRStorageTexture(e,r,a,i,n=!0,o=!1,l=t.Texture.TRILINEAR_SAMPLINGMODE,h=1){return new s(e,r,a,6,i,n,o,l,h,1)}}e.s(["RawTexture",0,s])},66861,e=>{"use strict";var t=e.i(2060),s=e.i(16347),r=e.i(41041),a=e.i(69223),i=e.i(13099),n=e.i(6949),o=e.i(55288),l=e.i(59052),h=e.i(80065),u=e.i(16771),_=e.i(23003);class c{constructor(){this.mm=new Map}get(e,t){let s=this.mm.get(e);if(void 0!==s)return s.get(t)}set(e,t,s){let r=this.mm.get(e);void 0===r&&this.mm.set(e,r=new Map),r.set(t,s)}}class p{get standalone(){return this._options?.standalone??!1}get baseMaterial(){return this._baseMaterial}get doNotInjectCode(){return this._options?.doNotInjectCode??!1}constructor(e,t,s){this._baseMaterial=e,this._scene=t??_.EngineStore.LastCreatedScene,this._options=s,this._subMeshToEffect=new Map,this._subMeshToDepthWrapper=new c,this._meshes=new Map,this._onEffectCreatedObserver=this._baseMaterial.onEffectCreatedObservable.add(e=>{let t=e.subMesh?.getMesh();t&&!this._meshes.has(t)&&this._meshes.set(t,t.onDisposeObservable.add(e=>{let t=this._subMeshToEffect.keys();for(let s=t.next();!0!==s.done;s=t.next()){let t=s.value;t?.getMesh()===e&&(this._subMeshToEffect.delete(t),this._deleteDepthWrapperEffect(t))}})),this._subMeshToEffect.get(e.subMesh)?.[0]!==e.effect&&(this._subMeshToEffect.set(e.subMesh,[e.effect,this._scene.getEngine().currentRenderPassId]),this._deleteDepthWrapperEffect(e.subMesh))})}_deleteDepthWrapperEffect(e){let t=this._subMeshToDepthWrapper.mm.get(e);t&&(t.forEach(e=>{e.mainDrawWrapper.effect?.dispose()}),this._subMeshToDepthWrapper.mm.delete(e))}getEffect(e,t,s){let r=this._subMeshToDepthWrapper.mm.get(e)?.get(t);if(!r)return null;let a=r.drawWrapper[s];return a||(a=r.drawWrapper[s]=new u.DrawWrapper(this._scene.getEngine())).setEffect(r.mainDrawWrapper.effect,r.mainDrawWrapper.defines),a}isReadyForSubMesh(e,t,s,r,a){return(!this.standalone||!!this._baseMaterial.isReadyForSubMesh(e.getMesh(),e,r))&&(this._makeEffect(e,t,s,a)?.isReady()??!1)}dispose(){this._baseMaterial.onEffectCreatedObservable.remove(this._onEffectCreatedObserver),this._onEffectCreatedObserver=null;let e=this._meshes.entries();for(let t=e.next();!0!==t.done;t=e.next()){let[e,s]=t.value;e.onDisposeObservable.remove(s)}}_makeEffect(e,t,s,r){let a=this._scene.getEngine(),i=this._subMeshToEffect.get(e);if(!i)return null;let[n,o]=i;if(!n.isReady())return null;let _=this._subMeshToDepthWrapper.get(e,s);if(!_){let t=new u.DrawWrapper(a),i=e._getDrawWrapper(o)?.defines;t.defines="string"==typeof i?null:i??null,(_={drawWrapper:[],mainDrawWrapper:t,depthDefines:"",token:(0,h.RandomGUID)()}).drawWrapper[r]=t,this._subMeshToDepthWrapper.set(e,s,_)}let c=t.join("\n");if(_.mainDrawWrapper.effect&&c===_.depthDefines)return _.mainDrawWrapper.effect;_.depthDefines=c;let p=n.getUniformNames().slice(),d=n.vertexSourceCodeBeforeMigration,f=n.fragmentSourceCodeBeforeMigration;if(!d&&!f)return null;if(!this.doNotInjectCode){let e=this._options&&this._options.remappedVariables?`#include<shadowMapVertexNormalBias>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapVertexNormalBias>",t=this._options&&this._options.remappedVariables?`#include<shadowMapVertexMetric>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapVertexMetric>",s=this._options&&this._options.remappedVariables?`#include<shadowMapFragmentSoftTransparentShadow>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapFragmentSoftTransparentShadow>",r="#include<shadowMapFragment>",a="#include<shadowMapVertexExtraDeclaration>";d=(d=-1!==(d=(d=0===n.shaderLanguage?d.replace(/void\s+?main/g,`
|
|
2
|
-
${a}
|
|
3
|
-
void main`):d.replace(/@vertex/g,`
|
|
4
|
-
${a}
|
|
5
|
-
@vertex`)).replace(/#define SHADOWDEPTH_NORMALBIAS|#define CUSTOM_VERTEX_UPDATE_WORLDPOS/g,e)).indexOf("#define SHADOWDEPTH_METRIC")?d.replace(/#define SHADOWDEPTH_METRIC/g,t):d.replace(/}\s*$/g,t+"\n}")).replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");let i=f.indexOf("#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW")>=0||f.indexOf("#define CUSTOM_FRAGMENT_BEFORE_FOG")>=0,o=-1!==f.indexOf("#define SHADOWDEPTH_FRAGMENT"),h="";i?f=f.replace(/#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW|#define CUSTOM_FRAGMENT_BEFORE_FOG/g,s):h=s+"\n",f=f.replace(/void\s+?main/g,l.Effect.IncludesShadersStore.shadowMapFragmentExtraDeclaration+"\nvoid main"),o?f=f.replace(/#define SHADOWDEPTH_FRAGMENT/g,r):h+=r+"\n",h&&(f=f.replace(/}\s*$/g,h+"}")),p.push("biasAndScaleSM","depthValuesSM","lightDataSM","softTransparentShadowSM")}_.mainDrawWrapper.effect=a.createEffect({vertexSource:d,fragmentSource:f,vertexToken:_.token,fragmentToken:_.token},{attributes:n.getAttributesNames(),uniformsNames:p,uniformBuffersNames:n.getUniformBuffersNames(),samplers:n.getSamplers(),defines:c+"\n"+n.defines.replace("#define SHADOWS","").replace(/#define SHADOW\d/g,""),indexParameters:n.getIndexParameters(),shaderLanguage:n.shaderLanguage},a);for(let e=0;e<_.drawWrapper.length;++e)e!==r&&_.drawWrapper[e]?.setEffect(_.mainDrawWrapper.effect,_.mainDrawWrapper.defines);return _.mainDrawWrapper.effect}}var d=e.i(28548),f=e.i(46533),x=e.i(22052),m=e.i(34149);function g(e){return Math.min(Math.max(Math.floor(Math.max(e.getCaps().maxVertexUniformVectors-40,0)/5),1),256)}class S extends a.MaterialDefines{constructor(e){super(e),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.SH_DEGREE=0,this.COMPENSATION=!1,this.IS_COMPOUND=!1,this.MAX_PART_COUNT=128,this.USE_SOG=!1,this.USE_SOG_V2=!1,this.rebuild()}hasDefine(e){return -1!==this._keys.indexOf(e)}}class T extends i.PushMaterial{constructor(e,t){super(e,t),this.kernelSize=T.KernelSize,this.minPixelSize=T.MinPixelSize,this._compensation=T.Compensation,this._isDirty=!1,this._sourceMesh=null,this._voxelMissingTextureWarned=new Set,this._voxelPartWorldData=new Float32Array(0),this._voxelPartVisibilityData=[],this.backFaceCulling=!1,this.shadowDepthWrapper=T._MakeGaussianSplattingShadowDepthWrapper(t,this.shaderLanguage)}set compensation(e){this._isDirty=this._isDirty!=e,this._compensation=e}get compensation(){return this._compensation}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(t,s){let r=s._drawWrapper,a=s.materialDefines;if(a&&this._isDirty&&a.markAsUnprocessed(),r.effect&&this.isFrozen&&r._wasPreviouslyReady&&!0===r._wasPreviouslyUsingInstances)return!0;if(!s.materialDefines||this.pluginManager){this._callbackPluginEventGeneric(4,this._eventInfo);let e=this._eventInfo.defineNames;(!s.materialDefines||e&&Object.keys(e).some(e=>!a.hasDefine(e)))&&(a=s.materialDefines=new S(e))}let i=this.getScene();if(this._isReadyForSubMesh(s))return!0;if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=a,this._eventInfo.subMesh=s,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh||!this._sourceMesh)return!1;let o=i.getEngine(),l=this._sourceMesh;(0,x.PrepareDefinesForMisc)(t,i,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,a,void 0,void 0,void 0,this._isVertexOutputInvariant),(0,x.PrepareDefinesForFrameBoundValues)(i,o,this,a,!0,null,!0),this._eventInfo.defines=a,this._eventInfo.mesh=t,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),(0,x.PrepareDefinesForAttributes)(t,a,!1,!1),this._callbackPluginEventPrepareDefines(this._eventInfo),(o.version>1||o.isWebGPU)&&(a.SH_DEGREE=l.shDegree),a.IS_COMPOUND=l.isCompound,a.MAX_PART_COUNT=g(o),a.USE_SOG=l.useSog,a.USE_SOG_V2=l.useSog&&l.sogParams?.version===2;let h=l.material;if(a.COMPENSATION=h&&h.compensation?h.compensation:T.Compensation,a.isDirty){a.markAsProcessed(),i.resetCachedMaterial(),(0,x.PrepareAttributesForInstances)(T._Attribs,a);let r=T._Attribs.slice(),l=T._Uniforms.slice(),h=T._Samplers.slice(),u=T._UniformBuffers.slice();(0,x.PrepareUniformsAndSamplersList)({uniformsNames:l,uniformBuffersNames:u,samplers:h,defines:a}),(0,n.AddClipPlaneUniforms)(l),this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._eventInfo.fallbackRank=0,this._eventInfo.defines=a,this._eventInfo.attributes=r,this._eventInfo.uniforms=l,this._eventInfo.samplers=h,this._eventInfo.uniformBuffersNames=u,this._eventInfo.customCode=void 0,this._eventInfo.mesh=t,this._callbackPluginEventGeneric(128,this._eventInfo);let _=a.toString(),c=i.getEngine().createEffect("gaussianSplatting",{attributes:r,uniformsNames:l,uniformBuffersNames:u,samplers:h,defines:_,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},processCodeAfterIncludes:this._eventInfo.customCode,shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([e.A(32365),e.A(43640)]):await Promise.all([e.A(55237),e.A(47780)])}},o);s.setEffect(c,a,this._materialContext)}return!!s.effect&&!!s.effect.isReady()&&(a._renderId=i.getRenderId(),r._wasPreviouslyReady=!0,r._wasPreviouslyUsingInstances=!0,this._isDirty=!1,!0)}setSourceMesh(e){this._sourceMesh=e}getSourceMesh(){return this._sourceMesh}static BindEffect(e,t,s){let r=s.getEngine(),a=s.activeCamera,i=r.getRenderWidth()*a.viewport.width,n=r.getRenderHeight()*a.viewport.height,l=e.material;if(!l._sourceMesh)return;let h=l._sourceMesh,u=a?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(i/u),1/n);let _=1e3;if(a){let e=a.getProjectionMatrix().m[5];_=a.fovMode==o.Camera.FOVMODE_VERTICAL_FIXED?n*e/2:i*e/2}if(t.setFloat2("focal",_,_),t.setFloat("kernelSize",l&&l.kernelSize?l.kernelSize:T.KernelSize),t.setFloat("minPixelSize",l?l.minPixelSize:T.MinPixelSize),t.setFloat("alpha",l.alpha),s.bindEyePosition(t,"eyePosition",!0),h.covariancesATexture){let e=h.covariancesATexture.getSize();if(t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",h.covariancesATexture),t.setTexture("covariancesBTexture",h.covariancesBTexture),t.setTexture("centersTexture",h.centersTexture),t.setTexture("colorsTexture",h.colorsTexture),h.useSog)T._BindSogUniforms(h,t);else if(h.shTextures)for(let e=0;e<h.shTextures.length;e++)t.setTexture(`shTexture${e}`,h.shTextures[e]);h.bindExtraEffectUniforms(t)}}static _BindSogUniforms(e,t){let s=e.sogParams;s&&(t.setTexture("sogQuatsTexture",e.rotationsATexture),e.shTextures&&e.shTextures.length>=2&&(t.setTexture("sogShNCentroidsTexture",e.shTextures[0]),t.setTexture("sogShNLabelsTexture",e.shTextures[1])),s.codebookTexture&&t.setTexture("sogCodebookTexture",s.codebookTexture),t.setFloat3("sogMeansMin",s.meansMin[0],s.meansMin[1],s.meansMin[2]),t.setFloat3("sogMeansMax",s.meansMax[0],s.meansMax[1],s.meansMax[2]),s.scalesMin&&s.scalesMax&&(t.setFloat3("sogScalesMin",s.scalesMin[0],s.scalesMin[1],s.scalesMin[2]),t.setFloat3("sogScalesMax",s.scalesMax[0],s.scalesMax[1],s.scalesMax[2])),s.sh0Min&&s.sh0Max&&(t.setFloat4("sogSh0Min",s.sh0Min[0],s.sh0Min[1],s.sh0Min[2],s.sh0Min[3]),t.setFloat4("sogSh0Max",s.sh0Max[0],s.sh0Max[1],s.sh0Max[2],s.sh0Max[3])),t.setFloat("sogShnMin",s.shnMin??0),t.setFloat("sogShnMax",s.shnMax??0),t.setFloat("sogShCoeffCount",s.shCoeffCount??0))}bindForSubMesh(e,t,s){let r=this.getScene(),a=s.materialDefines;if(!a)return;let i=s.effect;i&&(this._activeEffect=i,t.getMeshUniformBuffer().bindToEffect(i,"Mesh"),t.transferToEffect(e),this._mustRebind(r,i,s,t.visibility)?(this.bindView(i),this.bindViewProjection(i),T.BindEffect(t,this._activeEffect,r),(0,n.BindClipPlane)(i,this,r)):r.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),(0,x.BindFogParameters)(r,t,i),this.useLogarithmicDepth&&(0,x.BindLogDepth)(a,i,r),this._eventInfo.subMesh=s,this._callbackPluginEventBindForSubMesh(this._eventInfo),this._afterBind(t,this._activeEffect,s))}static _BindEffectUniforms(e,t,s,r){let a,i,n=r.getEngine(),l=s.getEffect(),h=r.activeCamera;if(!h)return;e.getMeshUniformBuffer().bindToEffect(l,"Mesh"),s.bindView(l),s.bindViewProjection(l);let u=n.getRenderWidth()*h.viewport.width,_=n.getRenderHeight()*h.viewport.height;l.setFloat2("invViewport",1/u,1/_);let c=1e3;if(h){let e=h.getProjectionMatrix().m[5];c=h.fovMode==o.Camera.FOVMODE_VERTICAL_FIXED?_*e/2:u*e/2}if(l.setFloat2("focal",c,c),l.setFloat("kernelSize",t&&t.kernelSize?t.kernelSize:T.KernelSize),l.setFloat("minPixelSize",t?t.minPixelSize:T.MinPixelSize),l.setFloat("alpha",t.alpha),h.mode===o.Camera.ORTHOGRAPHIC_CAMERA?(a=!n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:1,i=n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:1):(a=n.useReverseDepthBuffer&&n.isNDCHalfZRange?h.minZ:n.isNDCHalfZRange?0:h.minZ,i=n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:h.maxZ),l.setFloat2("depthValues",a,a+i),e.covariancesATexture){let t=e.covariancesATexture.getSize();l.setFloat2("dataTextureSize",t.width,t.height),l.setTexture("covariancesATexture",e.covariancesATexture),l.setTexture("covariancesBTexture",e.covariancesBTexture),l.setTexture("centersTexture",e.centersTexture),l.setTexture("colorsTexture",e.colorsTexture),e.bindExtraEffectUniforms(l)}}_bindVoxelEffectUniforms(e,t,r){if(!e.rotationsATexture&&(e.needsRotationScaleTextures=!0,!e.rotationsATexture))return!e.centersTexture||e.splatsData||this._voxelMissingTextureWarned.has(e.uniqueId)||(this._voxelMissingTextureWarned.add(e.uniqueId),s.Logger.Error("IBL voxelization: GaussianSplattingMesh rotation/scale textures are not available. Create the mesh either with keepInRam=true or needsRotationScaleTextures=true to enable IBL shadow voxelization.")),!1;this._voxelMissingTextureWarned.delete(e.uniqueId);let a=r.getEffect();e.getMeshUniformBuffer().bindToEffect(a,"Mesh");let i=e.rotationsATexture.getSize();if(a.setFloat("alpha",t.alpha),a.setFloat2("dataTextureSize",i.width,i.height),a.setTexture("rotationsATexture",e.rotationsATexture),a.setTexture("rotationsBTexture",e.rotationsBTexture),a.setTexture("rotationScaleTexture",e.rotationScaleTexture),a.setTexture("centersTexture",e.centersTexture),a.setTexture("colorsTexture",e.colorsTexture),e.partIndicesTexture){a.setTexture("partIndicesTexture",e.partIndicesTexture);let t=16*e.partCount;this._voxelPartWorldData.length!==t&&(this._voxelPartWorldData=new Float32Array(t));let s=this._voxelPartWorldData;for(let t=0;t<e.partCount;t++)e.getWorldMatrixForPart(t).toArray(s,16*t);a.setMatrices("partWorld",s);let r=this._voxelPartVisibilityData;r.length=e.partCount;for(let t=0;t<e.partCount;t++)r[t]=e.partVisibility[t]??1;a.setArray("partVisibility",r)}return!0}makeVoxelRenderingMaterial(t,s,r,a=!1){let i=[`#define MAX_DRAW_BUFFERS ${r}`];i.push("#define IS_FOR_VOXELIZATION"),a&&(i.push("#define IS_COMPOUND 1"),i.push(`#define MAX_PART_COUNT ${g(t.getEngine())}`));let n=new d.ShaderMaterial("gaussianSplattingVoxelRender",t,{vertex:"gaussianSplattingVoxel",fragment:"gaussianSplattingVoxel"},{attributes:T._Attribs,uniforms:T._VoxelUniforms,samplers:T._VoxelSamplers,uniformBuffers:T._UniformBuffers,shaderLanguage:s,defines:i,needAlphaBlending:!1,extraInitializationsAsync:async()=>{1===s?await Promise.all([e.A(61777),e.A(484)]):await Promise.all([e.A(37070),e.A(4987)])}});return n.cullBackFaces=!1,n.backFaceCulling=!1,n.depthFunction=m.Engine.ALWAYS,n.onBindObservable.add(e=>{let t=e.material;this._bindVoxelEffectUniforms(e,t,n)}),n}makeDepthRenderingMaterial(e,t,s=!1,r=!1){let a=["#define DEPTH_RENDER"];s&&a.push("#define ALPHA_BLENDED_DEPTH"),r&&(a.push("#define IS_COMPOUND 1"),a.push(`#define MAX_PART_COUNT ${g(e.getEngine())}`));let i=new d.ShaderMaterial("gaussianSplattingDepthRender",e,{vertex:"gaussianSplattingDepth",fragment:"gaussianSplattingDepth"},{attributes:T._Attribs,uniforms:T._Uniforms,samplers:T._Samplers,uniformBuffers:T._UniformBuffers,shaderLanguage:t,defines:a,needAlphaBlending:s});return i.doNotSerialize=!0,i.backFaceCulling=!1,i.onBindObservable.add(t=>{let s=t.material,r=s?.getSourceMesh()??t;T._BindEffectUniforms(r,s,i,e)}),i}static _MakeGaussianSplattingShadowDepthWrapper(e,t){let s=new d.ShaderMaterial("gaussianSplattingDepth",e,{vertex:"gaussianSplattingDepth",fragment:"gaussianSplattingDepth"},{attributes:T._Attribs,uniforms:T._Uniforms,samplers:T._Samplers,uniformBuffers:T._UniformBuffers,shaderLanguage:t});s.doNotSerialize=!0,s.backFaceCulling=!1;let r=new p(s,e,{standalone:!0});return s.onBindObservable.add(t=>{let r=t.material,a=r?.getSourceMesh()??t;T._BindEffectUniforms(a,r,s,e)}),r}clone(e){let s=t.SerializationHelper.Clone(()=>new T(e,this.getScene()),this);return s.id=e,s.name=e,this._clonePlugins(s,""),s}serialize(){let e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,s,r){let a=t.SerializationHelper.Parse(()=>new T(e.name,s),e,s,r);return f.Material._ParsePlugins(e,a,s,r),a}}T.KernelSize=.3,T.Compensation=!1,T.MinPixelSize=0,T._Attribs=[r.VertexBuffer.PositionKind,"splatIndex0","splatIndex1","splatIndex2","splatIndex3"],T._Samplers=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture","shTexture0","shTexture1","shTexture2","shTexture3","shTexture4","partIndicesTexture","sogQuatsTexture","sogShNCentroidsTexture","sogShNLabelsTexture","sogCodebookTexture"],T._UniformBuffers=["Scene","Mesh"],T._VoxelUniforms=["world","dataTextureSize","alpha","invWorldScale","viewMatrix","nearPlane","farPlane","stepSize","partWorld","partVisibility","axis"],T._VoxelSamplers=["rotationsATexture","rotationsBTexture","rotationScaleTexture","centersTexture","colorsTexture","partIndicesTexture"],T._Uniforms=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal","eyePosition","kernelSize","minPixelSize","alpha","depthValues","partWorld","partVisibility","sogMeansMin","sogMeansMax","sogScalesMin","sogScalesMax","sogSh0Min","sogSh0Max","sogShnMin","sogShnMax","sogShCoeffCount"],e.s(["GaussianSplattingMaterial",0,T,"GetGaussianSplattingMaxPartCount",0,g],66861)},51483,31169,e=>{"use strict";var t,s,r,a,i=e.i(69400),n=e.i(66861),o=e.i(46951),l=e.i(64831),h=e.i(64378),u=e.i(16347),_=e.i(3864),c=e.i(24032),p=e.i(6563),d=e.i(63235);let f=d.HighestCommonFactor,x={...d,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:f};var m=e.i(84856),g=e.i(23003),S=e.i(64433);let T="positions",M="partMatrices",y="partIndices",D=function(e){let t,s,r,a,i,n,o,l,h=null;e.onmessage=u=>{let _=u.data.command;if("positions"===_)t=u.data.positions;else if("positionsUpdate"===_)t&&u.data.data&&t.set(u.data.data,u.data.offset);else if("partMatrices"===_)a=u.data.partMatrices;else if("partIndices"===_)r=u.data.partIndices;else if("intervals"===_)h=u.data.intervals;else if("sort"===_){let _=u.data.cameraId,c=u.data.sortRequestId,p=u.data.rangeVersion,d=u.data.worldMatrix,f=u.data.cameraForward,x=u.data.cameraPosition;if(s=u.data.depthMix,!t||!f)return void e.postMessage({command:"sorted",depthMix:s,cameraId:_,sortRequestId:c,rangeVersion:p},[s.buffer]);let m=!1!==u.data.useCountingSort,g=!!u.data.logSortPerformance,S=u.data.rightHanded?-1:1,T=h,M=t.length/4,y=M;if(T){y=0;for(let e=1;e<T.length;e+=2)y+=T[e]}let D=Math.max(y+15&-16,16),b=f[0]*x[0]+f[1]*x[1]+f[2]*x[2],I=e=>[f[0]*e[0]+f[1]*e[1]+f[2]*e[2],f[0]*e[4]+f[1]*e[5]+f[2]*e[6],f[0]*e[8]+f[1]*e[9]+f[2]*e[10],f[0]*e[12]+f[1]*e[13]+f[2]*e[14]-b],w=globalThis.performance,A=g&&w?w.now():0;try{if(m){let e=new Uint32Array(s.buffer);if(!i||i.length<y){let e=Math.max(y,16);i=new Uint32Array(e),n=new Float32Array(e),o=new Uint32Array(e)}let h=!!(a&&r),u=[],_=0,c=0,p=0,f=0,x=0;if(h)u=a.map(e=>{let t=I(e);return t[0]*=S,t[1]*=S,t[2]*=S,t[3]*=S,t}),_=r.length;else{let e=I(d);c=e[0]*S,p=e[1]*S,f=e[2]*S,x=e[3]*S}let m=0,g=1/0,b=-1/0,w=T?T.length:2;for(let e=0;e<w;e+=2){let s=T?T[e]:0,a=s+(T?T[e+1]:M);if(h)for(let e=s;e<a;e++){let s=4*e,a=u[r[e<_?e:_-1]],o=a[0]*t[s]+a[1]*t[s+1]+a[2]*t[s+2]+a[3];i[m]=e,n[m]=o,m++,o<g&&(g=o),o>b&&(b=o)}else for(let e=s;e<a;e++){let s=4*e,r=c*t[s]+p*t[s+1]+f*t[s+2]+x;i[m]=e,n[m]=r,m++,r<g&&(g=r),r>b&&(b=r)}}let A=Math.max(10,Math.min(20,Math.round(Math.log2(Math.max(1,y)/4)))),v=2**A+1;l&&l.length===v?l.fill(0):l=new Uint32Array(v);let C=b-g;if(C>1e-12){let e=(v-1)/C,t=v-1;for(let s=0;s<y;s++){let r=(b-n[s])*e>>>0;r>t&&(r=t),o[s]=r,l[r]++}}else{for(let e=0;e<y;e++)o[e]=0;l[0]=y}for(let e=1;e<v;e++)l[e]+=l[e-1];for(let t=0;t<y;t++){let s=--l[o[t]];e[2*s]=i[t]}for(let t=y;t<D;t++)e[2*t]=0}else{let e=new Uint32Array(s.buffer),i=new Float32Array(s.buffer);if(T){let t=0;for(let s=0;s<T.length;s+=2){let r=T[s],a=T[s+1];for(let s=r;s<r+a;s++)e[2*t++]=s}for(;t<D;t++)e[2*t]=0}else for(let t=0;t<D;t++)e[2*t]=t;if(a&&r){let s=a.map(e=>I(e)),n=r.length;for(let a=0;a<D;a++){let o=e[2*a],l=s[r[Math.min(o,n-1)]];i[2*a+1]=l[0]*t[4*o+0]+l[1]*t[4*o+1]+l[2]*t[4*o+2]+l[3],e[2*a+1]=~e[2*a+1]}}else{let[s,r,a,n]=I(d);for(let o=0;o<D;o++){let l=e[2*o];i[2*o+1]=s*t[4*l+0]+r*t[4*l+1]+a*t[4*l+2]+n,e[2*o+1]=~e[2*o+1]}}s.sort()}}catch(e){console.error("Gaussian splat sort worker encountered an error (will retry next frame):",e)}g&&w&&console.log(`[GaussianSplatting] ${m?"counting":"legacy"} sort: ${y} splats in ${(w.now()-A).toFixed(2)}ms`),e.postMessage({command:"sorted",depthMix:s,cameraId:_,sortRequestId:c,rangeVersion:p},[s.buffer])}}},b="u">typeof _native,I=b?_native:null,w=(e,t)=>{let s=(1<<t)-1;return(e&s)/s},A=(e,t)=>{t.x=w(e>>>21,11),t.y=w(e>>>11,10),t.z=w(e,11)},v=(e,t)=>{t[0]=255*w(e>>>24,8),t[1]=255*w(e>>>16,8),t[2]=255*w(e>>>8,8),t[3]=255*w(e,8)},C=(e,t)=>{let s=1/(.5*Math.sqrt(2)),r=(w(e>>>20,10)-.5)*s,a=(w(e>>>10,10)-.5)*s,i=(w(e,10)-.5)*s,n=Math.sqrt(1-(r*r+a*a+i*i));switch(e>>>30){case 0:t.set(n,r,a,i);break;case 1:t.set(r,n,a,i);break;case 2:t.set(r,a,n,i);break;case 3:t.set(r,a,i,n)}};(t=r||(r={}))[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t[t.DOUBLE=3]="DOUBLE",t[t.UCHAR=4]="UCHAR",t[t.UNDEFINED=5]="UNDEFINED",(s=a||(a={}))[s.MIN_X=0]="MIN_X",s[s.MIN_Y=1]="MIN_Y",s[s.MIN_Z=2]="MIN_Z",s[s.MAX_X=3]="MAX_X",s[s.MAX_Y=4]="MAX_Y",s[s.MAX_Z=5]="MAX_Z",s[s.MIN_SCALE_X=6]="MIN_SCALE_X",s[s.MIN_SCALE_Y=7]="MIN_SCALE_Y",s[s.MIN_SCALE_Z=8]="MIN_SCALE_Z",s[s.MAX_SCALE_X=9]="MAX_SCALE_X",s[s.MAX_SCALE_Y=10]="MAX_SCALE_Y",s[s.MAX_SCALE_Z=11]="MAX_SCALE_Z",s[s.PACKED_POSITION=12]="PACKED_POSITION",s[s.PACKED_ROTATION=13]="PACKED_ROTATION",s[s.PACKED_SCALE=14]="PACKED_SCALE",s[s.PACKED_COLOR=15]="PACKED_COLOR",s[s.X=16]="X",s[s.Y=17]="Y",s[s.Z=18]="Z",s[s.SCALE_0=19]="SCALE_0",s[s.SCALE_1=20]="SCALE_1",s[s.SCALE_2=21]="SCALE_2",s[s.DIFFUSE_RED=22]="DIFFUSE_RED",s[s.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",s[s.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",s[s.OPACITY=25]="OPACITY",s[s.F_DC_0=26]="F_DC_0",s[s.F_DC_1=27]="F_DC_1",s[s.F_DC_2=28]="F_DC_2",s[s.F_DC_3=29]="F_DC_3",s[s.ROT_0=30]="ROT_0",s[s.ROT_1=31]="ROT_1",s[s.ROT_2=32]="ROT_2",s[s.ROT_3=33]="ROT_3",s[s.MIN_COLOR_R=34]="MIN_COLOR_R",s[s.MIN_COLOR_G=35]="MIN_COLOR_G",s[s.MIN_COLOR_B=36]="MIN_COLOR_B",s[s.MAX_COLOR_R=37]="MAX_COLOR_R",s[s.MAX_COLOR_G=38]="MAX_COLOR_G",s[s.MAX_COLOR_B=39]="MAX_COLOR_B",s[s.SH_0=40]="SH_0",s[s.SH_1=41]="SH_1",s[s.SH_2=42]="SH_2",s[s.SH_3=43]="SH_3",s[s.SH_4=44]="SH_4",s[s.SH_5=45]="SH_5",s[s.SH_6=46]="SH_6",s[s.SH_7=47]="SH_7",s[s.SH_8=48]="SH_8",s[s.SH_9=49]="SH_9",s[s.SH_10=50]="SH_10",s[s.SH_11=51]="SH_11",s[s.SH_12=52]="SH_12",s[s.SH_13=53]="SH_13",s[s.SH_14=54]="SH_14",s[s.SH_15=55]="SH_15",s[s.SH_16=56]="SH_16",s[s.SH_17=57]="SH_17",s[s.SH_18=58]="SH_18",s[s.SH_19=59]="SH_19",s[s.SH_20=60]="SH_20",s[s.SH_21=61]="SH_21",s[s.SH_22=62]="SH_22",s[s.SH_23=63]="SH_23",s[s.SH_24=64]="SH_24",s[s.SH_25=65]="SH_25",s[s.SH_26=66]="SH_26",s[s.SH_27=67]="SH_27",s[s.SH_28=68]="SH_28",s[s.SH_29=69]="SH_29",s[s.SH_30=70]="SH_30",s[s.SH_31=71]="SH_31",s[s.SH_32=72]="SH_32",s[s.SH_33=73]="SH_33",s[s.SH_34=74]="SH_34",s[s.SH_35=75]="SH_35",s[s.SH_36=76]="SH_36",s[s.SH_37=77]="SH_37",s[s.SH_38=78]="SH_38",s[s.SH_39=79]="SH_39",s[s.SH_40=80]="SH_40",s[s.SH_41=81]="SH_41",s[s.SH_42=82]="SH_42",s[s.SH_43=83]="SH_43",s[s.SH_44=84]="SH_44",s[s.SH_45=85]="SH_45",s[s.SH_46=86]="SH_46",s[s.SH_47=87]="SH_47",s[s.SH_48=88]="SH_48",s[s.SH_49=89]="SH_49",s[s.SH_50=90]="SH_50",s[s.SH_51=91]="SH_51",s[s.SH_52=92]="SH_52",s[s.SH_53=93]="SH_53",s[s.SH_54=94]="SH_54",s[s.SH_55=95]="SH_55",s[s.SH_56=96]="SH_56",s[s.SH_57=97]="SH_57",s[s.SH_58=98]="SH_58",s[s.SH_59=99]="SH_59",s[s.SH_60=100]="SH_60",s[s.SH_61=101]="SH_61",s[s.SH_62=102]="SH_62",s[s.SH_63=103]="SH_63",s[s.SH_64=104]="SH_64",s[s.SH_65=105]="SH_65",s[s.SH_66=106]="SH_66",s[s.SH_67=107]="SH_67",s[s.SH_68=108]="SH_68",s[s.SH_69=109]="SH_69",s[s.SH_70=110]="SH_70",s[s.SH_71=111]="SH_71",s[s.UNDEFINED=112]="UNDEFINED";class P extends l.Mesh{static _GetSplatDataBytes(e){return ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}static _GetSplatDataFloats(e){let t=P._GetSplatDataBytes(e),s=Float32Array.BYTES_PER_ELEMENT;if(t.byteLength%s!=0)throw Error(`Gaussian splat data byte length (${t.byteLength}) is not divisible by ${s} and cannot be reinterpreted as Float32 data.`);if(t.byteOffset%s!=0){let e=new Uint8Array(t.byteLength);return e.set(t),new Float32Array(e.buffer,0,t.byteLength/s)}return new Float32Array(t.buffer,t.byteOffset,t.byteLength/s)}static _BuildSplatRangeData(e,t){if(null===e)return{ranges:null,count:t,key:""};let s=[],r=0,a="";for(let i of e){let e=Math.max(0,Math.floor(i.offset)),n=Math.max(0,Math.min(t,e+Math.max(0,Math.floor(i.count)))-e);0!==n&&(s.push(e,n),r+=n,a+=`${e}:${n};`)}return{ranges:new Uint32Array(s),count:r,key:a}}get disableDepthSort(){return this._disableDepthSort}set disableDepthSort(e){!this._disableDepthSort&&e?(this._worker?.terminate(),this._worker=null,this._disableDepthSort=!0):this._disableDepthSort&&!e&&(this._disableDepthSort=!1,this._sortIsDirty=!0,this._instantiateWorker())}get viewDirectionFactor(){return i.Vector3.OneReadOnly}get shDegree(){return this._shDegree}set shDegree(e){let t=Math.max(0,Math.min(Math.round(e),this._maxShDegree));this._shDegree!==t&&(this._shDegree=t,this.material?.resetDrawCache())}get maxShDegree(){return this._maxShDegree}get splatCount(){return this._splatIndex?.length}get renderedSplatCount(){return this._activeSplatRanges?this._activeSplatRenderCount:this._vertexCount}setSplatIndexRanges(e){this._setSplatIndexRanges(e)}_setSplatIndexRanges(e){let t=P._BuildSplatRangeData(e,this._vertexCount);(null===this._activeSplatRanges?null===t.ranges:null!==t.ranges&&this._activeSplatRangeKey===t.key)||(this._activeSplatRanges=t.ranges,this._activeSplatRangeKey=t.key,this._activeSplatRenderCount=t.count,this._activeRangeVersion++,this._postIntervalsToWorker(),this._worker?(this._ensureDepthMixSize(Math.max(this._activeSplatRenderCount+15&-16,16)),this._sortIsDirty=!0):this._updateSplatIndexBuffer(this._vertexCount),this._postToWorker(!0))}get _isDepthSortSettled(){return this._readyToDisplay&&!this._sortIsDirty&&this._canPostToWorker}_ensureDepthMixSize(e){!b&&(this._depthMix&&this._depthMix.length===e&&0!==this._depthMix.buffer.byteLength||(this._depthMix=new BigInt64Array(e)))}_postIntervalsToWorker(){if(!this._worker)return;let e=new Uint32Array(this._activeSplatRanges?this._activeSplatRanges:[0,this._vertexCount]);this._worker.postMessage({command:"intervals",intervals:e},[e.buffer])}_setExternalWorkBuffer(e,t,s,r,a,i){this._covariancesATexture=t,this._covariancesBTexture=s,this._centersTexture=e,this._colorsTexture=r,this._splatPositions=a,this._vertexCount=i,this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._readyToDisplay=!1,this._instantiateWorker(),this.setEnabled(!0)}get splatsData(){return this._keepInRam?this._splatsData:null}get shData(){return this._keepInRam?this._shData:null}get splatSizeRange(){return isFinite(this._splatSizeMin)&&isFinite(this._splatSizeMax)?{min:this._splatSizeMin,max:this._splatSizeMax}:null}get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}get rotationsATexture(){return this._rotationsATexture}get rotationsBTexture(){return this._rotationsBTexture}get rotationScaleTexture(){return this._rotationScaleTexture}get needsRotationScaleTextures(){return this._needsRotationScaleTextures}set needsRotationScaleTextures(e){this._needsRotationScaleTextures!==e&&(this._needsRotationScaleTextures=e,e&&this._covariancesATexture&&(this._splatsData?this.updateData(this._splatsData,this._shData??void 0,{flipY:!1},void 0,this._shDegree):u.Logger.Error("GaussianSplattingMeshBase: needsRotationScaleTextures was enabled after the mesh was already loaded, but the splat data is not kept in RAM. The rotation and scale matrix textures cannot be initialized. Please reload the mesh data via updateData() or construct with keepInRam=true.")))}get shTextures(){return this._shTextures}get useSog(){return this._useSog}get sogParams(){return this._sogParams}setSogTextureData(e){if(this._useSog=!0,this._sogParams?.codebookTexture?.dispose(),this._sogParams=e,this._vertexCount=e.splatCount,this._shDegree=e.shDegree??0,this._maxShDegree=this._shDegree,this._splatPositions=e.positions,this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._rotationsATexture?.dispose(),this._shTextures)for(let e of this._shTextures)e.dispose();this._centersTexture=e.meansTextureL,this._covariancesATexture=e.meansTextureU,this._covariancesBTexture=e.scalesTexture,this._rotationsATexture=e.quatsTexture,this._colorsTexture=e.sh0Texture;let t=[];e.shCentroidsTexture&&t.push(e.shCentroidsTexture),e.shLabelsTexture&&t.push(e.shLabelsTexture),this._shTextures=t.length?t:null,this._material?.resetDrawCache();let s=e.meansTextureL.getSize();this._textureSize.x=s.width,this._textureSize.y=s.height,this._updateSplatIndexBuffer(this._vertexCount),this._instantiateWorker();let r=e.positions,a=new i.Vector3(1/0,1/0,1/0),n=new i.Vector3(-1/0,-1/0,-1/0);for(let e=0;e<this._vertexCount;e++){let t=r[4*e+0],s=r[4*e+1],i=r[4*e+2];t<a.x&&(a.x=t),s<a.y&&(a.y=s),i<a.z&&(a.z=i),t>n.x&&(n.x=t),s>n.y&&(n.y=s),i>n.z&&(n.z=i)}this.getBoundingInfo().reConstruct(a,n,this.getWorldMatrix()),this.setEnabled(!0),this._sortIsDirty=!0}get kernelSize(){return this._material instanceof n.GaussianSplattingMaterial?this._material.kernelSize:0}get compensation(){return this._material instanceof n.GaussianSplattingMaterial&&this._material.compensation}get minPixelSize(){return this._material instanceof n.GaussianSplattingMaterial?this._material.minPixelSize:0}set minPixelSize(e){this._material instanceof n.GaussianSplattingMaterial&&(this._material.minPixelSize=Math.max(0,e))}set material(e){this._material=e,this._material.backFaceCulling=!1,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}static _MakeSplatGeometryForMesh(e){let t=new h.VertexData,s=[-2,-2,0,2,-2,0,2,2,0,-2,2,0],r=[0,1,2,0,2,3],a=[],i=[];for(let e=0;e<P._BatchSize;e++){for(let t=0;t<12;t++)2==t||5==t||8==t||11==t?a.push(e):a.push(s[t]);i.push(r.map(t=>t+4*e))}t.positions=a,t.indices=i.flat(),t.applyToMesh(e)}constructor(e,t=null,s=null,r=!1){super(e,s),this.safeOrbitCameraLimits=null,this._vertexCount=0,this._worker=null,this._modelViewProjectionMatrix=i.Matrix.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._sortRequestId=0,this._activeRangeVersion=0,this._hasRenderedOnce=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._rotationDataA=null,this._rotationDataB=null,this._rotationScaleData=null,this._needsRotationScaleTextures=!1,this._splatPositions=null,this._splatIndex=null,this._shTextures=null,this._splatsData=null,this._shData=null,this._textureSize=new i.Vector2(0,0),this._keepInRam=!1,this._alwaysRetainSplatsData=!1,this._flipY=!1,this._delayedTextureUpdate=null,this._useRGBACovariants=!1,this._useSog=!1,this._sogParams=null,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._splatSizeMin=1/0,this._splatSizeMax=-1/0,this._sortIsDirty=!1,this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._cachedBoundingMin=null,this._cachedBoundingMax=null,this._shDegree=0,this._maxShDegree=0,this._cameraViewInfos=new Map,this.onPartCountChangedObservable=new _.Observable,this.onPartRemovedObservable=new _.Observable,this.viewUpdateThreshold=P._DefaultViewUpdateThreshold,this._disableDepthSort=!1,this._loadingPromise=null,this._updateTextureFromData=(e,t,s,r,a)=>{this._getTextureDataUpdateEngine().updateTextureData(e.getInternalTexture(),t,0,r,s,a,0,0,!1)},this._updateTextureFromDataRect=(e,t,s,r,a,i)=>{this._getTextureDataUpdateEngine().updateTextureData(e.getInternalTexture(),t,s,r,a,i,0,0,!1)},this.subMeshes=[],new o.SubMesh(0,0,4*P._BatchSize,0,6*P._BatchSize,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,function(e){if(b)return;let t=e.customAnimationFrameRequester;if(t?._gsInterFrameYield)return t._refCount++;if(t)return;let s=0,r=0;e.customAnimationFrameRequester={_gsInterFrameYield:!0,_refCount:1,requestAnimationFrame:e=>s=setTimeout(()=>{r=requestAnimationFrame(e)},0),cancelAnimationFrame:e=>{clearTimeout(s),r>0&&cancelAnimationFrame(r),s=0,r=0}}}(this.getEngine()),this._keepInRam=r,t&&(this._loadingPromise=this.loadFileAsync(t));const a=new n.GaussianSplattingMaterial(this.name+"_material",this._scene);a.setSourceMesh(this),a.doNotSerialize=!0,this._material=a,this._scene.onCameraRemovedObservable.add(e=>{let t=e.uniqueId,s=this._cameraViewInfos.get(t);s&&(this._geometry===s.mesh.geometry&&(this._geometry=null),s.mesh.dispose(),this._cameraViewInfos.delete(t))})}getLoadingPromise(){return this._loadingPromise}getClassName(){return"GaussianSplattingMeshBase"}getTotalVertices(){return this._vertexCount}isReady(e=!1){if(!super.isReady(e,!0))return!1;if(!this._readyToDisplay)return this._postToWorker(!0),!1;if(!this._hasRenderedOnce&&!this._disableDepthSort){let e=this._scene.activeCameras?.length?this._scene.activeCameras:[this._scene.activeCamera],t=this.computeWorldMatrix(!0),s=!1;for(let r of e){if(!r)continue;let e=this._cameraViewInfos.get(r.uniqueId);if(!e||!e.splatIndexBufferSet||e.sortAppliedId!==e.sortRequestId){s=!0;continue}this._isSortStateDirty(e,t,r,!0)&&(s=!0)}if(s)return this._postToWorker(!0),!1}if(!this._geometry&&this._cameraViewInfos.size&&(this._geometry=this._cameraViewInfos.values().next().value.mesh.geometry),this.material&&this.material.shadowDepthWrapper){let e=this._scene.getEngine(),t=e.currentRenderPassId;try{for(let t of this._scene.lights){let s=t.getShadowGenerator();if(!s)continue;let r=s.getShadowMap(),a=r?.renderPassIds;if(a&&0!==a.length){for(let t=0;t<a.length;++t)for(let r of(e.currentRenderPassId=a[t],this.subMeshes))if(!s.isReady(r,!0,!1))return!1}}}finally{e.currentRenderPassId=t}}return!0}_getCameraDirection(e){let t=e.getViewMatrix(),s=e.getProjectionMatrix(),r=i.TmpVectors.Matrix[0];t.multiplyToRef(s,r);let a=this.computeWorldMatrix(!0),n=i.TmpVectors.Matrix[1];a.multiplyToRef(t,n),a.multiplyToRef(r,this._modelViewProjectionMatrix);let o=i.TmpVectors.Vector3[1];return o.set(n.m[2],n.m[6],n.m[10]),o.normalize(),o}_isSortStateDirty(e,t,s,r=!1){let a=t.m,i=e.sortWorldMatrix.m;for(let e=0;e<i.length;e++)if(!x.WithinEpsilon(i[e],a[e],this.viewUpdateThreshold))return!0;if(r)return!1;let n=s.getViewMatrix();if(!x.WithinEpsilon(e.sortCameraForward.x,n.m[2],this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraForward.y,n.m[6],this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraForward.z,n.m[10],this.viewUpdateThreshold))return!0;let o=s.globalPosition;return!x.WithinEpsilon(e.sortCameraPosition.x,o.x,this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraPosition.y,o.y,this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraPosition.z,o.z,this.viewUpdateThreshold)}_postToWorker(e=!1){let t=this._scene.getFrameId(),s=!1;this._cameraViewInfos.forEach(e=>{e.frameIdLastUpdate!==t&&(s=!0)});let r=this._scene.activeCameras?.length?this._scene.activeCameras:[this._scene.activeCamera],a=[];r.forEach(e=>{if(!e)return;let s=e.uniqueId,r=this._cameraViewInfos.get(s);if(r)a.push(r);else{let r=new l.Mesh(this.name+"_cameraMesh_"+s,this._scene);if(r.doNotSerialize=!0,r.reservedDataStore={hidden:!0},r.setEnabled(!1),r.material=this.material,r.material&&r.material instanceof n.GaussianSplattingMaterial){let e=r.material;e.getSourceMesh()||e.setSourceMesh(this)}P._MakeSplatGeometryForMesh(r);let o={camera:e,cameraDirection:new i.Vector3(0,0,0),sortWorldMatrix:i.Matrix.Identity(),sortCameraForward:new i.Vector3(0,0,0),sortCameraPosition:new i.Vector3(0,0,0),sortRequestId:0,sortAppliedId:0,mesh:r,frameIdLastUpdate:t,splatIndexBufferSet:!1};a.push(o),this._cameraViewInfos.set(s,o)}}),a.sort((e,t)=>e.splatIndexBufferSet!==t.splatIndexBufferSet?e.splatIndexBufferSet?1:-1:e.frameIdLastUpdate-t.frameIdLastUpdate);let o=!!I?.sortSplats&&!!this._splatPositions&&!!this._splatIndex,h=!this._disableDepthSort&&(this._worker||o);if((e||s)&&h&&(this._scene.activeCameras?.length||this._scene.activeCamera)&&this._canPostToWorker){let s=this.computeWorldMatrix(!0);a.forEach(r=>{let a=r.camera,i=this._getCameraDirection(a);if((e||this._isSortStateDirty(r,s,a))&&this._canPostToWorker){let e=a.getViewMatrix();r.cameraDirection.copyFrom(i),r.sortWorldMatrix.copyFrom(s),r.sortCameraForward.set(e.m[2],e.m[6],e.m[10]),r.sortCameraPosition.copyFrom(a.globalPosition),r.sortRequestId=++this._sortRequestId,r.frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker?this._worker.postMessage({command:"sort",worldMatrix:s.m,cameraForward:[e.m[2],e.m[6],e.m[10]],cameraPosition:[a.globalPosition.x,a.globalPosition.y,a.globalPosition.z],depthMix:this._depthMix,cameraId:a.uniqueId,sortRequestId:r.sortRequestId,rangeVersion:this._activeRangeVersion,useCountingSort:P.UseCountingSort,rightHanded:this._scene.useRightHandedSystem,logSortPerformance:P.LogSortPerformance},[this._depthMix.buffer]):I?.sortSplats&&(this._activeSplatRanges?this._updateSplatIndexBuffer(this._vertexCount):I.sortSplats(this._modelViewProjectionMatrix,this._splatPositions,this._splatIndex,this._scene.useRightHandedSystem),r.splatIndexBufferSet?r.mesh.thinInstanceBufferUpdated("splatIndex"):(r.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),r.splatIndexBufferSet=!0),r.sortAppliedId=r.sortRequestId,this._canPostToWorker=!0,this._readyToDisplay=!0)}})}else this._disableDepthSort&&(this._splatIndex&&(a.forEach(e=>{e.splatIndexBufferSet||(e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),e.splatIndexBufferSet=!0)}),this._readyToDisplay=!0),this._canPostToWorker=!0)}render(e,t,s){this._postToWorker(),!this._geometry&&this._cameraViewInfos.size&&(this._geometry=this._cameraViewInfos.values().next().value.mesh.geometry);let r=this._scene.activeCamera.uniqueId,a=this._cameraViewInfos.get(r);if(!a||!a.splatIndexBufferSet)return this;this.onBeforeRenderObservable&&this.onBeforeRenderObservable.notifyObservers(this);let i=a.mesh;i.getWorldMatrix().copyFrom(this.getWorldMatrix());let n=this._scene.getEngine().currentRenderPassId,o=this.getMaterialForRenderPass(n);o&&i.setMaterialForRenderPass(n,o);let l=i.render(e,t,s);return this._hasRenderedOnce=!0,o&&i.setMaterialForRenderPass(n,void 0),this.onAfterRenderObservable&&this.onAfterRenderObservable.notifyObservers(this),l}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4}return 5}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33;case"min_r":return 34;case"min_g":return 35;case"min_b":return 36;case"max_r":return 37;case"max_g":return 38;case"max_b":return 39;case"f_rest_0":return 40;case"f_rest_1":return 41;case"f_rest_2":return 42;case"f_rest_3":return 43;case"f_rest_4":return 44;case"f_rest_5":return 45;case"f_rest_6":return 46;case"f_rest_7":return 47;case"f_rest_8":return 48;case"f_rest_9":return 49;case"f_rest_10":return 50;case"f_rest_11":return 51;case"f_rest_12":return 52;case"f_rest_13":return 53;case"f_rest_14":return 54;case"f_rest_15":return 55;case"f_rest_16":return 56;case"f_rest_17":return 57;case"f_rest_18":return 58;case"f_rest_19":return 59;case"f_rest_20":return 60;case"f_rest_21":return 61;case"f_rest_22":return 62;case"f_rest_23":return 63;case"f_rest_24":return 64;case"f_rest_25":return 65;case"f_rest_26":return 66;case"f_rest_27":return 67;case"f_rest_28":return 68;case"f_rest_29":return 69;case"f_rest_30":return 70;case"f_rest_31":return 71;case"f_rest_32":return 72;case"f_rest_33":return 73;case"f_rest_34":return 74;case"f_rest_35":return 75;case"f_rest_36":return 76;case"f_rest_37":return 77;case"f_rest_38":return 78;case"f_rest_39":return 79;case"f_rest_40":return 80;case"f_rest_41":return 81;case"f_rest_42":return 82;case"f_rest_43":return 83;case"f_rest_44":return 84;case"f_rest_45":return 85;case"f_rest_46":return 86;case"f_rest_47":return 87;case"f_rest_48":return 88;case"f_rest_49":return 89;case"f_rest_50":return 90;case"f_rest_51":return 91;case"f_rest_52":return 92;case"f_rest_53":return 93;case"f_rest_54":return 94;case"f_rest_55":return 95;case"f_rest_56":return 96;case"f_rest_57":return 97;case"f_rest_58":return 98;case"f_rest_59":return 99;case"f_rest_60":return 100;case"f_rest_61":return 101;case"f_rest_62":return 102;case"f_rest_63":return 103;case"f_rest_64":return 104;case"f_rest_65":return 105;case"f_rest_66":return 106;case"f_rest_67":return 107;case"f_rest_68":return 108;case"f_rest_69":return 109;case"f_rest_70":return 110;case"f_rest_71":return 111}return 112}static ParseHeader(e){var t;let s,r=new Uint8Array(e),a=new TextDecoder().decode(r.slice(0,10240)),i="end_header\n",n=a.indexOf(i);if(n<0||!a)return null;let o=parseInt(/element vertex (\d+)\n/.exec(a)[1]),l=/element chunk (\d+)\n/.exec(a),h=0;l&&(h=parseInt(l[1]));let _=0,c=0,p={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};(t=s||(s={}))[t.Vertex=0]="Vertex",t[t.Chunk=1]="Chunk",t[t.SH=2]="SH",t[t.Unused=3]="Unused";let d=1,f=[],x=[],m=a.slice(0,n).split("\n"),g=0;for(let e of m)if(e.startsWith("property ")){let[,t,s]=e.split(" "),r=P._ValueNameToEnum(s);112!=r&&(r>=111?g=4:r>=84?g=Math.max(g,3):r>=63?g=Math.max(g,2):r>=48&&(g=Math.max(g,1)));let a=P._TypeNameToEnum(t);1==d?(x.push({value:r,type:a,offset:c}),c+=p[t]):0==d?(f.push({value:r,type:a,offset:_}),_+=p[t]):2==d&&f.push({value:r,type:a,offset:_}),p[t]||u.Logger.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){let[,t]=e.split(" ");d="chunk"==t?1:"vertex"==t?0:"sh"==t?2:3}let S=new DataView(e,n+i.length),T=new ArrayBuffer(P._RowOutputLength*o),M=null,y=0;return g&&(M=new ArrayBuffer((y=3*((g+1)*(g+1)-1))*o)),{vertexCount:o,chunkCount:h,rowVertexLength:_,rowChunkLength:c,vertexProperties:f,chunkProperties:x,dataView:S,buffer:T,shDegree:g,shCoefficientCount:y,shBuffer:M}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;let s=e.dataView,r=Array(e.chunkCount);for(let a=0;a<e.chunkCount;a++){let n={min:new i.Vector3,max:new i.Vector3,minScale:new i.Vector3,maxScale:new i.Vector3,minColor:new i.Vector3(0,0,0),maxColor:new i.Vector3(1,1,1)};r[a]=n;for(let r=0;r<e.chunkProperties.length;r++){let a,i=e.chunkProperties[r];if(0===i.type)switch(a=s.getFloat32(i.offset+t.value,!0),i.value){case 0:n.min.x=a;break;case 1:n.min.y=a;break;case 2:n.min.z=a;break;case 3:n.max.x=a;break;case 4:n.max.y=a;break;case 5:n.max.z=a;break;case 6:n.minScale.x=a;break;case 7:n.minScale.y=a;break;case 8:n.minScale.z=a;break;case 9:n.maxScale.x=a;break;case 10:n.maxScale.y=a;break;case 11:n.maxScale.z=a;break;case 34:n.minColor.x=a;break;case 35:n.minColor.y=a;break;case 36:n.minColor.z=a;break;case 37:n.maxColor.x=a;break;case 38:n.maxColor.y=a;break;case 39:n.maxColor.z=a}}t.value+=e.rowChunkLength}return r}static _GetSplat(e,t,s,r){let a=i.TmpVectors.Quaternion[0],n=i.TmpVectors.Vector3[0],o=P._RowOutputLength,l=e.buffer,h=e.dataView,u=new Float32Array(l,t*o,3),_=new Float32Array(l,t*o+12,3),c=new Uint8ClampedArray(l,t*o+24,4),p=new Uint8ClampedArray(l,t*o+28,4),d=null;e.shBuffer&&(d=new Uint8ClampedArray(e.shBuffer,t*e.shCoefficientCount,e.shCoefficientCount));let f=t>>8,m=255,g=0,S=0,T=0,M=[];for(let i=0;i<e.vertexProperties.length;i++){let o,l=e.vertexProperties[i];switch(l.type){case 0:o=h.getFloat32(r.value+l.offset,!0);break;case 1:o=h.getInt32(r.value+l.offset,!0);break;case 2:o=h.getUint32(r.value+l.offset,!0);break;case 3:o=h.getFloat64(r.value+l.offset,!0);break;case 4:o=h.getUint8(r.value+l.offset);break;default:continue}switch(l.value){case 12:{let e=s[f];A(o,n),u[0]=x.Lerp(e.min.x,e.max.x,n.x),u[1]=x.Lerp(e.min.y,e.max.y,n.y),u[2]=x.Lerp(e.min.z,e.max.z,n.z)}break;case 13:C(o,a),m=a.x,g=a.y,S=a.z,T=a.w;break;case 14:{let e=s[f];A(o,n),_[0]=Math.exp(x.Lerp(e.minScale.x,e.maxScale.x,n.x)),_[1]=Math.exp(x.Lerp(e.minScale.y,e.maxScale.y,n.y)),_[2]=Math.exp(x.Lerp(e.minScale.z,e.maxScale.z,n.z))}break;case 15:{let e=s[f];v(o,c),c[0]=255*x.Lerp(e.minColor.x,e.maxColor.x,c[0]/255),c[1]=255*x.Lerp(e.minColor.y,e.maxColor.y,c[1]/255),c[2]=255*x.Lerp(e.minColor.z,e.maxColor.z,c[2]/255)}break;case 16:u[0]=o;break;case 17:u[1]=o;break;case 18:u[2]=o;break;case 19:_[0]=Math.exp(o);break;case 20:_[1]=Math.exp(o);break;case 21:_[2]=Math.exp(o);break;case 22:c[0]=o;break;case 23:c[1]=o;break;case 24:c[2]=o;break;case 26:c[0]=(.5+P._SH_C0*o)*255;break;case 27:c[1]=(.5+P._SH_C0*o)*255;break;case 28:c[2]=(.5+P._SH_C0*o)*255;break;case 29:c[3]=(.5+P._SH_C0*o)*255;break;case 25:c[3]=1/(1+Math.exp(-o))*255;break;case 30:m=o;break;case 31:g=o;break;case 32:S=o;break;case 33:T=o}if(d&&l.value>=40&&l.value<=111){let s=l.value-40;if(4==l.type&&e.chunkCount){let r=h.getUint8(e.rowChunkLength*e.chunkCount+e.vertexCount*e.rowVertexLength+t*e.shCoefficientCount+s);M[s]=(8/255*r-4)*127.5+127.5}else{let e=x.Clamp(127.5*o+127.5,0,255);M[s]=e}}}if(d){let t=1==e.shDegree?3:2==e.shDegree?8:3==e.shDegree?15:24;for(let e=0;e<t;e++)d[3*e+0]=M[e],d[3*e+1]=M[e+t],d[3*e+2]=M[e+2*t]}a.set(g,S,T,m),a.normalize(),p[0]=127.5*a.w+127.5,p[1]=127.5*a.x+127.5,p[2]=127.5*a.y+127.5,p[3]=127.5*a.z+127.5,r.value+=e.rowVertexLength}static*ConvertPLYWithSHToSplat(e,t=!1){let s=P.ParseHeader(e);if(!s)return{buffer:e};let r={value:0},a=P._GetCompressedChunks(s,r);for(let e=0;e<s.vertexCount;e++)P._GetSplat(s,e,a,r),e%P._PlyConversionBatchSize==0&&t&&(yield);let i=null;if(s.shDegree&&s.shBuffer){let e=Math.ceil(s.shCoefficientCount/16),t=0,r=new Uint8Array(s.shBuffer);i=[];let a=s.vertexCount,n=g.EngineStore.LastCreatedEngine;if(n){let o=n.getCaps().maxTextureSize;i=E(e,Math.ceil(a/o)*o*16);for(let e=0;e<a;e++)for(let a=0;a<s.shCoefficientCount;a++){let s=r[t++];i[Math.floor(a/16)][a%16+16*e]=s}}}return{buffer:s.buffer,sh:i,shDegree:s.shDegree}}static*ConvertPLYToSplat(e,t=!1){let s=P.ParseHeader(e);if(!s)return e;let r={value:0},a=P._GetCompressedChunks(s,r);for(let e=0;e<s.vertexCount;e++)P._GetSplat(s,e,a,r),e%P._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return await (0,m.runCoroutineAsync)(P.ConvertPLYToSplat(e,!0),(0,m.createYieldingScheduler)())}static async ConvertPLYWithSHToSplatAsync(e){return await (0,m.runCoroutineAsync)(P.ConvertPLYWithSHToSplat(e,!0),(0,m.createYieldingScheduler)())}async loadDataAsync(e){return await this.updateDataAsync(e)}async loadFileAsync(e,t){await (0,S.ImportMeshAsync)(e,t||g.EngineStore.LastCreatedScene,{pluginOptions:{splat:{gaussianSplattingMesh:this}}})}dispose(e){var t;let s;if(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._shTextures)for(let e of this._shTextures)e.dispose();this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._sogParams?.codebookTexture?.dispose(),this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._rotationDataA=null,this._rotationDataB=null,this._rotationScaleData=null,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._shTextures=null,this._cachedBoundingMin=null,this._cachedBoundingMax=null,s=(t=this.getEngine()).customAnimationFrameRequester,s?._gsInterFrameYield&&(s._refCount--,0===s._refCount&&(t.customAnimationFrameRequester=null)),this._worker?.terminate(),this._worker=null,this.onPartCountChangedObservable.clear(),this.onPartRemovedObservable.clear(),this._cameraViewInfos.forEach(e=>{e.mesh.dispose()}),super.dispose(e,!0)}_copyTextures(e){if(this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone(),e._shTextures)for(let t of(this._shTextures=[],e._shTextures))this._shTextures?.push(t.clone());e._rotationsATexture&&(this._rotationsATexture=e._rotationsATexture.clone(),this._rotationsBTexture=e._rotationsBTexture?.clone(),this._rotationScaleTexture=e._rotationScaleTexture?.clone())}clone(e=""){let t=new P(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewProjectionMatrix=i.Matrix.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._hasRenderedOnce=!1,t._disableDepthSort=this._disableDepthSort,t._instantiateWorker();let s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=this.forcedInstanceCount,t.setEnabled(!0),t}_makeEmptySplat(e,t,s,r){let a=this._useRGBACovariants?4:2;this._splatPositions[4*e+0]=0,this._splatPositions[4*e+1]=0,this._splatPositions[4*e+2]=0,t[4*e+0]=(0,p.ToHalfFloat)(0),t[4*e+1]=(0,p.ToHalfFloat)(0),t[4*e+2]=(0,p.ToHalfFloat)(0),t[4*e+3]=(0,p.ToHalfFloat)(0),s[e*a+0]=(0,p.ToHalfFloat)(0),s[e*a+1]=(0,p.ToHalfFloat)(0),r[4*e+3]=0}_makeSplat(e,t,s,r,a,n,o,l,h,u=e){let _=i.TmpVectors.Matrix[0],c=i.TmpVectors.Matrix[1],d=i.TmpVectors.Quaternion[0],f=this._useRGBACovariants?4:2,x=t[8*u+0],m=t[8*u+1]*(h?-1:1),g=t[8*u+2];if(this._splatPositions[4*e+0]=x,this._splatPositions[4*e+1]=m,this._splatPositions[4*e+2]=g,o.minimizeInPlaceFromFloats(x,m,g),l.maximizeInPlaceFromFloats(x,m,g),d.set((s[32*u+28+1]-127.5)/127.5,(s[32*u+28+2]-127.5)/127.5,(s[32*u+28+3]-127.5)/127.5,-(s[32*u+28+0]-127.5)/127.5),d.normalize(),d.toRotationMatrix(_),i.Matrix.ScalingToRef(2*t[8*u+3+0],2*t[8*u+3+1],2*t[8*u+3+2],c),this._needsRotationScaleTextures){(!this._rotationDataA||this._rotationDataA.length<r.length)&&(this._rotationDataA=new Uint16Array(r.length),this._rotationDataB=new Uint16Array(r.length),this._rotationScaleData=new Uint16Array(r.length));let t=this._rotationDataA,s=this._rotationDataB,a=this._rotationScaleData,i=_.m,n=c.m;t[4*e+0]=(0,p.ToHalfFloat)(i[0]),t[4*e+1]=(0,p.ToHalfFloat)(i[1]),t[4*e+2]=(0,p.ToHalfFloat)(i[2]),t[4*e+3]=(0,p.ToHalfFloat)(i[4]),s[4*e+0]=(0,p.ToHalfFloat)(i[5]),s[4*e+1]=(0,p.ToHalfFloat)(i[6]),s[4*e+2]=(0,p.ToHalfFloat)(i[8]),s[4*e+3]=(0,p.ToHalfFloat)(i[9]),a[4*e+0]=(0,p.ToHalfFloat)(i[10]),a[4*e+1]=(0,p.ToHalfFloat)(n[0]),a[4*e+2]=(0,p.ToHalfFloat)(n[5]),a[4*e+3]=(0,p.ToHalfFloat)(n[10])}let S=_.multiplyToRef(c,i.TmpVectors.Matrix[0]).m,T=this._tmpCovariances;T[0]=S[0]*S[0]+S[1]*S[1]+S[2]*S[2],T[1]=S[0]*S[4]+S[1]*S[5]+S[2]*S[6],T[2]=S[0]*S[8]+S[1]*S[9]+S[2]*S[10],T[3]=S[4]*S[4]+S[5]*S[5]+S[6]*S[6],T[4]=S[4]*S[8]+S[5]*S[9]+S[6]*S[10],T[5]=S[8]*S[8]+S[9]*S[9]+S[10]*S[10];let M=-1e4;for(let e=0;e<6;e++)M=Math.max(M,Math.abs(T[e]));this._splatPositions[4*e+3]=M;let y=M;r[4*e+0]=(0,p.ToHalfFloat)(T[0]/y),r[4*e+1]=(0,p.ToHalfFloat)(T[1]/y),r[4*e+2]=(0,p.ToHalfFloat)(T[2]/y),r[4*e+3]=(0,p.ToHalfFloat)(T[3]/y),a[e*f+0]=(0,p.ToHalfFloat)(T[4]/y),a[e*f+1]=(0,p.ToHalfFloat)(T[5]/y);let D=T[0],b=T[1],I=T[2],w=T[3],A=T[4],v=T[5],C=Math.pow(Math.abs(D*(w*v-A*A)-b*(b*v-A*I)+I*(b*A-w*I)),1/6);C<this._splatSizeMin&&(this._splatSizeMin=C),C>this._splatSizeMax&&(this._splatSizeMax=C),n[4*e+0]=s[32*u+24+0],n[4*e+1]=s[32*u+24+1],n[4*e+2]=s[32*u+24+2],n[4*e+3]=s[32*u+24+3]}_onUpdateTextures(e){}_onIndexDataReceived(e,t){}_onIncrementalUpdateStart(e){}get isCompound(){return!1}_setDelayedTextureUpdate(e,t,s,r){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions,sh:r}}_updateTextures(e,t,s,r){let a=this._getTextureSize(this._vertexCount),i=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,1),n=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,0),o=(e,t,s)=>new c.RawTexture(null,e,t,s,this._scene,!1,!1,1,7),l=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,2),h=null===this._covariancesATexture,u=this._textureSize.y!=a.y;if(h||u){if(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._shTextures){for(let e of this._shTextures)e.dispose();this._shTextures=null}if(this._textureSize=a,this._covariancesATexture=l(e,a.x,a.y,5),this._covariancesBTexture=l(t,a.x,a.y,this._useRGBACovariants?5:7),this._centersTexture=i(this._splatPositions,a.x,a.y,5),this._colorsTexture=n(s,a.x,a.y,5),r){this._shTextures=[];for(let e=0;e<r.length;e++){let e=o(a.x,a.y,11);e.wrapU=0,e.wrapV=0,this._shTextures.push(e)}for(let e=0;e<r.length;e++)this._updateShTextureData(this._shTextures[e],r[e],a.x,0,a.y)}if(this._needsRotationScaleTextures){let t=this._rotationDataA??new Uint16Array(e.length),s=this._rotationDataB??new Uint16Array(e.length),r=this._rotationScaleData??new Uint16Array(e.length);this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._rotationsATexture=l(t,a.x,a.y,5),this._rotationsBTexture=l(s,a.x,a.y,5),this._rotationScaleTexture=l(r,a.x,a.y,5),this._rotationsATexture.wrapU=0,this._rotationsATexture.wrapV=0,this._rotationsBTexture.wrapU=0,this._rotationsBTexture.wrapV=0,this._rotationScaleTexture.wrapU=0,this._rotationScaleTexture.wrapV=0}if(this._onUpdateTextures(a),h)this._instantiateWorker();else{if(this._worker){let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:T,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker()}this._postToWorker(!0)}}else{this._setDelayedTextureUpdate(e,t,s,r);let i=Float32Array.from(this._splatPositions),n=this._vertexCount;if(this._worker&&(this._worker.postMessage({command:T,positions:i,vertexCount:n},[i.buffer]),this._postIntervalsToWorker()),r&&!this._shTextures){this._shTextures=[];for(let e=0;e<r.length;e++){let t=o(a.x,a.y,11);t.wrapU=0,t.wrapV=0,this._shTextures.push(t),this._updateShTextureData(t,r[e],a.x,0,a.y)}}this._needsRotationScaleTextures&&this._rotationDataA&&(this._rotationsATexture?(this._updateTextureFromData(this._rotationsATexture,this._rotationDataA,a.x,0,a.y),this._updateTextureFromData(this._rotationsBTexture,this._rotationDataB,a.x,0,a.y),this._updateTextureFromData(this._rotationScaleTexture,this._rotationScaleData,a.x,0,a.y)):(this._rotationsATexture=l(this._rotationDataA,a.x,a.y,5),this._rotationsBTexture=l(this._rotationDataB,a.x,a.y,5),this._rotationScaleTexture=l(this._rotationScaleData,a.x,a.y,5),this._rotationsATexture.wrapU=0,this._rotationsATexture.wrapV=0,this._rotationsBTexture.wrapU=0,this._rotationsBTexture.wrapV=0,this._rotationScaleTexture.wrapU=0,this._rotationScaleTexture.wrapV=0)),this._onUpdateTextures(a),this._postToWorker(!0)}}_canReuseCachedData(e,t){return!(e<=0)&&!(e>t)&&null!==this._splatPositions&&null!==this._cachedBoundingMin&&null!==this._cachedBoundingMax&&null!==this._covariancesATexture&&this._getTextureSize(t).y===this._textureSize.y}_notifyWorkerNewData(){if(this._worker){let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:T,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker()}this._sortIsDirty=!0}_postWorkerPositionsRange(e,t){if(!this._worker||!this._splatPositions||t<=0)return;let s=4*e,r=this._splatPositions.slice(s,s+4*t);this._worker.postMessage({command:"positionsUpdate",offset:s,data:r},[r.buffer]),this._sortIsDirty=!0}*_updateData(e,t,s,r,{flipY:a=!1,previousVertexCount:n=0}={},o){this._covariancesATexture||(this._readyToDisplay=!1),this._flipY=a;let l=new Uint8Array(e),h=new Float32Array(l.buffer);this._keepInRam||this._alwaysRetainSplatsData?(this._splatsData=l.buffer,this._shData=s?s.map(e=>new Uint8Array(e)):null):(this._splatsData=null,this._shData=null);let u=l.length/P._RowOutputLength;u!=this._vertexCount&&(this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._updateSplatIndexBuffer(u)),this._vertexCount=u,this._maxShDegree=s?o??0:0,this._shDegree=this._maxShDegree;let _=this._getTextureSize(u),c=_.x*_.y,p=P.ProgressiveUpdateAmount??_.y;r&&this._onIndexDataReceived(r,c);let d=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),f=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),x=this._useRGBACovariants?4:2,m=new Uint16Array(4*c),g=new Uint16Array(x*c),S=new Uint8Array(4*c),T=this._canReuseCachedData(n,u);T||(this._splatSizeMin=1/0,this._splatSizeMax=-1/0);let M=T?Math.floor(n/_.x):0,y=M*_.x,D=this._splatPositions;if(this._splatPositions=new Float32Array(4*c),T&&(this._splatPositions.set(D.subarray(0,4*n)),d.copyFrom(this._cachedBoundingMin),f.copyFrom(this._cachedBoundingMax),this._onIncrementalUpdateStart(_)),P.ProgressiveUpdateAmount){T||this._updateTextures(m,g,S,s),this.setEnabled(!0);let e=Math.ceil(_.y/p);for(let r=0;r<e;r++){let e=r*p,i=Math.min(e+p,_.y);if(i<=M)continue;let n=Math.max(e,M),o=n*_.x,c=i*_.x;for(let e=o;e<c;e++)e<u?this._makeSplat(e,h,l,m,g,S,d,f,a):this._makeEmptySplat(e,m,g,S);this._updateSubTextures(this._splatPositions,m,g,S,n,i-n,s),this.getBoundingInfo().reConstruct(d,f,this.getWorldMatrix()),t&&(yield)}this._notifyWorkerNewData()}else{for(let e=y;e<u;e++)this._makeSplat(e,h,l,m,g,S,d,f,a),t&&e%P._SplatBatchSize==0&&(yield);let e=T?c:u+15&-16;for(let t=u;t<e;t++)this._makeEmptySplat(t,m,g,S);T?(this._updateSubTextures(this._splatPositions,m,g,S,M,_.y-M,s),this.getBoundingInfo().reConstruct(d,f,this.getWorldMatrix()),this.setEnabled(!0),this._notifyWorkerNewData()):(this._updateTextures(m,g,S,s),this.getBoundingInfo().reConstruct(d,f,this.getWorldMatrix()),this.setEnabled(!0),this._sortIsDirty=!0)}this._cachedBoundingMin=d.clone(),this._cachedBoundingMax=f.clone(),this._postToWorker(!0)}async updateDataAsync(e,t,s,r){return await (0,m.runCoroutineAsync)(this._updateData(e,!0,t,s,void 0,r),(0,m.createYieldingScheduler)())}updateData(e,t,s={flipY:!0},r,a){(0,m.runCoroutineSync)(this._updateData(e,!1,t,r,s,a))}refreshBoundingInfo(){return this.thinInstanceRefreshBoundingInfo(!1),this}_updateSplatIndexBuffer(e){let t=Math.max((this._activeSplatRanges?this._activeSplatRenderCount:e)+15&-16,16),s=this._splatIndex;s&&t===s.length||(this._splatIndex=new Float32Array(t),this._cameraViewInfos.forEach(e=>{e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1)}));let r=this._splatIndex;if(this._activeSplatRanges){let e=0;for(let t=0;t<this._activeSplatRanges.length;t+=2){let s=this._activeSplatRanges[t],a=this._activeSplatRanges[t+1];for(let t=s;t<s+a;t++)r[e++]=t}for(;e<t;e++)r[e]=0}else for(let e=0;e<t;e++)r[e]=e;this._depthMix&&t===this._depthMix.length||b||(this._depthMix=new BigInt64Array(t)),this.forcedInstanceCount=Math.max(t>>4,1)}_getTextureDataUpdateEngine(){return this.getEngine()}_updateShTextureData(e,t,s,r,a){let i=this._getTextureDataUpdateEngine();if(!i._gl&&!i.isWebGPU){let r,a=e.getInternalTexture(),n=s*a.height*16;if(t.byteLength===n&&t.byteOffset%Uint32Array.BYTES_PER_ELEMENT==0)r=new Uint32Array(t.buffer,t.byteOffset,t.byteLength/Uint32Array.BYTES_PER_ELEMENT);else{let e=new Uint8Array(n);e.set(t.subarray(0,Math.min(t.byteLength,n))),r=new Uint32Array(e.buffer)}i.updateRawTexture(a,r,a.format,a.invertY,null,a.type,a._useSRGBBuffer);return}let n=r*s,o=Math.floor(t.byteLength/16);if(n>=o)return;let l=Math.min(a*s,o-n);if(l<=0)return;let h=(e,s)=>new Uint32Array(t.buffer,t.byteOffset+e,4*s),u=Math.floor(l/s);if(u>0){let t=u*s;this._updateTextureFromData(e,h(16*n,t),s,r,u),l-=t}l>0&&this._updateTextureFromDataRect(e,h((n+u*s)*16,l),0,r+u,l,1)}_updateSubTextures(e,t,s,r,a,i,n){let o=this._getTextureSize(this._vertexCount),l=this._useRGBACovariants?4:2,h=a*o.x,u=i*o.x,_=new Uint16Array(t.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),c=new Uint16Array(s.buffer,h*l*Uint16Array.BYTES_PER_ELEMENT,u*l),p=new Uint8Array(r.buffer,4*h,4*u),d=new Float32Array(e.buffer,4*h*Float32Array.BYTES_PER_ELEMENT,4*u);if(this._updateTextureFromData(this._covariancesATexture,_,o.x,a,i),this._updateTextureFromData(this._covariancesBTexture,c,o.x,a,i),this._updateTextureFromData(this._centersTexture,d,o.x,a,i),this._updateTextureFromData(this._colorsTexture,p,o.x,a,i),this._rotationsATexture&&this._rotationDataA){let e=new Uint16Array(this._rotationDataA.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),t=new Uint16Array(this._rotationDataB.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),s=new Uint16Array(this._rotationScaleData.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u);this._updateTextureFromData(this._rotationsATexture,e,o.x,a,i),this._updateTextureFromData(this._rotationsBTexture,t,o.x,a,i),this._updateTextureFromData(this._rotationScaleTexture,s,o.x,a,i)}if(n)for(let e=0;e<n.length;e++)this._updateShTextureData(this._shTextures[e],n[e],o.x,a,i)}_instantiateWorker(){if(!this._vertexCount||(this._updateSplatIndexBuffer(this._vertexCount),this._disableDepthSort||b))return;this._worker?.terminate(),this._canPostToWorker=!0,this._worker=new Worker(URL.createObjectURL(new Blob(["(",D.toString(),")(self)"],{type:"application/javascript"})));let e=Float32Array.from(this._splatPositions);this._worker.postMessage({command:T,positions:e},[e.buffer]),this._postIntervalsToWorker(),this._onWorkerCreated(this._worker),this._worker.onerror=()=>{this._canPostToWorker=!0},this._worker.onmessage=e=>{let t=Math.max(this.renderedSplatCount+15&-16,16);if(e.data.depthMix.length!=t||e.data.rangeVersion!==this._activeRangeVersion){this._depthMix.buffer.byteLength>0&&(this._canPostToWorker=!0,this._postToWorker(!0),this._sortIsDirty=!1);return}this._depthMix=e.data.depthMix;let s=e.data.cameraId,r=e.data.sortRequestId;this._splatIndex&&this._splatIndex.length===t||(this._splatIndex=new Float32Array(t),this._cameraViewInfos.forEach(e=>{e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),e.splatIndexBufferSet=!0}));let a=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<t;e++)this._splatIndex[e]=a[2*e];if(this.forcedInstanceCount=Math.max(t>>4,1),this._delayedTextureUpdate){let e=this._vertexCount+15&-16,t=this._getTextureSize(e);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,t.y,this._delayedTextureUpdate.sh),this._delayedTextureUpdate=null}let i=this._cameraViewInfos.get(s);i&&(i.splatIndexBufferSet?i.mesh.thinInstanceBufferUpdated("splatIndex"):(i.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),i.splatIndexBufferSet=!0),i.sortAppliedId=r),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){let t=this._scene.getEngine(),s=t.getCaps().maxTextureSize,r=1;if(1!==t.version||t.isWebGPU)r=Math.ceil(e/s);else for(;s*r<e;)r*=2;return r>s&&(u.Logger.Error("GaussianSplatting texture size: ("+s+", "+r+"), maxTextureSize: "+s),r=s),new i.Vector2(s,r)}_onWorkerCreated(e){}bindExtraEffectUniforms(e){}_appendSourceToArrays(e,t,s,r,a,i,n,o){let l=e._vertexCount,h=e._splatsData;if(!h||0===l)return;let u=P._GetSplatDataBytes(h),_=P._GetSplatDataFloats(h);for(let e=0;e<l;e++)this._makeSplat(t+e,_,u,s,r,a,n,o,!1,e);if(i&&e._shData)for(let s=0;s<i.length;s++)s<e._shData.length&&i[s].set(e._shData[s].subarray(0,16*l),16*t)}bakeTransformIntoVertices(e){let t,s=this.splatsData;if(!s)return u.Logger.Error("Cannot bake transform into vertices if splatsData is not kept in RAM"),this;let r=e.m,a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),n=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),o=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]);if(Math.abs(a-n)>.001||Math.abs(a-o)>.001)return u.Logger.Error("Gaussian Splatting bakeTransformIntoVertices does not support non-uniform scaling"),this;let l=new Uint8Array(s),h=new Float32Array(s),_=i.TmpVectors.Vector3[0],c=i.TmpVectors.Quaternion[0],p=i.TmpVectors.Quaternion[1];for(e.decompose(_,p,_),t=0;t<this._vertexCount;t++){let s=8*t;i.Vector3.TransformCoordinatesFromFloatsToRef(h[s],h[s+1],h[s+2],e,_),h[s]=_.x,h[s+1]=_.y,h[s+2]=_.z,h[s+3]*=a,h[s+4]*=a,h[s+5]*=a,c.set((l[32*t+28+1]-127.5)/127.5,(l[32*t+28+2]-127.5)/127.5,(l[32*t+28+3]-127.5)/127.5,(l[32*t+28+0]-127.5)/127.5),c.normalize(),this.scaling.x<0&&(c.x=-c.x,c.w=-c.w),this.scaling.y<0&&(c.y=-c.y,c.w=-c.w),this.scaling.z<0&&(c.z=-c.z,c.w=-c.w),p.multiplyToRef(c,c),c.normalize(),l[32*t+28+0]=Math.round(127.5*c.w+127.5),l[32*t+28+1]=Math.round(127.5*c.x+127.5),l[32*t+28+2]=Math.round(127.5*c.y+127.5),l[32*t+28+3]=Math.round(127.5*c.z+127.5)}return this.updateData(s,this.shData??void 0,{flipY:!1}),this}}function E(e,t){let s=[];for(let r=0;r<e;r++){let e=new Uint8Array(t);e.fill(128),s.push(e)}return s}P.UseCountingSort=!0,P.LogSortPerformance=!1,P._RowOutputLength=32,P._SH_C0=.28209479177387814,P._SplatBatchSize=327680,P._PlyConversionBatchSize=32768,P._BatchSize=16,P._DefaultViewUpdateThreshold=1e-4,P.ProgressiveUpdateAmount=0,e.s(["AllocateShBuffers",0,E,"GaussianSplattingMeshBase",0,P],31169);var R=e.i(1229),B=l,k=e.i(90025),F=e.i(92247);class U extends B.Mesh{get partIndex(){return this._partIndex}get proxiedMesh(){return this.compoundSplatMesh}constructor(e,t,s,r,a,i,n,o=n){super(e,t),this._partIndex=r,this._vertexCount=i,this._splatsDataOffset=n,this._shDataOffset=o,this._minimum=a.minimum.clone(),this._maximum=a.maximum.clone(),this.compoundSplatMesh=s,this._applyBoundingInfo(),this.compoundSplatMesh.setWorldMatrixForPart(this.partIndex,this.getWorldMatrix()),this.onAfterWorldMatrixUpdateObservable.add(()=>{this.compoundSplatMesh.setWorldMatrixForPart(this.partIndex,this.getWorldMatrix())})}updateBoundingInfoFromPartData(){this._applyBoundingInfo()}updateBoundingInfoFromProxiedMesh(){this.updateBoundingInfoFromPartData()}_applyBoundingInfo(){this.setBoundingInfo(new k.BoundingInfo(this._minimum.clone(),this._maximum.clone()))}getClassName(){return"GaussianSplattingPartProxyMesh"}updatePartIndex(e){this._partIndex=e}updatePartMetadata(e,t,s=t){this._vertexCount=e,this._splatsDataOffset=t,this._shDataOffset=s}get isVisible(){return this.compoundSplatMesh.getPartVisibility(this.partIndex)>0}set isVisible(e){this.compoundSplatMesh.setPartVisibility(this.partIndex,+!!e)}get visibility(){return this.compoundSplatMesh.getPartVisibility(this.partIndex)}set visibility(e){this.compoundSplatMesh.setPartVisibility(this.partIndex,e)}intersects(e){let t=new F.PickingInfo,s=this.getBoundingInfo();return s&&e.intersectsSphere(s.boundingSphere)&&e.intersectsBox(s.boundingBox)&&(t.hit=!0,t.pickedMesh=this,t.distance=i.Vector3.Distance(e.origin,s.boundingSphere.center),t.subMeshId=0),t}serialize(e={}){(e=super.serialize(e)).subMeshes=[],e.geometryUniqueId=void 0,e.geometryId=void 0,e.materialUniqueId=void 0,e.materialId=void 0,e.instances=[],e.actions=void 0,e.type=this.getClassName(),e.compoundSplatMeshId=this.compoundSplatMesh.id,e.partIndex=this._partIndex,e.vertexCount=this._vertexCount,e.splatsDataOffset=this._splatsDataOffset,e.shDataOffset=this._shDataOffset;let t=this.getBoundingInfo();return e.boundingInfo={minimum:t.minimum.asArray(),maximum:t.maximum.asArray()},e}static Parse(e,t){let s=e.partIndex,r=e.compoundSplatMesh??t.getLastMeshById(e.compoundSplatMeshId);if(!r)throw Error(`GaussianSplattingPartProxyMesh: compound mesh not found with ID ${e.compoundSplatMeshId}`);let a=i.Vector3.FromArray(e.boundingInfo.minimum),n=i.Vector3.FromArray(e.boundingInfo.maximum),o=new k.BoundingInfo(a,n),l=e.vertexCount??0,h=e.splatsDataOffset??0,u=e.shDataOffset??h;return new U(e.name,t,r,s,o,l,h,u)}}class H extends P{get partIndicesTexture(){return this._partIndicesTexture}constructor(e,t=null,s=null,r=!1,a=!1){super(e,t,s,r),this._partProxies=[],this._part0LocalMin=null,this._part0LocalMax=null,this._partMatrices=[],this._rebuilding=!1,this._partVisibility=[],this._partIndicesTexture=null,this._partIndices=null,this._alwaysRetainSplatsData=!0,this._needsRotationScaleTextures=a}getClassName(){return"GaussianSplattingMesh"}isReady(e=!1){for(let e of this._partProxies)e&&e.computeWorldMatrix(!0);return super.isReady(e)}_updateBoundingInfoFromProxies(){let e=this.getWorldMatrix(),t=i.Matrix.Invert(e),s=this._part0LocalMin?this._part0LocalMin.clone():new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=this._part0LocalMax?this._part0LocalMax.clone():new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=new i.Vector3;for(let e of this._partProxies){if(!e)continue;e.computeWorldMatrix(!1);let n=e.getBoundingInfo().boundingBox,o=n.minimumWorld,l=n.maximumWorld;for(let e=0;e<8;e++)a.set(1&e?l.x:o.x,2&e?l.y:o.y,4&e?l.z:o.z),i.Vector3.TransformCoordinatesToRef(a,t,a),s.minimizeInPlace(a),r.maximizeInPlace(a)}s.x<=r.x&&(this._boundingInfo?this._boundingInfo.reConstruct(s,r,e):this._boundingInfo=new k.BoundingInfo(s,r,e),this._cachedBoundingMin=s.clone(),this._cachedBoundingMax=r.clone())}_updateBoundingInfo(){return this.isCompound?(this._updateBoundingInfoFromProxies(),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this):super._updateBoundingInfo()}getHierarchyBoundingVectors(e=!0,t=null){if(!this.isCompound)return super.getHierarchyBoundingVectors(e,t);let s=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(this._part0LocalMin&&(this._partVisibility[0]??1)>0){let e=this.getWorldMatrix(),t=this._part0LocalMin,a=this._part0LocalMax,n=new i.Vector3;for(let o=0;o<8;o++)n.set(1&o?a.x:t.x,2&o?a.y:t.y,4&o?a.z:t.z),i.Vector3.TransformCoordinatesToRef(n,e,n),s.minimizeInPlace(n),r.maximizeInPlace(n)}for(let e=0;e<this._partProxies.length;e++){let t=this._partProxies[e];if(!t||(this._partVisibility[e]??1)===0)continue;t.computeWorldMatrix(!1);let a=t.getBoundingInfo().boundingBox;s.minimizeInPlace(a.minimumWorld),r.maximizeInPlace(a.maximumWorld)}return{min:s,max:r}}dispose(e){for(let e of this._partProxies)e.dispose();this._partIndicesTexture?.dispose(),this._partProxies=[],this._partMatrices=[],this._partVisibility=[],this._partIndicesTexture=null,this._part0LocalMin=null,this._part0LocalMax=null,super.dispose(e)}_onWorkerCreated(e){e.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),e.postMessage({command:y,partIndices:this._partIndices?new Uint8Array(this._partIndices):null})}_onIndexDataReceived(e,t){this._partIndices=new Uint8Array(t),this._partIndices.set(e)}get isCompound(){return this._partMatrices.length>0}_instantiateWorker(){this._rebuilding&&this._worker?this._updateSplatIndexBuffer(this._vertexCount):super._instantiateWorker()}_onIncrementalUpdateStart(e){this._ensurePartIndicesTexture(e,this._partIndices??void 0)}_notifyWorkerNewData(){super._notifyWorkerNewData(),this._worker&&this._worker.postMessage({command:y,partIndices:this._partIndices??null})}bindExtraEffectUniforms(e){if(!this._partIndicesTexture)return;e.setTexture("partIndicesTexture",this._partIndicesTexture);let t=new Float32Array(16*this.partCount);for(let e=0;e<this.partCount;e++)this._partMatrices[e].toArray(t,16*e);e.setMatrices("partWorld",t);let s=[];for(let e=0;e<this.partCount;e++)s.push(this._partVisibility[e]??1);e.setArray("partVisibility",s)}get partCount(){return this._partMatrices.length}get partVisibility(){return this._partVisibility}setWorldMatrixForPart(e,t){if(this._partMatrices.length<=e){this.computeWorldMatrix(!0);let t=this.getWorldMatrix();for(;this._partMatrices.length<=e;)this._partMatrices.push(t.clone()),this._partVisibility.push(1)}!this._partMatrices[e].equals(t)&&(this._partMatrices[e].copyFrom(t),this._rebuilding||(this._worker&&this._worker.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._postToWorker(!0)))}getWorldMatrixForPart(e){return this._partMatrices[e]??this.getWorldMatrix()}getPartVisibility(e){return this._partVisibility[e]??1}setPartVisibility(e,t){this._partVisibility[e]=Math.max(0,Math.min(1,t))}_copyTextures(e){super._copyTextures(e),this._partIndicesTexture=e._partIndicesTexture?.clone()}_onUpdateTextures(e){let t=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,0);if(this._partIndices){let s=new Uint8Array(this._partIndices);if(this._partIndicesTexture){let r=this._partIndicesTexture.getSize();r.width!==e.x||r.height!==e.y?(this._partIndicesTexture.dispose(),this._partIndicesTexture=t(s,e.x,e.y,6),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0):this._updateTextureFromData(this._partIndicesTexture,s,e.x,0,e.y)}else this._partIndicesTexture=t(s,e.x,e.y,6),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0}}_updateSubTextures(e,t,s,r,a,i,n,o){if(super._updateSubTextures(e,t,s,r,a,i,n),o&&this._partIndicesTexture){let e=this._getTextureSize(this._vertexCount),t=a*e.x,s=i*e.x,r=new Uint8Array(o.buffer,t,s);this._updateTextureFromData(this._partIndicesTexture,r,e.x,a,i),this._worker&&this._worker.postMessage({command:y,partIndices:o})}}_ensurePartIndicesTexture(e,t){if(!t||this._partIndicesTexture)return;let s=new Uint8Array(this._partIndices);this._partIndicesTexture=new c.RawTexture(s,e.x,e.y,6,this._scene,!1,!1,2,0),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0,this._worker&&this._worker.postMessage({command:y,partIndices:t??null})}_appendPartSourceToArrays(e,t,s,r,a,i,n,o){this._appendSourceToArrays(e,t,s,r,a,i,n,o)}_createRetainedPartSource(e){if(!this._splatsData||this._shDegree>0&&!this._shData)return null;let t=32*e._splatsDataOffset,s=32*e._vertexCount,r=16*e._shDataOffset,a=16*e._vertexCount,i=P._GetSplatDataBytes(this._splatsData);return{name:e.name,_vertexCount:e._vertexCount,_splatsData:i.subarray(t,t+s),_shData:this._shData?.map(e=>e.subarray(r,r+a))??null,_shDegree:this._shData?this._shDegree:0,isCompound:!1,getWorldMatrix:()=>e.getWorldMatrix(),getBoundingInfo:()=>e.getBoundingInfo(),dispose:()=>{}}}_retainMergedPartData(e,t,s,r){if(!this._keepInRam&&!this._alwaysRetainSplatsData){this._splatsData=null,this._shData=null;return}let a=new Uint8Array(32*t),i=0;for(let t of(this._splatsData&&e>0&&(a.set(P._GetSplatDataBytes(this._splatsData).subarray(0,32*e),i),i+=32*e),s)){if(!t._splatsData)continue;let e=32*t._vertexCount;a.set(P._GetSplatDataBytes(t._splatsData).subarray(0,e),i),i+=e}if(this._splatsData=a.buffer,r<=0){this._shData=null;return}let n=E(Math.ceil(((r+1)*(r+1)-1)*3/16),16*t),o=0;if(this._shData&&e>0){let t=16*e;for(let e=0;e<n.length;e++)e<this._shData.length&&n[e].set(this._shData[e].subarray(0,t),o);o+=t}for(let e of s){let t=16*e._vertexCount;if(e._shData)for(let s=0;s<n.length;s++)s<e._shData.length&&n[s].set(e._shData[s].subarray(0,t),o);o+=t}this._shData=n}_addPartsInternal(e,t){let s;if(0===e.length)return{proxyMeshes:[],assignedPartIndices:[]};for(let t of e){if(!t._splatsData)throw Error("To call addPart()/addParts(), each source mesh must be fully loaded");if(t.isCompound)throw Error("To call addPart()/addParts(), each source mesh must not be a compound")}let r=this._vertexCount,a=r+e.reduce((e,t)=>e+t._vertexCount,0),o=this._getTextureSize(a),l=o.x*o.y,h=this._useRGBACovariants?4:2,u=new Uint16Array(4*l),_=new Uint16Array(h*l),p=new Uint8Array(4*l),d=this._shDegree>0||e.some(e=>null!==e._shData),f=d?Math.max(this._shDegree,...e.map(e=>e._shDegree)):0;d&&f>0&&(s=E(Math.ceil(((f+1)*(f+1)-1)*3/16),16*l));let x=this._canReuseCachedData(r,a),m=x?Math.floor(r/o.x):0,g=x?this._cachedBoundingMin.clone():new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),S=x?this._cachedBoundingMax.clone():new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),T=this._splatPositions;this._splatPositions=new Float32Array(4*l),x&&T&&this._splatPositions.set(T.subarray(0,4*r));let y=this.partCount,D=this._partIndices;D||(D=new Uint8Array(r),y=+(r>0)),this._partIndices=new Uint8Array(l),this._partIndices.set(D.subarray(0,r));let b=[],I=[],w=r,A=(0,n.GetGaussianSplattingMaxPartCount)(this._scene.getEngine());for(let t of e){if(y>=A)throw Error(`Cannot add part, as the maximum part count (${A}) has been reached`);let e=y++;b.push(e),I.push(w),this._partIndices.fill(e,w,w+t._vertexCount),w+=t._vertexCount}if(!x&&r>0){if(this._partProxies.length>0){let e=0;if(!this._partProxies[0]&&this._splatsData){let t=r-this._partProxies.reduce((e,t)=>e+(t?t._vertexCount:0),0);if(t>0){let r=P._GetSplatDataBytes(this._splatsData),a=P._GetSplatDataFloats(this._splatsData);for(let e=0;e<t;e++)this._makeSplat(e,a,r,u,_,p,g,S,!1);if(s&&this._shData)for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(0,16*t),0);e+=t}}for(let t=0;t<this._partProxies.length;t++){let r=this._partProxies[t];if(!r)continue;let a=this._createRetainedPartSource(r);if(!a)throw Error(`Cannot rebuild compound part "${r.name}": the retained compound source data is not available.`);this._appendPartSourceToArrays(a,e,u,_,p,s,g,S),e+=a._vertexCount}}else if(this._splatsData){let e=P._GetSplatDataBytes(this._splatsData),t=P._GetSplatDataFloats(this._splatsData);for(let s=0;s<r;s++)this._makeSplat(s,t,e,u,_,p,g,S,!1);if(s&&this._shData)for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(0,16*r),0)}}if(x){let e=m*o.x;if(e<r)if(0===this._partProxies.length){if(this._splatsData){let t=P._GetSplatDataBytes(this._splatsData),s=P._GetSplatDataFloats(this._splatsData);for(let a=e;a<r;a++)this._makeSplat(a,s,t,u,_,p,g,S,!1,a)}}else{let t=r-this._partProxies.reduce((e,t)=>e+(t?t._vertexCount:0),0),s=Array(this._partProxies.length).fill(null),a=Array(this._partProxies.length).fill(null),i=Array(this._partProxies.length).fill(0);!this._partProxies[0]&&this._splatsData&&t>0&&(s[0]=P._GetSplatDataBytes(this._splatsData),a[0]=P._GetSplatDataFloats(this._splatsData),i[0]=0);let n=t;for(let e=0;e<this._partProxies.length;e++){let t=this._partProxies[e];if(!t)continue;let r=this._createRetainedPartSource(t);if(!r||!r._splatsData)throw Error(`Cannot rebuild compound part "${t.name}": the retained compound source data is not available.`);s[e]=P._GetSplatDataBytes(r._splatsData),a[e]=P._GetSplatDataFloats(r._splatsData),i[e]=n,n+=r._vertexCount}for(let t=e;t<r;t++){let e=this._partIndices?this._partIndices[t]:0,r=e<s.length?s[e]:null,n=e<a.length?a[e]:null;r&&n&&this._makeSplat(t,n,r,u,_,p,g,S,!1,t-(i[e]??0))}}}for(let t of(w=r,e))this._appendPartSourceToArrays(t,w,u,_,p,s,g,S),w+=t._vertexCount;let v=a+15&-16;for(let e=a;e<v;e++)this._makeEmptySplat(e,u,_,p);a!==this._vertexCount&&this._updateSplatIndexBuffer(a),this._retainMergedPartData(r,a,e,f),this._vertexCount=a,this._shDegree=f;let C=!this._rebuilding;C&&(this._canPostToWorker=!1,this._rebuilding=!0);try{if(x){if(s&&(!this._shTextures||s.length>this._shTextures.length))for(this._shTextures||(this._shTextures=[]);this._shTextures.length<s.length;){let e=this._shTextures.length,t=new c.RawTexture(null,o.x,o.y,11,this._scene,!1,!1,1,7);t.wrapU=0,t.wrapV=0,this._shTextures.push(t);let r=this._shData&&e<this._shData.length?this._shData[e]:s[e];this._updateShTextureData(t,r,o.x,0,o.y)}if(s&&this._shData){let e=m*o.x;if(e<r){let t=16*e,a=16*r;for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(t,a),t)}}this._onUpdateTextures(o),this._updateSubTextures(this._splatPositions,u,_,p,m,o.y-m,s)}else this._updateTextures(u,_,p,s);this.setEnabled(!0),this._notifyWorkerNewData(),this._partProxies[0]||!(r>0)||this._part0LocalMin||(this._part0LocalMin=this.getBoundingInfo().minimum.clone(),this._part0LocalMax=this.getBoundingInfo().maximum.clone());let a=[];for(let s=0;s<e.length;s++){let r=e[s],n=b[s],o=r.getWorldMatrix();this.setWorldMatrixForPart(n,o);let l=new U(r.name,this.getScene(),this,n,r.getBoundingInfo(),r._vertexCount,I[s],I[s]);t&&r.dispose();let h=new i.Quaternion;o.decompose(l.scaling,h,l.position),l.rotationQuaternion=h,l.computeWorldMatrix(!0),this._partProxies[n]=l,a.push(l)}return this._updateBoundingInfoFromProxies(),C&&(this._rebuilding=!1,this._worker&&this._worker.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._canPostToWorker=!0,this._postToWorker(!0)),this.onPartCountChangedObservable.notifyObservers(this.partCount),{proxyMeshes:a,assignedPartIndices:b}}catch(e){throw C&&(this._rebuilding=!1,this._canPostToWorker=!0),e}}addPart(e,t=!0){let{proxyMeshes:s}=this._addPartsInternal([e],t);return s[0]}removePart(e){if(e<0||e>=this.partCount)throw Error(`Part index ${e} is out of range [0, ${this.partCount})`);let t=[];for(let s=0;s<this._partProxies.length;s++){let r=this._partProxies[s];if(!r||s===e)continue;let a=this._createRetainedPartSource(r);if(!a)throw Error(`Cannot remove part: the retained compound source data is not available for part "${r.name}".`);t.push({proxyMesh:r,source:a,oldIndex:s,worldMatrix:r.getWorldMatrix().clone(),visibility:this._partVisibility[s]??1})}for(let{proxyMesh:e,source:s}of(t.sort((e,t)=>e.oldIndex-t.oldIndex),t)){if(!s._splatsData)throw Error(`Cannot remove part: the source data for part "${e.name}" is not available.`);if(s._shDegree>0&&!s._shData)throw Error(`Cannot remove part: the SH data for part "${e.name}" is not available.`)}if(this.onPartRemovedObservable.notifyObservers(e),this._worker&&(this._worker.terminate(),this._worker=null),this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._shTextures){for(let e of this._shTextures)e.dispose();this._shTextures=null}this._partIndicesTexture&&(this._partIndicesTexture.dispose(),this._partIndicesTexture=null),this._vertexCount=0,this._splatPositions=null,this._partIndices=null,this._partMatrices=[],this._partVisibility=[],this._cachedBoundingMin=null,this._cachedBoundingMax=null,this._part0LocalMin=null,this._part0LocalMax=null,this._splatsData=null,this._shData=null,this._shDegree=0;let s=this._partProxies[e];if(s&&s.dispose(),this._partProxies=[],0===t.length){this.setEnabled(!1),this.onPartCountChangedObservable.notifyObservers(0);return}this._rebuilding=!0,this._canPostToWorker=!1;try{let e=t.map(e=>e.source),{proxyMeshes:s}=this._addPartsInternal(e,!1);for(let e=0;e<t.length;e++){let r=t[e].proxyMesh,a=s[e],n=a.partIndex;this.setWorldMatrixForPart(n,t[e].worldMatrix),this.setPartVisibility(n,t[e].visibility);let o=new i.Quaternion;t[e].worldMatrix.decompose(a.scaling,o,a.position),a.rotationQuaternion=o,a.computeWorldMatrix(!0),r.updatePartIndex(n),r.updatePartMetadata(a._vertexCount,a._splatsDataOffset,a._shDataOffset),this._partProxies[n]=r,a.dispose()}this._rebuilding=!1;let r=this._worker;r?.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._canPostToWorker=!0,this._postToWorker(!0)}catch(e){throw this._rebuilding=!1,this._canPostToWorker=!0,e}}serialize(e={},t="base64"){if((e=super.serialize(e)).subMeshes=[],e.geometryUniqueId=void 0,e.geometryId=void 0,e.materialUniqueId=void 0,e.materialId=void 0,e.instances=[],e.actions=void 0,e.type=this.getClassName(),e.keepInRam=this._keepInRam,e.disableDepthSort=this._disableDepthSort,e.viewUpdateThreshold=this.viewUpdateThreshold,e._flipY=this._flipY,this._splatsData&&(e.splatsData="base64"===t?(0,R.EncodeArrayBufferToBase64)(this._splatsData):this._splatsData),this._shData&&(e.shData="base64"===t?this._shData.map(R.EncodeArrayBufferToBase64):this._shData,e.shDegree=this._shDegree),this._partIndices){let s=function(e){let t=[],s=e.length,r=0;for(;r<s;){let a=e[r],i=1;for(;r+i<s&&e[r+i]===a;)i++;t.push(i,a),r+=i}return new Uint32Array(t)}(this._partIndices.subarray(0,this._vertexCount));e.partIndices="base64"===t?(0,R.EncodeArrayBufferToBase64)(s):s}return this._partProxies.length&&(e.partProxies=this._partProxies.filter(e=>!!e).map(e=>e.serialize())),e}static _ParseInternal(e,t,s){let r,a,i=new s(e.name,null,t,e.keepInRam);i.disableDepthSort=e.disableDepthSort??!1,i.viewUpdateThreshold=e.viewUpdateThreshold??P._DefaultViewUpdateThreshold;let n=e.splatsData;"string"==typeof n&&(n=(0,R.DecodeBase64ToBinary)(n));let o=e.shData;if(Array.isArray(o)&&o.length){let e=[];for(let t=0,s=o.length;t<s;t++){let s=o[t];"string"==typeof s?e[t]=new Uint8Array((0,R.DecodeBase64ToBinary)(s)):e[t]=s}r=e}let h=e.partIndices;if("string"==typeof h&&(h=new Uint32Array((0,R.DecodeBase64ToBinary)(h))),h&&(a=function(e){let t=0,s=e.length;for(let r=0;r<s;r+=2)t+=e[r];let r=new Uint8Array(t),a=0;for(let t=0;t<s;t+=2){let s=e[t],i=e[t+1];r.fill(i,a,a+s),a+=s}return r}(h)),n){let t=e._flipY??!1;i.updateData(n,r,{flipY:t},a,e.shDegree)}if(e.partProxies)for(let s of e.partProxies){let e=Object.assign({},s);e.compoundSplatMesh=i;let r=l.Mesh.Parse(e,t,""),a=r.partIndex;i._partProxies[a]=r,i.setWorldMatrixForPart(a,r.getWorldMatrix()),i.setPartVisibility(a,r.visibility)}return i}static Parse(e,t){return H._ParseInternal(e,t,H)}}e.s(["GaussianSplattingMesh",0,H,"IsGaussianSplattingClassName",0,function(e){return"GaussianSplattingMesh"===e||"GaussianSplattingStream"===e}],51483)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95877,e=>{"use strict";var t=e.i(78992),i=e.i(79105),s=e.i(75105),n=e.i(44520);class r extends t.FlowGraphEventBlock{constructor(e){super(e),this.type="PointerUp",this.targetMesh=this.registerDataInput("targetMesh",s.RichTypeAny,e?.targetMesh),this.pointerId=this.registerDataOutput("pointerId",s.RichTypeNumber),this.pickedMesh=this.registerDataOutput("pickedMesh",s.RichTypeAny),this.pickedPoint=this.registerDataOutput("pickedPoint",s.RichTypeAny)}_executeEvent(e,t){let s=this.targetMesh.getValue(e),n=t.pickInfo?.pickedMesh;return!(!s||n===s||n&&(0,i._IsDescendantOf)(n,s))||(this.pointerId.setValue(t.event.pointerId,e),this.pickedMesh.setValue(n??null,e),this.pickedPoint.setValue(t.pickInfo?.pickedPoint??null,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerUpEventBlock"}}let p=!1;function o(){p||(p=!0,(0,n.RegisterClass)("FlowGraphPointerUpEventBlock",r))}e.s(["FlowGraphPointerUpEventBlock",0,r,"RegisterFlowGraphPointerUpEventBlock",0,o],87520),o(),e.s([],71624),e.i(71624),e.i(87520),e.s(["FlowGraphPointerUpEventBlock",0,r],95877)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40311,e=>{"use strict";var t=e.i(62478),s=e.i(75105),l=e.i(16347),o=e.i(44520);class r extends t.FlowGraphExecutionBlockWithOutSignal{constructor(e){if(super(e),this.message=this.registerDataInput("message",s.RichTypeAny),this.logType=this.registerDataInput("logType",s.RichTypeString,"log"),e?.messageTemplate)for(const t of this._getTemplateMatches(e.messageTemplate))this.registerDataInput(t,s.RichTypeAny)}_execute(e){let t=this.logType.getValue(e),s=this._getMessageValue(e);"warn"===t?l.Logger.Warn(s):"error"===t?l.Logger.Error(s):l.Logger.Log(s),this.out._activateSignal(e)}getClassName(){return"FlowGraphConsoleLogBlock"}_serializeValue(e){if(null==e)return String(e);if("object"==typeof e){let t=e.toString();if("[object Object]"===t)try{return JSON.stringify(e)}catch{}return t}return String(e)}_getMessageValue(e){if(!this.config?.messageTemplate)return this.message.getValue(e);{let t=this.config.messageTemplate,s=this._getTemplateMatches(t),l=this.message.getValue(e),o=null!=l&&"object"==typeof l?l:null;for(let l of s){let s;if(void 0!==(s=null!==o&&l in o?o[l]:this.getDataInput(l)?.getValue(e))){let e=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp(`\\{${e}\\}`,"g"),this._serializeValue(s))}}return t}}_getTemplateMatches(e){let t,s=/\{([^}]+)\}/g,l=[];for(;null!==(t=s.exec(e));)l.push(t[1]);return l}}let i=!1;function a(){i||(i=!0,(0,o.RegisterClass)("FlowGraphConsoleLogBlock",r))}e.s(["FlowGraphConsoleLogBlock",0,r,"RegisterFlowGraphConsoleLogBlock",0,a],7154),a(),e.s([],91918),e.i(91918),e.i(7154),e.s(["FlowGraphConsoleLogBlock",0,r],40311)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52624,e=>{"use strict";let t,i,s,n,a,r,o,h,l,d,_,u,c,g,f,m;var I,p=e.i(57575),b=e.i(69400),y=e.i(9855),S=e.i(3864),L=e.i(23003),M=e.i(85050),E=e.i(2060);class T{constructor(){this._doNotSerialize=!1,this._isDisposed=!1,this._sceneRootNodesIndex=-1,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._onEnabledStateChangedObservable=new S.Observable,this._onEffectiveEnabledStateChangedObservable=null,this._onClonedObservable=new S.Observable,this._inheritVisibility=!1,this._isVisible=!0}}let D=(r=[],o=[],h=[],l=[],d=[],_=[],u=[],c=[],g=[],f=[],I=class{static AddNodeConstructor(e,t){this._NodeConstructors[e]=t}static Construct(e,t,i,s){let n=this._NodeConstructors[e];return n?n(t,i,s):null}set accessibilityTag(e){this._accessibilityTag=e,this.onAccessibilityTagChangedObservable.notifyObservers(e)}get accessibilityTag(){return this._accessibilityTag}get doNotSerialize(){return!!this._nodeDataStorage._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize}set doNotSerialize(e){this._nodeDataStorage._doNotSerialize=e}isDisposed(){return this._nodeDataStorage._isDisposed}set parent(e){if(this._parentNode===e)return;let t=this._parentNode;if(this._parentNode&&void 0!==this._parentNode._children&&null!==this._parentNode._children){let t=this._parentNode._children.indexOf(this);-1!==t&&this._parentNode._children.splice(t,1),e||this._nodeDataStorage._isDisposed||this._addToSceneRootNodes()}this._parentNode=e,this._isDirty=!0,this._parentNode&&((void 0===this._parentNode._children||null===this._parentNode._children)&&(this._parentNode._children=[]),this._parentNode._children.push(this),t||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}get parent(){return this._parentNode}get inheritVisibility(){return this._nodeDataStorage._inheritVisibility}set inheritVisibility(e){this._nodeDataStorage._inheritVisibility=e}get isVisible(){return(!this.inheritVisibility||!this._parentNode||!!this._parentNode.isVisible)&&this._nodeDataStorage._isVisible}set isVisible(e){this._nodeDataStorage._isVisible=e}_serializeAsParent(e){e.parentId=this.uniqueId}_addToSceneRootNodes(){-1===this._nodeDataStorage._sceneRootNodesIndex&&(this._nodeDataStorage._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))}_removeFromSceneRootNodes(){if(-1!==this._nodeDataStorage._sceneRootNodesIndex){let e=this._scene.rootNodes,t=e.length-1;e[this._nodeDataStorage._sceneRootNodesIndex]=e[t],e[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex=this._nodeDataStorage._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._nodeDataStorage._sceneRootNodesIndex=-1}}get animationPropertiesOverride(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride}set animationPropertiesOverride(e){this._animationPropertiesOverride=e}getClassName(){return"Node"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get onEnabledStateChangedObservable(){return this._nodeDataStorage._onEnabledStateChangedObservable}get onEffectiveEnabledStateChangedObservable(){var e;return(e=this._nodeDataStorage)._onEffectiveEnabledStateChangedObservable??(e._onEffectiveEnabledStateChangedObservable=new S.Observable)}get onClonedObservable(){return this._nodeDataStorage._onClonedObservable}constructor(e,t=null,i=!0){this._isDirty=!1,this._nodeDataStorage=new T,this.name=(0,p.__runInitializers)(this,r,void 0),this.id=((0,p.__runInitializers)(this,o),(0,p.__runInitializers)(this,h,void 0)),this.uniqueId=((0,p.__runInitializers)(this,l),(0,p.__runInitializers)(this,d,void 0)),this.state=((0,p.__runInitializers)(this,_),(0,p.__runInitializers)(this,u,"")),this.metadata=((0,p.__runInitializers)(this,c),(0,p.__runInitializers)(this,g,null)),this._internalMetadata=(0,p.__runInitializers)(this,f),this.reservedDataStore=null,this._accessibilityTag=null,this.onAccessibilityTagChangedObservable=new S.Observable,this._parentContainer=null,this.animations=[],this._ranges={},this.onReady=null,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._waitingParentInstanceIndex=null,this._waitingParsedUniqueId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=b.Matrix.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new S.Observable,this._onDisposeObserver=null,this._behaviors=[],this.name=e,this.id=e,this._scene=t||L.EngineStore.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache(),i&&this._addToSceneRootNodes()}getScene(){return this._scene}getEngine(){return this._scene.getEngine()}addBehavior(e,t=!1){return -1!==this._behaviors.indexOf(e)||(e.init(),this._scene.isLoading&&!t?this._scene.onDataLoadedObservable.addOnce(()=>{this._behaviors.includes(e)&&e.attach(this)}):e.attach(this),this._behaviors.push(e)),this}removeBehavior(e){let t=this._behaviors.indexOf(e);return -1===t||(this._behaviors.splice(t,1),e.detach()),this}get behaviors(){return this._behaviors}getBehaviorByName(e){for(let t of this._behaviors)if(t.name===e)return t;return null}getWorldMatrix(){return this._currentRenderId!==this._scene.getRenderId()&&this.computeWorldMatrix(),this._worldMatrix}_getWorldMatrixDeterminant(){return this._worldMatrixDeterminantIsDirty&&(this._worldMatrixDeterminantIsDirty=!1,this._worldMatrixDeterminant=this._worldMatrix.determinant()),this._worldMatrixDeterminant}get worldMatrixFromCache(){return this._worldMatrix}_initCache(){this._cache={}}updateCache(e){!e&&this.isSynchronized()||this._updateCache()}_getActionManagerForTrigger(e,t=!0){return this.parent?this.parent._getActionManagerForTrigger(e,!1):null}_updateCache(e){}_isSynchronized(){return!0}_markSyncedWithParent(){this._parentNode&&(this._parentUpdateId=this._parentNode._childUpdateId)}isSynchronizedWithParent(){return!this._parentNode||!this._parentNode._isDirty&&this._parentUpdateId===this._parentNode._childUpdateId&&this._parentNode.isSynchronized()}isSynchronized(){return(!this._parentNode||!!this.isSynchronizedWithParent())&&this._isSynchronized()}isReady(e=!1){return this._nodeDataStorage._isReady}markAsDirty(e){return this._currentRenderId=Number.MAX_VALUE,this._isDirty=!0,this}isEnabled(e=!0){return!1===e?this._nodeDataStorage._isEnabled:!!this._nodeDataStorage._isEnabled&&this._nodeDataStorage._isParentEnabled}_hasEffectiveEnabledStateObservers(){let e=this._nodeDataStorage._onEffectiveEnabledStateChangedObservable;return!!e&&e.hasObservers()}_syncParentEnabledState(){let e=this._hasEffectiveEnabledStateObservers(),t=e?this.isEnabled():null;if(this._nodeDataStorage._isParentEnabled=!this._parentNode||this._parentNode.isEnabled(),this._children)for(let e of this._children)e._syncParentEnabledState();if(e){let e=this.isEnabled();e!==t&&this._nodeDataStorage._onEffectiveEnabledStateChangedObservable.notifyObservers(e)}}setEnabled(e){if(this._nodeDataStorage._isEnabled===e)return;let t=this._hasEffectiveEnabledStateObservers(),i=t?this.isEnabled():null;if(this._nodeDataStorage._isEnabled=e,this._syncParentEnabledState(),this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(e),t){let e=this.isEnabled();e!==i&&this._nodeDataStorage._onEffectiveEnabledStateChangedObservable.notifyObservers(e)}}isDescendantOf(e){return!!this.parent&&(this.parent===e||this.parent.isDescendantOf(e))}_getDescendants(e,t=!1,i){if(this._children)for(let s=0;s<this._children.length;s++){let n=this._children[s];(!i||i(n))&&e.push(n),t||n._getDescendants(e,!1,i)}}getDescendants(e,t){let i=[];return this._getDescendants(i,e,t),i}getChildMeshes(e,t){let i=[];return this._getDescendants(i,e,e=>(!t||t(e))&&void 0!==e.cullingStrategy),i}getChildren(e,t=!0){return this.getDescendants(t,e)}_setReady(e){if(e!==this._nodeDataStorage._isReady){if(!e){this._nodeDataStorage._isReady=!1;return}this.onReady&&this.onReady(this),this._nodeDataStorage._isReady=!0}}getAnimationByName(e){for(let t=0;t<this.animations.length;t++){let i=this.animations[t];if(i.name===e)return i}return null}createAnimationRange(e,t,i){if(!this._ranges[e]){this._ranges[e]=I._AnimationRangeFactory(e,t,i);for(let s=0,n=this.animations.length;s<n;s++)this.animations[s]&&this.animations[s].createRange(e,t,i)}}deleteAnimationRange(e,t=!0){for(let i=0,s=this.animations.length;i<s;i++)this.animations[i]&&this.animations[i].deleteRange(e,t);this._ranges[e]=null}getAnimationRange(e){return this._ranges[e]||null}clone(e,t,i){let s=E.SerializationHelper.Clone(()=>new I(e,this.getScene()),this);if(t&&(s.parent=t),!i){let t=this.getDescendants(!0);for(let i=0;i<t.length;i++){let n=t[i];n.clone(e+"."+n.name,s)}}return s}getAnimationRanges(){let e,t=[];for(e in this._ranges)t.push(this._ranges[e]);return t}beginAnimation(e,t,i,s){let n=this.getAnimationRange(e);return n?this._scene.beginAnimation(this,n.from,n.to,t,i,s):null}serializeAnimationRanges(){let e=[];for(let t in this._ranges){let i=this._ranges[t];if(!i)continue;let s={};s.name=t,s.from=i.from,s.to=i.to,e.push(s)}return e}computeWorldMatrix(e){return this._worldMatrix||(this._worldMatrix=b.Matrix.Identity()),this._worldMatrix}dispose(e,t=!1){if(this._nodeDataStorage._isDisposed=!0,!e)for(let i of this.getDescendants(!0))i.dispose(e,t);for(let e of(this.parent?this.parent=null:this._removeFromSceneRootNodes(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onEnabledStateChangedObservable.clear(),this._nodeDataStorage._onEffectiveEnabledStateChangedObservable?.clear(),this.onClonedObservable.clear(),this._behaviors))e.detach();this._behaviors.length=0,this.metadata=null}static ParseAnimationRanges(e,t,i){if(t.ranges)for(let i=0;i<t.ranges.length;i++){let s=t.ranges[i];e.createAnimationRange(s.name,s.from,s.to)}}getHierarchyBoundingVectors(e=!0,t=null){let i,s;if(this.getScene().incrementRenderId(),this.computeWorldMatrix(!0),this.getBoundingInfo&&this.subMeshes){let e=this.getBoundingInfo();i=e.boundingBox.minimumWorld.clone(),s=e.boundingBox.maximumWorld.clone()}else i=new b.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new b.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(e)for(let e of this.getDescendants(!1)){if(e.computeWorldMatrix(!0),t&&!t(e)||!e.getBoundingInfo||0===e.getTotalVertices())continue;let n=e.getBoundingInfo().boundingBox,a=n.minimumWorld,r=n.maximumWorld;b.Vector3.CheckExtends(a,i,s),b.Vector3.CheckExtends(r,i,s)}return{min:i,max:s}}},m="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,t=[(0,y.serialize)()],i=[(0,y.serialize)()],s=[(0,y.serialize)()],n=[(0,y.serialize)()],a=[(0,y.serialize)()],(0,p.__esDecorate)(null,null,t,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:m},r,o),(0,p.__esDecorate)(null,null,i,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:m},h,l),(0,p.__esDecorate)(null,null,s,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:m},d,_),(0,p.__esDecorate)(null,null,n,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,t)=>{e.state=t}},metadata:m},u,c),(0,p.__esDecorate)(null,null,a,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:m},g,f),m&&Object.defineProperty(I,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),I._AnimationRangeFactory=(e,t,i)=>{throw(0,M._WarnImport)("AnimationRange")},I._NodeConstructors={},I);e.s(["Node",0,D])},90160,e=>{"use strict";let t,i,s,n,a,r,o,h,l,d,_,u,c,g,f,m,I,p,b,y,S,L,M,E,T,D,N,O,v,C,A,P,x,z,R,w;var H,U,k=e.i(57575),G=e.i(9855),F=e.i(69400),Y=e.i(19919),W=e.i(52624),B=e.i(96333),V=e.i(44520),q=e.i(60420),j=e.i(2060);let X=(g=W.Node,f=[],m=[],I=[],p=[],b=[],y=[],S=[],L=[],M=[],E=[],T=[],D=[],N=[],O=[],v=[],C=[],A=[],P=[],x=[],z=[],R=[],H=class extends g{get range(){return this._range}set range(e){this._range=e,this._inverseSquaredRange=1/(this.range*this.range)}get intensityMode(){return this._intensityMode}set intensityMode(e){this._intensityMode=e,this._computePhotometricScale()}get radius(){return this._radius}set radius(e){this._radius=e,this._computePhotometricScale()}get renderPriority(){return(0,k.__classPrivateFieldGet)(this,U,"f")}set renderPriority(e){(0,k.__classPrivateFieldSet)(this,U,e,"f")}get shadowEnabled(){return this._shadowEnabled}set shadowEnabled(e){this._shadowEnabled!==e&&(this._shadowEnabled=e,this._markMeshesAsLightDirty())}get includedOnlyMeshes(){return this._includedOnlyMeshes}set includedOnlyMeshes(e){this._includedOnlyMeshes=e,this._hookArrayForIncludedOnly(e)}get excludedMeshes(){return this._excludedMeshes}set excludedMeshes(e){this._excludedMeshes=e,this._hookArrayForExcluded(e)}get excludeWithLayerMask(){return this._excludeWithLayerMask}set excludeWithLayerMask(e){this._excludeWithLayerMask=e,this._resyncMeshes()}get includeOnlyWithLayerMask(){return this._includeOnlyWithLayerMask}set includeOnlyWithLayerMask(e){this._includeOnlyWithLayerMask=e,this._resyncMeshes()}get lightmapMode(){return this._lightmapMode}set lightmapMode(e){this._lightmapMode!==e&&(this._lightmapMode=e,this._markMeshesAsLightDirty())}getViewMatrix(e){return null}getProjectionMatrix(e,t){return null}constructor(e,t,i){super(e,t,!1),this.diffuse=((0,k.__runInitializers)(this,f),(0,k.__runInitializers)(this,m,new Y.Color3(1,1,1))),this.specular=((0,k.__runInitializers)(this,I),(0,k.__runInitializers)(this,p,new Y.Color3(1,1,1))),this.falloffType=((0,k.__runInitializers)(this,b),(0,k.__runInitializers)(this,y,H.FALLOFF_DEFAULT)),this.intensity=((0,k.__runInitializers)(this,S),(0,k.__runInitializers)(this,L,1)),this._range=((0,k.__runInitializers)(this,M),Number.MAX_VALUE),this._inverseSquaredRange=0,this._photometricScale=1,this._intensityMode=H.INTENSITYMODE_AUTOMATIC,this._radius=1e-5,this._renderPriority=(0,k.__runInitializers)(this,E,void 0),U.set(this,((0,k.__runInitializers)(this,T),(0,k.__runInitializers)(this,D,0))),this._shadowEnabled=((0,k.__runInitializers)(this,N),(0,k.__runInitializers)(this,O,!0)),this._includedOnlyMeshes=(0,k.__runInitializers)(this,v),this._excludeWithLayerMask=(0,k.__runInitializers)(this,C,0),this._includeOnlyWithLayerMask=((0,k.__runInitializers)(this,A),(0,k.__runInitializers)(this,P,0)),this._lightmapMode=((0,k.__runInitializers)(this,x),(0,k.__runInitializers)(this,z,0)),this._shadowGenerators=((0,k.__runInitializers)(this,R),null),this._excludedMeshesIds=[],this._includedOnlyMeshesIds=[],this._currentViewDepth=0,this._clusteredContainer=null,this._isLight=!0,i||this.getScene().addLight(this),this._uniformBuffer=new B.UniformBuffer(this.getScene().getEngine(),void 0,void 0,e),this._buildUniformLayout(),this.includedOnlyMeshes=[],this.excludedMeshes=[],i||this._resyncMeshes()}transferTexturesToEffect(e,t){return this}_bindLight(e,t,i,s,n=!0){let a=e.toString(),r=!1;if(this._uniformBuffer.bindToEffect(i,"Light"+a),this._renderId!==t.getRenderId()||this._lastUseSpecular!==s||!this._uniformBuffer.useUbo){this._renderId=t.getRenderId(),this._lastUseSpecular=s;let e=this.getScaledIntensity();this.transferToEffect(i,a),this.diffuse.scaleToRef(e,Y.TmpColors.Color3[0]),this._uniformBuffer.updateColor4("vLightDiffuse",Y.TmpColors.Color3[0],this.range,a),s&&(this.specular.scaleToRef(e,Y.TmpColors.Color3[1]),this._uniformBuffer.updateColor4("vLightSpecular",Y.TmpColors.Color3[1],this.radius,a)),r=!0}if(this.transferTexturesToEffect(i,a),t.shadowsEnabled&&this.shadowEnabled&&n){let e=this.getShadowGenerator(t.activeCamera)??this.getShadowGenerator();e&&(e.bindShadowLight(a,i),r=!0)}r?this._uniformBuffer.update():this._uniformBuffer.bindUniformBuffer()}getClassName(){return"Light"}toString(e){let t="Name: "+this.name;if(t+=", type: "+["Point","Directional","Spot","Hemispheric","Clustered"][this.getTypeID()],this.animations)for(let i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t}_syncParentEnabledState(){super._syncParentEnabledState(),this.isDisposed()||this._resyncMeshes()}setEnabled(e){super.setEnabled(e),this._resyncMeshes()}getShadowGenerator(e=null){return null===this._shadowGenerators?null:this._shadowGenerators.get(e)??null}getShadowGenerators(){return this._shadowGenerators}getAbsolutePosition(){return F.Vector3.Zero()}canAffectMesh(e){return!e||(!this.includedOnlyMeshes||!(this.includedOnlyMeshes.length>0)||-1!==this.includedOnlyMeshes.indexOf(e))&&(!this.excludedMeshes||!(this.excludedMeshes.length>0)||-1===this.excludedMeshes.indexOf(e))&&(0===this.includeOnlyWithLayerMask||(this.includeOnlyWithLayerMask&e.layerMask)!=0)&&(0===this.excludeWithLayerMask||!(this.excludeWithLayerMask&e.layerMask))}dispose(e,t=!1){if(this._shadowGenerators){let e=this._shadowGenerators.values();for(let t=e.next();!0!==t.done;t=e.next())t.value.dispose();this._shadowGenerators=null}if(this.getScene().stopAnimation(this),this._parentContainer){let e=this._parentContainer.lights.indexOf(this);e>-1&&this._parentContainer.lights.splice(e,1),this._parentContainer=null}for(let e of this.getScene().meshes)e._removeLightSource(this,!0);this._uniformBuffer.dispose(),this.getScene().removeLight(this),super.dispose(e,t)}getTypeID(){return 0}getScaledIntensity(){return this._photometricScale*this.intensity}clone(e,t=null){let i=H.GetConstructorFromName(this.getTypeID(),e,this.getScene());if(!i)return null;let s=j.SerializationHelper.Clone(i,this);return e&&(s.name=e),t&&(s.parent=t),s.setEnabled(this.isEnabled()),this.onClonedObservable.notifyObservers(s),s}serialize(){let e=j.SerializationHelper.Serialize(this);if(e.uniqueId=this.uniqueId,e.type=this.getTypeID(),this.parent&&this.parent._serializeAsParent(e),this.excludedMeshes.length>0)for(let t of(e.excludedMeshesIds=[],this.excludedMeshes))e.excludedMeshesIds.push(t.id);if(this.includedOnlyMeshes.length>0)for(let t of(e.includedOnlyMeshesIds=[],this.includedOnlyMeshes))e.includedOnlyMeshesIds.push(t.id);return j.SerializationHelper.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e}static GetConstructorFromName(e,t,i){let s=W.Node.Construct("Light_Type_"+e,t,i);return s||null}static Parse(e,t,i=""){let s=H.GetConstructorFromName(e.type,e.name,t);if(!s)return null;let n=j.SerializationHelper.Parse(s,e,t,i);if(e.excludedMeshesIds&&(n._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(n._includedOnlyMeshesIds=e.includedOnlyMeshesIds),void 0!==e.parentId&&(n._waitingParentId=e.parentId),void 0!==e.parentInstanceIndex&&(n._waitingParentInstanceIndex=e.parentInstanceIndex),void 0!==e.falloffType&&(n.falloffType=e.falloffType),void 0!==e.lightmapMode&&(n.lightmapMode=e.lightmapMode),e.animations){for(let t=0;t<e.animations.length;t++){let i=e.animations[t],s=(0,V.GetClass)("BABYLON.Animation");s&&n.animations.push(s.Parse(i))}W.Node.ParseAnimationRanges(n,e,t)}return e.autoAnimate&&t.beginAnimation(n,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),void 0!==e.isEnabled&&n.setEnabled(e.isEnabled),n._onParsed(e,t,i),n}_onParsed(e,t,i=""){}_hookArrayForExcluded(e){let t=e.push;e.push=(...i)=>{let s=t.apply(e,i);if(this._clusteredContainer)return s;for(let e of i)e._resyncLightSource(this);return s};let i=e.splice;if(e.splice=(t,s)=>{let n=i.call(e,t,s??e.length);if(this._clusteredContainer)return n;for(let e of n)e._resyncLightSource(this);return n},!this._clusteredContainer)for(let t of e)t._resyncLightSource(this)}_hookArrayForIncludedOnly(e){let t=e.push;e.push=(...i)=>{let s=t.apply(e,i);return this._resyncMeshes(),s};let i=e.splice;e.splice=(t,s)=>{let n=i.call(e,t,s??e.length);return this._resyncMeshes(),n},this._resyncMeshes()}_resyncMeshes(){if(!this._clusteredContainer)for(let e of this.getScene().meshes)e._resyncLightSource(this)}_markMeshesAsLightDirty(){for(let e of this.getScene().meshes)-1!==e.lightSources.indexOf(this)&&e._markSubMeshesAsLightDirty()}_computePhotometricScale(){this._photometricScale=this._getPhotometricScale(),this.getScene().resetCachedMaterial()}_getPhotometricScale(){let e=0,t=this.getTypeID(),i=this.intensityMode;switch(i===H.INTENSITYMODE_AUTOMATIC&&(i=t===H.LIGHTTYPEID_DIRECTIONALLIGHT?H.INTENSITYMODE_ILLUMINANCE:H.INTENSITYMODE_LUMINOUSINTENSITY),t){case H.LIGHTTYPEID_POINTLIGHT:case H.LIGHTTYPEID_SPOTLIGHT:switch(i){case H.INTENSITYMODE_LUMINOUSPOWER:e=1/(4*Math.PI);break;case H.INTENSITYMODE_LUMINOUSINTENSITY:e=1;break;case H.INTENSITYMODE_LUMINANCE:e=this.radius*this.radius}break;case H.LIGHTTYPEID_DIRECTIONALLIGHT:switch(i){case H.INTENSITYMODE_ILLUMINANCE:e=1;break;case H.INTENSITYMODE_LUMINANCE:{let t=this.radius;e=2*Math.PI*(1-Math.cos(t=Math.max(t,.001)))}}break;case H.LIGHTTYPEID_HEMISPHERICLIGHT:case H.LIGHTTYPEID_RECT_AREALIGHT:e=1}return e}_reorderLightsInScene(){let e=this.getScene();0!=this._renderPriority&&(e.requireLightSorting=!0),this.getScene().sortLightsByPriority()}areLightTexturesReady(){return!0}_isReady(){return!0}},U=new WeakMap,w="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0,t=[(0,G.serializeAsColor3)()],i=[(0,G.serializeAsColor3)()],s=[(0,G.serialize)()],n=[(0,G.serialize)()],a=[(0,G.serialize)()],r=[(0,G.serialize)()],o=[(0,G.serialize)()],h=[(0,G.serialize)()],l=[(0,G.expandToProperty)("_reorderLightsInScene")],d=[(0,G.serialize)("shadowEnabled")],_=[(0,G.serialize)("excludeWithLayerMask")],u=[(0,G.serialize)("includeOnlyWithLayerMask")],c=[(0,G.serialize)("lightmapMode")],(0,k.__esDecorate)(H,null,a,{kind:"getter",name:"range",static:!1,private:!1,access:{has:e=>"range"in e,get:e=>e.range},metadata:w},null,f),(0,k.__esDecorate)(H,null,r,{kind:"getter",name:"intensityMode",static:!1,private:!1,access:{has:e=>"intensityMode"in e,get:e=>e.intensityMode},metadata:w},null,f),(0,k.__esDecorate)(H,null,o,{kind:"getter",name:"radius",static:!1,private:!1,access:{has:e=>"radius"in e,get:e=>e.radius},metadata:w},null,f),(0,k.__esDecorate)(H,null,l,{kind:"accessor",name:"renderPriority",static:!1,private:!1,access:{has:e=>"renderPriority"in e,get:e=>e.renderPriority,set:(e,t)=>{e.renderPriority=t}},metadata:w},D,N),(0,k.__esDecorate)(null,null,t,{kind:"field",name:"diffuse",static:!1,private:!1,access:{has:e=>"diffuse"in e,get:e=>e.diffuse,set:(e,t)=>{e.diffuse=t}},metadata:w},m,I),(0,k.__esDecorate)(null,null,i,{kind:"field",name:"specular",static:!1,private:!1,access:{has:e=>"specular"in e,get:e=>e.specular,set:(e,t)=>{e.specular=t}},metadata:w},p,b),(0,k.__esDecorate)(null,null,s,{kind:"field",name:"falloffType",static:!1,private:!1,access:{has:e=>"falloffType"in e,get:e=>e.falloffType,set:(e,t)=>{e.falloffType=t}},metadata:w},y,S),(0,k.__esDecorate)(null,null,n,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:e=>"intensity"in e,get:e=>e.intensity,set:(e,t)=>{e.intensity=t}},metadata:w},L,M),(0,k.__esDecorate)(null,null,h,{kind:"field",name:"_renderPriority",static:!1,private:!1,access:{has:e=>"_renderPriority"in e,get:e=>e._renderPriority,set:(e,t)=>{e._renderPriority=t}},metadata:w},E,T),(0,k.__esDecorate)(null,null,d,{kind:"field",name:"_shadowEnabled",static:!1,private:!1,access:{has:e=>"_shadowEnabled"in e,get:e=>e._shadowEnabled,set:(e,t)=>{e._shadowEnabled=t}},metadata:w},O,v),(0,k.__esDecorate)(null,null,_,{kind:"field",name:"_excludeWithLayerMask",static:!1,private:!1,access:{has:e=>"_excludeWithLayerMask"in e,get:e=>e._excludeWithLayerMask,set:(e,t)=>{e._excludeWithLayerMask=t}},metadata:w},C,A),(0,k.__esDecorate)(null,null,u,{kind:"field",name:"_includeOnlyWithLayerMask",static:!1,private:!1,access:{has:e=>"_includeOnlyWithLayerMask"in e,get:e=>e._includeOnlyWithLayerMask,set:(e,t)=>{e._includeOnlyWithLayerMask=t}},metadata:w},P,x),(0,k.__esDecorate)(null,null,c,{kind:"field",name:"_lightmapMode",static:!1,private:!1,access:{has:e=>"_lightmapMode"in e,get:e=>e._lightmapMode,set:(e,t)=>{e._lightmapMode=t}},metadata:w},z,R),w&&Object.defineProperty(H,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:w}),H.FALLOFF_DEFAULT=q.LightConstants.FALLOFF_DEFAULT,H.FALLOFF_PHYSICAL=q.LightConstants.FALLOFF_PHYSICAL,H.FALLOFF_GLTF=q.LightConstants.FALLOFF_GLTF,H.FALLOFF_STANDARD=q.LightConstants.FALLOFF_STANDARD,H.LIGHTMAP_DEFAULT=q.LightConstants.LIGHTMAP_DEFAULT,H.LIGHTMAP_SPECULAR=q.LightConstants.LIGHTMAP_SPECULAR,H.LIGHTMAP_SHADOWSONLY=q.LightConstants.LIGHTMAP_SHADOWSONLY,H.INTENSITYMODE_AUTOMATIC=q.LightConstants.INTENSITYMODE_AUTOMATIC,H.INTENSITYMODE_LUMINOUSPOWER=q.LightConstants.INTENSITYMODE_LUMINOUSPOWER,H.INTENSITYMODE_LUMINOUSINTENSITY=q.LightConstants.INTENSITYMODE_LUMINOUSINTENSITY,H.INTENSITYMODE_ILLUMINANCE=q.LightConstants.INTENSITYMODE_ILLUMINANCE,H.INTENSITYMODE_LUMINANCE=q.LightConstants.INTENSITYMODE_LUMINANCE,H.LIGHTTYPEID_POINTLIGHT=q.LightConstants.LIGHTTYPEID_POINTLIGHT,H.LIGHTTYPEID_DIRECTIONALLIGHT=q.LightConstants.LIGHTTYPEID_DIRECTIONALLIGHT,H.LIGHTTYPEID_SPOTLIGHT=q.LightConstants.LIGHTTYPEID_SPOTLIGHT,H.LIGHTTYPEID_HEMISPHERICLIGHT=q.LightConstants.LIGHTTYPEID_HEMISPHERICLIGHT,H.LIGHTTYPEID_RECT_AREALIGHT=q.LightConstants.LIGHTTYPEID_RECT_AREALIGHT,H);e.s(["Light",0,X])},88083,23017,e=>{"use strict";let t,i,s,n,a,r,o,h;var l,d=e.i(57575),_=e.i(9855),u=e.i(69400),c=e.i(19919),g=e.i(90160),f=e.i(52624),m=e.i(44520);let I=(s=g.Light,n=[],a=[],r=[],o=[],l=class extends s{constructor(e,t,i,s){super(e,i,s),this.groundColor=(0,d.__runInitializers)(this,n,new c.Color3(0,0,0)),this.direction=((0,d.__runInitializers)(this,a),(0,d.__runInitializers)(this,r,void 0)),(0,d.__runInitializers)(this,o),this.direction=t||u.Vector3.Up()}_buildUniformLayout(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightGround",3),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()}getClassName(){return"HemisphericLight"}setDirectionToTarget(e){return this.direction=u.Vector3.Normalize(e.subtract(u.Vector3.Zero())),this.direction}getShadowGenerator(){return null}transferToEffect(e,t){let i=u.Vector3.Normalize(this.direction);return this._uniformBuffer.updateFloat4("vLightData",i.x,i.y,i.z,0,t),this._uniformBuffer.updateColor3("vLightGround",this.groundColor.scale(this.intensity),t),this}transferToNodeMaterialEffect(e,t){let i=u.Vector3.Normalize(this.direction);return e.setFloat3(t,i.x,i.y,i.z),this}computeWorldMatrix(){return this._worldMatrix||(this._worldMatrix=u.Matrix.Identity()),this._worldMatrix}getTypeID(){return g.Light.LIGHTTYPEID_HEMISPHERICLIGHT}prepareLightSpecificDefines(e,t){e["HEMILIGHT"+t]=!0}},h="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0,t=[(0,_.serializeAsColor3)()],i=[(0,_.serializeAsVector3)()],(0,d.__esDecorate)(null,null,t,{kind:"field",name:"groundColor",static:!1,private:!1,access:{has:e=>"groundColor"in e,get:e=>e.groundColor,set:(e,t)=>{e.groundColor=t}},metadata:h},n,a),(0,d.__esDecorate)(null,null,i,{kind:"field",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction,set:(e,t)=>{e.direction=t}},metadata:h},r,o),h&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:h}),l),p=!1;function b(){p||(p=!0,f.Node.AddNodeConstructor("Light_Type_3",(e,t)=>()=>new I(e,u.Vector3.Zero(),t)),(0,m.RegisterClass)("BABYLON.HemisphericLight",I))}e.s(["HemisphericLight",0,I,"RegisterHemisphericLight",0,b],23017),b(),e.s([],88083)},5153,e=>{"use strict";e.i(88083);var t=e.i(23017);e.s(["HemisphericLight",()=>t.HemisphericLight,"RegisterHemisphericLight",()=>t.RegisterHemisphericLight])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47150,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])},3524,69680,e=>{"use strict";var t=e.i(41041),r=e.i(3864);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new r.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[t.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[t.VertexBuffer.PositionKind]=new t.VertexBuffer(this._scene.getEngine(),e,t.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let r=0;r<e.length;r++){let i=e[r];i&&t.push(i)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let r=this._scene.activeCamera;return!!r&&!!(t=t||this._getActivePostProcesses(r._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(r,e,null!=t),!0)}directRender(e,t=null,r=!1,i=0,s=0,n=!1,a=e.length){let o=this._scene.getEngine();for(let h=0;h<a;h++){h<e.length-1?e[h+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?o.bindFramebuffer(t,i,void 0,void 0,r,s):n||o.restoreDefaultFramebuffer(),o._debugInsertMarker?.(`post process ${e[h].name} output`));let a=e[h],c=a.apply();c&&(a.onBeforeRenderObservable.notifyObservers(c),this._prepareBuffers(),o.bindBuffers(this._vertexBuffers,this._indexBuffer,c),o.drawElementsType(0,0,6),a.onAfterRenderObservable.notifyObservers(c))}o.setDepthBuffer(!0),o.setDepthWrite(!0)}_finalizeFrame(e,t,r,i,s=!1){let n=this._scene.activeCamera;if(!n||(this.onBeforeRenderObservable.notifyObservers(this),0===(i=i||this._getActivePostProcesses(n._postProcesses)).length||!this._scene.postProcessesEnabled))return;let a=this._scene.getEngine();for(let o=0,h=i.length;o<h;o++){let c=i[o];if(o<h-1?c._outputTexture=i[o+1].activate(n,t?.texture):(t?(a.bindFramebuffer(t,r,void 0,void 0,s),c._outputTexture=t):(a.restoreDefaultFramebuffer(),c._outputTexture=null),a._debugInsertMarker?.(`post process ${i[o].name} output`)),e)break;let l=c.apply();l&&(c.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),a.bindBuffers(this._vertexBuffers,this._indexBuffer,l),a.drawElementsType(0,0,6),c.onAfterRenderObservable.notifyObservers(l))}a.setDepthBuffer(!0),a.setDepthWrite(!0),a.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[t.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}],3524);var i=e.i(32451),s=e.i(69400);class n{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=n.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=n.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=n.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,r=null,s=null,n=null){this.index=e,this._opaqueSubMeshes=new i.SmartArray(256),this._transparentSubMeshes=new i.SmartArray(256),this._alphaTestSubMeshes=new i.SmartArray(256),this._depthOnlySubMeshes=new i.SmartArray(256),this._particleSystems=new i.SmartArray(256),this._spriteManagers=new i.SmartArray(256),this._empty=!0,this._edgesRenderers=new i.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=r,this.alphaTestSortCompareFn=s,this.transparentSortCompareFn=n}render(e,t,r,i,s=!0,n=!0,a=!0,o=!0,h){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let c=this._scene.getEngine();s&&0!==this._depthOnlySubMeshes.length&&(c.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),c.setColorWrite(!0)),n&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),a&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let l=c.getStencilBuffer();if(c.setStencilBuffer(!1),t&&this._renderSprites(),r&&this._renderParticles(i),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),o&&(h||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(c.setStencilBuffer(l),h)h(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);c.setAlphaMode(0)}if(c.setStencilBuffer(!1),n&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();c.setAlphaMode(0)}c.setStencilBuffer(l)}_renderOpaqueSorted(e){n._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){n._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){n._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,r,i,a){let o,h=0,c=r?r.globalPosition:n._ZeroVector;if(i)for(;h<e.length;h++)(o=e.data[h])._alphaIndex=o.getMesh().alphaIndex,o._distanceToCamera=s.Vector3.Distance(o.getBoundingInfo().boundingSphere.centerWorld,c);let l=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&l.sort(t);let u=l[0].getMesh().getScene();for(h=0;h<l.length;h++)if(o=l[h],!u._activeMeshesFrozenButKeepClipping||o.isInFrustum(u._frustumPlanes)){if(i){let e=o.getMaterial();if(e&&e.needDepthPrePass&&!a){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),o.render(!1),t.setColorWrite(!0)}}o.render(i)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:n.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let r=e.getMesh(),i=t.getMesh();return r.material&&i.material?r.material.uniqueId-i.material.uniqueId:r.uniqueId-i.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),void 0===r&&(r=e.getMaterial()),null!=r&&(r.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):r.needAlphaTestingForMesh(t)?(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let r=0;r<this._particleSystems.length;r++){let i=this._particleSystems.data[r];if(0===(t&&t.layerMask&i.layerMask))continue;let s=i.emitter;s.position&&e&&-1===e.indexOf(s)||this._scene._activeParticles.addCount(i.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let r=this._spriteManagers.data[t];0!==(e&&e.layerMask&r.layerMask)&&r.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}n._ZeroVector=s.Vector3.Zero();class a{}class o{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new a,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,r,i,s=!0,n=!0,a=!0,h=!0,c){let l=this._renderingGroupInfo;if(l.scene=this._scene,l.camera=this._scene.activeCamera,l.renderingManager=this,this._scene.spriteManagers&&i)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let u=o.MIN_RENDERINGGROUPS;u<o.MAX_RENDERINGGROUPS;u++){this._depthStencilBufferAlreadyCleaned=u===o.MIN_RENDERINGGROUPS;let p=this._renderingGroups[u];if(!p||p._empty)continue;let d=1<<u;if(l.renderingGroupId=u,this._scene.onBeforeRenderingGroupObservable.notifyObservers(l,d),o.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(u):this._autoClearDepthStencil[u];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(u);for(let o of(p.render(e,i,r,t,s,n,a,h,c),this._scene._afterRenderingGroupDrawStage))o.action(u);this._scene.onAfterRenderingGroupObservable.notifyObservers(l,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new n(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,r))}setRenderingOrder(e,t=null,r=null,i=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=r,this._customTransparentSortCompareFn[e]=i,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,r=!0,i=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:r,stencil:i}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}o.MAX_RENDERINGGROUPS=4,o.MIN_RENDERINGGROUPS=0,o.AUTOCLEAR=!0,e.s(["RenderingManager",0,o],69680)},11267,e=>{"use strict";var t=e.i(87627);class r{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._hasResult=!1,this._hasCurrentValue=!1,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._hasCurrentValue=r.Enabled,this._lastSecValueCount++}addCount(e,t){r.Enabled&&(this._current+=e,this._hasCurrentValue=!0,t&&this._fetchResult())}beginMonitoring(){r.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!r.Enabled)return;e&&this.fetchNewFrame();let i=t.PrecisionDate.Now;this._current=i-this._startMonitoringTime,this._hasCurrentValue=!0,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){if(!this._hasCurrentValue)return;this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._hasResult?(this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current)):(this._min=this._current,this._max=this._current,this._hasResult=!0),this._average=this._totalAccumulated/this._totalValueCount;let e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}r.Enabled=!0,e.s(["PerfCounter",0,r])},57660,e=>{"use strict";var t=e.i(96042);class r{static GetPlanes(e){let i=[];for(let e=0;e<6;e++)i.push(new t.Plane(0,0,0,0));return r.GetPlanesToRef(e,i),i}static GetNearPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[2],t.normal.y=r[7]+r[6],t.normal.z=r[11]+r[10],t.d=r[15]+r[14],t.normalize()}static GetFarPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[2],t.normal.y=r[7]-r[6],t.normal.z=r[11]-r[10],t.d=r[15]-r[14],t.normalize()}static GetLeftPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[0],t.normal.y=r[7]+r[4],t.normal.z=r[11]+r[8],t.d=r[15]+r[12],t.normalize()}static GetRightPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[0],t.normal.y=r[7]-r[4],t.normal.z=r[11]-r[8],t.d=r[15]-r[12],t.normalize()}static GetTopPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[1],t.normal.y=r[7]-r[5],t.normal.z=r[11]-r[9],t.d=r[15]-r[13],t.normalize()}static GetBottomPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[1],t.normal.y=r[7]+r[5],t.normal.z=r[11]+r[9],t.d=r[15]+r[13],t.normalize()}static GetPlanesToRef(e,t){r.GetNearPlaneToRef(e,t[0]),r.GetFarPlaneToRef(e,t[1]),r.GetLeftPlaneToRef(e,t[2]),r.GetRightPlaneToRef(e,t[3]),r.GetTopPlaneToRef(e,t[4]),r.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let r=0;r<6;r++)if(0>t[r].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,r])},92247,e=>{"use strict";var t=e.i(69400),r=e.i(41041);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,i=!0){let s;if(!this.pickedMesh||i&&!this.pickedMesh.isVerticesDataPresent(r.VertexBuffer.NormalKind))return null;let n=this.pickedMesh.getIndices();n?.length===0&&(n=null);let a=t.TmpVectors.Vector3[0],o=t.TmpVectors.Vector3[1],h=t.TmpVectors.Vector3[2];if(i){let e=this.pickedMesh.getVerticesData(r.VertexBuffer.NormalKind),i=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],h):h.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);i=i.scale(this.bu),c=c.scale(this.bv),l=l.scale(1-this.bu-this.bv),s=new t.Vector3(i.x+c.x+l.x,i.y+c.y+l.y,i.z+c.z+l.z)}else{let e=this.pickedMesh.getVerticesData(r.VertexBuffer.PositionKind),i=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],h):h.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),u=i.subtract(c),p=l.subtract(c);s=t.Vector3.Cross(u,p)}let c=(e,r)=>{if(-1!==this.thinInstanceIndex){let i=e._thinInstanceDataStorage.matrixData,s=this.thinInstanceIndex<<4;if(i&&i.length>s){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(i,s,e),t.Vector3.TransformNormalToRef(r,e,r)}}let i=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(i),(i=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),i.invert(),i.transposeToRef(t.TmpVectors.Matrix[1]),i=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(r,i,r)};if(e&&c(this.pickedMesh,s),this.ray){let r=t.TmpVectors.Vector3[0].copyFrom(s);e||c(this.pickedMesh,r),t.Vector3.Dot(r,this.ray.direction)>0&&s.negateInPlace()}return s.normalize(),s}getTextureCoordinates(e=r.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let i=this.pickedMesh.getIndices();if(!i)return null;let s=this.pickedMesh.getVerticesData(e);if(!s)return null;let n=t.Vector2.FromArray(s,2*i[3*this.faceId]),a=t.Vector2.FromArray(s,2*i[3*this.faceId+1]),o=t.Vector2.FromArray(s,2*i[3*this.faceId+2]);return n=n.scale(this.bu),a=a.scale(this.bv),o=o.scale(1-this.bu-this.bv),new t.Vector2(n.x+a.x+o.x,n.y+a.y+o.y)}}])},84964,e=>{"use strict";var t=e.i(69400);class r{}r.POINTERDOWN=1,r.POINTERUP=2,r.POINTERMOVE=4,r.POINTERWHEEL=8,r.POINTERPICK=16,r.POINTERTAP=32,r.POINTERDOUBLETAP=64;class i{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,r,"PointerInfo",0,class extends i{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,r,i=null){super(e,t),this._pickInfo=r,this._inputManager=i}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends i{constructor(e,r,i,s){super(e,r),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(i,s)}}])},71092,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,r,"KeyboardInfoPre",0,class extends r{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},4021,e=>{"use strict";var t,r;(r=t||(t={}))[r.PointerMove=0]="PointerMove",r[r.PointerDown=1]="PointerDown",r[r.PointerUp=2]="PointerUp";class i{}i.DOM_DELTA_PIXEL=0,i.DOM_DELTA_LINE=1,i.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,i])},22287,e=>{"use strict";e.s(["IntersectionInfo",0,class{constructor(e,t,r){this.bu=e,this.bv=t,this.distance=r,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},12675,e=>{"use strict";var t=e.i(66460),r=e.i(55288),i=e.i(84106),s=e.i(69400),n=e.i(30672),a=e.i(22287),o=e.i(92247),h=e.i(23003),c=e.i(52390);let l={internalPickerForMesh:void 0};class u{constructor(e,t,r=Number.MAX_VALUE,s=i.Epsilon){this.origin=e,this.direction=t,this.length=r,this.epsilon=s}clone(){return new u(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,r=0){let i,s,n,a,o=u._TmpVector3[0].copyFromFloats(e.x-r,e.y-r,e.z-r),h=u._TmpVector3[1].copyFromFloats(t.x+r,t.y+r,t.z+r),c=0,l=Number.MAX_VALUE;if(1e-7>Math.abs(this.direction.x)){if(this.origin.x<o.x||this.origin.x>h.x)return!1}else if(i=1/this.direction.x,s=(o.x-this.origin.x)*i,(n=(h.x-this.origin.x)*i)==-1/0&&(n=1/0),s>n&&(a=s,s=n,n=a),(c=Math.max(s,c))>(l=Math.min(n,l)))return!1;if(1e-7>Math.abs(this.direction.y)){if(this.origin.y<o.y||this.origin.y>h.y)return!1}else if(i=1/this.direction.y,s=(o.y-this.origin.y)*i,(n=(h.y-this.origin.y)*i)==-1/0&&(n=1/0),s>n&&(a=s,s=n,n=a),(c=Math.max(s,c))>(l=Math.min(n,l)))return!1;if(1e-7>Math.abs(this.direction.z)){if(this.origin.z<o.z||this.origin.z>h.z)return!1}else if(i=1/this.direction.z,s=(o.z-this.origin.z)*i,(n=(h.z-this.origin.z)*i)==-1/0&&(n=1/0),s>n&&(a=s,s=n,n=a),(c=Math.max(s,c))>(l=Math.min(n,l)))return!1;return!0}intersectsBox(e,t=0){return this.intersectsBoxMinMax(e.minimum,e.maximum,t)}intersectsSphere(e,t=0){let r=e.center.x-this.origin.x,i=e.center.y-this.origin.y,s=e.center.z-this.origin.z,n=r*r+i*i+s*s,a=e.radius+t,o=a*a;if(n<=o)return!0;let h=r*this.direction.x+i*this.direction.y+s*this.direction.z;return!(h<0)&&n-h*h<=o}intersectsTriangle(e,t,r){let i=u._TmpVector3[0],n=u._TmpVector3[1],o=u._TmpVector3[2],h=u._TmpVector3[3],c=u._TmpVector3[4];t.subtractToRef(e,i),r.subtractToRef(e,n),s.Vector3.CrossToRef(this.direction,n,o);let l=s.Vector3.Dot(i,o);if(0===l)return null;let p=1/l;this.origin.subtractToRef(e,h);let d=s.Vector3.Dot(h,o)*p;if(d<-this.epsilon||d>1+this.epsilon)return null;s.Vector3.CrossToRef(h,i,c);let f=s.Vector3.Dot(this.direction,c)*p;if(f<-this.epsilon||d+f>1+this.epsilon)return null;let _=s.Vector3.Dot(n,c)*p;return _>this.length||_<0?null:new a.IntersectionInfo(1-d-f,d,_)}intersectsPlane(e){let t,r=s.Vector3.Dot(e.normal,this.direction);if(999999997475243e-21>Math.abs(r))return null;{let i=s.Vector3.Dot(e.normal,this.origin);if((t=(-e.d-i)/r)<0)if(t<-999999997475243e-21)return null;else return 0;return t}}intersectsAxis(e,t=0){switch(e){case"y":{let e=(this.origin.y-t)/this.direction.y;if(e>0)return null;return new s.Vector3(this.origin.x+-(this.direction.x*e),t,this.origin.z+-(this.direction.z*e))}case"x":{let e=(this.origin.x-t)/this.direction.x;if(e>0)return null;return new s.Vector3(t,this.origin.y+-(this.direction.y*e),this.origin.z+-(this.direction.z*e))}case"z":{let e=(this.origin.z-t)/this.direction.z;if(e>0)return null;return new s.Vector3(this.origin.x+-(this.direction.x*e),this.origin.y+-(this.direction.y*e),t)}default:return null}}intersectsMesh(e,t,r,i=!1,n,a=!1){let o=s.TmpVectors.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?u.TransformToRef(this,o,this._tmpRay):this._tmpRay=u.Transform(this,o),e.intersects(this._tmpRay,t,r,i,n,a)}intersectsMeshes(e,t,r){r?r.length=0:r=[];for(let i=0;i<e.length;i++){let s=this.intersectsMesh(e[i],t);s.hit&&r.push(s)}return r.sort(this._comparePickingInfo),r}_comparePickingInfo(e,t){return e.distance<t.distance?-1:+(e.distance>t.distance)}intersectionSegment(e,t,r){let i=this.origin,n=s.TmpVectors.Vector3[0],a=s.TmpVectors.Vector3[1],o=s.TmpVectors.Vector3[2],h=s.TmpVectors.Vector3[3];t.subtractToRef(e,n),this.direction.scaleToRef(u._Rayl,o),i.addToRef(o,a),e.subtractToRef(i,h);let c=s.Vector3.Dot(n,n),l=s.Vector3.Dot(n,o),p=s.Vector3.Dot(o,o),d=s.Vector3.Dot(n,h),f=s.Vector3.Dot(o,h),_=c*p-l*l,m,g=_,R,y=_;_<u._Smallnum?(m=0,g=1,R=f,y=p):(m=l*f-p*d,R=c*f-l*d,m<0?(m=0,R=f,y=p):m>g&&(m=g,R=f+l,y=p)),R<0?(R=0,0>-d?m=0:-d>c?m=g:(m=-d,g=c)):R>y&&(R=y,-d+l<0?m=0:-d+l>c?m=g:(m=-d+l,g=c));let S=Math.abs(m)<u._Smallnum?0:m/g,T=Math.abs(R)<u._Smallnum?0:R/y,P=s.TmpVectors.Vector3[4];o.scaleToRef(T,P);let M=s.TmpVectors.Vector3[5];n.scaleToRef(S,M),M.addInPlace(h);let b=s.TmpVectors.Vector3[6];return(M.subtractToRef(P,b),T>0&&T<=this.length&&b.lengthSquared()<r*r)?M.length():-1}update(e,t,r,i,n,a,o,h=!1){if(h){u._RayDistant||(u._RayDistant=u.Zero()),u._RayDistant.unprojectRayToRef(e,t,r,i,s.Matrix.IdentityReadOnly,a,o);let h=s.TmpVectors.Matrix[0];n.invertToRef(h),u.TransformToRef(u._RayDistant,h,this)}else this.unprojectRayToRef(e,t,r,i,n,a,o);return this}static Zero(){return new u(s.Vector3.Zero(),s.Vector3.Zero())}static CreateNew(e,t,r,i,s,n,a){return u.Zero().update(e,t,r,i,s,n,a)}static CreateNewFromTo(e,t,r=s.Matrix.IdentityReadOnly){let i=new u(new s.Vector3(0,0,0),new s.Vector3(0,0,0));return u.CreateFromToToRef(e,t,i,r)}static CreateFromToToRef(e,t,r,i=s.Matrix.IdentityReadOnly){r.origin.copyFrom(e);let n=t.subtractToRef(e,r.direction);return r.length=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z),r.direction.normalize(),u.TransformToRef(r,i,r)}static Transform(e,t){let r=new u(new s.Vector3(0,0,0),new s.Vector3(0,0,0));return u.TransformToRef(e,t,r),r}static TransformToRef(e,t,r){s.Vector3.TransformCoordinatesToRef(e.origin,t,r.origin),s.Vector3.TransformNormalToRef(e.direction,t,r.direction),r.length=e.length,r.epsilon=e.epsilon;let i=r.direction,n=i.length();if(0!==n&&1!==n){let e=1/n;i.x*=e,i.y*=e,i.z*=e,r.length*=n}return r}unprojectRayToRef(e,t,r,i,n,a,o){let c=s.TmpVectors.Matrix[0];n.multiplyToRef(a,c),c.multiplyToRef(o,c),c.invert();let l=h.EngineStore.LastCreatedEngine,u=s.TmpVectors.Vector3[0];u.x=e/r*2-1,u.y=-(t/i*2-1),u.z=l?.useReverseDepthBuffer?1:l?.isNDCHalfZRange?0:-1;let p=s.TmpVectors.Vector3[1].copyFromFloats(u.x,u.y,1-1e-8),d=s.TmpVectors.Vector3[2],f=s.TmpVectors.Vector3[3];s.Vector3.TransformCoordinatesToRef(u,c,d),s.Vector3.TransformCoordinatesToRef(p,c,f),this.origin.copyFrom(d),f.subtractToRef(d,this.direction),this.direction.normalize()}}function p(e,t,r,i,s,n=!1){let a=u.Zero();return d(e,t,r,i,a,s,n),a}function d(e,t,r,i,n,a,o=!1,h=!1){let c=e.getEngine();if(!a&&!(a=e.activeCamera)&&!(a=e.cameraToUseForPointers))return e;let l=a.viewport,u=c.getRenderHeight(),{x:p,y:f,width:_,height:m}=l.toGlobal(c.getRenderWidth(),u),g=1/c.getHardwareScalingLevel();return t=t*g-p,r=r*g-(u-f-m),n.update(t,r,_,m,i||s.Matrix.IdentityReadOnly,o?s.Matrix.IdentityReadOnly:a.getViewMatrix(),a.getProjectionMatrix(),h),e}function f(e,t,r,i){let s=u.Zero();return _(e,t,r,s,i),s}function _(e,t,r,i,n){if(!o.PickingInfo)return e;let a=e.getEngine();if(!n&&!(n=e.activeCamera)&&!(n=e.cameraToUseForPointers))throw Error("Active camera not set");let h=n.viewport,c=a.getRenderHeight(),{x:l,y:u,width:p,height:d}=h.toGlobal(a.getRenderWidth(),c),f=s.Matrix.Identity(),_=1/a.getHardwareScalingLevel();return t=t*_-l,r=r*_-(c-u-d),i.update(t,r,p,d,f,f,n.getProjectionMatrix()),e}function m(e,t,r,i,s,n,a,o){let h=t(i,r.enableDistantPicking);return g(e,r,i,h,s,n,a,o)}function g(e,t,r,i,s,n,a,o){let h=t.intersects(i,s,a,n,r,o);return h&&h.hit&&(s||null==e||!(h.distance>=e.distance))?h:null}function R(e){let t=e.getClassName();if("GreasedLineMesh"===t)return{rawBoundingInfo:null,intersectionThreshold:0};let r=e.rawBoundingInfo;return{rawBoundingInfo:r,intersectionThreshold:r?"InstancedLinesMesh"===t||"LinesMesh"===t?e.intersectionThreshold:0:0}}function y(e,t,r,i,s){let n=e(r,t.enableDistantPicking);return n.intersectsSphere(i.boundingSphere,s)&&n.intersectsBox(i.boundingBox,s)?n:null}function S(e,t,r,i,n,a){let h=null,c=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),u=e.cameraToUseForPointers||e.activeCamera,p=l.internalPickerForMesh||m,d=p===m;for(let o=0;o<e.meshes.length;o++){let l=e.meshes[o];if(r){if(!r(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;let f=c&&l.isWorldMatrixCameraDependent(),_=l.computeWorldMatrix(f,u);if(l.hasThinInstances&&l.thinInstanceEnablePicking){let e=p(h,t,l,_,!0,!0,a);if(e){if(n)return e;let{rawBoundingInfo:o,intersectionThreshold:c}=R(l),u=l._thinInstanceDataStorage.matrixData;if(u){let e=s.TmpVectors.Matrix[0],f=s.TmpVectors.Matrix[1],m=Math.min(l.thinInstanceCount,u.length>>4);for(let R=0;R<m;R++){if(r&&!r(l,R))continue;s.Matrix.FromArrayToRef(u,R<<4,e),e.multiplyToRef(_,f);let m=d&&o?y(t,l,f,o,c):null;if(d&&o&&!m)continue;let S=d&&m?g(h,l,f,m,i,n,a,!0):p(h,t,l,f,i,n,a,!0);if(S&&((h=S).thinInstanceIndex=R,i))return h}}}}else{let e=p(h,t,l,_,i,n,a);if(e&&(h=e,i))return h}}return h||new o.PickingInfo}function T(e,t,r,i){if(!o.PickingInfo)return null;let n=[],a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),h=e.cameraToUseForPointers||e.activeCamera,c=l.internalPickerForMesh||m,u=c===m;for(let o=0;o<e.meshes.length;o++){let l=e.meshes[o];if(r){if(!r(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;let p=a&&l.isWorldMatrixCameraDependent(),d=l.computeWorldMatrix(p,h);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(c(null,t,l,d,!0,!0,i)){let{rawBoundingInfo:e,intersectionThreshold:a}=R(l),o=l._thinInstanceDataStorage.matrixData;if(o){let h=s.TmpVectors.Matrix[0],p=s.TmpVectors.Matrix[1],f=Math.min(l.thinInstanceCount,o.length>>4);for(let _=0;_<f;_++){if(r&&!r(l,_))continue;s.Matrix.FromArrayToRef(o,_<<4,h),h.multiplyToRef(d,p);let f=u&&e?y(t,l,p,e,a):null;if(u&&e&&!f)continue;let m=u&&f?g(null,l,p,f,!1,!1,i,!0):c(null,t,l,p,!1,!1,i,!0);m&&(m.thinInstanceIndex=_,n.push(m))}}}}else{let e=c(null,t,l,d,!1,!1,i);e&&n.push(e)}}return n}function P(e,t,r,i,n,a){if(!o.PickingInfo)return null;let h=S(e,i=>(e._tempPickingRay||(e._tempPickingRay=u.Zero()),d(e,t,r,i,e._tempPickingRay,a||null),e._tempPickingRay),i,n,!0);return h&&(h.ray=p(e,t,r,s.Matrix.Identity(),a||null)),h}function M(e,t,r,i,n,a,o,h=!1){let c=S(e,(i,s)=>(e._tempPickingRay||(e._tempPickingRay=u.Zero()),d(e,t,r,i,e._tempPickingRay,a||null,!1,s),e._tempPickingRay),i,n,!1,o);return c&&(c.ray=p(e,t,r,s.Matrix.Identity(),a||null)),c}function b(e,t,r,i,n){let a=S(e,r=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=s.Matrix.Identity()),r.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=u.Zero()),u.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform),r,i,!1,n);return a&&(a.ray=t),a}function I(e,t,r,i,s,n){return T(e,i=>p(e,t,r,i,s||null),i,n)}function x(e,t,r,i){return T(e,r=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=s.Matrix.Identity()),r.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=u.Zero()),u.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform),r,i)}function C(e,t=100,r,i){return V(e,new u(s.Vector3.Zero(),s.Vector3.Zero(),t),t,r,i)}function V(e,t,r=100,i,n){i||(i=e.getWorldMatrix()),t.length=r,n?t.origin.copyFrom(n):t.origin.copyFrom(e.position);let a=s.TmpVectors.Vector3[2];a.set(0,0,e._scene.useRightHandedSystem?-1:1);let o=s.TmpVectors.Vector3[3];return s.Vector3.TransformNormalToRef(a,i,o),s.Vector3.NormalizeToRef(o,t.direction),t}function v(e,t){t&&(t.prototype.getForwardRay=function(e=100,t,r){return V(this,new u(s.Vector3.Zero(),s.Vector3.Zero(),e),e,t,r)},t.prototype.getForwardRayToRef=function(e,t=100,r,i){return V(this,e,t,r,i)}),e&&(c._ImportHelper._IsPickingAvailable=!0,e.prototype.createPickingRay=function(e,t,r,i,s=!1){return p(this,e,t,r,i,s)})}u._TmpVector3=(0,n.BuildArray)(6,s.Vector3.Zero),u._RayDistant=u.Zero(),u._Smallnum=1e-8,u._Rayl=1e9,e.s(["AddRayExtensions",0,v,"CreatePickingRay",0,p,"CreatePickingRayInCameraSpace",0,f,"CreatePickingRayInCameraSpaceToRef",0,_,"CreatePickingRayToRef",0,d,"GetForwardRay",0,C,"GetForwardRayToRef",0,V,"MultiPick",0,I,"MultiPickWithRay",0,x,"Pick",0,M,"PickWithBoundingInfo",0,P,"PickWithRay",0,b,"PickingCustomization",0,l,"Ray",0,u],75258);let F=!1;function k(){F||(F=!0,v(t.Scene,r.Camera),t.Scene.prototype.createPickingRayToRef=function(e,t,r,i,s,n=!1,a=!1){return d(this,e,t,r,i,s,n,a)},t.Scene.prototype.createPickingRayInCameraSpace=function(e,t,r){return f(this,e,t,r)},t.Scene.prototype.createPickingRayInCameraSpaceToRef=function(e,t,r,i){return _(this,e,t,r,i)},t.Scene.prototype.pickWithBoundingInfo=function(e,t,r,i,s){return P(this,e,t,r,i,s)},t.Scene.prototype.pick=function(e,t,r,i,s,n,a=!1){return M(this,e,t,r,i,s,n,a)},t.Scene.prototype.pickWithRay=function(e,t,r,i){return b(this,e,t,r,i)},t.Scene.prototype.multiPick=function(e,t,r,i,s){return I(this,e,t,r,i,s)},t.Scene.prototype.multiPickWithRay=function(e,t,r){return x(this,e,t,r)})}e.s(["RegisterRay",0,k],88165),k(),e.s([],95484),e.i(95484),e.i(88165),e.i(75258),e.s(["AddRayExtensions",0,v,"CreatePickingRay",0,p,"CreatePickingRayInCameraSpace",0,f,"CreatePickingRayInCameraSpaceToRef",0,_,"CreatePickingRayToRef",0,d,"GetForwardRay",0,C,"GetForwardRayToRef",0,V,"MultiPick",0,I,"MultiPickWithRay",0,x,"Pick",0,M,"PickWithBoundingInfo",0,P,"PickWithRay",0,b,"PickingCustomization",0,l,"Ray",0,u,"RegisterRay",0,k],73034),e.i(73034),e.s(["AddRayExtensions",0,v,"CreatePickingRay",0,p,"CreatePickingRayInCameraSpace",0,f,"CreatePickingRayInCameraSpaceToRef",0,_,"CreatePickingRayToRef",0,d,"GetForwardRay",0,C,"GetForwardRayToRef",0,V,"MultiPick",0,I,"MultiPickWithRay",0,x,"Pick",0,M,"PickWithBoundingInfo",0,P,"PickWithRay",0,b,"PickingCustomization",0,l,"Ray",0,u,"RegisterRay",0,k],12675)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47150,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])},21758,27480,68056,t=>{"use strict";t.s([],27480);var e=t.i(69400),n=t.i(16347),r=t.i(90025),a=t.i(64831),s=t.i(41041);let i="bakedVertexAnimationSettingsInstanced";function o(t){let e=t.bakedVertexAnimationManager?.texture?.getInternalTexture()?._bufferView;return e instanceof Float32Array||e instanceof Uint16Array}let h=!1;function f(){h||(h=!0,a.Mesh.prototype.thinInstanceAdd=function(t,e=!0){if(!this.getScene().getEngine().getCaps().instancedArrays)return n.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 r=this._thinInstanceDataStorage.instancesCount;if(Array.isArray(t))for(let n=0;n<t.length;++n)this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t[n],n===t.length-1&&e);else this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t,e);return r},a.Mesh.prototype.thinInstanceAddSelf=function(t=!0){return this.thinInstanceAdd(e.Matrix.IdentityReadOnly,t)},a.Mesh.prototype.thinInstanceRegisterAttribute=function(t,e){t===s.VertexBuffer.ColorKind&&(t=s.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 s.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!0,!1,e,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t])},a.Mesh.prototype.thinInstanceSetMatrixAt=function(t,e,n=!0){if(!this._thinInstanceDataStorage.matrixData||t>=this._thinInstanceDataStorage.instancesCount)return!1;let r=this._thinInstanceDataStorage.matrixData;return e.copyToArray(r,16*t),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[t]=e),n&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},a.Mesh.prototype.thinInstanceSetAttributeAt=function(t,e,n,r=!0){return t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),!!this._userThinInstanceBuffersStorage&&!!this._userThinInstanceBuffersStorage.data[t]&&!(e>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(t,0),this._userThinInstanceBuffersStorage.data[t].set(n,e*this._userThinInstanceBuffersStorage.strides[t]),r&&this.thinInstanceBufferUpdated(t),!0)},Object.defineProperty(a.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}),a.Mesh.prototype._thinInstanceCreateMatrixBuffer=function(t,e,n=!0){let r=new s.Buffer(this.getEngine(),e,!n,16,!1,!0);for(let e=0;e<4;e++)this.setVerticesBuffer(r.createVertexBuffer(t+e,4*e,4));return r},a.Mesh.prototype.thinInstanceSetBuffer=function(t,e,n=0,r=!0){if(n=n||16,"matrix"===t)this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=e?e.length:32*n,this._thinInstanceDataStorage.matrixData=e,this._thinInstanceDataStorage.worldMatrices=null,null!==e?(this._thinInstanceDataStorage.instancesCount=e.length/n,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",e,r),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,r));else if("splatIndex"===t&&e){this._thinInstanceInitializeUserStorage(),this._thinInstanceDataStorage.instancesCount=e.length/n,this._userThinInstanceBuffersStorage.data[t]=e,this._userThinInstanceBuffersStorage.strides[t]=n,this._userThinInstanceBuffersStorage.sizes[t]=e.length;let r=new s.Buffer(this.getEngine(),e,!0,16,!1,!0);this._thinInstanceDataStorage.matrixBuffer=r;for(let e=0;e<4;e++)this.setVerticesBuffer(r.createVertexBuffer(t+e,4*e,4))}else t===s.VertexBuffer.ColorKind&&(t=s.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]=n,this._userThinInstanceBuffersStorage.sizes[t]=e.length,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new s.VertexBuffer(this.getEngine(),e,t,!r,!1,n,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},a.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===s.VertexBuffer.ColorKind&&(t=s.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)))},a.Mesh.prototype.thinInstancePartialBufferUpdate=function(t,e,n){if("matrix"===t)this._thinInstanceDataStorage.matrixBuffer&&("number"==typeof e?this._thinInstanceDataStorage.matrixBuffer.updateDirectly(new Float32Array(this._thinInstanceDataStorage.matrixData.buffer,this._thinInstanceDataStorage.matrixData.byteOffset+16*n*Float32Array.BYTES_PER_ELEMENT,16*e),16*n):this._thinInstanceDataStorage.matrixBuffer.updateDirectly(e,n));else if(t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]){let r=this._userThinInstanceBuffersStorage.vertexBuffers[t];if("number"==typeof e){let r=new Float32Array(this._userThinInstanceBuffersStorage.data[t].buffer,this._userThinInstanceBuffersStorage.data[t].byteOffset+n*this._userThinInstanceBuffersStorage.strides[t]*Float32Array.BYTES_PER_ELEMENT,e*this._userThinInstanceBuffersStorage.strides[t]);this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(r,n*this._userThinInstanceBuffersStorage.strides[t])}else r.updateDirectly(e,n)}},a.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 n=0;n<this._thinInstanceDataStorage.instancesCount;++n)this._thinInstanceDataStorage.worldMatrices[n]=e.Matrix.FromArray(t,16*n)}return this._thinInstanceDataStorage.worldMatrices},a.Mesh.prototype.thinInstanceRefreshBoundingInfo=function(t=!1,n=!1,a=!1,h=!1){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return;let f=this._thinInstanceDataStorage.boundingVectors;if(t||!this.rawBoundingInfo){if(f.length=0,h&&function(t,n,a){let h=t._userThinInstanceBuffersStorage,f=h?.data[i],u=h?.strides[i];if(!f||!u||u<4||!o(t))return!1;let c=t._thinInstanceDataStorage.matrixData;if(!c)return!1;let I={},g=e.TmpVectors.Vector4[0],S=e.TmpVectors.Vector3[1],l=e.TmpVectors.Vector3[2],B=e.TmpVectors.Vector3[3],d=e.TmpVectors.Vector3[4],_=e.TmpVectors.Vector3[5],x=e.TmpVectors.Vector3[6],p=e.TmpVectors.Matrix[2],m=t.geometry?t.geometry.boundingBias:null,D=t.getTotalVertices();S.setAll(1/0),l.setAll(-1/0),B.setAll(1/0),d.setAll(-1/0);for(let n=0;n<t._thinInstanceDataStorage.instancesCount;++n){let r=n*u;g.set(f[r],f[r+1],f[r+2],f[r+3]);let i=t._getData({applyMorph:a,applyBakedVertexAnimation:!0,bakedVertexAnimationSettings:g,updatePositionsArray:!1,cache:I},null,s.VertexBuffer.PositionKind);if(!i)return!1;_.setAll(1/0),x.setAll(-1/0);for(let t=0;t<3*D;t+=3){let e=i[t],n=i[t+1],r=i[t+2];e<_.x&&(_.x=e),n<_.y&&(_.y=n),r<_.z&&(_.z=r),e>x.x&&(x.x=e),n>x.y&&(x.y=n),r>x.z&&(x.z=r)}m&&(_.x-=_.x*m.x+m.y,_.y-=_.y*m.x+m.y,_.z-=_.z*m.x+m.y,x.x+=x.x*m.x+m.y,x.y+=x.y*m.x+m.y,x.z+=x.z*m.x+m.y),S.minimizeInPlace(_),l.maximizeInPlace(x),e.Matrix.FromArrayToRef(c,16*n,p),m?function(t,n,r,a,s){let i=e.TmpVectors.Vector3[7],o=e.TmpVectors.Vector3[8];for(let h=0;h<2;++h)for(let f=0;f<2;++f)for(let u=0;u<2;++u)i.set(h?n.x:t.x,f?n.y:t.y,u?n.z:t.z),e.Vector3.TransformCoordinatesToRef(i,r,o),a.minimizeInPlace(o),s.maximizeInPlace(o)}(_,x,p,B,d):function(t,n,r,a,s){let i=e.TmpVectors.Vector3[7];for(let o=0;o<3*n;o+=3)e.Vector3.TransformCoordinatesFromFloatsToRef(t[o],t[o+1],t[o+2],r,i),a.minimizeInPlace(i),s.maximizeInPlace(i)}(i,D,p,B,d)}if(!isFinite(S.x)||!isFinite(B.x))return!1;t.getBoundingInfo().reConstruct(B,d),t.rawBoundingInfo=new r.BoundingInfo(S,l);var T=t.rawBoundingInfo;n.length=0;for(let t=0;t<T.boundingBox.vectors.length;++t)n.push(T.boundingBox.vectors[t].clone());return t._updateBoundingInfo(),!0}(this,f,a))return;h&&this.bakedVertexAnimationManager?.isEnabled&&o(this)?this.refreshBoundingInfo({applySkeleton:n,applyMorph:a,applyBakedVertexAnimation:!0,updatePositionsArray:!1}):this.refreshBoundingInfo(n,a);let t=this.getBoundingInfo();this.rawBoundingInfo=new r.BoundingInfo(t.minimum,t.maximum)}let u=this.getBoundingInfo(),c=this._thinInstanceDataStorage.matrixData;if(0===f.length)for(let t=0;t<u.boundingBox.vectors.length;++t)f.push(u.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(c,16*t,e.TmpVectors.Matrix[0]);for(let t=0;t<f.length;++t)e.Vector3.TransformCoordinatesToRef(f[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])}u.reConstruct(e.TmpVectors.Vector3[0],e.TmpVectors.Vector3[1]),this._updateBoundingInfo()},a.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===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new s.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!e,!1,this._userThinInstanceBuffersStorage.strides[t],!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},a.Mesh.prototype._thinInstanceUpdateBufferSize=function(t,e=1){t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind);let n="matrix"===t;if(!n&&(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.strides[t]))return;let r=n?16:this._userThinInstanceBuffersStorage.strides[t],a=n?this._thinInstanceDataStorage.matrixBufferSize:this._userThinInstanceBuffersStorage.sizes[t],i=n?this._thinInstanceDataStorage.matrixData:this._userThinInstanceBuffersStorage.data[t],o=(this._thinInstanceDataStorage.instancesCount+e)*r,h=a;for(;h<o;)h*=2;if(!i||a!=h){if(i){let t=new Float32Array(h);t.set(i,0),i=t}else i=new Float32Array(h);n?(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 s.VertexBuffer(this.getEngine(),i,t,!0,!1,r,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))}},a.Mesh.prototype._thinInstanceInitializeUserStorage=function(){this._userThinInstanceBuffersStorage||(this._userThinInstanceBuffersStorage={data:{},sizes:{},vertexBuffers:{},strides:{}})},a.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,f],68056),f(),t.s([],21758)},27870,t=>{"use strict";t.i(21758),t.i(27480);var e=t.i(68056);t.s(["RegisterThinInstanceMesh",()=>e.RegisterThinInstanceMesh])},5742,t=>{t.v(e=>Promise.all(["static/chunks/0rykrf_vofbad.js"].map(e=>t.l(e))).then(()=>e(12838)))}]);
|