@uptimizr/dashboard 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +4 -4
- package/out/__next._full.txt +11 -11
- package/out/__next._head.txt +4 -4
- package/out/__next._index.txt +4 -4
- package/out/__next._tree.txt +2 -2
- package/out/_next/static/chunks/0-29qf-q72olu.js +1 -0
- package/out/_next/static/chunks/0-tk5ptli--r0.js +1 -0
- package/out/_next/static/chunks/006nix8mv66z_.js +1 -0
- package/out/_next/static/chunks/01aeari2x_tlz.js +1 -0
- package/out/_next/static/chunks/0296l8lzd69ns.js +1 -0
- package/out/_next/static/chunks/02tc9r3sc7fgc.js +1 -0
- package/out/_next/static/chunks/{256k1jw1m--l7.js → 03st_hmor6qju.js} +1 -1
- package/out/_next/static/chunks/{2ue1wo4ryk87z.js → 04pk6n3z75dcy.js} +1 -1
- package/out/_next/static/chunks/05l3dluxivcor.js +1 -0
- package/out/_next/static/chunks/06ljadw2-i91-.js +1 -0
- package/out/_next/static/chunks/06m_64ysu9kn0.js +1 -0
- package/out/_next/static/chunks/{2ycvtdd68gub7.js → 08bm3ye5govev.js} +1 -1
- package/out/_next/static/chunks/{32ahba5ezp467.js → 08rk1dp1wb-gm.js} +38 -38
- package/out/_next/static/chunks/091ll-lp6spu3.js +1 -0
- package/out/_next/static/chunks/09p5fltt7o3to.js +1 -0
- package/out/_next/static/chunks/{3mbnfpufs2-7e.js → 0_tqu60oxaj7q.js} +1 -1
- package/out/_next/static/chunks/{3riekaxl3uxfb.js → 0_ux41xcoea3u.js} +40 -40
- package/out/_next/static/chunks/0b7-mrrg7ryj2.js +1 -0
- package/out/_next/static/chunks/{29tfeb6amdkjb.js → 0c2k-gvwph4qs.js} +1 -1
- package/out/_next/static/chunks/0e7xuupmrw4-e.js +1 -0
- package/out/_next/static/chunks/0f_nv15a8q415.js +1 -0
- package/out/_next/static/chunks/0fxfsshoxnnh6.js +4 -0
- package/out/_next/static/chunks/0g6u34xkzrpjn.js +1 -0
- package/out/_next/static/chunks/0g7p8zp2kxve5.js +1 -0
- package/out/_next/static/chunks/0gblbgw7w7r9w.js +1 -0
- package/out/_next/static/chunks/0gwa154w_0wuh.js +1 -0
- package/out/_next/static/chunks/0h-ohf4gntwtj.js +1 -0
- package/out/_next/static/chunks/0h1o0cr3327tt.js +1 -0
- package/out/_next/static/chunks/0i9oqg-xbq-a9.js +1 -0
- package/out/_next/static/chunks/0ioyy42h35hnd.js +1 -0
- package/out/_next/static/chunks/{242xhzxxetctz.js → 0jf3n5n5yrr4o.js} +1 -1
- package/out/_next/static/chunks/{3idaz_s77e-j_.js → 0jxklh_ayjd4b.js} +12 -12
- package/out/_next/static/chunks/{07eeopuufsqp-.js → 0k79ryqehst0b.js} +11 -11
- package/out/_next/static/chunks/{3be6s4_kn9q-o.js → 0kcbdjbdxu_wa.js} +1 -1
- package/out/_next/static/chunks/0kr-bd6fuqc2s.js +1 -0
- package/out/_next/static/chunks/0l3wwyl93sqh9.js +1 -0
- package/out/_next/static/chunks/{3l1dr_qm_x5kp.js → 0m0n7kjzscx0y.js} +1 -1
- package/out/_next/static/chunks/0m3yjobjg36ce.js +1 -0
- package/out/_next/static/chunks/{1a9l89j7e6mqu.js → 0mk8tangq9equ.js} +1 -1
- package/out/_next/static/chunks/0mqi0xn_c010j.js +1 -0
- package/out/_next/static/chunks/0msckddycfy76.js +1 -0
- package/out/_next/static/chunks/0ngai1_zxwsk8.js +1 -0
- package/out/_next/static/chunks/0ngiuj5k-or6g.js +1 -0
- package/out/_next/static/chunks/0nx_t8iq-324h.js +1 -0
- package/out/_next/static/chunks/0oap0o8a8a_cl.js +1 -0
- package/out/_next/static/chunks/{3tm-pqpmq_ppw.js → 0ostjlqtwkhqr.js} +1 -1
- package/out/_next/static/chunks/{1uu-rt_8p1edp.js → 0ptp4ne7j6yg6.js} +11 -11
- package/out/_next/static/chunks/0rruvj1cyflrh.js +1 -0
- package/out/_next/static/chunks/{0o_mp98xzqfyf.js → 0tl8j9f8lt0yf.js} +1 -1
- package/out/_next/static/chunks/{0sqys6o2pbe1q.js → 0ufakw529sr9d.js} +38 -38
- package/out/_next/static/chunks/{3ne77mjdz2y7o.js → 0vddljjnmozzx.js} +1 -1
- package/out/_next/static/chunks/{0dm32-jq30tg8.js → 0w0sx062qmcsh.js} +1 -1
- package/out/_next/static/chunks/{0rys92_73hdb0.js → 0x4-zyy8pzmlq.js} +1 -1
- package/out/_next/static/chunks/0x6i6e6863tir.js +1 -0
- package/out/_next/static/chunks/{3k9d4ylc3li2t.js → 0zcdc17ie6lmh.js} +10 -10
- package/out/_next/static/chunks/{44nxswtahaq4w.js → 0zo4x1j8ug-kb.js} +5 -5
- package/out/_next/static/chunks/{0jmn7u31w95ly.js → 0zwkmsojeuekb.js} +2 -2
- package/out/_next/static/chunks/{3m6nmp2dca6un.js → 1--aypw9o8yng.js} +37 -37
- package/out/_next/static/chunks/1--kelnig7pxx.js +1 -0
- package/out/_next/static/chunks/1-ud6hztxiazp.js +1 -0
- package/out/_next/static/chunks/10v4rskkrjgd_.js +1 -0
- package/out/_next/static/chunks/117ys3lltfmcu.js +1 -0
- package/out/_next/static/chunks/14klj_i6-l-10.js +1 -0
- package/out/_next/static/chunks/159u-hx80yfaw.js +1 -0
- package/out/_next/static/chunks/{3gimb3z_mteou.js → 168r9r65o9jnc.js} +1 -1
- package/out/_next/static/chunks/{0w8_1yjvol1f0.js → 16d4a4iopj2if.js} +5 -5
- package/out/_next/static/chunks/{2z_jn9ud28fk7.js → 17d1isrw8gtnb.js} +1 -1
- package/out/_next/static/chunks/17dabmbnkkplu.js +1 -0
- package/out/_next/static/chunks/17dmbt396_tyq.js +1 -0
- package/out/_next/static/chunks/17ev44x54_jrd.js +1 -0
- package/out/_next/static/chunks/17svumd4o0qnc.js +1 -0
- package/out/_next/static/chunks/17v12p4sfraa0.js +1 -0
- package/out/_next/static/chunks/18avgwx9nlxp9.js +1 -0
- package/out/_next/static/chunks/{0tw4dyl-cp-hd.js → 18k-0jn63_5ie.js} +1 -1
- package/out/_next/static/chunks/18r387bj9iv0j.js +1 -0
- package/out/_next/static/chunks/18ss4ls60s31e.js +1 -0
- package/out/_next/static/chunks/1a7cup181rjod.js +1 -0
- package/out/_next/static/chunks/1ajmblsp0wj0_.js +1 -0
- package/out/_next/static/chunks/{1dsy2ngmfflis.js → 1b2tkk7e_2o0k.js} +2 -2
- package/out/_next/static/chunks/{1ltux4lwz7muf.js → 1bv97vf67p_ri.js} +33 -33
- package/out/_next/static/chunks/1e1zozntzsx42.js +1 -0
- package/out/_next/static/chunks/1ek5rtpo6rxev.js +1 -0
- package/out/_next/static/chunks/1evp209qbr4cr.js +5 -0
- package/out/_next/static/chunks/1f1vq3goue1w4.js +1 -0
- package/out/_next/static/chunks/{296w2ke-v5tbm.js → 1f92k-xa0pl-3.js} +1 -1
- package/out/_next/static/chunks/1fa265388524p.js +1 -0
- package/out/_next/static/chunks/1fruncg3k-3pu.js +3 -0
- package/out/_next/static/chunks/{1_qzlkuxukhpq.js → 1fvlbwp6r93wo.js} +22 -22
- package/out/_next/static/chunks/1g3z43o3h-024.js +31 -0
- package/out/_next/static/chunks/1g_27texazqcj.js +1 -0
- package/out/_next/static/chunks/1iaxzjly2pap1.js +1 -0
- package/out/_next/static/chunks/{0c83pe1mpx456.js → 1j--a56ji33_x.js} +1 -1
- package/out/_next/static/chunks/{112hws17nz665.js → 1kl5xxohpr6-4.js} +1 -1
- package/out/_next/static/chunks/1kmsg9ef5djl3.js +1 -0
- package/out/_next/static/chunks/1kq86iv41cet4.js +1 -0
- package/out/_next/static/chunks/1l12hkz1g7uhf.js +1 -0
- package/out/_next/static/chunks/{3figbil1t4ssj.js → 1ll0ta8a2qx1p.js} +16 -16
- package/out/_next/static/chunks/{1ynju1jqfrcv0.js → 1oara6fkfvgs3.js} +1 -1
- package/out/_next/static/chunks/1par9m038tiov.js +1 -0
- package/out/_next/static/chunks/1rcfy_gzean3n.js +1 -0
- package/out/_next/static/chunks/{35h5n42wxwgzk.js → 1rne-b-ktit5c.js} +2 -2
- package/out/_next/static/chunks/1t60cososq7b0.js +1 -0
- package/out/_next/static/chunks/1tdg_eolxlcdl.js +1 -0
- package/out/_next/static/chunks/1vkww9l6lgqag.js +1 -0
- package/out/_next/static/chunks/1vpcaaf-0dn7q.js +1 -0
- package/out/_next/static/chunks/1vzmzrjhlm1q5.js +1 -0
- package/out/_next/static/chunks/1w9xu1qa9-wmv.js +1 -0
- package/out/_next/static/chunks/1wyr4at61q29n.js +1 -0
- package/out/_next/static/chunks/{3_mu-4rdjajna.js → 1y12bjsbq18_t.js} +34 -34
- package/out/_next/static/chunks/1y20bv6vl4ylk.js +1 -0
- package/out/_next/static/chunks/{0tnlbw78tgaxp.js → 1zcrrq1fx8g2y.js} +2 -2
- package/out/_next/static/chunks/224_scesvd739.js +1 -0
- package/out/_next/static/chunks/229mkx-mtfcgf.js +1 -0
- package/out/_next/static/chunks/{3yfrsm8lfi6ls.js → 22qzld31fbhbv.js} +1 -1
- package/out/_next/static/chunks/245h82k-g1nxr.js +1 -0
- package/out/_next/static/chunks/24cqjhy669845.js +1 -0
- package/out/_next/static/chunks/25ctnyh7njp-d.js +4 -0
- package/out/_next/static/chunks/2716si10ouwu-.js +1 -0
- package/out/_next/static/chunks/286ggpetqnwyo.js +3 -0
- package/out/_next/static/chunks/28f1onw3nywbz.js +1 -0
- package/out/_next/static/chunks/28ycc-1519hl2.js +1 -0
- package/out/_next/static/chunks/{17xd8hnazzr0g.js → 29v8falcmjvev.js} +34 -33
- package/out/_next/static/chunks/{0o6ayai0s01js.js → 2_7dp91937mqi.js} +1 -1
- package/out/_next/static/chunks/2_hgfg-cjqw1-.js +1 -0
- package/out/_next/static/chunks/2ab-99frxpah-.js +1 -0
- package/out/_next/static/chunks/2apt1vh-7rl2l.js +1 -0
- package/out/_next/static/chunks/2bn9u9r0rfhvc.js +1 -0
- package/out/_next/static/chunks/{45bwefvdpztfs.js → 2btqzk0tj0gz6.js} +1 -1
- package/out/_next/static/chunks/2cvvxifoedn6j.js +1 -0
- package/out/_next/static/chunks/2dhv35o59yzao.js +1 -0
- package/out/_next/static/chunks/{17q0c2h5ui10r.js → 2dolerz81xb52.js} +1 -1
- package/out/_next/static/chunks/{2xwy0-qfho1iz.js → 2dqg85hsevk3c.js} +2 -2
- package/out/_next/static/chunks/{41wt50z9tx9cx.js → 2enlv4yy0t-9j.js} +12 -12
- package/out/_next/static/chunks/2ey30qeaob985.js +1 -0
- package/out/_next/static/chunks/2f0r-df7tb3pu.js +1 -0
- package/out/_next/static/chunks/2gh4z57fem0_v.js +1 -0
- package/out/_next/static/chunks/2gtebfttq1v0o.js +1 -0
- package/out/_next/static/chunks/{1ua15kzid0_8p.js → 2h051-1hu4co_.js} +9 -9
- package/out/_next/static/chunks/2h1uw3cluvmmo.js +1 -0
- package/out/_next/static/chunks/2ib62lnqqaf4p.js +1 -0
- package/out/_next/static/chunks/2j-sax2xfdv7l.js +1 -0
- package/out/_next/static/chunks/{3z84au-mitjjw.js → 2k4s5rt7-l8jr.js} +1 -1
- package/out/_next/static/chunks/2kje_jvmwsvwo.js +1 -0
- package/out/_next/static/chunks/{2cbmf9m7lqv6k.js → 2kn_dqzbyabtn.js} +1 -1
- package/out/_next/static/chunks/2ktxjmx03u9l3.js +1 -0
- package/out/_next/static/chunks/2kw33jl_i9o5j.css +3 -0
- package/out/_next/static/chunks/2l_oqx9idxcs8.js +1 -0
- package/out/_next/static/chunks/{42k2-4_2hrg6u.js → 2mleh3pbge181.js} +1 -1
- package/out/_next/static/chunks/{31u5lbu1vxznh.js → 2npk7tr63h7rl.js} +1 -1
- package/out/_next/static/chunks/2op88btas-hl8.js +1 -0
- package/out/_next/static/chunks/{1gs-5722l4u59.js → 2p8dbh81chhon.js} +1 -1
- package/out/_next/static/chunks/{2yph6f7khgqii.js → 2reukv9c7cq_9.js} +1 -1
- package/out/_next/static/chunks/{14ggsmqwej_tt.js → 2rjc8yn50ducj.js} +34 -34
- package/out/_next/static/chunks/2s0dwzg7kq36n.js +1 -0
- package/out/_next/static/chunks/2vaoftqgc44cg.js +1 -0
- package/out/_next/static/chunks/{3_gku1pwluoo0.js → 2vmybybb3dvia.js} +1 -1
- package/out/_next/static/chunks/2w7yf7ouyrlkb.js +1 -0
- package/out/_next/static/chunks/{3218lp8l0a5g_.js → 2y75diyxqlhzl.js} +1 -1
- package/out/_next/static/chunks/{0fh-9h9ylxskr.js → 2yr9wt421xdjr.js} +17 -17
- package/out/_next/static/chunks/{0otsec99kdkt7.js → 2yzui3v-besdu.js} +4 -4
- package/out/_next/static/chunks/{3wi9gzq2mtr_q.js → 2z9ot-w1x60fv.js} +1 -1
- package/out/_next/static/chunks/2zljunurdji0q.js +1 -0
- package/out/_next/static/chunks/30363ptka3vzy.js +1 -0
- package/out/_next/static/chunks/{38x3c1ra5slhe.js → 3043pprgv9ors.js} +23 -23
- package/out/_next/static/chunks/340pg0qkv5tqq.js +1 -0
- package/out/_next/static/chunks/{37epa8fz59vba.js → 348hdbpkkcq_2.js} +22 -21
- package/out/_next/static/chunks/34gp3hvr3j6um.js +1 -0
- package/out/_next/static/chunks/38ea9kqlbxt86.js +1 -0
- package/out/_next/static/chunks/38g9jpxjoxn2x.js +1 -0
- package/out/_next/static/chunks/390fogn9oz13i.js +1 -0
- package/out/_next/static/chunks/{3w9go565cjhq3.js → 39lxb7c--3_2u.js} +30 -30
- package/out/_next/static/chunks/39ojyykom0z2r.js +1 -0
- package/out/_next/static/chunks/{2bjlls8-qe05r.js → 3_bzxvqtk1t53.js} +12 -12
- package/out/_next/static/chunks/3ajhvedcs_lzb.js +1 -0
- package/out/_next/static/chunks/3bsvp8qhjqdu0.js +1 -0
- package/out/_next/static/chunks/{023axeoslq39i.js → 3d0ejsnhbzi-j.js} +1 -1
- package/out/_next/static/chunks/3d5yb9ybkz7hx.js +1 -0
- package/out/_next/static/chunks/{0echnagbkyx79.js → 3efuvh_35yhes.js} +39 -39
- package/out/_next/static/chunks/3fx3sriw1w3sa.js +1 -0
- package/out/_next/static/chunks/{2qq3uzsbiicw3.js → 3fz7tc-4j13uv.js} +21 -21
- package/out/_next/static/chunks/3g4e2txsrb2p2.js +1 -0
- package/out/_next/static/chunks/{1m_buecgcq67j.js → 3g5ae-38cepwm.js} +199 -199
- package/out/_next/static/chunks/3g_h_00xs9u59.js +1 -0
- package/out/_next/static/chunks/3gi0f1kg72xsf.js +1 -0
- package/out/_next/static/chunks/{38fhw7fatsyvd.js → 3he9bxsc67ivq.js} +1 -1
- package/out/_next/static/chunks/3hr-mlwi78nov.js +1 -0
- package/out/_next/static/chunks/3jha6wlqw8459.js +1 -0
- package/out/_next/static/chunks/3kr1polwvt6o_.js +1 -0
- package/out/_next/static/chunks/{0j__xaq_8_di1.js → 3mwoauxszd3mn.js} +1 -1
- package/out/_next/static/chunks/3ovd8o_usay7j.js +1 -0
- package/out/_next/static/chunks/3pdpaqzwhhijn.js +1 -0
- package/out/_next/static/chunks/3pyggl13glbdc.js +1 -0
- package/out/_next/static/chunks/3rl45k759wfi1.js +1 -0
- package/out/_next/static/chunks/{0flc7nppbmsl1.js → 3sbm1ak54_2ep.js} +1 -1
- package/out/_next/static/chunks/3sg4zff4-h3t1.js +1 -0
- package/out/_next/static/chunks/3urd7r018nel4.js +1 -0
- package/out/_next/static/chunks/3v0td-ziuai2i.js +1 -0
- package/out/_next/static/chunks/3vaho-xrtuchd.js +2 -0
- package/out/_next/static/chunks/3vxkkhs0vi_xa.js +1 -0
- package/out/_next/static/chunks/{1g7emwu85bifo.js → 3w1a2o8nevap8.js} +18 -18
- package/out/_next/static/chunks/3wqs57qehored.js +1 -0
- package/out/_next/static/chunks/3x6wpv_z5m6rz.js +1 -0
- package/out/_next/static/chunks/{1qg_etglhvp9h.js → 3y9c26fv1poq_.js} +199 -199
- package/out/_next/static/chunks/{0ql-s-tsmel_u.js → 404f_93w2e8ty.js} +1 -1
- package/out/_next/static/chunks/40acif2eh_unv.js +1 -0
- package/out/_next/static/chunks/{1hatz-jlztrn0.js → 4227p7752rnny.js} +1 -1
- package/out/_next/static/chunks/42oyfkhdvb-u3.js +1 -0
- package/out/_next/static/chunks/44gsjajjdhf51.js +1 -0
- package/out/_next/static/chunks/{turbopack-19105pdhzxp1x.js → turbopack-16ab30_1p4vhq.js} +1 -1
- package/out/_not-found/__next._full.txt +9 -9
- package/out/_not-found/__next._head.txt +4 -4
- package/out/_not-found/__next._index.txt +4 -4
- package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +2 -2
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +9 -9
- package/out/index.html +1 -1
- package/out/index.txt +11 -11
- package/package.json +8 -8
- package/out/_next/static/chunks/002cjeoit6-up.js +0 -1
- package/out/_next/static/chunks/02n1uiltexy3w.js +0 -1
- package/out/_next/static/chunks/03ab2khhe8-x5.js +0 -1
- package/out/_next/static/chunks/04_yytpc2paxy.js +0 -1
- package/out/_next/static/chunks/06qot1qvlsqaz.js +0 -1
- package/out/_next/static/chunks/08a5xek662n8n.js +0 -1
- package/out/_next/static/chunks/08wuc9--s8zn_.js +0 -1
- package/out/_next/static/chunks/0927l-ygd5c8d.js +0 -1
- package/out/_next/static/chunks/09510356f0lad.js +0 -1
- package/out/_next/static/chunks/0_eu72k69lxj7.js +0 -1
- package/out/_next/static/chunks/0beajlqy8p8b5.js +0 -1
- package/out/_next/static/chunks/0dn0yx0rn6mpf.js +0 -1
- package/out/_next/static/chunks/0eh1ml86u8dh7.js +0 -1
- package/out/_next/static/chunks/0fzmc1up21g1i.js +0 -1
- package/out/_next/static/chunks/0g_v2zswo4l6f.js +0 -1
- package/out/_next/static/chunks/0grlb9lo8e502.js +0 -1
- package/out/_next/static/chunks/0h22pg-0xrxnm.js +0 -1
- package/out/_next/static/chunks/0j6p1pmc14t96.js +0 -1
- package/out/_next/static/chunks/0j_6dx-sttgsy.js +0 -1
- package/out/_next/static/chunks/0kfd-cvj5fvtz.js +0 -1
- package/out/_next/static/chunks/0r47gs_e93cka.js +0 -1
- package/out/_next/static/chunks/0titqrn1qmcsv.js +0 -1
- package/out/_next/static/chunks/0tl_moiyi2txt.js +0 -1
- package/out/_next/static/chunks/0v82oqyoy9zol.js +0 -1
- package/out/_next/static/chunks/0vbce-8omgurc.js +0 -1
- package/out/_next/static/chunks/0vfsg5byzep_0.js +0 -1
- package/out/_next/static/chunks/0xh144a5fz58h.js +0 -1
- package/out/_next/static/chunks/0xjltg_pph0c8.js +0 -1
- package/out/_next/static/chunks/0yeqgh0dnas8d.js +0 -1
- package/out/_next/static/chunks/101-7e_7up7rk.js +0 -1
- package/out/_next/static/chunks/128e51hj_04r0.js +0 -1
- package/out/_next/static/chunks/12kv810lohbsx.js +0 -5
- package/out/_next/static/chunks/14bws-suyy5zu.js +0 -1
- package/out/_next/static/chunks/15s7425ffrec9.js +0 -3
- package/out/_next/static/chunks/17genz6pkmty_.js +0 -1
- package/out/_next/static/chunks/18dczy9ylt2s_.js +0 -1
- package/out/_next/static/chunks/18xs_kvsaolb0.js +0 -1
- package/out/_next/static/chunks/19016f8-ry0z6.js +0 -1
- package/out/_next/static/chunks/1_6oejyxj39li.js +0 -1
- package/out/_next/static/chunks/1_aon8nz9p1fr.js +0 -1
- package/out/_next/static/chunks/1akaj5rhgitn3.js +0 -1
- package/out/_next/static/chunks/1bvl1ws7b_3gn.js +0 -1
- package/out/_next/static/chunks/1cdbk6kxyr1c9.js +0 -1
- package/out/_next/static/chunks/1fbjkk55uu4_g.js +0 -1
- package/out/_next/static/chunks/1furcfsgrw_3g.js +0 -1
- package/out/_next/static/chunks/1g0-f1g3gn_rs.js +0 -1
- package/out/_next/static/chunks/1gt4kh0_xmigy.js +0 -1
- package/out/_next/static/chunks/1h8xzuuhhglu9.js +0 -1
- package/out/_next/static/chunks/1iioifo7i0t0_.js +0 -1
- package/out/_next/static/chunks/1iiz7jqgj20z0.js +0 -1
- package/out/_next/static/chunks/1kujmd5n0j9nk.js +0 -1
- package/out/_next/static/chunks/1n9sy0yt5d2vq.js +0 -1
- package/out/_next/static/chunks/1nj82er7msdto.js +0 -2
- package/out/_next/static/chunks/1p1gz6dseck--.js +0 -1
- package/out/_next/static/chunks/1p1xtsfwvpuqo.js +0 -1
- package/out/_next/static/chunks/1p8f6okk2ewbz.js +0 -1
- package/out/_next/static/chunks/1pdep2_c530sg.js +0 -1
- package/out/_next/static/chunks/1th_t5ujeqlkf.js +0 -1
- package/out/_next/static/chunks/1thr-mdzbu96v.js +0 -1
- package/out/_next/static/chunks/1tta1a064979p.js +0 -1
- package/out/_next/static/chunks/1u_riwm0nfww7.js +0 -1
- package/out/_next/static/chunks/1uu93wuxigx4k.js +0 -1
- package/out/_next/static/chunks/1vuq3dos1406d.css +0 -3
- package/out/_next/static/chunks/1zfojlgb15okk.js +0 -1
- package/out/_next/static/chunks/1zj8x5wbgnzz-.js +0 -1
- package/out/_next/static/chunks/1zl6t15gh34nn.js +0 -1
- package/out/_next/static/chunks/2-qo2o1_fmpy-.js +0 -3
- package/out/_next/static/chunks/223vrr_4sfhsj.js +0 -1
- package/out/_next/static/chunks/22cr2b04btguf.js +0 -1
- package/out/_next/static/chunks/24essz5mmvx-6.js +0 -1
- package/out/_next/static/chunks/259obyrpxcv6r.js +0 -1
- package/out/_next/static/chunks/26v9yqicofqba.js +0 -1
- package/out/_next/static/chunks/2712627rfsmwn.js +0 -1
- package/out/_next/static/chunks/290d93hmm_e8b.js +0 -1
- package/out/_next/static/chunks/2_2fk7iddrs43.js +0 -1
- package/out/_next/static/chunks/2ckd7f1wbfod-.js +0 -1
- package/out/_next/static/chunks/2d6hru4qo23tt.js +0 -1
- package/out/_next/static/chunks/2ejvntxtvf5o9.js +0 -1
- package/out/_next/static/chunks/2f7_3tzf7xhps.js +0 -1
- package/out/_next/static/chunks/2gxd_o1g89_bv.js +0 -1
- package/out/_next/static/chunks/2hd2txb4-m9k1.js +0 -1
- package/out/_next/static/chunks/2hpxou_cnp4f_.js +0 -1
- package/out/_next/static/chunks/2izioctrfc0s5.js +0 -1
- package/out/_next/static/chunks/2jhnk4h4n0udv.js +0 -1
- package/out/_next/static/chunks/2jpkhkk9zi8-f.js +0 -1
- package/out/_next/static/chunks/2kpet_l1kq2sx.js +0 -1
- package/out/_next/static/chunks/2nck5w4c7leb7.js +0 -1
- package/out/_next/static/chunks/2qqqpu0ahfdda.js +0 -1
- package/out/_next/static/chunks/2r3ct6se2qn8z.js +0 -1
- package/out/_next/static/chunks/2u-f7mmxvk8wj.js +0 -1
- package/out/_next/static/chunks/2uk-vwlxe9-xr.js +0 -1
- package/out/_next/static/chunks/2ur5-lxdvv1jm.js +0 -1
- package/out/_next/static/chunks/2veqsohwfhfqc.js +0 -1
- package/out/_next/static/chunks/2vqlv9wnewhu9.js +0 -1
- package/out/_next/static/chunks/2wzshintp5lf8.js +0 -1
- package/out/_next/static/chunks/2x-00glogc485.js +0 -1
- package/out/_next/static/chunks/2yfxy0f5fqs4o.js +0 -1
- package/out/_next/static/chunks/2z88mt3ixktu3.js +0 -1
- package/out/_next/static/chunks/3-eswqjobiqk1.js +0 -1
- package/out/_next/static/chunks/30-tbi7pys6fp.js +0 -4
- package/out/_next/static/chunks/30c-nsedy_ce0.js +0 -1
- package/out/_next/static/chunks/337hn35kts7ud.js +0 -1
- package/out/_next/static/chunks/33dgpebv-tf73.js +0 -1
- package/out/_next/static/chunks/36jkdhq6kb-cf.js +0 -1
- package/out/_next/static/chunks/3833xfnz0a-ub.js +0 -1
- package/out/_next/static/chunks/38awrh_qxn22k.js +0 -1
- package/out/_next/static/chunks/39idqlqlcp5b9.js +0 -1
- package/out/_next/static/chunks/3coacc4-g-g5c.js +0 -1
- package/out/_next/static/chunks/3e00fzdfkclzq.js +0 -1
- package/out/_next/static/chunks/3e8fmlq0k5wkg.js +0 -1
- package/out/_next/static/chunks/3e9tzyrt4_98z.js +0 -1
- package/out/_next/static/chunks/3edelqkq92pil.js +0 -1
- package/out/_next/static/chunks/3j-4wuhs5weba.js +0 -1
- package/out/_next/static/chunks/3jjfnwvybayy7.js +0 -1
- package/out/_next/static/chunks/3jwm5dfk_78gc.js +0 -1
- package/out/_next/static/chunks/3l3_0ack3gy4k.js +0 -1
- package/out/_next/static/chunks/3lwhs5ja7tun3.js +0 -1
- package/out/_next/static/chunks/3mcd08gmt038z.js +0 -1
- package/out/_next/static/chunks/3mt5th7b1i_u9.js +0 -1
- package/out/_next/static/chunks/3puhrqtujktyv.js +0 -1
- package/out/_next/static/chunks/3rdifucupcgkg.js +0 -1
- package/out/_next/static/chunks/3sdoskq_buttj.js +0 -1
- package/out/_next/static/chunks/3sjq_xoi4rbyg.js +0 -31
- package/out/_next/static/chunks/3tg-ma9tv9xu4.js +0 -1
- package/out/_next/static/chunks/3xagd_2_9zft2.js +0 -1
- package/out/_next/static/chunks/3xsq_anpad-fb.js +0 -1
- package/out/_next/static/chunks/3ycv2qq7vpbua.js +0 -1
- package/out/_next/static/chunks/4030dhur2h70-.js +0 -1
- package/out/_next/static/chunks/40ffffml4h_3r.js +0 -4
- package/out/_next/static/chunks/431slrqh0wa0g.js +0 -1
- package/out/_next/static/chunks/43s_lbd1i2krj.js +0 -1
- /package/out/_next/static/{1NTbwHeIsn3AW-SeH9aP0 → 2AsIePMYsPfJoAl46w-g4}/_buildManifest.js +0 -0
- /package/out/_next/static/{1NTbwHeIsn3AW-SeH9aP0 → 2AsIePMYsPfJoAl46w-g4}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{1NTbwHeIsn3AW-SeH9aP0 → 2AsIePMYsPfJoAl46w-g4}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36516,e=>{"use strict";var t=e.i(99267),r=e.i(96265),s=e.i(58720),i=e.i(63132),n=e.i(68179),a=e.i(13379),h=e.i(33855),o=e.i(471),d=e.i(48657),c=e.i(23240),l=e.i(45707),_=e.i(21823);class g{get renderList(){return this._renderList}set renderList(e){this._renderList!==e&&(this._unObserveRenderList&&(this._unObserveRenderList(),this._unObserveRenderList=null),e&&(this._unObserveRenderList=(0,d._ObserveArray)(e,this._renderListHasChanged)),this._renderList=e)}get disableImageProcessing(){return this._disableImageProcessing}set disableImageProcessing(e){e!==this._disableImageProcessing&&(this._disableImageProcessing=e,this._scene.markAllMaterialsAsDirty(64))}get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){this._disableDepthPrePass=e,this._renderingManager.disableDepthPrePass=e}get name(){return this._name}set name(e){if(this._name!==e){if(this._name=e,this._sceneUBOs)for(let e=0;e<this._sceneUBOs.length;++e)this._sceneUBOs[e].name=`Scene ubo #${e} for ${this.name}`;if(this._scene)for(let e=0;e<this._renderPassIds.length;++e){let t=this._renderPassIds[e];this._engine._renderPassNames[t]=`${this._name}#${e}`}}}get renderPassIds(){return this._renderPassIds}get currentRefreshId(){return this._currentRefreshId}getActiveMeshes(){return this._activeMeshes}setMaterialForRendering(e,t){let r;r=Array.isArray(e)?e:[e];for(let e=0;e<r.length;++e)for(let s=0;s<this.options.numPasses;++s){let i=r[e];r[e].isAnInstance&&(i=r[e].sourceMesh),i.setMaterialForRenderPass(this._renderPassIds[s],void 0!==t?Array.isArray(t)?t[s]:t:void 0)}}_freezeActiveMeshes(e){this._freezeActiveMeshesCancel=(0,c._RetryWithInterval)(()=>this._checkReadiness(),()=>{if(this._freezeActiveMeshesCancel=null,e)for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._freeze();this._prepareRenderingManager(0,!0),this._isFrozen=!0},(e,t)=>{this._freezeActiveMeshesCancel=null,t?(a.Logger.Error("ObjectRenderer: Timeout while waiting for the renderer to be ready."),e&&a.Logger.Error(e)):(a.Logger.Error("ObjectRenderer: An unexpected error occurred while waiting for the renderer to be ready."),e&&(a.Logger.Error(e),e.stack&&a.Logger.Error(e.stack)))})}_unfreezeActiveMeshes(){this._freezeActiveMeshesCancel?.(),this._freezeActiveMeshesCancel=null;for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._unFreeze();this._isFrozen=!1}constructor(e,r,s){this._unObserveRenderList=null,this._renderListHasChanged=(e,t)=>{let r=this._renderList?this._renderList.length:0;if(0===t&&r>0||0===r)for(let e of this._scene.meshes)e._markSubMeshesAsLightDirty()},this.particleSystemList=null,this.getCustomRenderList=null,this.renderMeshes=!0,this.renderDepthOnlyMeshes=!0,this.renderOpaqueMeshes=!0,this.renderAlphaTestMeshes=!0,this.renderTransparentMeshes=!0,this.renderParticles=!0,this.renderSprites=!1,this.forceLayerMaskCheck=!1,this.enableBoundingBoxRendering=!1,this.enableOutlineRendering=!0,this._disableImageProcessing=!1,this.dontSetTransformationMatrix=!1,this._disableDepthPrePass=!1,this.onBeforeRenderObservable=new t.Observable,this.onAfterRenderObservable=new t.Observable,this.onBeforeRenderingManagerRenderObservable=new t.Observable,this.onAfterRenderingManagerRenderObservable=new t.Observable,this.onInitRenderingObservable=new t.Observable,this.onFinishRenderingObservable=new t.Observable,this.onFastPathRenderObservable=new t.Observable,this._currentRefreshId=-1,this._refreshRate=1,this._currentApplyByPostProcessSetting=!1,this._activeMeshes=new l.SmartArray(256),this._activeBoundingBoxes=new l.SmartArray(32),this._currentFrameId=-1,this._currentSceneUBOIndex=0,this._isFrozen=!1,this._freezeActiveMeshesCancel=null,this._currentSceneCamera=null,this.name=e,this._scene=r,this._engine=this._scene.getEngine(),this._useUBO=this._engine.supportsUniformBuffers,this.renderList=[],this._renderPassIds=[],this.options={numPasses:1,doNotChangeAspectRatio:!0,enableClusteredLights:!1,...s},this._createRenderPassId(),this.renderPassId=this._renderPassIds[0],this._renderingManager=new o.RenderingManager(r),this._renderingManager._useSceneAutoClearSetup=!0,this.options.enableClusteredLights&&this.onInitRenderingObservable.add(()=>{for(let e of this._scene.lights)e.getTypeID()===_.LightConstants.LIGHTTYPEID_CLUSTERED_CONTAINER&&e.isSupported&&e._updateBatches(this.activeCamera).render()}),this._scene.addObjectRenderer(this)}_releaseRenderPassId(){for(let e=0;e<this.options.numPasses;++e)this._engine.releaseRenderPassId(this._renderPassIds[e]);this._renderPassIds.length=0}_createRenderPassId(){this._releaseRenderPassId();for(let e=0;e<this.options.numPasses;++e)this._renderPassIds[e]=this._engine.createRenderPassId(`${this.name}#${e}`)}_createSceneUBO(e,t){let r=this._scene.getEngine(),s=new h.UniformBuffer(r,void 0,t,e,void 0,!1);return s.addUniform("viewProjection",16),t&&s.addUniform("viewProjectionR",16),s.addUniform("view",16),s.addUniform("projection",16),s.addUniform("vEyePosition",4),s.addUniform("inverseProjection",16),s}_getSceneUBO(){this._currentFrameId!==this._engine.frameId&&(this._currentSceneUBOIndex=0,this._currentFrameId=this._engine.frameId),this._sceneUBOs||(this._sceneUBOs=[],this._sceneUBOIsMultiview=[]);let e=this._engine._currentRenderTarget,t=!!(e&&e.texture?.isMultiview)||!!this._scene._multiviewSceneUboIsActive;if(this._currentSceneUBOIndex>=this._sceneUBOs.length){let e=this._sceneUBOs.length;this._sceneUBOs.push(this._createSceneUBO(`Scene ubo #${e} for ${this.name}`,t)),this._sceneUBOIsMultiview.push(t)}else this._sceneUBOIsMultiview[this._currentSceneUBOIndex]!==t&&(this._sceneUBOs[this._currentSceneUBOIndex].dispose(),this._sceneUBOs[this._currentSceneUBOIndex]=this._createSceneUBO(`Scene ubo #${this._currentSceneUBOIndex} for ${this.name}`,t),this._sceneUBOIsMultiview[this._currentSceneUBOIndex]=t);let r=this._sceneUBOs[this._currentSceneUBOIndex++];return r.unbindEffect(),r}resetRefreshCounter(){this._currentRefreshId=-1}get refreshRate(){return this._refreshRate}set refreshRate(e){this._refreshRate=e,this.resetRefreshCounter()}shouldRender(){return!!this._engine.snapshotRendering||(-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1))}isReadyForRendering(e,t){this.prepareRenderList(),this.initRender(e,t);let r=this._checkReadiness();return this.finishRender(),r}prepareRenderList(){let e=this._scene;if(this._waitingRenderList){if(!this.renderListPredicate){this.renderList=[];for(let t=0;t<this._waitingRenderList.length;t++){let r=this._waitingRenderList[t],s=e.getMeshById(r);s&&this.renderList.push(s)}}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];let e=this._scene.meshes;for(let t=0;t<e.length;t++){let r=e[t];this.renderListPredicate(r)&&this.renderList.push(r)}}this._currentApplyByPostProcessSetting=this._scene.imageProcessingConfiguration.applyByPostProcess,this._disableImageProcessing&&(this._scene.imageProcessingConfiguration._applyByPostProcess=this._disableImageProcessing)}initRender(e,t){let r=this.activeCamera??this._scene.activeCamera;this._currentSceneCamera=this._scene.activeCamera,this._useUBO&&(this._currentSceneUBO=this._scene.getSceneUniformBuffer(),this._currentSceneUBO.unbindEffect(),this._scene.setSceneUniformBuffer(this._getSceneUBO())),this.onInitRenderingObservable.notifyObservers(this),r&&(this.dontSetTransformationMatrix||this._scene.setTransformMatrix(r.getViewMatrix(),r.getProjectionMatrix(!0)),this._scene._activeCamera=r,this._engine.setViewport(r.rigParent?r.rigParent.viewport:r.viewport,e,t)),this._useUBO&&this._scene.finalizeSceneUbo(),this._defaultRenderListPrepared=!1}finishRender(){let e=this._scene;this._useUBO&&this._scene.setSceneUniformBuffer(this._currentSceneUBO),this._disableImageProcessing&&(e.imageProcessingConfiguration._applyByPostProcess=this._currentApplyByPostProcessSetting),e._activeCamera=this._currentSceneCamera,this._currentSceneCamera&&(this.activeCamera&&this.activeCamera!==e.activeCamera&&e.setTransformMatrix(this._currentSceneCamera.getViewMatrix(),this._currentSceneCamera.getProjectionMatrix(!0)),this._engine.setViewport(this._currentSceneCamera.viewport)),e.resetCachedMaterial(),this.onFinishRenderingObservable.notifyObservers(this)}render(e=0,t=!1){let r=this._engine.currentRenderPassId;if(this._engine.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e),this._engine.snapshotRendering&&1===this._engine.snapshotRenderingMode)this.onFastPathRenderObservable.notifyObservers(e);else{let t=this._prepareRenderingManager(e),r=this._scene.getOutlineRenderer?.(),s=r?.enabled;r&&(r.enabled=this.enableOutlineRendering),this.onBeforeRenderingManagerRenderObservable.notifyObservers(e),this._renderingManager.render(this.customRenderFunction,t,this.renderParticles,this.renderSprites,this.renderDepthOnlyMeshes,this.renderOpaqueMeshes,this.renderAlphaTestMeshes,this.renderTransparentMeshes,this.customRenderTransparentSubMeshes),this.onAfterRenderingManagerRenderObservable.notifyObservers(e),r&&(r.enabled=s)}t||this.onAfterRenderObservable.notifyObservers(e),this._engine.currentRenderPassId=r}_checkReadiness(){let e=this._scene,t=this._engine.currentRenderPassId,r=!0;e.getViewMatrix()||e.updateTransformMatrix();let s=this.options.numPasses;for(let t=0;t<s&&r;t++){let i=this.renderList?this.renderList:e.frameGraph?e.meshes:e.getActiveMeshes().data,n=this.renderList||e.frameGraph?i.length:e.getActiveMeshes().length;this._engine.currentRenderPassId=this._renderPassIds[t],this.onBeforeRenderObservable.notifyObservers(t);let a=null,h=n;this.getCustomRenderList&&(a=this.getCustomRenderList(t,i,n))&&(h=a.length),a||(a=i),this.options.doNotChangeAspectRatio||e.updateTransformMatrix(!0);for(let e=0;e<h&&r;++e){let t=a[e];if(t.isEnabled()&&!t.isBlocked&&t.isVisible&&t.subMeshes){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(t,this.refreshRate,!0)){r=!1;continue}}else if(!t.isReady(!0)){r=!1;continue}}}this.onAfterRenderObservable.notifyObservers(t),s>1&&(e.incrementRenderId(),e.resetCachedMaterial())}for(let t of this.particleSystemList||e.particleSystems)t.isReady()||(r=!1);return this._engine.currentRenderPassId=t,r}_prepareRenderingManager(e=0,t=!1){let r,s,i=this._scene,n=null,a=this.renderList?this.renderList:i.frameGraph?i.meshes:i.getActiveMeshes().data,h=this.renderList||i.frameGraph?a.length:i.getActiveMeshes().length;if(this.getCustomRenderList&&(n=this.getCustomRenderList(e,a,h)),n)r=n.length,s=this.forceLayerMaskCheck;else{if(this._defaultRenderListPrepared&&!t&&!this._engine.isWebGPU)return a;this._defaultRenderListPrepared=!0,n=a,r=h,s=!this.renderList||this.forceLayerMaskCheck}let o=i.activeCamera,d=this.cameraForLOD??o,c=i.getBoundingBoxRenderer?.();if(i._activeMeshesFrozen&&this._isFrozen){if(this._renderingManager.resetSprites(),this.enableBoundingBoxRendering&&c){c.reset();for(let e=0;e<this._activeBoundingBoxes.length;e++){let t=this._activeBoundingBoxes.data[e];c.renderList.push(t)}}return n}if(this._renderingManager.reset(),this._activeMeshes.reset(),this._activeBoundingBoxes.reset(),c&&c.reset(),this.renderMeshes){let e=i.getRenderId(),t=i.getFrameId();for(let a=0;a<r;a++){let r=n[a];if(r&&!r.isBlocked){let n,a;if(this.customIsReadyFunction){if(!this.customIsReadyFunction(r,this.refreshRate,!1)){this.resetRefreshCounter();continue}}else if(!r.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}if(d){let e=r._internalAbstractMeshDataInfo._currentLOD.get(d);e&&e[1]===t?n=e[0]:(n=i.customLODSelector?i.customLODSelector(r,d):r.getLOD(d),e?(e[0]=n,e[1]=t):r._internalAbstractMeshDataInfo._currentLOD.set(d,[n,t]))}else n=r;if(!n)continue;if(n!==r&&0!==n.billboardMode&&n.computeWorldMatrix(),n._preActivateForIntermediateRendering(e),a=!!s&&!!o&&(r.layerMask&o.layerMask)==0,r.isEnabled()&&r.isVisible&&r.subMeshes&&!a){if(this._activeMeshes.push(r),n._internalAbstractMeshDataInfo._wasActiveLastFrame=!0,n!==r&&n._activate(e,!0),this.enableBoundingBoxRendering&&c&&c._preActiveMesh(r),r._activate(e,!0)&&r.subMeshes.length){r.isAnInstance?r._internalAbstractMeshDataInfo._actAsRegularMesh&&(n=r):n._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,n._internalAbstractMeshDataInfo._isActiveIntermediate=!0,i._prepareSkeleton(n);for(let e=0;e<n.subMeshes.length;e++){let t=n.subMeshes[e];this.enableBoundingBoxRendering&&c&&c._evaluateSubMesh(r,t),this._renderingManager.dispatch(t,n)}}r._postActivate()}}}}if(this.enableBoundingBoxRendering&&c&&t)for(let e=0;e<c.renderList.length;e++){let t=c.renderList.data[e];this._activeBoundingBoxes.push(t)}if(this._scene.particlesEnabled&&this.renderParticles){this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);let e=this.particleSystemList||i.particleSystems;for(let t=0;t<e.length;t++){let r=e[t],s=r.emitter;r.isStarted()&&s&&(!s.position||s.isEnabled())&&this._renderingManager.dispatchParticles(r)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}return n}get renderingManager(){return this._renderingManager}setRenderingOrder(e,t=null,r=null,s=null){this._renderingManager.setRenderingOrder(e,t,r,s)}setRenderingAutoClearDepthStencil(e,t,r=!0,s=!0){this._renderingManager.setRenderingAutoClearDepthStencil(e,t,r,s),this._renderingManager._useSceneAutoClearSetup=!1}clone(){let e=new g(this.name,this._scene,this.options);return this.renderList&&(e.renderList=this.renderList.slice(0)),e}dispose(){let e=this.renderList?this.renderList:this._scene.getActiveMeshes().data,t=this.renderList?this.renderList.length:this._scene.getActiveMeshes().length;for(let r=0;r<t;r++){let t=e[r];t&&void 0!==t.getMaterialForRenderPass(this.renderPassId)&&t.setMaterialForRenderPass(this.renderPassId,void 0)}if(this.onInitRenderingObservable.clear(),this.onFinishRenderingObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderingManagerRenderObservable.clear(),this.onAfterRenderingManagerRenderObservable.clear(),this.onFastPathRenderObservable.clear(),this._releaseRenderPassId(),this.renderList=null,this._sceneUBOs)for(let e of this._sceneUBOs)e.dispose();this._sceneUBOs=void 0,this._scene.removeObjectRenderer(this)}_rebuild(){this.refreshRate===g.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=g.REFRESHRATE_RENDER_ONCE)}freeRenderingGroups(){this._renderingManager&&this._renderingManager.freeRenderingGroups()}}g.REFRESHRATE_RENDER_ONCE=0,g.REFRESHRATE_RENDER_ONEVERYFRAME=1,g.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2;var u=e.i(99904),R=e.i(75405);class b extends s.Texture{get renderListPredicate(){return this._objectRenderer.renderListPredicate}set renderListPredicate(e){this._objectRenderer.renderListPredicate=e}get renderList(){return this._objectRenderer.renderList}set renderList(e){this._objectRenderer.renderList=e}get particleSystemList(){return this._objectRenderer.particleSystemList}set particleSystemList(e){this._objectRenderer.particleSystemList=e}get getCustomRenderList(){return this._objectRenderer.getCustomRenderList}set getCustomRenderList(e){this._objectRenderer.getCustomRenderList=e}get renderParticles(){return this._objectRenderer.renderParticles}set renderParticles(e){this._objectRenderer.renderParticles=e}get renderSprites(){return this._objectRenderer.renderSprites}set renderSprites(e){this._objectRenderer.renderSprites=e}get enableBoundingBoxRendering(){return this._objectRenderer.enableBoundingBoxRendering}set enableBoundingBoxRendering(e){this._objectRenderer.enableBoundingBoxRendering=e}get enableOutlineRendering(){return this._objectRenderer.enableOutlineRendering}set enableOutlineRendering(e){this._objectRenderer.enableOutlineRendering=e}get forceLayerMaskCheck(){return this._objectRenderer.forceLayerMaskCheck}set forceLayerMaskCheck(e){this._objectRenderer.forceLayerMaskCheck=e}get activeCamera(){return this._objectRenderer.activeCamera}set activeCamera(e){this._objectRenderer.activeCamera=e}get cameraForLOD(){return this._objectRenderer.cameraForLOD}set cameraForLOD(e){this._objectRenderer.cameraForLOD=e}get disableImageProcessing(){return this._objectRenderer.disableImageProcessing}set disableImageProcessing(e){this._objectRenderer.disableImageProcessing=e}get customIsReadyFunction(){return this._objectRenderer.customIsReadyFunction}set customIsReadyFunction(e){this._objectRenderer.customIsReadyFunction=e}get customRenderFunction(){return this._objectRenderer.customRenderFunction}set customRenderFunction(e){this._objectRenderer.customRenderFunction=e}get postProcesses(){return this._postProcesses}get _prePassEnabled(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled}set onAfterUnbind(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)}get onBeforeRenderObservable(){return this._objectRenderer.onBeforeRenderObservable}set onBeforeRender(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)}get onAfterRenderObservable(){return this._objectRenderer.onAfterRenderObservable}set onAfterRender(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)}set onClear(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)}get _waitingRenderList(){return this._objectRenderer._waitingRenderList}set _waitingRenderList(e){this._objectRenderer._waitingRenderList=e}get renderPassId(){return this._objectRenderer.renderPassId}get renderPassIds(){return this._objectRenderer.renderPassIds}get currentRefreshId(){return this._objectRenderer.currentRefreshId}setMaterialForRendering(e,t){this._objectRenderer.setMaterialForRendering(e,t)}get isMulti(){return this._renderTarget?.isMulti??!1}get renderTargetOptions(){return this._renderTargetOptions}get renderTarget(){return this._renderTarget}_onRatioRescale(){this._sizeRatio&&this.resize(this._initialSizeParameter)}set boundingBoxSize(e){if(this._boundingBoxSize&&this._boundingBoxSize.equals(e))return;this._boundingBoxSize=e;let t=this.getScene();t&&t.markAllMaterialsAsDirty(1)}get boundingBoxSize(){return this._boundingBoxSize}get depthStencilTexture(){return this._renderTarget?._depthStencilTexture??null}constructor(e,i,n,h=!1,o=!0,d=0,c=!1,l=s.Texture.TRILINEAR_SAMPLINGMODE,_=!0,u=!1,R=!1,b=5,f=!1,p,O,m=!1,v=!1){let P,M,T=!0,S=!1;if("object"==typeof h){const e=h;h=!!e.generateMipMaps,o=e.doNotChangeAspectRatio??!0,d=e.type??0,c=!!e.isCube,l=e.samplingMode??s.Texture.TRILINEAR_SAMPLINGMODE,_=e.generateDepthBuffer??!0,u=!!e.generateStencilBuffer,R=!!e.isMulti,b=e.format??5,f=!!e.delayAllocation,p=e.samples,O=e.creationFlags,m=!!e.noColorAttachment,v=!!e.useSRGBBuffer,P=e.colorAttachment,T=e.gammaSpace??T,M=e.existingObjectRenderer,S=!!e.enableClusteredLights}if(super(null,n,!h,void 0,l,void 0,void 0,void 0,void 0,b),this.ignoreCameraViewport=!1,this.onBeforeBindObservable=new t.Observable,this.onAfterUnbindObservable=new t.Observable,this.onClearObservable=new t.Observable,this.onResizeObservable=new t.Observable,this._cleared=!1,this.skipInitialClear=!1,this._samples=1,this._canRescale=!0,this._renderTarget=null,this._dontDisposeObjectRenderer=!1,this.boundingBoxPosition=r.Vector3.Zero(),this._disableEngineStages=!1,this._dumpToolsLoading=!1,!(n=this.getScene()))return;const L=this.getScene().getEngine();if(this._gammaSpace=T,this._coordinatesMode=s.Texture.PROJECTION_MODE,this.name=e,this.isRenderTarget=!0,this._initialSizeParameter=i,this._dontDisposeObjectRenderer=!!M,this._processSizeParameter(i),this._objectRenderer=M??new g(e,n,{numPasses:c?6:this.getRenderLayers()||1,doNotChangeAspectRatio:o,enableClusteredLights:S}),this._onBeforeRenderingManagerRenderObserver=this._objectRenderer.onBeforeRenderingManagerRenderObservable.add(()=>{let e=this._scene;if(!this._disableEngineStages)for(let t of e._beforeRenderTargetClearStage)t.action(this,this._currentFaceIndex,this._currentLayer);if(this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(L):this.skipInitialClear||L.clear(this.clearColor??e.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||e.updateTransformMatrix(!0),!this._disableEngineStages)for(let t of e._beforeRenderTargetDrawStage)t.action(this,this._currentFaceIndex,this._currentLayer);L._debugPushGroup&&L._debugPushGroup(`Render to ${this.name} (face #${this._currentFaceIndex} layer #${this._currentLayer})`)}),this._onAfterRenderingManagerRenderObserver=this._objectRenderer.onAfterRenderingManagerRenderObservable.add(()=>{if(L._debugPopGroup&&L._debugPopGroup(),!this._disableEngineStages)for(let e of this._scene._afterRenderTargetDrawStage)e.action(this,this._currentFaceIndex,this._currentLayer);let e=this._texture?.generateMipMaps??!1;if(this._texture&&(this._texture.generateMipMaps=!1),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,this._renderTarget??void 0,this._currentFaceIndex,this._postProcesses,this.ignoreCameraViewport):this._currentUseCameraPostProcess&&this._scene.postProcessManager._finalizeFrame(!1,this._renderTarget??void 0,this._currentFaceIndex),!this._disableEngineStages)for(let e of this._scene._afterRenderTargetPostProcessStage)e.action(this,this._currentFaceIndex,this._currentLayer);this._texture&&(this._texture.generateMipMaps=e),this._doNotChangeAspectRatio||this._scene.updateTransformMatrix(!0),this._currentDumpForDebug&&(this._dumpTools?this._dumpTools.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),L):a.Logger.Error("dumpTools module is still being loaded. To speed up the process import dump tools directly in your project"))}),this._onFastPathRenderObserver=this._objectRenderer.onFastPathRenderObservable.add(()=>{this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(L):this.skipInitialClear||L.clear(this.clearColor||this._scene.clearColor,!0,!0,!0)}),this._resizeObserver=L.onResizeObservable.add(()=>{}),this._generateMipMaps=!!h,this._doNotChangeAspectRatio=o,R)return;this._renderTargetOptions={generateMipMaps:h,type:d,format:this._format??void 0,samplingMode:this.samplingMode,generateDepthBuffer:_,generateStencilBuffer:u,samples:p,creationFlags:O,noColorAttachment:m,useSRGBBuffer:v,colorAttachment:P,label:this.name},this.samplingMode===s.Texture.NEAREST_SAMPLINGMODE&&(this.wrapU=s.Texture.CLAMP_ADDRESSMODE,this.wrapV=s.Texture.CLAMP_ADDRESSMODE),f||(c?(this._renderTarget=n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions),this.coordinatesMode=s.Texture.INVCUBIC_MODE,this._textureMatrix=r.Matrix.Identity()):this._renderTarget=n.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==p&&(this.samples=p))}createDepthStencilTexture(e=0,t=!0,r=!1,s=1,i=14,n){this._renderTarget?.createDepthStencilTexture(e,t,r,s,i,n)}_processSizeParameter(e){if(e.ratio){this._sizeRatio=e.ratio;let t=this._getEngine();this._size={width:this._bestReflectionRenderTargetDimension(t.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(t.getRenderHeight(),this._sizeRatio)}}else this._size=e}get samples(){return this._renderTarget?.samples??this._samples}set samples(e){this._renderTarget&&(this._samples=this._renderTarget.setSamples(e))}addPostProcess(e){if(!this._postProcessManager){let e=this.getScene();if(!e)return;this._postProcessManager=new i.PostProcessManager(e),this._postProcesses=[]}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1}clearPostProcesses(e=!1){if(this._postProcesses){if(e)for(let e of this._postProcesses)e.dispose();this._postProcesses=[]}}removePostProcess(e){if(!this._postProcesses)return;let t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}resetRefreshCounter(){this._objectRenderer.resetRefreshCounter()}get refreshRate(){return this._objectRenderer.refreshRate}set refreshRate(e){this._objectRenderer.refreshRate=e}_shouldRender(){return this._objectRenderer.shouldRender()}getRenderSize(){return this.getRenderWidth()}getRenderWidth(){return this._size.width?this._size.width:this._size}getRenderHeight(){return this._size.width?this._size.height:this._size}getRenderLayers(){let e=this._size.layers;if(e)return e;let t=this._size.depth;return t||0}disableRescaling(){this._canRescale=!1}get canRescale(){return this._canRescale}scale(e){let t=Math.max(1,this.getRenderSize()*e);this.resize(t)}getReflectionTextureMatrix(){return this.isCube?this._textureMatrix:super.getReflectionTextureMatrix()}resize(e){let t=this.isCube;this._renderTarget?.dispose(),this._renderTarget=null;let r=this.getScene();r&&(this._processSizeParameter(e),t?this._renderTarget=r.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):this._renderTarget=r.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))}render(e=!1,t=!1){this._render(e,t)}isReadyForRendering(){this._dumpToolsLoading||(this._dumpToolsLoading=!0,e.A(49950).then(e=>this._dumpTools=e)),this._objectRenderer.prepareRenderList(),this.onBeforeBindObservable.notifyObservers(this),this._objectRenderer.initRender(this.getRenderWidth(),this.getRenderHeight());let t=this._objectRenderer._checkReadiness();return this.onAfterUnbindObservable.notifyObservers(this),this._objectRenderer.finishRender(),t}_render(e=!1,t=!1){let r=this.getScene();if(!r)return;void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses);let s=r.getEngine();if(s._debugPushGroup&&s._debugPushGroup(`Render to ${this.name}`),this._objectRenderer.prepareRenderList(),this.onBeforeBindObservable.notifyObservers(this),this._objectRenderer.initRender(this.getRenderWidth(),this.getRenderHeight()),(this.is2DArray||this.is3D)&&!this.isMulti)for(let s=0;s<this.getRenderLayers();s++)this._renderToTarget(0,e,t,s),r.incrementRenderId(),r.resetCachedMaterial();else if(this.isCube&&!this.isMulti)for(let s=0;s<6;s++)this._renderToTarget(s,e,t),r.incrementRenderId(),r.resetCachedMaterial();else this._renderToTarget(0,e,t);this.onAfterUnbindObservable.notifyObservers(this),this._objectRenderer.finishRender(),s._debugPopGroup&&s._debugPopGroup()}_bestReflectionRenderTargetDimension(e,t){let r=e*t,s=(0,n.NearestPOT)(r+16384/(128+r));return Math.min((0,n.FloorPOT)(e),s)}_bindFrameBuffer(e=0,t=0){let r=this.getScene();if(!r)return;let s=r.getEngine();this._renderTarget&&s.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}_unbindFrameBuffer(e,t){this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,()=>{this.onAfterRenderObservable.notifyObservers(t)})}_prepareFrame(e,t,r,s){this._postProcessManager?this._prePassEnabled||this._postProcessManager._prepareFrame(this._texture,this._postProcesses)||this._bindFrameBuffer(t,r):s&&e.postProcessManager._prepareFrame(this._texture)||this._bindFrameBuffer(t,r)}_renderToTarget(e,t,r,s=0){let i=this.getScene();if(!i)return;let n=i.getEngine();this._currentFaceIndex=e,this._currentLayer=s,this._currentUseCameraPostProcess=t,this._currentDumpForDebug=r,this._prepareFrame(i,e,s,t),this._objectRenderer.render(e+s,!0),this._unbindFrameBuffer(n,e),this._texture&&this.isCube&&5===e&&n.generateMipMapsForCubemap(this._texture,!0)}setRenderingOrder(e,t=null,r=null,s=null){this._objectRenderer.setRenderingOrder(e,t,r,s)}setRenderingAutoClearDepthStencil(e,t){this._objectRenderer.setRenderingAutoClearDepthStencil(e,t)}clone(){let e=this.getSize(),t=new b(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer,void 0,this._renderTargetOptions.format,void 0,this._renderTargetOptions.samples);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t}serialize(){if(!this.name)return null;let e=super.serialize();if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(let t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e}disposeFramebufferObjects(){this._renderTarget?.dispose(!0)}releaseInternalTexture(){this._renderTarget?.releaseTextures(),this._texture=null}dispose(){this.onResizeObservable.clear(),this.onClearObservable.clear(),this.onAfterUnbindObservable.clear(),this.onBeforeBindObservable.clear(),this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this._prePassRenderTarget&&this._prePassRenderTarget.dispose(),this._objectRenderer.onBeforeRenderingManagerRenderObservable.remove(this._onBeforeRenderingManagerRenderObserver),this._objectRenderer.onAfterRenderingManagerRenderObservable.remove(this._onAfterRenderingManagerRenderObserver),this._objectRenderer.onFastPathRenderObservable.remove(this._onFastPathRenderObserver),this._dontDisposeObjectRenderer||this._objectRenderer.dispose(),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null);let e=this.getScene();if(!e)return;let t=e.customRenderTargets.indexOf(this);for(let r of(t>=0&&e.customRenderTargets.splice(t,1),e.cameras))(t=r.customRenderTargets.indexOf(this))>=0&&r.customRenderTargets.splice(t,1);this._renderTarget?.dispose(),this._renderTarget=null,this._texture=null,super.dispose()}_rebuild(){this._objectRenderer._rebuild(),this._postProcessManager&&this._postProcessManager._rebuild()}freeRenderingGroups(){this._objectRenderer.freeRenderingGroups()}getViewCount(){return 1}}b.REFRESHRATE_RENDER_ONCE=g.REFRESHRATE_RENDER_ONCE,b.REFRESHRATE_RENDER_ONEVERYFRAME=g.REFRESHRATE_RENDER_ONEVERYFRAME,b.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=g.REFRESHRATE_RENDER_ONEVERYTWOFRAMES;let f=!1;Object.getOwnPropertyDescriptor(b.prototype,"noPrePassRenderer")||Object.defineProperty(b.prototype,"noPrePassRenderer",(0,R._MissingSideEffectProperty)("RenderTargetTexture","noPrePassRenderer")),e.s(["RegisterRenderTargetTexture",0,function(){f||(f=!0,u.Effect.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},s.Texture._CreateRenderTargetTexture=(e,t,r,s,i)=>new b(e,t,r,s))},"RenderTargetTexture",0,b],36516)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74040,e=>{"use strict";var t=e.i(57554),r=e.i(10534),s=e.i(67374),i=e.i(93357),n=e.i(65679),a=e.i(83464),h=e.i(39766),o=e.i(29665),d=e.i(27745),c=e.i(4775),l=e.i(95294),_=e.i(86143);class g{get renderList(){return this._renderList}set renderList(e){this._renderList!==e&&(this._unObserveRenderList&&(this._unObserveRenderList(),this._unObserveRenderList=null),e&&(this._unObserveRenderList=(0,d._ObserveArray)(e,this._renderListHasChanged)),this._renderList=e)}get disableImageProcessing(){return this._disableImageProcessing}set disableImageProcessing(e){e!==this._disableImageProcessing&&(this._disableImageProcessing=e,this._scene.markAllMaterialsAsDirty(64))}get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){this._disableDepthPrePass=e,this._renderingManager.disableDepthPrePass=e}get name(){return this._name}set name(e){if(this._name!==e){if(this._name=e,this._sceneUBOs)for(let e=0;e<this._sceneUBOs.length;++e)this._sceneUBOs[e].name=`Scene ubo #${e} for ${this.name}`;if(this._scene)for(let e=0;e<this._renderPassIds.length;++e){let t=this._renderPassIds[e];this._engine._renderPassNames[t]=`${this._name}#${e}`}}}get renderPassIds(){return this._renderPassIds}get currentRefreshId(){return this._currentRefreshId}getActiveMeshes(){return this._activeMeshes}setMaterialForRendering(e,t){let r;r=Array.isArray(e)?e:[e];for(let e=0;e<r.length;++e)for(let s=0;s<this.options.numPasses;++s){let i=r[e];r[e].isAnInstance&&(i=r[e].sourceMesh),i.setMaterialForRenderPass(this._renderPassIds[s],void 0!==t?Array.isArray(t)?t[s]:t:void 0)}}_freezeActiveMeshes(e){this._freezeActiveMeshesCancel=(0,c._RetryWithInterval)(()=>this._checkReadiness(),()=>{if(this._freezeActiveMeshesCancel=null,e)for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._freeze();this._prepareRenderingManager(0,!0),this._isFrozen=!0},(e,t)=>{this._freezeActiveMeshesCancel=null,t?(a.Logger.Error("ObjectRenderer: Timeout while waiting for the renderer to be ready."),e&&a.Logger.Error(e)):(a.Logger.Error("ObjectRenderer: An unexpected error occurred while waiting for the renderer to be ready."),e&&(a.Logger.Error(e),e.stack&&a.Logger.Error(e.stack)))})}_unfreezeActiveMeshes(){this._freezeActiveMeshesCancel?.(),this._freezeActiveMeshesCancel=null;for(let e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._unFreeze();this._isFrozen=!1}constructor(e,r,s){this._unObserveRenderList=null,this._renderListHasChanged=(e,t)=>{let r=this._renderList?this._renderList.length:0;if(0===t&&r>0||0===r)for(let e of this._scene.meshes)e._markSubMeshesAsLightDirty()},this.particleSystemList=null,this.getCustomRenderList=null,this.renderMeshes=!0,this.renderDepthOnlyMeshes=!0,this.renderOpaqueMeshes=!0,this.renderAlphaTestMeshes=!0,this.renderTransparentMeshes=!0,this.renderParticles=!0,this.renderSprites=!1,this.forceLayerMaskCheck=!1,this.enableBoundingBoxRendering=!1,this.enableOutlineRendering=!0,this._disableImageProcessing=!1,this.dontSetTransformationMatrix=!1,this._disableDepthPrePass=!1,this.onBeforeRenderObservable=new t.Observable,this.onAfterRenderObservable=new t.Observable,this.onBeforeRenderingManagerRenderObservable=new t.Observable,this.onAfterRenderingManagerRenderObservable=new t.Observable,this.onInitRenderingObservable=new t.Observable,this.onFinishRenderingObservable=new t.Observable,this.onFastPathRenderObservable=new t.Observable,this._currentRefreshId=-1,this._refreshRate=1,this._currentApplyByPostProcessSetting=!1,this._activeMeshes=new l.SmartArray(256),this._activeBoundingBoxes=new l.SmartArray(32),this._currentFrameId=-1,this._currentSceneUBOIndex=0,this._isFrozen=!1,this._freezeActiveMeshesCancel=null,this._currentSceneCamera=null,this.name=e,this._scene=r,this._engine=this._scene.getEngine(),this._useUBO=this._engine.supportsUniformBuffers,this.renderList=[],this._renderPassIds=[],this.options={numPasses:1,doNotChangeAspectRatio:!0,enableClusteredLights:!1,...s},this._createRenderPassId(),this.renderPassId=this._renderPassIds[0],this._renderingManager=new o.RenderingManager(r),this._renderingManager._useSceneAutoClearSetup=!0,this.options.enableClusteredLights&&this.onInitRenderingObservable.add(()=>{for(let e of this._scene.lights)e.getTypeID()===_.LightConstants.LIGHTTYPEID_CLUSTERED_CONTAINER&&e.isSupported&&e._updateBatches(this.activeCamera).render()}),this._scene.addObjectRenderer(this)}_releaseRenderPassId(){for(let e=0;e<this.options.numPasses;++e)this._engine.releaseRenderPassId(this._renderPassIds[e]);this._renderPassIds.length=0}_createRenderPassId(){this._releaseRenderPassId();for(let e=0;e<this.options.numPasses;++e)this._renderPassIds[e]=this._engine.createRenderPassId(`${this.name}#${e}`)}_createSceneUBO(e,t){let r=this._scene.getEngine(),s=new h.UniformBuffer(r,void 0,t,e,void 0,!1);return s.addUniform("viewProjection",16),t&&s.addUniform("viewProjectionR",16),s.addUniform("view",16),s.addUniform("projection",16),s.addUniform("vEyePosition",4),s.addUniform("inverseProjection",16),s}_getSceneUBO(){this._currentFrameId!==this._engine.frameId&&(this._currentSceneUBOIndex=0,this._currentFrameId=this._engine.frameId),this._sceneUBOs||(this._sceneUBOs=[],this._sceneUBOIsMultiview=[]);let e=this._engine._currentRenderTarget,t=!!(e&&e.texture?.isMultiview)||!!this._scene._multiviewSceneUboIsActive;if(this._currentSceneUBOIndex>=this._sceneUBOs.length){let e=this._sceneUBOs.length;this._sceneUBOs.push(this._createSceneUBO(`Scene ubo #${e} for ${this.name}`,t)),this._sceneUBOIsMultiview.push(t)}else this._sceneUBOIsMultiview[this._currentSceneUBOIndex]!==t&&(this._sceneUBOs[this._currentSceneUBOIndex].dispose(),this._sceneUBOs[this._currentSceneUBOIndex]=this._createSceneUBO(`Scene ubo #${this._currentSceneUBOIndex} for ${this.name}`,t),this._sceneUBOIsMultiview[this._currentSceneUBOIndex]=t);let r=this._sceneUBOs[this._currentSceneUBOIndex++];return r.unbindEffect(),r}resetRefreshCounter(){this._currentRefreshId=-1}get refreshRate(){return this._refreshRate}set refreshRate(e){this._refreshRate=e,this.resetRefreshCounter()}shouldRender(){return!!this._engine.snapshotRendering||(-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1))}isReadyForRendering(e,t){this.prepareRenderList(),this.initRender(e,t);let r=this._checkReadiness();return this.finishRender(),r}prepareRenderList(){let e=this._scene;if(this._waitingRenderList){if(!this.renderListPredicate){this.renderList=[];for(let t=0;t<this._waitingRenderList.length;t++){let r=this._waitingRenderList[t],s=e.getMeshById(r);s&&this.renderList.push(s)}}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];let e=this._scene.meshes;for(let t=0;t<e.length;t++){let r=e[t];this.renderListPredicate(r)&&this.renderList.push(r)}}this._currentApplyByPostProcessSetting=this._scene.imageProcessingConfiguration.applyByPostProcess,this._disableImageProcessing&&(this._scene.imageProcessingConfiguration._applyByPostProcess=this._disableImageProcessing)}initRender(e,t){let r=this.activeCamera??this._scene.activeCamera;this._currentSceneCamera=this._scene.activeCamera,this._useUBO&&(this._currentSceneUBO=this._scene.getSceneUniformBuffer(),this._currentSceneUBO.unbindEffect(),this._scene.setSceneUniformBuffer(this._getSceneUBO())),this.onInitRenderingObservable.notifyObservers(this),r&&(this.dontSetTransformationMatrix||this._scene.setTransformMatrix(r.getViewMatrix(),r.getProjectionMatrix(!0)),this._scene._activeCamera=r,this._engine.setViewport(r.rigParent?r.rigParent.viewport:r.viewport,e,t)),this._useUBO&&this._scene.finalizeSceneUbo(),this._defaultRenderListPrepared=!1}finishRender(){let e=this._scene;this._useUBO&&this._scene.setSceneUniformBuffer(this._currentSceneUBO),this._disableImageProcessing&&(e.imageProcessingConfiguration._applyByPostProcess=this._currentApplyByPostProcessSetting),e._activeCamera=this._currentSceneCamera,this._currentSceneCamera&&(this.activeCamera&&this.activeCamera!==e.activeCamera&&e.setTransformMatrix(this._currentSceneCamera.getViewMatrix(),this._currentSceneCamera.getProjectionMatrix(!0)),this._engine.setViewport(this._currentSceneCamera.viewport)),e.resetCachedMaterial(),this.onFinishRenderingObservable.notifyObservers(this)}render(e=0,t=!1){let r=this._engine.currentRenderPassId;if(this._engine.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e),this._engine.snapshotRendering&&1===this._engine.snapshotRenderingMode)this.onFastPathRenderObservable.notifyObservers(e);else{let t=this._prepareRenderingManager(e),r=this._scene.getOutlineRenderer?.(),s=r?.enabled;r&&(r.enabled=this.enableOutlineRendering),this.onBeforeRenderingManagerRenderObservable.notifyObservers(e),this._renderingManager.render(this.customRenderFunction,t,this.renderParticles,this.renderSprites,this.renderDepthOnlyMeshes,this.renderOpaqueMeshes,this.renderAlphaTestMeshes,this.renderTransparentMeshes,this.customRenderTransparentSubMeshes),this.onAfterRenderingManagerRenderObservable.notifyObservers(e),r&&(r.enabled=s)}t||this.onAfterRenderObservable.notifyObservers(e),this._engine.currentRenderPassId=r}_checkReadiness(){let e=this._scene,t=this._engine.currentRenderPassId,r=!0;e.getViewMatrix()||e.updateTransformMatrix();let s=this.options.numPasses;for(let t=0;t<s&&r;t++){let i=this.renderList?this.renderList:e.frameGraph?e.meshes:e.getActiveMeshes().data,n=this.renderList||e.frameGraph?i.length:e.getActiveMeshes().length;this._engine.currentRenderPassId=this._renderPassIds[t],this.onBeforeRenderObservable.notifyObservers(t);let a=null,h=n;this.getCustomRenderList&&(a=this.getCustomRenderList(t,i,n))&&(h=a.length),a||(a=i),this.options.doNotChangeAspectRatio||e.updateTransformMatrix(!0);for(let e=0;e<h&&r;++e){let t=a[e];if(t.isEnabled()&&!t.isBlocked&&t.isVisible&&t.subMeshes){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(t,this.refreshRate,!0)){r=!1;continue}}else if(!t.isReady(!0)){r=!1;continue}}}this.onAfterRenderObservable.notifyObservers(t),s>1&&(e.incrementRenderId(),e.resetCachedMaterial())}for(let t of this.particleSystemList||e.particleSystems)t.isReady()||(r=!1);return this._engine.currentRenderPassId=t,r}_prepareRenderingManager(e=0,t=!1){let r,s,i=this._scene,n=null,a=this.renderList?this.renderList:i.frameGraph?i.meshes:i.getActiveMeshes().data,h=this.renderList||i.frameGraph?a.length:i.getActiveMeshes().length;if(this.getCustomRenderList&&(n=this.getCustomRenderList(e,a,h)),n)r=n.length,s=this.forceLayerMaskCheck;else{if(this._defaultRenderListPrepared&&!t&&!this._engine.isWebGPU)return a;this._defaultRenderListPrepared=!0,n=a,r=h,s=!this.renderList||this.forceLayerMaskCheck}let o=i.activeCamera,d=this.cameraForLOD??o,c=i.getBoundingBoxRenderer?.();if(i._activeMeshesFrozen&&this._isFrozen){if(this._renderingManager.resetSprites(),this.enableBoundingBoxRendering&&c){c.reset();for(let e=0;e<this._activeBoundingBoxes.length;e++){let t=this._activeBoundingBoxes.data[e];c.renderList.push(t)}}return n}if(this._renderingManager.reset(),this._activeMeshes.reset(),this._activeBoundingBoxes.reset(),c&&c.reset(),this.renderMeshes){let e=i.getRenderId(),t=i.getFrameId();for(let a=0;a<r;a++){let r=n[a];if(r&&!r.isBlocked){let n,a;if(this.customIsReadyFunction){if(!this.customIsReadyFunction(r,this.refreshRate,!1)){this.resetRefreshCounter();continue}}else if(!r.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}if(d){let e=r._internalAbstractMeshDataInfo._currentLOD.get(d);e&&e[1]===t?n=e[0]:(n=i.customLODSelector?i.customLODSelector(r,d):r.getLOD(d),e?(e[0]=n,e[1]=t):r._internalAbstractMeshDataInfo._currentLOD.set(d,[n,t]))}else n=r;if(!n)continue;if(n!==r&&0!==n.billboardMode&&n.computeWorldMatrix(),n._preActivateForIntermediateRendering(e),a=!!s&&!!o&&(r.layerMask&o.layerMask)==0,r.isEnabled()&&r.isVisible&&r.subMeshes&&!a){if(this._activeMeshes.push(r),n._internalAbstractMeshDataInfo._wasActiveLastFrame=!0,n!==r&&n._activate(e,!0),this.enableBoundingBoxRendering&&c&&c._preActiveMesh(r),r._activate(e,!0)&&r.subMeshes.length){r.isAnInstance?r._internalAbstractMeshDataInfo._actAsRegularMesh&&(n=r):n._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,n._internalAbstractMeshDataInfo._isActiveIntermediate=!0,i._prepareSkeleton(n);for(let e=0;e<n.subMeshes.length;e++){let t=n.subMeshes[e];this.enableBoundingBoxRendering&&c&&c._evaluateSubMesh(r,t),this._renderingManager.dispatch(t,n)}}r._postActivate()}}}}if(this.enableBoundingBoxRendering&&c&&t)for(let e=0;e<c.renderList.length;e++){let t=c.renderList.data[e];this._activeBoundingBoxes.push(t)}if(this._scene.particlesEnabled&&this.renderParticles){this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);let e=this.particleSystemList||i.particleSystems;for(let t=0;t<e.length;t++){let r=e[t],s=r.emitter;r.isStarted()&&s&&(!s.position||s.isEnabled())&&this._renderingManager.dispatchParticles(r)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}return n}get renderingManager(){return this._renderingManager}setRenderingOrder(e,t=null,r=null,s=null){this._renderingManager.setRenderingOrder(e,t,r,s)}setRenderingAutoClearDepthStencil(e,t,r=!0,s=!0){this._renderingManager.setRenderingAutoClearDepthStencil(e,t,r,s),this._renderingManager._useSceneAutoClearSetup=!1}clone(){let e=new g(this.name,this._scene,this.options);return this.renderList&&(e.renderList=this.renderList.slice(0)),e}dispose(){let e=this.renderList?this.renderList:this._scene.getActiveMeshes().data,t=this.renderList?this.renderList.length:this._scene.getActiveMeshes().length;for(let r=0;r<t;r++){let t=e[r];t&&void 0!==t.getMaterialForRenderPass(this.renderPassId)&&t.setMaterialForRenderPass(this.renderPassId,void 0)}if(this.onInitRenderingObservable.clear(),this.onFinishRenderingObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderingManagerRenderObservable.clear(),this.onAfterRenderingManagerRenderObservable.clear(),this.onFastPathRenderObservable.clear(),this._releaseRenderPassId(),this.renderList=null,this._sceneUBOs)for(let e of this._sceneUBOs)e.dispose();this._sceneUBOs=void 0,this._scene.removeObjectRenderer(this)}_rebuild(){this.refreshRate===g.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=g.REFRESHRATE_RENDER_ONCE)}freeRenderingGroups(){this._renderingManager&&this._renderingManager.freeRenderingGroups()}}g.REFRESHRATE_RENDER_ONCE=0,g.REFRESHRATE_RENDER_ONEVERYFRAME=1,g.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2;var u=e.i(5313),R=e.i(54670);class b extends s.Texture{get renderListPredicate(){return this._objectRenderer.renderListPredicate}set renderListPredicate(e){this._objectRenderer.renderListPredicate=e}get renderList(){return this._objectRenderer.renderList}set renderList(e){this._objectRenderer.renderList=e}get particleSystemList(){return this._objectRenderer.particleSystemList}set particleSystemList(e){this._objectRenderer.particleSystemList=e}get getCustomRenderList(){return this._objectRenderer.getCustomRenderList}set getCustomRenderList(e){this._objectRenderer.getCustomRenderList=e}get renderParticles(){return this._objectRenderer.renderParticles}set renderParticles(e){this._objectRenderer.renderParticles=e}get renderSprites(){return this._objectRenderer.renderSprites}set renderSprites(e){this._objectRenderer.renderSprites=e}get enableBoundingBoxRendering(){return this._objectRenderer.enableBoundingBoxRendering}set enableBoundingBoxRendering(e){this._objectRenderer.enableBoundingBoxRendering=e}get enableOutlineRendering(){return this._objectRenderer.enableOutlineRendering}set enableOutlineRendering(e){this._objectRenderer.enableOutlineRendering=e}get forceLayerMaskCheck(){return this._objectRenderer.forceLayerMaskCheck}set forceLayerMaskCheck(e){this._objectRenderer.forceLayerMaskCheck=e}get activeCamera(){return this._objectRenderer.activeCamera}set activeCamera(e){this._objectRenderer.activeCamera=e}get cameraForLOD(){return this._objectRenderer.cameraForLOD}set cameraForLOD(e){this._objectRenderer.cameraForLOD=e}get disableImageProcessing(){return this._objectRenderer.disableImageProcessing}set disableImageProcessing(e){this._objectRenderer.disableImageProcessing=e}get customIsReadyFunction(){return this._objectRenderer.customIsReadyFunction}set customIsReadyFunction(e){this._objectRenderer.customIsReadyFunction=e}get customRenderFunction(){return this._objectRenderer.customRenderFunction}set customRenderFunction(e){this._objectRenderer.customRenderFunction=e}get postProcesses(){return this._postProcesses}get _prePassEnabled(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled}set onAfterUnbind(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)}get onBeforeRenderObservable(){return this._objectRenderer.onBeforeRenderObservable}set onBeforeRender(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)}get onAfterRenderObservable(){return this._objectRenderer.onAfterRenderObservable}set onAfterRender(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)}set onClear(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)}get _waitingRenderList(){return this._objectRenderer._waitingRenderList}set _waitingRenderList(e){this._objectRenderer._waitingRenderList=e}get renderPassId(){return this._objectRenderer.renderPassId}get renderPassIds(){return this._objectRenderer.renderPassIds}get currentRefreshId(){return this._objectRenderer.currentRefreshId}setMaterialForRendering(e,t){this._objectRenderer.setMaterialForRendering(e,t)}get isMulti(){return this._renderTarget?.isMulti??!1}get renderTargetOptions(){return this._renderTargetOptions}get renderTarget(){return this._renderTarget}_onRatioRescale(){this._sizeRatio&&this.resize(this._initialSizeParameter)}set boundingBoxSize(e){if(this._boundingBoxSize&&this._boundingBoxSize.equals(e))return;this._boundingBoxSize=e;let t=this.getScene();t&&t.markAllMaterialsAsDirty(1)}get boundingBoxSize(){return this._boundingBoxSize}get depthStencilTexture(){return this._renderTarget?._depthStencilTexture??null}constructor(e,i,n,h=!1,o=!0,d=0,c=!1,l=s.Texture.TRILINEAR_SAMPLINGMODE,_=!0,u=!1,R=!1,b=5,f=!1,p,O,m=!1,v=!1){let P,M,T=!0,S=!1;if("object"==typeof h){const e=h;h=!!e.generateMipMaps,o=e.doNotChangeAspectRatio??!0,d=e.type??0,c=!!e.isCube,l=e.samplingMode??s.Texture.TRILINEAR_SAMPLINGMODE,_=e.generateDepthBuffer??!0,u=!!e.generateStencilBuffer,R=!!e.isMulti,b=e.format??5,f=!!e.delayAllocation,p=e.samples,O=e.creationFlags,m=!!e.noColorAttachment,v=!!e.useSRGBBuffer,P=e.colorAttachment,T=e.gammaSpace??T,M=e.existingObjectRenderer,S=!!e.enableClusteredLights}if(super(null,n,!h,void 0,l,void 0,void 0,void 0,void 0,b),this.ignoreCameraViewport=!1,this.onBeforeBindObservable=new t.Observable,this.onAfterUnbindObservable=new t.Observable,this.onClearObservable=new t.Observable,this.onResizeObservable=new t.Observable,this._cleared=!1,this.skipInitialClear=!1,this._samples=1,this._canRescale=!0,this._renderTarget=null,this._dontDisposeObjectRenderer=!1,this.boundingBoxPosition=r.Vector3.Zero(),this._disableEngineStages=!1,this._dumpToolsLoading=!1,!(n=this.getScene()))return;const L=this.getScene().getEngine();if(this._gammaSpace=T,this._coordinatesMode=s.Texture.PROJECTION_MODE,this.name=e,this.isRenderTarget=!0,this._initialSizeParameter=i,this._dontDisposeObjectRenderer=!!M,this._processSizeParameter(i),this._objectRenderer=M??new g(e,n,{numPasses:c?6:this.getRenderLayers()||1,doNotChangeAspectRatio:o,enableClusteredLights:S}),this._onBeforeRenderingManagerRenderObserver=this._objectRenderer.onBeforeRenderingManagerRenderObservable.add(()=>{let e=this._scene;if(!this._disableEngineStages)for(let t of e._beforeRenderTargetClearStage)t.action(this,this._currentFaceIndex,this._currentLayer);if(this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(L):this.skipInitialClear||L.clear(this.clearColor??e.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||e.updateTransformMatrix(!0),!this._disableEngineStages)for(let t of e._beforeRenderTargetDrawStage)t.action(this,this._currentFaceIndex,this._currentLayer);L._debugPushGroup&&L._debugPushGroup(`Render to ${this.name} (face #${this._currentFaceIndex} layer #${this._currentLayer})`)}),this._onAfterRenderingManagerRenderObserver=this._objectRenderer.onAfterRenderingManagerRenderObservable.add(()=>{if(L._debugPopGroup&&L._debugPopGroup(),!this._disableEngineStages)for(let e of this._scene._afterRenderTargetDrawStage)e.action(this,this._currentFaceIndex,this._currentLayer);let e=this._texture?.generateMipMaps??!1;if(this._texture&&(this._texture.generateMipMaps=!1),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,this._renderTarget??void 0,this._currentFaceIndex,this._postProcesses,this.ignoreCameraViewport):this._currentUseCameraPostProcess&&this._scene.postProcessManager._finalizeFrame(!1,this._renderTarget??void 0,this._currentFaceIndex),!this._disableEngineStages)for(let e of this._scene._afterRenderTargetPostProcessStage)e.action(this,this._currentFaceIndex,this._currentLayer);this._texture&&(this._texture.generateMipMaps=e),this._doNotChangeAspectRatio||this._scene.updateTransformMatrix(!0),this._currentDumpForDebug&&(this._dumpTools?this._dumpTools.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),L):a.Logger.Error("dumpTools module is still being loaded. To speed up the process import dump tools directly in your project"))}),this._onFastPathRenderObserver=this._objectRenderer.onFastPathRenderObservable.add(()=>{this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(L):this.skipInitialClear||L.clear(this.clearColor||this._scene.clearColor,!0,!0,!0)}),this._resizeObserver=L.onResizeObservable.add(()=>{}),this._generateMipMaps=!!h,this._doNotChangeAspectRatio=o,R)return;this._renderTargetOptions={generateMipMaps:h,type:d,format:this._format??void 0,samplingMode:this.samplingMode,generateDepthBuffer:_,generateStencilBuffer:u,samples:p,creationFlags:O,noColorAttachment:m,useSRGBBuffer:v,colorAttachment:P,label:this.name},this.samplingMode===s.Texture.NEAREST_SAMPLINGMODE&&(this.wrapU=s.Texture.CLAMP_ADDRESSMODE,this.wrapV=s.Texture.CLAMP_ADDRESSMODE),f||(c?(this._renderTarget=n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions),this.coordinatesMode=s.Texture.INVCUBIC_MODE,this._textureMatrix=r.Matrix.Identity()):this._renderTarget=n.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==p&&(this.samples=p))}createDepthStencilTexture(e=0,t=!0,r=!1,s=1,i=14,n){this._renderTarget?.createDepthStencilTexture(e,t,r,s,i,n)}_processSizeParameter(e){if(e.ratio){this._sizeRatio=e.ratio;let t=this._getEngine();this._size={width:this._bestReflectionRenderTargetDimension(t.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(t.getRenderHeight(),this._sizeRatio)}}else this._size=e}get samples(){return this._renderTarget?.samples??this._samples}set samples(e){this._renderTarget&&(this._samples=this._renderTarget.setSamples(e))}addPostProcess(e){if(!this._postProcessManager){let e=this.getScene();if(!e)return;this._postProcessManager=new i.PostProcessManager(e),this._postProcesses=[]}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1}clearPostProcesses(e=!1){if(this._postProcesses){if(e)for(let e of this._postProcesses)e.dispose();this._postProcesses=[]}}removePostProcess(e){if(!this._postProcesses)return;let t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}resetRefreshCounter(){this._objectRenderer.resetRefreshCounter()}get refreshRate(){return this._objectRenderer.refreshRate}set refreshRate(e){this._objectRenderer.refreshRate=e}_shouldRender(){return this._objectRenderer.shouldRender()}getRenderSize(){return this.getRenderWidth()}getRenderWidth(){return this._size.width?this._size.width:this._size}getRenderHeight(){return this._size.width?this._size.height:this._size}getRenderLayers(){let e=this._size.layers;if(e)return e;let t=this._size.depth;return t||0}disableRescaling(){this._canRescale=!1}get canRescale(){return this._canRescale}scale(e){let t=Math.max(1,this.getRenderSize()*e);this.resize(t)}getReflectionTextureMatrix(){return this.isCube?this._textureMatrix:super.getReflectionTextureMatrix()}resize(e){let t=this.isCube;this._renderTarget?.dispose(),this._renderTarget=null;let r=this.getScene();r&&(this._processSizeParameter(e),t?this._renderTarget=r.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):this._renderTarget=r.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))}render(e=!1,t=!1){this._render(e,t)}isReadyForRendering(){this._dumpToolsLoading||(this._dumpToolsLoading=!0,e.A(16301).then(e=>this._dumpTools=e)),this._objectRenderer.prepareRenderList(),this.onBeforeBindObservable.notifyObservers(this),this._objectRenderer.initRender(this.getRenderWidth(),this.getRenderHeight());let t=this._objectRenderer._checkReadiness();return this.onAfterUnbindObservable.notifyObservers(this),this._objectRenderer.finishRender(),t}_render(e=!1,t=!1){let r=this.getScene();if(!r)return;void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses);let s=r.getEngine();if(s._debugPushGroup&&s._debugPushGroup(`Render to ${this.name}`),this._objectRenderer.prepareRenderList(),this.onBeforeBindObservable.notifyObservers(this),this._objectRenderer.initRender(this.getRenderWidth(),this.getRenderHeight()),(this.is2DArray||this.is3D)&&!this.isMulti)for(let s=0;s<this.getRenderLayers();s++)this._renderToTarget(0,e,t,s),r.incrementRenderId(),r.resetCachedMaterial();else if(this.isCube&&!this.isMulti)for(let s=0;s<6;s++)this._renderToTarget(s,e,t),r.incrementRenderId(),r.resetCachedMaterial();else this._renderToTarget(0,e,t);this.onAfterUnbindObservable.notifyObservers(this),this._objectRenderer.finishRender(),s._debugPopGroup&&s._debugPopGroup()}_bestReflectionRenderTargetDimension(e,t){let r=e*t,s=(0,n.NearestPOT)(r+16384/(128+r));return Math.min((0,n.FloorPOT)(e),s)}_bindFrameBuffer(e=0,t=0){let r=this.getScene();if(!r)return;let s=r.getEngine();this._renderTarget&&s.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}_unbindFrameBuffer(e,t){this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,()=>{this.onAfterRenderObservable.notifyObservers(t)})}_prepareFrame(e,t,r,s){this._postProcessManager?this._prePassEnabled||this._postProcessManager._prepareFrame(this._texture,this._postProcesses)||this._bindFrameBuffer(t,r):s&&e.postProcessManager._prepareFrame(this._texture)||this._bindFrameBuffer(t,r)}_renderToTarget(e,t,r,s=0){let i=this.getScene();if(!i)return;let n=i.getEngine();this._currentFaceIndex=e,this._currentLayer=s,this._currentUseCameraPostProcess=t,this._currentDumpForDebug=r,this._prepareFrame(i,e,s,t),this._objectRenderer.render(e+s,!0),this._unbindFrameBuffer(n,e),this._texture&&this.isCube&&5===e&&n.generateMipMapsForCubemap(this._texture,!0)}setRenderingOrder(e,t=null,r=null,s=null){this._objectRenderer.setRenderingOrder(e,t,r,s)}setRenderingAutoClearDepthStencil(e,t){this._objectRenderer.setRenderingAutoClearDepthStencil(e,t)}clone(){let e=this.getSize(),t=new b(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer,void 0,this._renderTargetOptions.format,void 0,this._renderTargetOptions.samples);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t}serialize(){if(!this.name)return null;let e=super.serialize();if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(let t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e}disposeFramebufferObjects(){this._renderTarget?.dispose(!0)}releaseInternalTexture(){this._renderTarget?.releaseTextures(),this._texture=null}dispose(){this.onResizeObservable.clear(),this.onClearObservable.clear(),this.onAfterUnbindObservable.clear(),this.onBeforeBindObservable.clear(),this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this._prePassRenderTarget&&this._prePassRenderTarget.dispose(),this._objectRenderer.onBeforeRenderingManagerRenderObservable.remove(this._onBeforeRenderingManagerRenderObserver),this._objectRenderer.onAfterRenderingManagerRenderObservable.remove(this._onAfterRenderingManagerRenderObserver),this._objectRenderer.onFastPathRenderObservable.remove(this._onFastPathRenderObserver),this._dontDisposeObjectRenderer||this._objectRenderer.dispose(),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null);let e=this.getScene();if(!e)return;let t=e.customRenderTargets.indexOf(this);for(let r of(t>=0&&e.customRenderTargets.splice(t,1),e.cameras))(t=r.customRenderTargets.indexOf(this))>=0&&r.customRenderTargets.splice(t,1);this._renderTarget?.dispose(),this._renderTarget=null,this._texture=null,super.dispose()}_rebuild(){this._objectRenderer._rebuild(),this._postProcessManager&&this._postProcessManager._rebuild()}freeRenderingGroups(){this._objectRenderer.freeRenderingGroups()}getViewCount(){return 1}}b.REFRESHRATE_RENDER_ONCE=g.REFRESHRATE_RENDER_ONCE,b.REFRESHRATE_RENDER_ONEVERYFRAME=g.REFRESHRATE_RENDER_ONEVERYFRAME,b.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=g.REFRESHRATE_RENDER_ONEVERYTWOFRAMES;let f=!1;Object.getOwnPropertyDescriptor(b.prototype,"noPrePassRenderer")||Object.defineProperty(b.prototype,"noPrePassRenderer",(0,R._MissingSideEffectProperty)("RenderTargetTexture","noPrePassRenderer")),e.s(["RegisterRenderTargetTexture",0,function(){f||(f=!0,u.Effect.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},s.Texture._CreateRenderTargetTexture=(e,t,r,s,i)=>new b(e,t,r,s))},"RenderTargetTexture",0,b],74040)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88777,t=>{"use strict";var e=t.i(95330),i=t.i(82350),l=t.i(48477);class s extends e.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.body=this.registerDataInput("body",i.RichTypeAny),this.impulse=this.registerDataInput("impulse",i.RichTypeVector3),this.location=this.registerDataInput("location",i.RichTypeVector3)}_execute(t,e){let i=this.body.getValue(t);if(!i){this._reportError(t,"No physics body provided"),this.out._activateSignal(t);return}let l=this.impulse.getValue(t),s=this.location.getValue(t);i.applyImpulse(l,s),this.out._activateSignal(t)}getClassName(){return"FlowGraphApplyImpulseBlock"}}let o=!1;function p(){o||(o=!0,(0,l.RegisterClass)("FlowGraphApplyImpulseBlock",s))}t.s(["FlowGraphApplyImpulseBlock",0,s,"RegisterFlowGraphApplyImpulseBlock",0,p],20338),p(),t.s([],33719),t.i(33719),t.i(20338),t.s(["FlowGraphApplyImpulseBlock",0,s],88777)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93357,29665,e=>{"use strict";var t=e.i(65703),s=e.i(57554);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new s.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 s=0;s<e.length;s++){let r=e[s];r&&t.push(r)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let s=this._scene.activeCamera;return!!s&&!!(t=t||this._getActivePostProcesses(s._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(s,e,null!=t),!0)}directRender(e,t=null,s=!1,r=0,i=0,n=!1,a=e.length){let h=this._scene.getEngine();for(let o=0;o<a;o++){o<e.length-1?e[o+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?h.bindFramebuffer(t,r,void 0,void 0,s,i):n||h.restoreDefaultFramebuffer(),h._debugInsertMarker?.(`post process ${e[o].name} output`));let a=e[o],l=a.apply();l&&(a.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),h.bindBuffers(this._vertexBuffers,this._indexBuffer,l),h.drawElementsType(0,0,6),a.onAfterRenderObservable.notifyObservers(l))}h.setDepthBuffer(!0),h.setDepthWrite(!0)}_finalizeFrame(e,t,s,r,i=!1){let n=this._scene.activeCamera;if(!n||(this.onBeforeRenderObservable.notifyObservers(this),0===(r=r||this._getActivePostProcesses(n._postProcesses)).length||!this._scene.postProcessesEnabled))return;let a=this._scene.getEngine();for(let h=0,o=r.length;h<o;h++){let l=r[h];if(h<o-1?l._outputTexture=r[h+1].activate(n,t?.texture):(t?(a.bindFramebuffer(t,s,void 0,void 0,i),l._outputTexture=t):(a.restoreDefaultFramebuffer(),l._outputTexture=null),a._debugInsertMarker?.(`post process ${r[h].name} output`)),e)break;let c=l.apply();c&&(l.onBeforeRenderObservable.notifyObservers(c),this._prepareBuffers(),a.bindBuffers(this._vertexBuffers,this._indexBuffer,c),a.drawElementsType(0,0,6),l.onAfterRenderObservable.notifyObservers(c))}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)}}],93357);var r=e.i(95294),i=e.i(10534);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,s=null,i=null,n=null){this.index=e,this._opaqueSubMeshes=new r.SmartArray(256),this._transparentSubMeshes=new r.SmartArray(256),this._alphaTestSubMeshes=new r.SmartArray(256),this._depthOnlySubMeshes=new r.SmartArray(256),this._particleSystems=new r.SmartArray(256),this._spriteManagers=new r.SmartArray(256),this._empty=!0,this._edgesRenderers=new r.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=s,this.alphaTestSortCompareFn=i,this.transparentSortCompareFn=n}render(e,t,s,r,i=!0,n=!0,a=!0,h=!0,o){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let l=this._scene.getEngine();i&&0!==this._depthOnlySubMeshes.length&&(l.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),l.setColorWrite(!0)),n&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),a&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let c=l.getStencilBuffer();if(l.setStencilBuffer(!1),t&&this._renderSprites(),s&&this._renderParticles(r),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),h&&(o||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(l.setStencilBuffer(c),o)o(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);l.setAlphaMode(0)}if(l.setStencilBuffer(!1),n&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();l.setAlphaMode(0)}l.setStencilBuffer(c)}_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,s,r,a){let h,o=0,l=s?s.globalPosition:n._ZeroVector;if(r)for(;o<e.length;o++)(h=e.data[o])._alphaIndex=h.getMesh().alphaIndex,h._distanceToCamera=i.Vector3.Distance(h.getBoundingInfo().boundingSphere.centerWorld,l);let c=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&c.sort(t);let u=c[0].getMesh().getScene();for(o=0;o<c.length;o++)if(h=c[o],!u._activeMeshesFrozenButKeepClipping||h.isInFrustum(u._frustumPlanes)){if(r){let e=h.getMaterial();if(e&&e.needDepthPrePass&&!a){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),h.render(!1),t.setColorWrite(!0)}}h.render(r)}}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 s=e.getMesh(),r=t.getMesh();return s.material&&r.material?s.material.uniqueId-r.material.uniqueId:s.uniqueId-r.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,s){void 0===t&&(t=e.getMesh()),void 0===s&&(s=e.getMaterial()),null!=s&&(s.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):s.needAlphaTestingForMesh(t)?(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(s.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 s=0;s<this._particleSystems.length;s++){let r=this._particleSystems.data[s];if(0===(t&&t.layerMask&r.layerMask))continue;let i=r.emitter;i.position&&e&&-1===e.indexOf(i)||this._scene._activeParticles.addCount(r.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 s=this._spriteManagers.data[t];0!==(e&&e.layerMask&s.layerMask)&&s.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}n._ZeroVector=i.Vector3.Zero();class a{}class h{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=h.MIN_RENDERINGGROUPS;e<h.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,s,r,i=!0,n=!0,a=!0,o=!0,l){let c=this._renderingGroupInfo;if(c.scene=this._scene,c.camera=this._scene.activeCamera,c.renderingManager=this,this._scene.spriteManagers&&r)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let u=h.MIN_RENDERINGGROUPS;u<h.MAX_RENDERINGGROUPS;u++){this._depthStencilBufferAlreadyCleaned=u===h.MIN_RENDERINGGROUPS;let p=this._renderingGroups[u];if(!p||p._empty)continue;let d=1<<u;if(c.renderingGroupId=u,this._scene.onBeforeRenderingGroupObservable.notifyObservers(c,d),h.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 h of(p.render(e,r,s,t,i,n,a,o,l),this._scene._afterRenderingGroupDrawStage))h.action(u);this._scene.onAfterRenderingGroupObservable.notifyObservers(c,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=h.MIN_RENDERINGGROUPS;e<h.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=h.MIN_RENDERINGGROUPS;e<h.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,s){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,s))}setRenderingOrder(e,t=null,s=null,r=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=s,this._customTransparentSortCompareFn[e]=r,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,s=!0,r=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:s,stencil:r}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}h.MAX_RENDERINGGROUPS=4,h.MIN_RENDERINGGROUPS=0,h.AUTOCLEAR=!0,e.s(["RenderingManager",0,h],29665)},3367,e=>{"use strict";var t=e.i(85240);class s{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._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._lastSecValueCount++}addCount(e,t){s.Enabled&&(this._current+=e,t&&this._fetchResult())}beginMonitoring(){s.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!s.Enabled)return;e&&this.fetchNewFrame();let r=t.PrecisionDate.Now;this._current=r-this._startMonitoringTime,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),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)}}s.Enabled=!0,e.s(["PerfCounter",0,s])},16475,e=>{"use strict";var t=e.i(38677);class s{static GetPlanes(e){let r=[];for(let e=0;e<6;e++)r.push(new t.Plane(0,0,0,0));return s.GetPlanesToRef(e,r),r}static GetNearPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[2],t.normal.y=s[7]+s[6],t.normal.z=s[11]+s[10],t.d=s[15]+s[14],t.normalize()}static GetFarPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[2],t.normal.y=s[7]-s[6],t.normal.z=s[11]-s[10],t.d=s[15]-s[14],t.normalize()}static GetLeftPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[0],t.normal.y=s[7]+s[4],t.normal.z=s[11]+s[8],t.d=s[15]+s[12],t.normalize()}static GetRightPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[0],t.normal.y=s[7]-s[4],t.normal.z=s[11]-s[8],t.d=s[15]-s[12],t.normalize()}static GetTopPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[1],t.normal.y=s[7]-s[5],t.normal.z=s[11]-s[9],t.d=s[15]-s[13],t.normalize()}static GetBottomPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[1],t.normal.y=s[7]+s[5],t.normal.z=s[11]+s[9],t.d=s[15]+s[13],t.normalize()}static GetPlanesToRef(e,t){s.GetNearPlaneToRef(e,t[0]),s.GetFarPlaneToRef(e,t[1]),s.GetLeftPlaneToRef(e,t[2]),s.GetRightPlaneToRef(e,t[3]),s.GetTopPlaneToRef(e,t[4]),s.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let s=0;s<6;s++)if(0>t[s].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,s])},66476,e=>{"use strict";var t=e.i(10534),s=e.i(65703);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,r=!0){let i;if(!this.pickedMesh||r&&!this.pickedMesh.isVerticesDataPresent(s.VertexBuffer.NormalKind))return null;let n=this.pickedMesh.getIndices();n?.length===0&&(n=null);let a=t.TmpVectors.Vector3[0],h=t.TmpVectors.Vector3[1],o=t.TmpVectors.Vector3[2];if(r){let e=this.pickedMesh.getVerticesData(s.VertexBuffer.NormalKind),r=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]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],h):h.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],o):o.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);r=r.scale(this.bu),l=l.scale(this.bv),c=c.scale(1-this.bu-this.bv),i=new t.Vector3(r.x+l.x+c.x,r.y+l.y+c.y,r.z+l.z+c.z)}else{let e=this.pickedMesh.getVerticesData(s.VertexBuffer.PositionKind),r=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]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],h):h.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],o):o.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),u=r.subtract(l),p=c.subtract(l);i=t.Vector3.Cross(u,p)}let l=(e,s)=>{if(-1!==this.thinInstanceIndex){let r=e._thinInstanceDataStorage.matrixData,i=this.thinInstanceIndex<<4;if(r&&r.length>i){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(r,i,e),t.Vector3.TransformNormalToRef(s,e,s)}}let r=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(r),(r=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),r.invert(),r.transposeToRef(t.TmpVectors.Matrix[1]),r=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(s,r,s)};if(e&&l(this.pickedMesh,i),this.ray){let s=t.TmpVectors.Vector3[0].copyFrom(i);e||l(this.pickedMesh,s),t.Vector3.Dot(s,this.ray.direction)>0&&i.negateInPlace()}return i.normalize(),i}getTextureCoordinates(e=s.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let r=this.pickedMesh.getIndices();if(!r)return null;let i=this.pickedMesh.getVerticesData(e);if(!i)return null;let n=t.Vector2.FromArray(i,2*r[3*this.faceId]),a=t.Vector2.FromArray(i,2*r[3*this.faceId+1]),h=t.Vector2.FromArray(i,2*r[3*this.faceId+2]);return n=n.scale(this.bu),a=a.scale(this.bv),h=h.scale(1-this.bu-this.bv),new t.Vector2(n.x+a.x+h.x,n.y+a.y+h.y)}}])},11437,e=>{"use strict";var t=e.i(10534);class s{}s.POINTERDOWN=1,s.POINTERUP=2,s.POINTERMOVE=4,s.POINTERWHEEL=8,s.POINTERPICK=16,s.POINTERTAP=32,s.POINTERDOUBLETAP=64;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends r{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,s,r=null){super(e,t),this._pickInfo=s,this._inputManager=r}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends r{constructor(e,s,r,i){super(e,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(r,i)}}])},70463,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class s{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{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}}])},24423,e=>{"use strict";var t,s;(s=t||(t={}))[s.PointerMove=0]="PointerMove",s[s.PointerDown=1]="PointerDown",s[s.PointerUp=2]="PointerUp";class r{}r.DOM_DELTA_PIXEL=0,r.DOM_DELTA_LINE=1,r.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,r])},93565,e=>{"use strict";var t=e.i(10534),s=e.i(52344);class r extends s.Material{constructor(e,s,r=!0,i=!1){super(e,s,void 0,i),this._normalMatrix=new t.Matrix,this._storeEffectOnSubMeshes=r}getEffect(){return this._storeEffectOnSubMeshes?this._activeEffect:super.getEffect()}isReady(e,t){return!!e&&(!this._storeEffectOnSubMeshes||!e.subMeshes||0===e.subMeshes.length||this.isReadyForSubMesh(e,e.subMeshes[0],t))}_isReadyForSubMesh(e){let t=e.materialDefines;return!this.checkReadyOnEveryCall&&!!e.effect&&!!t&&t._renderId===this.getScene().getRenderId()}bindOnlyWorldMatrix(e){this._activeEffect.setMatrix("world",e)}bindOnlyNormalMatrix(e){this._activeEffect.setMatrix("normalMatrix",e)}bind(e,t){t&&this.bindForSubMesh(e,t,t.subMeshes[0])}_afterBind(e,t=null,s){super._afterBind(e,t,s),this.getScene()._cachedEffect=t,s?s._drawWrapper._forceRebindOnNextCall=!1:this._drawWrapper._forceRebindOnNextCall=!1}_mustRebind(e,t,s,r=1){return s._drawWrapper._forceRebindOnNextCall||e.isCachedMaterialInvalid(this,t,r)}dispose(e,t,s){this._activeEffect=void 0,super.dispose(e,t,s)}}e.s(["PushMaterial",0,r])},20193,e=>{"use strict";e.s(["EffectFallbacks",0,class{constructor(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}unBindMesh(){this._mesh=null}addFallback(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=[]),this._defines[e].push(t)}addCPUSkinningFallback(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)}get hasMoreFallbacks(){return this._currentRank<=this._maxRank}reduce(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;let s=this._mesh.getScene();for(let e=0;e<s.meshes.length;e++){let r=s.meshes[e];if(!r.material){!this._mesh.material&&r.computeBonesUsingShaders&&r.numBoneInfluencers>0&&(r.computeBonesUsingShaders=!1);continue}if(r.computeBonesUsingShaders&&0!==r.numBoneInfluencers){if(r.material.getEffect()===t)r.computeBonesUsingShaders=!1;else if(r.subMeshes){for(let e of r.subMeshes)if(e.effect===t){r.computeBonesUsingShaders=!1;break}}}}}else{let t=this._defines[this._currentRank];if(t)for(let s=0;s<t.length;s++)e=e.replace("#define "+t[s],"");this._currentRank++}return e}}])},69858,e=>{"use strict";let t=new WeakMap;e.s(["BindVertexPullingUniforms",0,function(e,t){t.forEach((t,s)=>{let r=`vp_${s}_info`;e.setFloat4(r,t.offset,t.stride,t.type,+!!t.normalized)})},"PrepareVertexPullingUniforms",0,function(e){let s=e.getVertexBuffers();if(!s)return null;let r=t.get(e);if(r){let e=!1;for(let t in s)if(!r.has(t)){e=!0;break}if(!e)return r}else r=new Map,t.set(e,r);for(let e in s){let t=s[e];if(t){let s=t.byteOffset,i=t.byteStride,n=t.type,a=t.normalized;r.set(e,{offset:s,stride:i,type:n,normalized:a})}}return r}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88638,t=>{"use strict";var e=t.i(82531),s=t.i(48477);t.i(557);var i=t.i(82350);class h extends e.FlowGraphBlock{constructor(t){super(t),this.key=this.registerDataInput("key",i.RichTypeString),this.withShift=this.registerDataInput("withShift",i.RichTypeBoolean),this.withCtrl=this.registerDataInput("withCtrl",i.RichTypeBoolean),this.withAlt=this.registerDataInput("withAlt",i.RichTypeBoolean),this.withMeta=this.registerDataInput("withMeta",i.RichTypeBoolean),this.withCommandOrCtrl=this.registerDataInput("withCommandOrCtrl",i.RichTypeBoolean),this.isPressed=this.registerDataOutput("isPressed",i.RichTypeBoolean)}_updateOutputs(t){let e=t.configuration.sceneEventCoordinator;if(!e)return void this.isPressed.setValue(!1,t);let s=e.pressedKeys,i=this.key.getValue(t),h=!i||s.has(i);h&&this.withShift.getValue(t)&&(h=s.has("ShiftLeft")||s.has("ShiftRight")),h&&this.withCtrl.getValue(t)&&(h=s.has("ControlLeft")||s.has("ControlRight")),h&&this.withAlt.getValue(t)&&(h=s.has("AltLeft")||s.has("AltRight")),h&&this.withMeta.getValue(t)&&(h=s.has("MetaLeft")||s.has("MetaRight")),h&&this.withCommandOrCtrl.getValue(t)&&(h=s.has("CommandOrControl")),this.isPressed.setValue(h,t)}getClassName(){return"FlowGraphIsKeyPressedBlock"}}(0,s.RegisterClass)("FlowGraphIsKeyPressedBlock",h),t.s(["FlowGraphIsKeyPressedBlock",0,h])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38677,e=>{"use strict";var t=e.i(10534);class i{constructor(e,i,r,a){this.normal=new t.Vector3(e,i,r),this.d=a}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,a=this.normal.x,s=this.normal.y,n=this.normal.z,o=this.d;return new i(a*r[0]+s*r[1]+n*r[2]+o*r[3],a*r[4]+s*r[5]+n*r[6]+o*r[7],a*r[8]+s*r[9]+n*r[10]+o*r[11],a*r[12]+s*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,a=t.x-e.x,s=t.y-e.y,n=t.z-e.z,o=i.x-e.x,l=i.y-e.y,h=i.z-e.z,c=s*h-n*l,d=n*o-a*h,u=a*l-s*o,_=Math.sqrt(c*c+d*d+u*u);return r=0!==_?1/_:0,this.normal.x=c*r,this.normal.y=d*r,this.normal.z=u*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 a=new i(0,0,0,0);return a.copyFromPoints(e,t,r),a}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 a=-(i.x*e.x+i.y*e.y+i.z*e.z);return t.Vector3.Dot(r,i)+a}}i._TmpMatrix=t.Matrix.Identity(),e.s(["Plane",0,i])},21834,e=>{"use strict";e.s(["useOpenGLOrientationForUV",()=>!1])},67374,30649,e=>{"use strict";var t=e.i(16147),i=e.i(40220),r=e.i(57554),a=e.i(10534),s=e.i(68061),n=e.i(48477),o=e.i(54670),l=e.i(4775),h=e.i(58279),c=e.i(38677),d=e.i(61023);function u(e,t,i=!1){let r=t.width,a=t.height;if(e instanceof Float32Array){let t=e.byteLength/e.BYTES_PER_ELEMENT,i=new Uint8Array(t);for(;--t>=0;){let r=e[t];r<0?r=0:r>1&&(r=1),i[t]=255*r}e=i}let s=document.createElement("canvas");s.width=r,s.height=a;let n=s.getContext("2d");if(!n)return null;let o=n.createImageData(r,a);if(o.data.set(e),n.putImageData(o,0,0),i){let e=document.createElement("canvas");e.width=r,e.height=a;let t=e.getContext("2d");return t?(t.translate(0,a),t.scale(1,-1),t.drawImage(s,0,0),e.toDataURL("image/png")):null}return s.toDataURL("image/png")}function _(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let a=e._readPixelsSync(t,i);return a?u(a,e.getSize(),r.invertY):null}async function f(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let a=await e.readPixels(t,i);return a?u(a,e.getSize(),r.invertY):null}e.s(["GenerateBase64StringFromTexture",0,_,"GenerateBase64StringFromTextureAsync",0,f],30649);var m=e.i(21834),T=e.i(95397);class p extends s.BaseTexture{static _CreateVideoTexture(e,t,i,r=!1,a=!1,s=p.TRILINEAR_SAMPLINGMODE,n={},l,h=5){throw(0,o._WarnImport)("VideoTexture")}get noMipmap(){return this._noMipmap}get mimeType(){return this._mimeType}set isBlocking(e){this._isBlocking=e}get isBlocking(){return this._isBlocking}get invertY(){return this._invertY}constructor(e,t,i,a,s=p.TRILINEAR_SAMPLINGMODE,n=null,o=null,h=null,c=!1,d,u,_,f,T){let g;super(t),this.url=null,this.uOffset=0,this.vOffset=0,this.uScale=1,this.vScale=1,this.uAng=0,this.vAng=0,this.wAng=0,this.uRotationCenter=.5,this.vRotationCenter=.5,this.wRotationCenter=.5,this.homogeneousRotationInUVTransform=!1,this.inspectableCustomProperties=null,this._noMipmap=!1,this._invertY=!1,this._rowGenerationMatrix=null,this._cachedTextureMatrix=null,this._projectionModeMatrix=null,this._t0=null,this._t1=null,this._t2=null,this._cachedUOffset=-1,this._cachedVOffset=-1,this._cachedUScale=0,this._cachedVScale=0,this._cachedUAng=-1,this._cachedVAng=-1,this._cachedWAng=-1,this._cachedReflectionProjectionMatrixId=-1,this._cachedURotationCenter=-1,this._cachedVRotationCenter=-1,this._cachedWRotationCenter=-1,this._cachedHomogeneousRotationInUVTransform=!1,this._cachedIdentity3x2=!0,this._cachedReflectionTextureMatrix=null,this._cachedReflectionUOffset=-1,this._cachedReflectionVOffset=-1,this._cachedReflectionUScale=0,this._cachedReflectionVScale=0,this._cachedReflectionCoordinatesMode=-1,this._buffer=null,this._deleteBuffer=!1,this._format=null,this._delayedOnLoad=null,this._delayedOnError=null,this.onLoadObservable=new r.Observable,this._isBlocking=!0,this.name=e||"",this.url=e;let R=!1,x=null,M=!0;"object"==typeof i&&null!==i?(g=i.noMipmap??!1,a=i.invertY??!m.useOpenGLOrientationForUV,s=i.samplingMode??p.TRILINEAR_SAMPLINGMODE,n=i.onLoad??null,o=i.onError??null,h=i.buffer??null,c=i.deleteBuffer??!1,d=i.format,u=i.mimeType,_=i.loaderOptions,f=i.creationFlags,R=i.useSRGBBuffer??!1,x=i.internalTexture??null,M=i.gammaSpace??M,T=i.forcedExtension??T):g=!!i,this._gammaSpace=M,this._noMipmap=g,this._invertY=void 0===a?!m.useOpenGLOrientationForUV:a,this._initialSamplingMode=s,this._buffer=h,this._deleteBuffer=c,this._mimeType=u,this._loaderOptions=_,this._creationFlags=f,this._useSRGBBuffer=R,this._forcedExtension=T,void 0!==d&&(this._format=d);const A=this.getScene(),S=this._getEngine();if(!S)return;S.onBeforeTextureInitObservable.notifyObservers(this);const E=()=>{this._texture&&(this._texture._invertVScale&&(this.vScale*=-1,this.vOffset+=1),null!==this._texture._cachedWrapU&&(this.wrapU=this._texture._cachedWrapU,this._texture._cachedWrapU=null),null!==this._texture._cachedWrapV&&(this.wrapV=this._texture._cachedWrapV,this._texture._cachedWrapV=null),null!==this._texture._cachedWrapR&&(this.wrapR=this._texture._cachedWrapR,this._texture._cachedWrapR=null)),this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),n&&n(),!this.isBlocking&&A&&A.resetCachedMaterial()},y=(e,t)=>{this._loadingError=!0,this._errorObject={message:e,exception:t},o&&o(e,t),p.OnTextureLoadErrorObservable.notifyObservers(this)};if(!this.url&&!x){this._delayedOnLoad=E,this._delayedOnError=y;return}if(this._texture=x??this._getFromCache(this.url,g,s,this._invertY,R,this.isCube),this._texture)if(this._texture.isReady)l.TimingTools.SetImmediate(()=>E());else{const e=this._texture.onLoadedObservable.add(E);this._texture.onErrorObservable.add(t=>{y(t.message,t.exception),this._texture?.onLoadedObservable.remove(e)})}else if(A&&A.useDelayedTextureLoading)this.delayLoadState=4,this._delayedOnLoad=E,this._delayedOnError=y;else{try{this._texture=S.createTexture(this.url,g,this._invertY,A,s,E,y,this._buffer,void 0,this._format,this._forcedExtension,u,_,f,R)}catch(e){throw y("error loading",e),e}c&&(this._buffer=null)}}updateURL(e,t=null,i,r){this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(1,e=>e.hasTexture(this))),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=r,this.delayLoadState=4;let a=this._delayedOnLoad,s=()=>{a?a():this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),i&&i()};this._delayedOnLoad=s,this.delayLoad()}delayLoad(){if(4!==this.delayLoadState)return;let e=this.getScene();if(!e)return;let t=this.url;!t&&(this.name.indexOf("://")>0||this.name.startsWith("data:"))&&(t=this.name),this.delayLoadState=1,this._texture=this._getFromCache(t,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer,this.isCube),this._texture?this._delayedOnLoad&&(this._texture.isReady?l.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(t,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null}_prepareRowForTextureGeneration(e,t,i,r){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,a.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,r),r.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,r.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,r.z+=this.wRotationCenter}getTextureMatrix(e=1){if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,this._cachedTextureMatrix&&this._rowGenerationMatrix||(this._cachedTextureMatrix=a.Matrix.Zero(),this._rowGenerationMatrix=new a.Matrix,this._t0=a.Vector3.Zero(),this._t1=a.Vector3.Zero(),this._t2=a.Vector3.Zero()),a.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(a.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,a.TmpVectors.Matrix[0]),a.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,a.TmpVectors.Matrix[1]),a.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,a.TmpVectors.Matrix[2]),a.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,a.TmpVectors.Matrix[3]),a.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(a.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(a.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(a.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),a.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));let t=this.getScene();if(!t)return this._cachedTextureMatrix;let i=this._cachedIdentity3x2;return this._cachedIdentity3x2=this._cachedTextureMatrix.isIdentityAs3x2(),this.optimizeUVAllocation&&i!==this._cachedIdentity3x2&&t.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedTextureMatrix}getReflectionTextureMatrix(){let e=this.getScene();if(!e)return this._cachedReflectionTextureMatrix;if(this.uOffset===this._cachedReflectionUOffset&&this.vOffset===this._cachedReflectionVOffset&&this.uScale===this._cachedReflectionUScale&&this.vScale===this._cachedReflectionVScale&&this.coordinatesMode===this._cachedReflectionCoordinatesMode){if(this.coordinatesMode!==p.PROJECTION_MODE)return this._cachedReflectionTextureMatrix;else if(this._cachedReflectionProjectionMatrixId===e.getProjectionMatrix().updateFlag)return this._cachedReflectionTextureMatrix}this._cachedReflectionTextureMatrix||(this._cachedReflectionTextureMatrix=a.Matrix.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=a.Matrix.Zero());let t=this._cachedReflectionCoordinatesMode!==this.coordinatesMode;switch(this._cachedReflectionUOffset=this.uOffset,this._cachedReflectionVOffset=this.vOffset,this._cachedReflectionUScale=this.uScale,this._cachedReflectionVScale=this.vScale,this._cachedReflectionCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case p.PLANAR_MODE:a.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix),this._cachedReflectionTextureMatrix[0]=this.uScale,this._cachedReflectionTextureMatrix[5]=this.vScale,this._cachedReflectionTextureMatrix[12]=this.uOffset,this._cachedReflectionTextureMatrix[13]=this.vOffset;break;case p.PROJECTION_MODE:{a.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);let t=e.getProjectionMatrix();this._cachedReflectionProjectionMatrixId=t.updateFlag,t.multiplyToRef(this._projectionModeMatrix,this._cachedReflectionTextureMatrix);break}default:a.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix)}return t&&e.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedReflectionTextureMatrix}clone(){let e={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return T.SerializationHelper.Clone(()=>new p(this._texture?this._texture.url:null,this.getScene(),e),this)}serialize(){let e=this.name;!p.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");let t=super.serialize(p._SerializeInternalTextureUniqueId);if(!t)return null;if(p.SerializeBuffers||p.ForceSerializeBuffers)if("string"==typeof this._buffer&&this._buffer.startsWith("data:"))t.base64String=this._buffer,t.name=t.name.replace("data:","");else if(this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array){let e=this.mimeType||"image/png";t.base64String=`data:${e};base64,${(0,d.EncodeArrayBufferToBase64)(this._buffer)}`}else(p.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?_(this):f(this));return t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,p._SerializeInternalTextureUniqueId&&(t.internalTextureUniqueId=this._texture?.uniqueId),t.internalTextureLabel=this._texture?.label,t.noMipmap=this._noMipmap,this.name=e,t}getClassName(){return"Texture"}dispose(){super.dispose(),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null,this._buffer=null}static Parse(e,t,i){let r;if(e.customType){let r=h.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&r.updateSamplingMode&&r._samplingMode&&r._samplingMode!==e.samplingMode&&r.updateSamplingMode(e.samplingMode),r}if(e.isCube&&!e.isRenderTarget)return p._CubeTextureParser(e,t,i);let a=void 0!==e.internalTextureUniqueId;if(!e.name&&!e.isRenderTarget&&!a)return null;if(a){for(let i of t.getEngine().getLoadedTexturesCache())if(i.uniqueId===e.internalTextureUniqueId){r=i;break}}let s=t=>{if(t&&t._texture&&(t._texture._cachedWrapU=null,t._texture._cachedWrapV=null,t._texture._cachedWrapR=null),e.samplingMode){let i=e.samplingMode;t&&t.samplingMode!==i&&t.updateSamplingMode(i)}if(t&&e.animations)for(let i=0;i<e.animations.length;i++){let r=e.animations[i],a=(0,n.GetClass)("BABYLON.Animation");a&&t.animations.push(a.Parse(r))}t&&t._texture&&(a&&!r&&t._texture._setUniqueId(e.internalTextureUniqueId),t._texture.label=e.internalTextureLabel)};return T.SerializationHelper.Parse(()=>{let a=!0;if(e.noMipmap&&(a=!1),e.mirrorPlane){let i=p._CreateMirror(e.name,e.renderTargetSize,t,a);return i._waitingRenderList=e.renderList,i.mirrorPlane=c.Plane.FromArray(e.mirrorPlane),s(i),i}if(e.isRenderTarget&&!e.base64String){let i=null;if(e.isCube){if(t.reflectionProbes)for(let i=0;i<t.reflectionProbes.length;i++){let r=t.reflectionProbes[i];if(r.name===e.name)return r.cubeTexture}}else(i=p._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,a,e._creationFlags??0))._waitingRenderList=e.renderList;return s(i),i}if(e.isVideo){let r=p._CreateVideoTexture(i+(e.url||e.name),i+(e.src||e.url),t,a,e.invertY,e.samplingMode,e.settings||{});return s(r),r}{let n;if("string"==typeof e.base64String&&e.base64String&&!r){let i={buffer:e.base64String,noMipmap:!a,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{s(n)}},r=e.base64String,o=r.startsWith("data:")?r.substring(5):r;(n=p.CreateFromBase64String("",o,t,i)).name=e.name}else{let o;o=e.name&&(e.name.indexOf("://")>0||e.name.startsWith("data:"))?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||p.UseSerializedUrlIfAny)&&(o=e.url),n=new p(o,t,{noMipmap:!a,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{s(n)},internalTexture:r})}return n}},e,t)}static CreateFromBase64String(e,t,i,r,a,s=p.TRILINEAR_SAMPLINGMODE,n=null,o=null,l=5,h,c){return new p("data:"+t,i,r,a,s,n,o,e,!1,l,void 0,void 0,h,c)}static LoadFromDataString(e,t,i,r=!1,a,s=!0,n=p.TRILINEAR_SAMPLINGMODE,o=null,l=null,h=5,c,d){return"data:"!==e.substring(0,5)&&(e="data:"+e),new p(e,i,a,s,n,o,l,t,r,h,void 0,void 0,c,d)}}p.SerializeBuffers=!0,p.ForceSerializeBuffers=!1,p.OnTextureLoadErrorObservable=new r.Observable,p._SerializeInternalTextureUniqueId=!1,p._CubeTextureParser=(e,t,i)=>{throw(0,o._WarnImport)("CubeTexture")},p._CreateMirror=(e,t,i,r)=>{throw(0,o._WarnImport)("MirrorTexture")},p._CreateRenderTargetTexture=(e,t,i,r,a)=>{throw(0,o._WarnImport)("RenderTargetTexture")},p.NEAREST_SAMPLINGMODE=1,p.NEAREST_NEAREST_MIPLINEAR=8,p.BILINEAR_SAMPLINGMODE=2,p.LINEAR_LINEAR_MIPNEAREST=11,p.TRILINEAR_SAMPLINGMODE=3,p.LINEAR_LINEAR_MIPLINEAR=3,p.NEAREST_NEAREST_MIPNEAREST=4,p.NEAREST_LINEAR_MIPNEAREST=5,p.NEAREST_LINEAR_MIPLINEAR=6,p.NEAREST_LINEAR=7,p.NEAREST_NEAREST=1,p.LINEAR_NEAREST_MIPNEAREST=9,p.LINEAR_NEAREST_MIPLINEAR=10,p.LINEAR_LINEAR=2,p.LINEAR_NEAREST=12,p.EXPLICIT_MODE=0,p.SPHERICAL_MODE=1,p.PLANAR_MODE=2,p.CUBIC_MODE=3,p.PROJECTION_MODE=4,p.SKYBOX_MODE=5,p.INVCUBIC_MODE=6,p.EQUIRECTANGULAR_MODE=7,p.FIXED_EQUIRECTANGULAR_MODE=8,p.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,p.CLAMP_ADDRESSMODE=0,p.WRAP_ADDRESSMODE=1,p.MIRROR_ADDRESSMODE=2,p.UseSerializedUrlIfAny=!1,(0,t.__decorate)([(0,i.serialize)()],p.prototype,"url",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"uOffset",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"vOffset",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"uScale",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"vScale",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"uAng",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"vAng",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"wAng",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"uRotationCenter",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"vRotationCenter",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"wRotationCenter",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"homogeneousRotationInUVTransform",void 0),(0,t.__decorate)([(0,i.serialize)()],p.prototype,"isBlocking",null);let g=!1;e.s(["RegisterTexture",0,function(){g||(g=!0,(0,n.RegisterClass)("BABYLON.Texture",p),T.SerializationHelper._TextureParser=p.Parse)},"Texture",0,p],67374)},13313,e=>{"use strict";var t,i,r=e.i(29711),a=e.i(83464),s=e.i(67374),n=e.i(58727);function o(){let e=null;onmessage=t=>{if("init"===t.data.action){if(t.data.url)try{importScripts(t.data.url)}catch(e){postMessage({action:"error",error:e})}e||(e=BASIS({wasmBinary:t.data.wasmBinary})),null!==e&&e.then(e=>{BASIS=e,e.initializeBasis(),postMessage({action:"init"})})}else if("transcode"===t.data.action){var i,r;let e,a=t.data.config,s=t.data.imageData,n=new BASIS.BasisFile(s),o=function(e){let t=e.getHasAlpha(),i=e.getNumImages(),r=[];for(let t=0;t<i;t++){let i={levels:[]},a=e.getNumLevels(t);for(let r=0;r<a;r++){let a={width:e.getImageWidth(t,r),height:e.getImageHeight(t,r)};i.levels.push(a)}r.push(i)}return{hasAlpha:t,images:r}}(n),l=t.data.ignoreSupportedFormats?null:(i=t.data.config,r=o,e=null,i.supportedCompressionFormats&&(e=i.supportedCompressionFormats.astc?10:i.supportedCompressionFormats.bc7?6:i.supportedCompressionFormats.s3tc?r.hasAlpha?3:2:i.supportedCompressionFormats.pvrtc?r.hasAlpha?9:8:i.supportedCompressionFormats.etc2?1:14*!i.supportedCompressionFormats.etc1),e),h=!1;null===l&&(h=!0,l=o.hasAlpha?3:2);let c=!0;n.startTranscoding()||(c=!1);let d=[];for(let e=0;e<o.images.length&&c;e++){let t=o.images[e];if(void 0===a.loadSingleImage||a.loadSingleImage===e){let i=t.levels.length;!1===a.loadMipmapLevels&&(i=1);for(let r=0;r<i;r++){let i=t.levels[r],a=function(e,t,i,r,a){let s=new Uint8Array(e.getImageTranscodedSizeInBytes(t,i,r));return e.transcodeImage(s,t,i,r,1,0)?(a&&(s=function(e,t,i){let r=new Uint16Array(4),a=new Uint16Array(t*i),s=t/4,n=i/4;for(let i=0;i<n;i++)for(let n=0;n<s;n++){let o=0+8*(i*s+n);r[0]=e[o]|e[o+1]<<8,r[1]=e[o+2]|e[o+3]<<8,r[2]=(2*(31&r[0])+ +(31&r[1]))/3|(2*(2016&r[0])+ +(2016&r[1]))/3&2016|(2*(63488&r[0])+ +(63488&r[1]))/3&63488,r[3]=(2*(31&r[1])+ +(31&r[0]))/3|(2*(2016&r[1])+ +(2016&r[0]))/3&2016|(2*(63488&r[1])+ +(63488&r[0]))/3&63488;for(let s=0;s<4;s++){let l=e[o+4+s],h=(4*i+s)*t+4*n;a[h++]=r[3&l],a[h++]=r[l>>2&3],a[h++]=r[l>>4&3],a[h]=r[l>>6&3]}}return a}(s,e.getImageWidth(t,i)+3&-4,e.getImageHeight(t,i)+3&-4)),s):null}(n,e,r,l,h);if(!a){c=!1;break}i.transcodedPixels=a,d.push(i.transcodedPixels.buffer)}}}n.close(),n.delete(),h&&(l=-1),c?postMessage({action:"transcode",success:c,id:t.data.id,fileInfo:o,format:l},d):postMessage({action:"transcode",success:c,id:t.data.id})}}}async function l(e,t,i){return await new Promise((a,s)=>{let n=t=>{"init"===t.data.action?(e.removeEventListener("message",n),a(e)):"error"===t.data.action&&s(t.data.error||"error initializing worker")};e.addEventListener("message",n),e.postMessage({action:"init",url:i?r.Tools.GetBabylonScriptURL(i):void 0,wasmBinary:t},[t])})}(t=i||(i={}))[t.cTFETC1=0]="cTFETC1",t[t.cTFETC2=1]="cTFETC2",t[t.cTFBC1=2]="cTFBC1",t[t.cTFBC3=3]="cTFBC3",t[t.cTFBC4=4]="cTFBC4",t[t.cTFBC5=5]="cTFBC5",t[t.cTFBC7=6]="cTFBC7",t[t.cTFPVRTC1_4_RGB=8]="cTFPVRTC1_4_RGB",t[t.cTFPVRTC1_4_RGBA=9]="cTFPVRTC1_4_RGBA",t[t.cTFASTC_4x4=10]="cTFASTC_4x4",t[t.cTFATC_RGB=11]="cTFATC_RGB",t[t.cTFATC_RGBA_INTERPOLATED_ALPHA=12]="cTFATC_RGBA_INTERPOLATED_ALPHA",t[t.cTFRGBA32=13]="cTFRGBA32",t[t.cTFRGB565=14]="cTFRGB565",t[t.cTFBGR565=15]="cTFBGR565",t[t.cTFRGBA4444=16]="cTFRGBA4444",t[t.cTFFXT1_RGB=17]="cTFFXT1_RGB",t[t.cTFPVRTC2_4_RGB=18]="cTFPVRTC2_4_RGB",t[t.cTFPVRTC2_4_RGBA=19]="cTFPVRTC2_4_RGBA",t[t.cTFETC2_EAC_R11=20]="cTFETC2_EAC_R11",t[t.cTFETC2_EAC_RG11=21]="cTFETC2_EAC_RG11";let h={JSModuleURL:`${r.Tools._DefaultCdnUrl}/basisTranscoder/1/basis_transcoder.js`,WasmModuleURL:`${r.Tools._DefaultCdnUrl}/basisTranscoder/1/basis_transcoder.wasm`},c=null,d=null,u=0,_=async()=>(c||(c=new Promise((e,t)=>{d?e(d):r.Tools.LoadFileAsync(r.Tools.GetBabylonScriptURL(h.WasmModuleURL)).then(i=>{if("function"!=typeof URL)return t("Basis transcoder requires an environment with a URL constructor");l(d=new Worker(URL.createObjectURL(new Blob([`(${o})()`],{type:"application/javascript"}))),i,h.JSModuleURL).then(e,t)}).catch(t)})),await c),f=async(e,t)=>{let i=e instanceof ArrayBuffer?new Uint8Array(e):e;return await new Promise((e,r)=>{_().then(()=>{let a=u++,s=t=>{"transcode"===t.data.action&&t.data.id===a&&(d.removeEventListener("message",s),t.data.success?e(t.data):r("Transcode is not supported on this device"))};d.addEventListener("message",s);let n=new Uint8Array(i.byteLength);n.set(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),d.postMessage({action:"transcode",id:a,imageData:n,config:t,ignoreSupportedFormats:!1},[n.buffer])},e=>{r(e)})})},m=(e,t)=>{let i=t._gl?.TEXTURE_2D;e.isCube&&(i=t._gl?.TEXTURE_CUBE_MAP),t._bindTextureDirectly(i,e,!0)},T=(e,t)=>{let r=e.getEngine();for(let o=0;o<t.fileInfo.images.length;o++){let l=t.fileInfo.images[o].levels[0];if(e._invertVScale=e.invertY,-1===t.format||t.format===i.cTFRGB565)if(e.type=10,e.format=4,r._features.basisNeedsPOT&&(Math.log2(l.width)%1!=0||Math.log2(l.height)%1!=0)){let t=new n.InternalTexture(r,2);e._invertVScale=e.invertY,t.type=10,t.format=4,t.width=l.width+3&-4,t.height=l.height+3&-4,m(t,r),r._uploadDataToTextureDirectly(t,new Uint16Array(l.transcodedPixels.buffer),o,0,4,!0),r._rescaleTexture(t,e,r.scenes[0],r._getInternalFormat(4),()=>{r._releaseTexture(t),m(e,r)})}else e._invertVScale=!e.invertY,e.width=l.width+3&-4,e.height=l.height+3&-4,e.samplingMode=2,m(e,r),r._uploadDataToTextureDirectly(e,new Uint16Array(l.transcodedPixels.buffer),o,0,4,!0);else{e.width=l.width,e.height=l.height,e.generateMipMaps=t.fileInfo.images[o].levels.length>1;let i=p.GetInternalFormatFromBasisFormat(t.format,r);e.format=i,m(e,r);let n=t.fileInfo.images[o].levels;for(let t=0;t<n.length;t++){let a=n[t];r._uploadCompressedDataToTextureDirectly(e,i,a.width,a.height,a.transcodedPixels,o,t)}r._features.basisNeedsPOT&&(Math.log2(e.width)%1!=0||Math.log2(e.height)%1!=0)&&(a.Logger.Warn("Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1."),e._cachedWrapU=s.Texture.CLAMP_ADDRESSMODE,e._cachedWrapV=s.Texture.CLAMP_ADDRESSMODE)}}},p={JSModuleURL:h.JSModuleURL,WasmModuleURL:h.WasmModuleURL,GetInternalFormatFromBasisFormat:(e,t)=>{let r;switch(e){case i.cTFETC1:r=36196;break;case i.cTFBC1:r=33776;break;case i.cTFBC4:r=33779;break;case i.cTFASTC_4x4:r=37808;break;case i.cTFETC2:r=37496;break;case i.cTFBC7:r=36492}if(void 0===r)throw"The chosen Basis transcoder format is not currently supported";return r},TranscodeAsync:f,LoadTextureFromTranscodeResult:T};e.s(["_BasisTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,t,i,a,s){if(Array.isArray(e))return;let n=t.getEngine().getCaps();f(e,{supportedCompressionFormats:{etc1:!!n.etc1,s3tc:!!n.s3tc,pvrtc:!!n.pvrtc,etc2:!!n.etc2,astc:!!n.astc,bc7:!!n.bptc}}).then(e=>{let i=e.fileInfo.images[0].levels.length>1&&t.generateMipMaps;T(t,e),t.getEngine()._setCubeMapTextureParams(t,i),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),a&&a()}).catch(e=>{r.Tools.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),t.isReady=!0,s&&s(e)})}loadData(e,t,i){let a=t.getEngine().getCaps();f(e,{supportedCompressionFormats:{etc1:!!a.etc1,s3tc:!!a.s3tc,pvrtc:!!a.pvrtc,etc2:!!a.etc2,astc:!!a.astc,bc7:!!a.bptc}}).then(e=>{let r=e.fileInfo.images[0].levels[0],a=e.fileInfo.images[0].levels.length>1&&t.generateMipMaps;i(r.width,r.height,a,-1!==e.format,()=>{T(t,e)})}).catch(e=>{r.Tools.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),r.Tools.Warn(`Failed to transcode Basis file: ${e}`),i(0,0,!1,!1,()=>{},!0)})}}],13313)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1733,e=>{"use strict";var t,s;(s=t||(t={})).Animation="Animation",s.AnimationGroup="AnimationGroup",s.Mesh="Mesh",s.Material="Material",s.Camera="Camera",s.Light="Light",e.s(["GetFlowGraphAssetWithType",0,function(e,t,s,i){switch(t){case"Animation":return i?e.animations.find(e=>e.uniqueId===s)??null:e.animations[s]??null;case"AnimationGroup":return i?e.animationGroups.find(e=>e.uniqueId===s)??null:e.animationGroups[s]??null;case"Mesh":return i?e.meshes.find(e=>e.uniqueId===s)??null:e.meshes[s]??null;case"Material":return i?e.materials.find(e=>e.uniqueId===s)??null:e.materials[s]??null;case"Camera":return i?e.cameras.find(e=>e.uniqueId===s)??null:e.cameras[s]??null;case"Light":return i?e.lights.find(e=>e.uniqueId===s)??null:e.lights[s]??null;default:return null}}])},21439,e=>{"use strict";var t,s,i,n,o,r,a=e.i(57554),l=e.i(16147),h=e.i(40220),c=e.i(53477),d=e.i(34032),u=e.i(1733),_=e.i(83464);(t=n||(n={})).ExecuteBlock="ExecuteBlock",t.ExecuteEvent="ExecuteEvent",t.TriggerConnection="TriggerConnection",t.ContextVariableSet="ContextVariableSet",t.GlobalVariableSet="GlobalVariableSet",t.GlobalVariableDelete="GlobalVariableDelete",t.GlobalVariableGet="GlobalVariableGet",t.AddConnection="AddConnection",t.GetConnectionValue="GetConnectionValue",t.SetConnectionValue="SetConnectionValue",t.ActivateSignal="ActivateSignal",t.ContextVariableGet="ContextVariableGet";class g{constructor(){this.logToConsole=!1,this.log=[]}addLogItem(e){if(e.time||(e.time=Date.now()),this.log.push(e),this.logToConsole){let t=e.payload?.value;"object"==typeof t&&t.getClassName?_.Logger.Log(`[FGLog] ${e.className}:${e.uniqueId.split("-")[0]} ${e.action} - ${JSON.stringify(t.getClassName())}: ${t.toString()}`):_.Logger.Log(`[FGLog] ${e.className}:${e.uniqueId.split("-")[0]} ${e.action} - ${JSON.stringify(e.payload)}`)}}getItemsOfType(e){return this.log.filter(t=>t.action===e)}}class p{get enableLogging(){return this._enableLogging}set enableLogging(e){this._enableLogging!==e&&(this._enableLogging=e,this._enableLogging?(this.logger=new g,this.logger.logToConsole=!0):this.logger=null)}constructor(e){this.uniqueId=(0,c.RandomGUID)(),this.name="",this._userVariables={},this._variableTypes={},this._executionVariables={},this._globalContextVariables={},this._connectionValues={},this._pendingBlocks=[],this._executionId=0,this.onNodeExecutedObservable=new a.Observable,this.onBreakpointHitObservable=new a.Observable,this.breakpointPredicate=null,this._pendingActivation=null,this._stepMode=!1,this._skipBreakpointForBlockId=null,this.treatDataAsRightHanded=!1,this._enableLogging=!1,this._configuration=e,this.assetsContext=e.assetsContext??e.scene}hasVariable(e){return e in this._userVariables}setVariable(e,t){this._userVariables[e]=t,this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"ContextVariableSet",payload:{name:e,value:t}})}getAsset(e,t){return(0,u.GetFlowGraphAssetWithType)(this.assetsContext,e,t)}getVariable(e){return this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"ContextVariableGet",payload:{name:e,value:this._userVariables[e]}}),this._userVariables[e]}get userVariables(){return this._userVariables}setVariableType(e,t){this._variableTypes[e]=t}getVariableType(e){return this._variableTypes[e]}get variableTypes(){return this._variableTypes}getScene(){return this._configuration.scene}_getUniqueIdPrefixedName(e,t){return`${e.uniqueId}_${t}`}_getGlobalContextVariable(e,t){return(this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GlobalVariableGet",payload:{name:e,defaultValue:t,possibleValue:this._globalContextVariables[e]}}),this._hasGlobalContextVariable(e))?this._globalContextVariables[e]:t}_setGlobalContextVariable(e,t){this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GlobalVariableSet",payload:{name:e,value:t}}),this._globalContextVariables[e]=t}_deleteGlobalContextVariable(e){this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GlobalVariableDelete",payload:{name:e}}),delete this._globalContextVariables[e]}_hasGlobalContextVariable(e){return e in this._globalContextVariables}_setExecutionVariable(e,t,s){this._executionVariables[this._getUniqueIdPrefixedName(e,t)]=s}_getExecutionVariable(e,t,s){return this._hasExecutionVariable(e,t)?this._executionVariables[this._getUniqueIdPrefixedName(e,t)]:s}_deleteExecutionVariable(e,t){delete this._executionVariables[this._getUniqueIdPrefixedName(e,t)]}_hasExecutionVariable(e,t){return this._getUniqueIdPrefixedName(e,t)in this._executionVariables}_hasConnectionValue(e){return e.uniqueId in this._connectionValues}_setConnectionValue(e,t){this._connectionValues[e.uniqueId]=t,this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"SetConnectionValue",payload:{connectionPointId:e.uniqueId,value:t}})}_setConnectionValueByKey(e,t){this._connectionValues[e]=t}_getConnectionValue(e){return this.logger?.addLogItem({time:Date.now(),className:this.getClassName(),uniqueId:this.uniqueId,action:"GetConnectionValue",payload:{connectionPointId:e.uniqueId,value:this._connectionValues[e.uniqueId]}}),this._connectionValues[e.uniqueId]}get configuration(){return this._configuration}get hasPendingBlocks(){return this._pendingBlocks.length>0}_addPendingBlock(e){this._pendingBlocks.includes(e)||(this._pendingBlocks.push(e),this._pendingBlocks.sort((e,t)=>e.priority-t.priority))}_removePendingBlock(e){let t=this._pendingBlocks.indexOf(e);-1!==t&&this._pendingBlocks.splice(t,1)}_clearPendingBlocks(){for(let e of this._pendingBlocks)e._cancelPendingTasks(this);this._pendingBlocks.length=0}_notifyExecuteNode(e){this.onNodeExecutedObservable.notifyObservers(e),this.logger?.addLogItem({time:Date.now(),className:e.getClassName(),uniqueId:e.uniqueId,action:"ExecuteBlock"})}_notifyOnTick(e){for(let t of(this._setGlobalContextVariable("timeSinceStart",e.timeSinceStart),this._setGlobalContextVariable("deltaTime",e.deltaTime),this._pendingBlocks))t._executeOnTick?.(this)}_increaseExecutionId(){this._executionId++}get executionId(){return this._executionId}_shouldBreak(e,t){return this._skipBreakpointForBlockId===e.uniqueId?(this._skipBreakpointForBlockId=null,!1):!!this._pendingActivation||(this._stepMode?(this._stepMode=!1,this._pendingActivation={block:e,context:this,signal:t},this.onBreakpointHitObservable.notifyObservers(this._pendingActivation),!0):!!(this.breakpointPredicate&&this.breakpointPredicate(e))&&(this._pendingActivation={block:e,context:this,signal:t},this.onBreakpointHitObservable.notifyObservers(this._pendingActivation),!0))}get pendingActivation(){return this._pendingActivation}continueExecution(){let e=this._pendingActivation;e&&(this._pendingActivation=null,this._skipBreakpointForBlockId=e.block.uniqueId,e.signal._activateSignal(this),this._skipBreakpointForBlockId=null)}stepExecution(){let e=this._pendingActivation;e&&(this._pendingActivation=null,this._stepMode=!0,this._skipBreakpointForBlockId=e.block.uniqueId,e.signal._activateSignal(this),this._stepMode=!1,this._skipBreakpointForBlockId=null)}_clearPendingActivation(){this._pendingActivation=null,this._stepMode=!1,this._skipBreakpointForBlockId=null}serialize(e={},t=d.defaultValueSerializationFunction){for(let s in e.uniqueId=this.uniqueId,e.name=this.name,e._userVariables={},this._userVariables)t(s,this._userVariables[s],e._userVariables);for(let s in Object.keys(this._variableTypes).length>0&&(e._variableTypes={...this._variableTypes}),e._connectionValues={},this._connectionValues)t(s,this._connectionValues[s],e._connectionValues);this.assetsContext!==this.getScene()&&(e._assetsContext={meshes:this.assetsContext.meshes.map(e=>e.id),materials:this.assetsContext.materials.map(e=>e.id),textures:this.assetsContext.textures.map(e=>e.name),animations:this.assetsContext.animations.map(e=>e.name),lights:this.assetsContext.lights.map(e=>e.id),cameras:this.assetsContext.cameras.map(e=>e.id),sounds:this.assetsContext.sounds?.map(e=>e.name),skeletons:this.assetsContext.skeletons.map(e=>e.id),particleSystems:this.assetsContext.particleSystems.map(e=>e.name),geometries:this.assetsContext.geometries.map(e=>e.id),multiMaterials:this.assetsContext.multiMaterials.map(e=>e.id),transformNodes:this.assetsContext.transformNodes.map(e=>e.id)})}getClassName(){return"FlowGraphContext"}}(0,l.__decorate)([(0,h.serialize)()],p.prototype,"uniqueId",void 0),(0,l.__decorate)([(0,h.serialize)()],p.prototype,"name",void 0);var v=e.i(82721),b=e.i(42561),f=e.i(11437),m=e.i(70463),y=e.i(87986);class x{constructor(e){this.onEventTriggeredObservable=new a.Observable,this.sceneReadyTriggered=!1,this._pointerUnderMeshState={},this._onBlurHandler=null,this.pressedKeys=new Set,this._startingTime=0,this._scene=e,this._initialize()}_initialize(){this._sceneReadyObserver=this._scene.onReadyObservable.addOnce(()=>{this.sceneReadyTriggered||(this.onEventTriggeredObservable.notifyObservers({type:"SceneReady"}),this.sceneReadyTriggered=!0)}),this._sceneDisposeObserver=this._scene.onDisposeObservable.add(()=>{this.onEventTriggeredObservable.notifyObservers({type:"SceneDispose"})}),this._sceneOnBeforeRenderObserver=this._scene.onBeforeRenderObservable.add(()=>{let e=this._scene.getEngine().getDeltaTime()/1e3;this.onEventTriggeredObservable.notifyObservers({type:"SceneBeforeRender",payload:{timeSinceStart:this._startingTime,deltaTime:e}}),this._startingTime+=e}),this._meshPickedObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"MeshPick",payload:e})},f.PointerEventTypes.POINTERPICK),this._pointerDownObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"PointerDown",payload:e})},f.PointerEventTypes.POINTERDOWN),this._pointerUpObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"PointerUp",payload:e})},f.PointerEventTypes.POINTERUP),this._pointerMoveObserver=this._scene.onPointerObservable.add(e=>{this.onEventTriggeredObservable.notifyObservers({type:"PointerMove",payload:e})},f.PointerEventTypes.POINTERMOVE),this._meshUnderPointerObserver=this._scene.onMeshUnderPointerUpdatedObservable.add(e=>{let t=e.pointerId,s=e.mesh,i=this._pointerUnderMeshState[t];!i&&s?this.onEventTriggeredObservable.notifyObservers({type:"PointerOver",payload:{pointerId:t,mesh:s}}):i&&!s?this.onEventTriggeredObservable.notifyObservers({type:"PointerOut",payload:{pointerId:t,mesh:i}}):i&&s&&i!==s&&(this.onEventTriggeredObservable.notifyObservers({type:"PointerOut",payload:{pointerId:t,mesh:i,over:s}}),this.onEventTriggeredObservable.notifyObservers({type:"PointerOver",payload:{pointerId:t,mesh:s,out:i}})),this._pointerUnderMeshState[t]=s},f.PointerEventTypes.POINTERMOVE),this._keyDownObserver=this._scene.onKeyboardObservable.add(e=>{let t=e.event.code;this.pressedKeys.add(t),x._COMMAND_OR_CTRL_CODES.has(t)&&this.pressedKeys.add("CommandOrControl"),this.onEventTriggeredObservable.notifyObservers({type:"KeyDown",payload:e})},m.KeyboardEventTypes.KEYDOWN),this._keyUpObserver=this._scene.onKeyboardObservable.add(e=>{let t=e.event.code;if(this.pressedKeys.delete(t),x._COMMAND_OR_CTRL_CODES.has(t)){let e=!1;for(let s of Array.from(x._COMMAND_OR_CTRL_CODES))if(s!==t&&this.pressedKeys.has(s)){e=!0;break}e||this.pressedKeys.delete("CommandOrControl")}this.onEventTriggeredObservable.notifyObservers({type:"KeyUp",payload:e})},m.KeyboardEventTypes.KEYUP);let e=this._scene.getEngine().getRenderingCanvas();e&&(this._onBlurHandler=()=>this.pressedKeys.clear(),e.addEventListener("blur",this._onBlurHandler))}dispose(){if(this._sceneDisposeObserver?.remove(),this._sceneReadyObserver?.remove(),this._sceneOnBeforeRenderObserver?.remove(),this._meshPickedObserver?.remove(),this._meshUnderPointerObserver?.remove(),this._pointerDownObserver?.remove(),this._pointerUpObserver?.remove(),this._pointerMoveObserver?.remove(),this._keyDownObserver?.remove(),this._keyUpObserver?.remove(),this._onBlurHandler){let e=this._scene.getEngine().getRenderingCanvas();e?.removeEventListener("blur",this._onBlurHandler),this._onBlurHandler=null}this.pressedKeys.clear(),this.onEventTriggeredObservable.clear()}}x._COMMAND_OR_CTRL_CODES=new Set(y._IsMacPlatform?["MetaLeft","MetaRight"]:["ControlLeft","ControlRight"]);var C=e.i(92719);(s=o||(o={}))[s.Error=0]="Error",s[s.Warning=1]="Warning";let O=new Set(["number","FlowGraphInteger","boolean"]),k=new Set(["Vector4","Quaternion"]),E=new Set(["Color3","Color4"]);function I(e){return e instanceof C.FlowGraphEventBlock}(i=r||(r={}))[i.Stopped=0]="Stopped",i[i.Started=1]="Started",i[i.Paused=2]="Paused";class B{get scene(){return this._scene}get coordinator(){return this._coordinator}get sceneEventCoordinator(){return this._sceneEventCoordinator}get state(){return this._state}set state(e){this._state=e,this.onStateChangedObservable.notifyObservers(e)}constructor(e){this.onStateChangedObservable=new a.Observable,this._eventBlocks={SceneReady:[],SceneDispose:[],SceneBeforeRender:[],MeshPick:[],PointerDown:[],PointerUp:[],PointerMove:[],PointerOver:[],PointerOut:[],KeyDown:[],KeyUp:[],SceneAfterRender:[],NoTrigger:[]},this._allBlocks=[],this._executionContexts=[],this._state=0,this._scene=e.scene,this._sceneEventCoordinator=new x(this._scene),this._coordinator=e.coordinator,this.name=e.name??"Graph",this.uniqueId=e.uniqueId??(0,c.RandomGUID)()}_attachEventObserver(){this._eventObserver||(this._eventObserver=this._sceneEventCoordinator.onEventTriggeredObservable.add(e=>{if("SceneDispose"===e.type)return void this.dispose();if(1===this.state){for(let t of this._executionContexts)for(let s of this._getContextualOrder(e.type,t))if(!s._executeEvent(t,e.payload))break;switch(e.type){case"SceneReady":this._sceneEventCoordinator.sceneReadyTriggered=!0;break;case"SceneBeforeRender":for(let t of this._executionContexts)t._notifyOnTick(e.payload)}}}))}_detachEventObserver(){this._eventObserver?.remove(),this._eventObserver=null}setScene(e){if(e!==this._scene){for(let t of(1===this.state&&this.stop(),this._detachEventObserver(),this._sceneEventCoordinator.dispose(),this._executionContexts.length=0,this._scene=e,this._scene.constantlyUpdateMeshUnderPointer=!0,this._allBlocks))for(let s of t.dataInputs)s._reresolveDefaultValueForScene(e);this._sceneEventCoordinator=new x(this._scene),this._attachEventObserver()}}createContext(){let e=new p({scene:this._scene,coordinator:this._coordinator,sceneEventCoordinator:this._sceneEventCoordinator});return this._executionContexts.push(e),e}getContext(e){return this._executionContexts[e]}get contextCount(){return this._executionContexts.length}removeContext(e){if(e<0||e>=this._executionContexts.length)return;let[t]=this._executionContexts.splice(e,1);return t._clearPendingBlocks(),t}getAllBlocks(){return this._allBlocks}addBlock(e){-1===this._allBlocks.indexOf(e)&&this._allBlocks.push(e)}removeBlock(e){let t=this._allBlocks.indexOf(e);if(-1!==t&&this._allBlocks.splice(t,1),e instanceof v.FlowGraphExecutionBlock&&"type"in e){let t=this._eventBlocks[e.type];if(t){let s=t.indexOf(e);-1!==s&&t.splice(s,1)}}if(e instanceof b.FlowGraphAsyncExecutionBlock)for(let t of this._executionContexts)e._cancelPendingTasks(t),e._resetAfterCanceled(t);for(let t of e.dataInputs)t.disconnectFromAll();for(let t of e.dataOutputs)t.disconnectFromAll();if(e instanceof v.FlowGraphExecutionBlock){for(let t of e.signalInputs)t.disconnectFromAll();for(let t of e.signalOutputs)t.disconnectFromAll()}}addEventBlock(e){if(this.addBlock(e),("PointerOver"===e.type||"PointerOut"===e.type)&&(this._scene.constantlyUpdateMeshUnderPointer=!0),this._eventBlocks[e.type].push(e),1===this.state)for(let t of this._executionContexts)e._startPendingTasks(t);else this.onStateChangedObservable.addOnce(t=>{if(1===t)for(let t of this._executionContexts)e._startPendingTasks(t)})}stop(){if(0!==this.state){for(let e of(this._detachEventObserver(),this.state=0,this._executionContexts))e._clearPendingBlocks(),e._clearPendingActivation();this._executionContexts.length=0}}pause(){if(1===this.state)for(let e of(this._detachEventObserver(),this.state=2,this._executionContexts))e._clearPendingBlocks()}start(){if(1===this.state)return;let e=2===this.state;0===this._executionContexts.length&&this.createContext(),this._attachEventObserver(),this.state=1,this._startPendingEvents(),e||(this._sceneEventCoordinator.sceneReadyTriggered=!1,this._scene.isReady(!0)?(this._sceneEventCoordinator.sceneReadyTriggered=!0,this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({type:"SceneReady"})):this._scene.executeWhenReady(()=>{1!==this.state||this._sceneEventCoordinator.sceneReadyTriggered||(this._sceneEventCoordinator.sceneReadyTriggered=!0,this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({type:"SceneReady"}))},!0))}_startPendingEvents(){for(let e of this._executionContexts)for(let t in this._eventBlocks)for(let s of this._getContextualOrder(t,e))s._startPendingTasks(e)}_getContextualOrder(e,t){let s=this._eventBlocks[e].sort((e,t)=>t.initPriority-e.initPriority);if("MeshPick"===e){let e=[];for(let i of s){let n=i.asset.getValue(t),o=0;for(;o<s.length;o++){let e=s[o].asset.getValue(t);if(n&&e&&(0,y._IsDescendantOf)(n,e))break}e.splice(o,0,i)}return e}return s}dispose(){if(0!==this.state){for(let e of(this.state=0,this._executionContexts))e._clearPendingBlocks(),e._clearPendingActivation();for(let e in this._executionContexts.length=0,this._eventBlocks)this._eventBlocks[e].length=0;this._allBlocks.length=0,this._detachEventObserver(),this._sceneEventCoordinator.dispose()}}visitAllBlocks(e){let t=[],s=new Set;for(let e in this._eventBlocks)for(let i of this._eventBlocks[e])t.push(i),s.add(i.uniqueId);for(;t.length>0;){let i=t.pop();for(let n of(e(i),i.dataInputs))for(let e of n._connectedPoint)s.has(e._ownerBlock.uniqueId)||(t.push(e._ownerBlock),s.add(e._ownerBlock.uniqueId));if(i instanceof v.FlowGraphExecutionBlock)for(let e of i.signalOutputs)for(let i of e._connectedPoint)s.has(i._ownerBlock.uniqueId)||(t.push(i._ownerBlock),s.add(i._ownerBlock.uniqueId))}}validate(){return function(e,t){let s=function(e){let t=[],s=new Map,i=e=>{if(t.push(e),e.block){let t=s.get(e.block.uniqueId);t||(t=[],s.set(e.block.uniqueId,t)),t.push(e)}},n=[];for(let t of(e.visitAllBlocks(e=>{n.push(e)}),0===function(e){let t=[];for(let s in e._eventBlocks)for(let i of e._eventBlocks[s])t.push(i);return t}(e).length&&i({severity:0,message:"Graph has no event blocks — nothing will trigger execution."}),n))for(let e of t.dataInputs)e.optional||e.isDisabled||e.isConnected()||i({severity:1,message:`"${e.name}" is not connected and will use its default value.`,block:t,connectionName:e.name});for(let e of n)if(e instanceof v.FlowGraphExecutionBlock){if(I(e))continue;let t=e.signalInputs.find(e=>"in"===e.name);t&&!t.isConnected()&&i({severity:0,message:"Execution block has no incoming signal — it will never execute.",block:e,connectionName:"in"})}for(let e of n)for(let t of e.dataInputs){if(!t.isConnected())continue;let s=t._connectedPoint[0],n=s.richType?.typeName,o=t.richType?.typeName;if(n&&o&&!(n===o||"any"===n||"any"===o||O.has(n)&&O.has(o)||k.has(n)&&k.has(o)||E.has(n)&&E.has(o))){if(void 0!==s.richType.typeTransformer||void 0!==t.richType.typeTransformer)continue;i({severity:1,message:`Type mismatch: "${s._ownerBlock.name}.${s.name}" (${n}) → "${e.name}.${t.name}" (${o}).`,block:e,connectionName:t.name})}}let o=new Set;return e.visitAllBlocks(e=>{o.add(e.uniqueId)}),function(e,t){let s=new Map;for(let t of e)s.set(t.uniqueId,0);let i=new Map;for(let t of e)i.set(t.uniqueId,t);let n=new Set;for(let i of e)0===s.get(i.uniqueId)&&function e(i){for(let o of(s.set(i.uniqueId,1),i.dataInputs))if(o.isConnected())for(let r of o._connectedPoint){let o=r._ownerBlock;if(o instanceof v.FlowGraphExecutionBlock)continue;let a=s.get(o.uniqueId);if(1===a)return n.has(i.uniqueId)||(n.add(i.uniqueId),t({severity:0,message:"Data dependency cycle detected — getValue() will recurse infinitely.",block:i})),n.has(o.uniqueId)||(n.add(o.uniqueId),t({severity:0,message:"Data dependency cycle detected — getValue() will recurse infinitely.",block:o})),!0;0===a&&e(o)}return s.set(i.uniqueId,2),!1}(i)}(n,i),t.sort((e,t)=>e.severity-t.severity),{isValid:t.every(e=>0!==e.severity),issues:t,errorCount:t.filter(e=>0===e.severity).length,warningCount:t.filter(e=>1===e.severity).length,issuesByBlock:s}}(e),i=new Set;for(let n of(e.visitAllBlocks(e=>{i.add(e.uniqueId)}),t))if(!i.has(n.uniqueId)){let e={severity:1,message:"Block is unreachable from any event block.",block:n};s.issues.push(e),s.warningCount++;let t=s.issuesByBlock.get(n.uniqueId);for(let i of(t||(t=[],s.issuesByBlock.set(n.uniqueId,t)),t.push(e),n.dataInputs))if(!i.optional&&!i.isDisabled&&!i.isConnected()){let e={severity:1,message:`"${i.name}" is not connected and will use its default value.`,block:n,connectionName:i.name};s.issues.push(e),s.warningCount++,t.push(e)}if(n instanceof v.FlowGraphExecutionBlock&&!I(n)){let e=n.signalInputs.find(e=>"in"===e.name);if(e&&!e.isConnected()){let e={severity:0,message:"Execution block has no incoming signal — it will never execute.",block:n,connectionName:"in"};s.issues.push(e),s.errorCount++,t.push(e)}}}return s.isValid=s.issues.every(e=>0!==e.severity),s.issues.sort((e,t)=>e.severity-t.severity),s}(this,this._allBlocks)}serialize(e={},t){e.name=this.name,e.uniqueId=this.uniqueId,e.allBlocks=[];let s=new Set,i=t=>{if(s.has(t.uniqueId))return;s.add(t.uniqueId);let i={};t.serialize(i),e.allBlocks.push(i)};for(let e of(this.visitAllBlocks(i),this._allBlocks))i(e);for(let s of(e.executionContexts=[],this._executionContexts)){let i={};s.serialize(i,t),e.executionContexts.push(i)}}}class T{constructor(e){this.config=e,this.dispatchEventsSynchronously=!0,this._flowGraphs=[],this._customEventsMap=new Map,this._eventExecutionCounter=new Map,this._executeOnNextFrame=[],this._eventUniqueId=0,this._disposeObserver=this.config.scene.onDisposeObservable.add(()=>{this.dispose()}),this._onBeforeRenderObserver=this.config.scene.onBeforeRenderObservable.add(()=>{this._eventExecutionCounter.clear();let e=this._executeOnNextFrame.slice(0);if(e.length)for(let t of e){this.notifyCustomEvent(t.id,t.data,!1);let e=this._executeOnNextFrame.findIndex(e=>e.uniqueId===t.uniqueId);-1!==e&&this._executeOnNextFrame.splice(e,1)}});let t=T.SceneCoordinators.get(this.config.scene);t||(t=[],T.SceneCoordinators.set(this.config.scene,t)),t.push(this)}createGraph(e){let t=e??`Graph ${this._flowGraphs.length+1}`,s=new B({scene:this.config.scene,coordinator:this,name:t});return this._flowGraphs.push(s),s}removeGraph(e){let t=this._flowGraphs.indexOf(e);-1!==t&&(e.dispose(),this._flowGraphs.splice(t,1))}start(){for(let e of this._flowGraphs)e.start()}dispose(){for(let e of this._flowGraphs)e.dispose();this._flowGraphs.length=0,this._disposeObserver?.remove(),this._onBeforeRenderObserver?.remove();let e=T.SceneCoordinators.get(this.config.scene)??[],t=e.indexOf(this);-1!==t&&e.splice(t,1)}serialize(e,t){for(let s of(e._flowGraphs=[],this._flowGraphs)){let i={};s.serialize(i,t),e._flowGraphs.push(i)}e.dispatchEventsSynchronously=this.dispatchEventsSynchronously}get flowGraphs(){return this._flowGraphs}getCustomEventObservable(e){let t=this._customEventsMap.get(e);return t||(t=new a.Observable,this._customEventsMap.set(e,t)),t}notifyCustomEvent(e,t,s=!this.dispatchEventsSynchronously){if(s)return void this._executeOnNextFrame.push({id:e,data:t,uniqueId:this._eventUniqueId++});if(this._eventExecutionCounter.has(e)){let t=this._eventExecutionCounter.get(e);if(this._eventExecutionCounter.set(e,t+1),t>=T.MaxEventTypeExecutionPerFrame){t===T.MaxEventTypeExecutionPerFrame&&_.Logger.Warn(`FlowGraphCoordinator: Too many executions of event "${e}".`);return}}else this._eventExecutionCounter.set(e,1);let i=this._customEventsMap.get(e);i&&i.notifyObservers(t)}}T.MaxEventsPerType=30,T.MaxEventTypeExecutionPerFrame=30,T.SceneCoordinators=new Map,e.s(["FlowGraphCoordinator",0,T],21439)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69030,t=>{"use strict";var e=t.i(82531),i=t.i(82350),n=t.i(48477);class o extends e.FlowGraphBlock{constructor(t){super(t),this.functionName=this.registerDataInput("functionName",i.RichTypeString),this.object=this.registerDataInput("object",i.RichTypeAny),this.context=this.registerDataInput("context",i.RichTypeAny,null),this.output=this.registerDataOutput("output",i.RichTypeAny)}_updateOutputs(t){let e=this.functionName.getValue(t),i=this.object.getValue(t),n=this.context.getValue(t);if(i&&e){let o=i[e];o&&"function"==typeof o&&this.output.setValue(o.bind(n),t)}}getClassName(){return"FlowGraphFunctionReference"}}let c=!1;function s(){c||(c=!0,(0,n.RegisterClass)("FlowGraphFunctionReference",o))}t.s(["FlowGraphFunctionReferenceBlock",0,o,"RegisterFlowGraphFunctionReferenceBlock",0,s],73785),s(),t.s([],99467),t.i(99467),t.i(73785),t.s(["FlowGraphFunctionReferenceBlock",0,o],69030)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21143,e=>{"use strict";class t{constructor(e){this._pendingActions=[],this._workerInfos=e.map(e=>({workerPromise:Promise.resolve(e),idle:!0}))}dispose(){for(let e of this._workerInfos)e.workerPromise.then(e=>{e.terminate()});this._workerInfos.length=0,this._pendingActions.length=0}push(e){this._executeOnIdleWorker(e)||this._pendingActions.push(e)}_executeOnIdleWorker(e){for(let t of this._workerInfos)if(t.idle)return this._execute(t,e),!0;return!1}_execute(e,t){e.idle=!1,e.workerPromise.then(r=>{t(r,()=>{let t=this._pendingActions.shift();t?this._execute(e,t):e.idle=!0})})}}class r extends t{constructor(e,t,s=r.DefaultOptions){super([]),this._maxWorkers=e,this._createWorkerAsync=t,this._options=s}push(e){if(!this._executeOnIdleWorker(e))if(this._workerInfos.length<this._maxWorkers){let t={workerPromise:this._createWorkerAsync(),idle:!1};this._workerInfos.push(t),this._execute(t,e)}else this._pendingActions.push(e)}_execute(e,t){e.timeoutId&&(clearTimeout(e.timeoutId),delete e.timeoutId),super._execute(e,(r,s)=>{t(r,()=>{s(),e.idle&&(e.timeoutId=setTimeout(()=>{e.workerPromise.then(e=>{e.terminate()});let t=this._workerInfos.indexOf(e);-1!==t&&this._workerInfos.splice(t,1)},this._options.idleTimeElapsedBeforeRelease))})})}}r.DefaultOptions={idleTimeElapsedBeforeRelease:1e3},e.s(["AutoReleaseWorkerPool",0,r])},58046,e=>{"use strict";var t,r,s,o,a,i,n=e.i(13379);class c{constructor(e,t){if(this.data=e,this.isInvalid=!1,!c.IsValid(e)){this.isInvalid=!0,n.Logger.Error("texture missing KTX identifier");return}const r=Uint32Array.BYTES_PER_ELEMENT,s=new DataView(this.data.buffer,this.data.byteOffset+12,13*r),o=0x4030201===s.getUint32(0,!0);if(this.glType=s.getUint32(+r,o),this.glTypeSize=s.getUint32(2*r,o),this.glFormat=s.getUint32(3*r,o),this.glInternalFormat=s.getUint32(4*r,o),this.glBaseInternalFormat=s.getUint32(5*r,o),this.pixelWidth=s.getUint32(6*r,o),this.pixelHeight=s.getUint32(7*r,o),this.pixelDepth=s.getUint32(8*r,o),this.numberOfArrayElements=s.getUint32(9*r,o),this.numberOfFaces=s.getUint32(10*r,o),this.numberOfMipmapLevels=s.getUint32(11*r,o),this.bytesOfKeyValueData=s.getUint32(12*r,o),0!==this.glType){n.Logger.Error("only compressed formats currently supported"),this.isInvalid=!0;return}if(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0===this.pixelHeight||0!==this.pixelDepth){n.Logger.Error("only 2D textures currently supported"),this.isInvalid=!0;return}if(0!==this.numberOfArrayElements){n.Logger.Error("texture arrays not currently supported"),this.isInvalid=!0;return}if(this.numberOfFaces!==t){n.Logger.Error("number of faces expected"+t+", but found "+this.numberOfFaces),this.isInvalid=!0;return}this.loadType=c.COMPRESSED_2D}uploadLevels(e,t){switch(this.loadType){case c.COMPRESSED_2D:this._upload2DCompressedLevels(e,t);case c.TEX_2D:case c.COMPRESSED_3D:case c.TEX_3D:}}_upload2DCompressedLevels(e,t){let r=c.HEADER_LEN+this.bytesOfKeyValueData,s=this.pixelWidth,o=this.pixelHeight,a=t?this.numberOfMipmapLevels:1;for(let t=0;t<a;t++){let a=new Int32Array(this.data.buffer,this.data.byteOffset+r,1)[0];r+=4;for(let i=0;i<this.numberOfFaces;i++){let n=new Uint8Array(this.data.buffer,this.data.byteOffset+r,a);e.getEngine()._uploadCompressedDataToTextureDirectly(e,e.format,s,o,n,i,t),r+=a,r+=3-(a+3)%4}s=Math.max(1,.5*s),o=Math.max(1,.5*o)}}static IsValid(e){if(e.byteLength>=12){let t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&49===t[5]&&49===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1}}c.HEADER_LEN=64,c.COMPRESSED_2D=0,c.COMPRESSED_3D=1,c.TEX_2D=2,c.TEX_3D=3;var l=e.i(21143),d=e.i(65740);function T(e,t){let r=t?.jsDecoderModule||KTX2DECODER;e&&(e.wasmBaseUrl&&(r.Transcoder.WasmBaseUrl=e.wasmBaseUrl),e.wasmUASTCToASTC&&(r.LiteTranscoder_UASTC_ASTC.WasmModuleURL=e.wasmUASTCToASTC),e.wasmUASTCToBC7&&(r.LiteTranscoder_UASTC_BC7.WasmModuleURL=e.wasmUASTCToBC7),e.wasmUASTCToRGBA_UNORM&&(r.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL=e.wasmUASTCToRGBA_UNORM),e.wasmUASTCToRGBA_SRGB&&(r.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL=e.wasmUASTCToRGBA_SRGB),e.wasmUASTCToR8_UNORM&&(r.LiteTranscoder_UASTC_R8_UNORM.WasmModuleURL=e.wasmUASTCToR8_UNORM),e.wasmUASTCToRG8_UNORM&&(r.LiteTranscoder_UASTC_RG8_UNORM.WasmModuleURL=e.wasmUASTCToRG8_UNORM),e.jsMSCTranscoder&&(r.MSCTranscoder.JSModuleURL=e.jsMSCTranscoder),e.wasmMSCTranscoder&&(r.MSCTranscoder.WasmModuleURL=e.wasmMSCTranscoder),e.wasmZSTDDecoder&&(r.ZSTDDecoder.WasmModuleURL=e.wasmZSTDDecoder)),t&&(t.wasmUASTCToASTC&&(r.LiteTranscoder_UASTC_ASTC.WasmBinary=t.wasmUASTCToASTC),t.wasmUASTCToBC7&&(r.LiteTranscoder_UASTC_BC7.WasmBinary=t.wasmUASTCToBC7),t.wasmUASTCToRGBA_UNORM&&(r.LiteTranscoder_UASTC_RGBA_UNORM.WasmBinary=t.wasmUASTCToRGBA_UNORM),t.wasmUASTCToRGBA_SRGB&&(r.LiteTranscoder_UASTC_RGBA_SRGB.WasmBinary=t.wasmUASTCToRGBA_SRGB),t.wasmUASTCToR8_UNORM&&(r.LiteTranscoder_UASTC_R8_UNORM.WasmBinary=t.wasmUASTCToR8_UNORM),t.wasmUASTCToRG8_UNORM&&(r.LiteTranscoder_UASTC_RG8_UNORM.WasmBinary=t.wasmUASTCToRG8_UNORM),t.jsMSCTranscoder&&(r.MSCTranscoder.JSModule=t.jsMSCTranscoder),t.wasmMSCTranscoder&&(r.MSCTranscoder.WasmBinary=t.wasmMSCTranscoder),t.wasmZSTDDecoder&&(r.ZSTDDecoder.WasmBinary=t.wasmZSTDDecoder))}function _(e){let t;void 0===e&&"u">typeof KTX2DECODER&&(e=KTX2DECODER),onmessage=r=>{if(r.data)switch(r.data.action){case"init":{let s=r.data.urls;s&&(s.jsDecoderModule&&void 0===e&&(importScripts(s.jsDecoderModule),e=KTX2DECODER),T(s)),r.data.wasmBinaries&&T(void 0,{...r.data.wasmBinaries,jsDecoderModule:e}),t=new e.KTX2Decoder,postMessage({action:"init"});break}case"setDefaultDecoderOptions":e.KTX2Decoder.DefaultDecoderOptions=r.data.options;break;case"decode":t.decode(r.data.data,r.data.caps,r.data.options).then(e=>{let t=[];for(let r=0;r<e.mipmaps.length;++r){let s=e.mipmaps[r];s&&s.data&&t.push(s.data.buffer)}postMessage({action:"decoded",success:!0,decodedData:e},t)}).catch(e=>{postMessage({action:"decoded",success:!1,msg:e})})}}}async function u(e,t,r){return await new Promise((s,o)=>{let a=t=>{e.removeEventListener("error",a),e.removeEventListener("message",i),o(t)},i=t=>{"init"===t.data.action&&(e.removeEventListener("error",a),e.removeEventListener("message",i),s(e))};e.addEventListener("error",a),e.addEventListener("message",i),e.postMessage({action:"init",urls:r,wasmBinaries:t})})}(t=o||(o={}))[t.ETC1S=0]="ETC1S",t[t.UASTC4x4=1]="UASTC4x4",(r=a||(a={}))[r.ASTC_4X4_RGBA=0]="ASTC_4X4_RGBA",r[r.ASTC_4x4_RGBA=0]="ASTC_4x4_RGBA",r[r.BC7_RGBA=1]="BC7_RGBA",r[r.BC3_RGBA=2]="BC3_RGBA",r[r.BC1_RGB=3]="BC1_RGB",r[r.PVRTC1_4_RGBA=4]="PVRTC1_4_RGBA",r[r.PVRTC1_4_RGB=5]="PVRTC1_4_RGB",r[r.ETC2_RGBA=6]="ETC2_RGBA",r[r.ETC1_RGB=7]="ETC1_RGB",r[r.RGBA32=8]="RGBA32",r[r.R8=9]="R8",r[r.RG8=10]="RG8",(s=i||(i={}))[s.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",s[s.COMPRESSED_RGBA_ASTC_4X4_KHR=37808]="COMPRESSED_RGBA_ASTC_4X4_KHR",s[s.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",s[s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",s[s.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",s[s.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",s[s.RGBA8Format=32856]="RGBA8Format",s[s.R8Format=33321]="R8Format",s[s.RG8Format=33323]="RG8Format";class R{static GetDefaultNumWorkers(){return"object"==typeof navigator&&navigator.hardwareConcurrency?Math.min(Math.floor(.5*navigator.hardwareConcurrency),4):1}static _Initialize(e){if(R._WorkerPoolPromise||R._DecoderModulePromise)return;let t={wasmBaseUrl:d.Tools.ScriptBaseUrl,jsDecoderModule:d.Tools.GetBabylonScriptURL(this.URLConfig.jsDecoderModule,!0),wasmUASTCToASTC:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToASTC,!0),wasmUASTCToBC7:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToBC7,!0),wasmUASTCToRGBA_UNORM:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_UNORM,!0),wasmUASTCToRGBA_SRGB:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_SRGB,!0),wasmUASTCToR8_UNORM:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToR8_UNORM,!0),wasmUASTCToRG8_UNORM:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRG8_UNORM,!0),jsMSCTranscoder:d.Tools.GetBabylonScriptURL(this.URLConfig.jsMSCTranscoder,!0),wasmMSCTranscoder:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmMSCTranscoder,!0),wasmZSTDDecoder:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmZSTDDecoder,!0)};e&&"function"==typeof Worker&&"u">typeof URL?R._WorkerPoolPromise=new Promise(r=>{let s=`${T}(${_})()`,o=URL.createObjectURL(new Blob([s],{type:"application/javascript"}));r(new l.AutoReleaseWorkerPool(e,async()=>await u(new Worker(o),void 0,t)))}):void 0===R._KTX2DecoderModule?R._DecoderModulePromise=d.Tools.LoadBabylonScriptAsync(t.jsDecoderModule).then(()=>(R._KTX2DecoderModule=KTX2DECODER,R._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,R._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,T(t,R._KTX2DecoderModule),new R._KTX2DecoderModule.KTX2Decoder)):(R._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,R._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,R._DecoderModulePromise=Promise.resolve(new R._KTX2DecoderModule.KTX2Decoder))}constructor(e,t=R.DefaultNumWorkers){this._engine=e;const r="object"==typeof t&&t.workerPool||R.WorkerPool;if(r)R._WorkerPoolPromise=Promise.resolve(r);else{"object"==typeof t?R._KTX2DecoderModule=t?.binariesAndModulesContainer?.jsDecoderModule:"u">typeof KTX2DECODER&&(R._KTX2DecoderModule=KTX2DECODER);const e="number"==typeof t?t:t.numWorkers??R.DefaultNumWorkers;R._Initialize(e)}}async _uploadAsync(e,t,r){let s=this._engine.getCaps(),o={astc:!!s.astc,bptc:!!s.bptc,s3tc:!!s.s3tc,pvrtc:!!s.pvrtc,etc2:!!s.etc2,etc1:!!s.etc1};if(R._WorkerPoolPromise){let s=await R._WorkerPoolPromise;return await new Promise((a,i)=>{s.push((s,n)=>{let c=e=>{s.removeEventListener("error",c),s.removeEventListener("message",l),i(e),n()},l=e=>{if("decoded"===e.data.action){if(s.removeEventListener("error",c),s.removeEventListener("message",l),e.data.success)try{this._createTexture(e.data.decodedData,t,r),a()}catch(e){i({message:e})}else i({message:e.data.msg});n()}};s.addEventListener("error",c),s.addEventListener("message",l),s.postMessage({action:"setDefaultDecoderOptions",options:R.DefaultDecoderOptions._getKTX2DecoderOptions()});let d=new Uint8Array(e.byteLength);d.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),s.postMessage({action:"decode",data:d,caps:o,options:r},[d.buffer])})})}if(R._DecoderModulePromise){let r=await R._DecoderModulePromise;return R.DefaultDecoderOptions.isDirty&&(R._KTX2DecoderModule.KTX2Decoder.DefaultDecoderOptions=R.DefaultDecoderOptions._getKTX2DecoderOptions()),await new Promise((o,a)=>{r.decode(e,s).then(e=>{this._createTexture(e,t),o()}).catch(e=>{a({message:e})})})}throw Error("KTX2 decoder module is not available")}_createTexture(e,t,r){this._engine._bindTextureDirectly(3553,t),r&&(r.transcodedFormat=e.transcodedFormat,r.isInGammaSpace=e.isInGammaSpace,r.hasAlpha=e.hasAlpha,r.transcoderName=e.transcoderName);let s=!0;switch(e.transcodedFormat){case 32856:t.type=0,t.format=5;break;case 33321:t.type=0,t.format=6;break;case 33323:t.type=0,t.format=7;break;default:t.format=e.transcodedFormat,s=!1}if(t._gammaSpace=e.isInGammaSpace,t.generateMipMaps=e.mipmaps.length>1,t.width=e.mipmaps[0].width,t.height=e.mipmaps[0].height,e.errors)throw Error("KTX2 container - could not transcode the data. "+e.errors);for(let r=0;r<e.mipmaps.length;++r){let o=e.mipmaps[r];if(!o||!o.data)throw Error("KTX2 container - could not transcode one of the image");s?(t.width=o.width,t.height=o.height,this._engine._uploadDataToTextureDirectly(t,o.data,0,r,void 0,!0)):this._engine._uploadCompressedDataToTextureDirectly(t,e.transcodedFormat,o.width,o.height,o.data,0,r)}t._extension=".ktx2",t.isReady=!0,this._engine._bindTextureDirectly(3553,null)}static IsValid(e){if(e.byteLength>=12){let t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&50===t[5]&&48===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1}}function m(e){switch(e){case 35916:return 33776;case 35918:return 33778;case 35919:return 33779;case 37493:return 37492;case 37497:return 37496;case 37495:return 37494;case 37840:return 37808;case 37841:return 37809;case 37842:return 37810;case 37843:return 37811;case 37844:return 37812;case 37845:return 37813;case 37846:return 37814;case 37847:return 37815;case 37848:return 37816;case 37849:return 37817;case 37850:return 37818;case 37851:return 37819;case 37852:return 37820;case 37853:return 37821;case 36493:return 36492}return null}R.URLConfig={jsDecoderModule:"https://cdn.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,wasmUASTCToR8_UNORM:null,wasmUASTCToRG8_UNORM:null,jsMSCTranscoder:null,wasmMSCTranscoder:null,wasmZSTDDecoder:null},R.DefaultNumWorkers=R.GetDefaultNumWorkers(),R.DefaultDecoderOptions=new class{constructor(){this._isDirty=!0,this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=!0,this._ktx2DecoderOptions={}}get isDirty(){return this._isDirty}get useRGBAIfASTCBC7NotAvailableWhenUASTC(){return this._useRGBAIfASTCBC7NotAvailableWhenUASTC}set useRGBAIfASTCBC7NotAvailableWhenUASTC(e){this._useRGBAIfASTCBC7NotAvailableWhenUASTC!==e&&(this._useRGBAIfASTCBC7NotAvailableWhenUASTC=e,this._isDirty=!0)}get useRGBAIfOnlyBC1BC3AvailableWhenUASTC(){return this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC}set useRGBAIfOnlyBC1BC3AvailableWhenUASTC(e){this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC!==e&&(this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=e,this._isDirty=!0)}get forceRGBA(){return this._forceRGBA}set forceRGBA(e){this._forceRGBA!==e&&(this._forceRGBA=e,this._isDirty=!0)}get forceR8(){return this._forceR8}set forceR8(e){this._forceR8!==e&&(this._forceR8=e,this._isDirty=!0)}get forceRG8(){return this._forceRG8}set forceRG8(e){this._forceRG8!==e&&(this._forceRG8=e,this._isDirty=!0)}get bypassTranscoders(){return this._bypassTranscoders}set bypassTranscoders(e){this._bypassTranscoders!==e&&(this._bypassTranscoders=e,this._isDirty=!0)}_getKTX2DecoderOptions(){if(!this._isDirty)return this._ktx2DecoderOptions;this._isDirty=!1;let e={};return void 0!==this._useRGBAIfASTCBC7NotAvailableWhenUASTC&&(e.useRGBAIfASTCBC7NotAvailableWhenUASTC=this._useRGBAIfASTCBC7NotAvailableWhenUASTC),void 0!==this._forceRGBA&&(e.forceRGBA=this._forceRGBA),void 0!==this._forceR8&&(e.forceR8=this._forceR8),void 0!==this._forceRG8&&(e.forceRG8=this._forceRG8),void 0!==this._bypassTranscoders&&(e.bypassTranscoders=this._bypassTranscoders),this.useRGBAIfOnlyBC1BC3AvailableWhenUASTC&&(e.transcodeFormatDecisionTree={UASTC:{transcodeFormat:[a.BC1_RGB,a.BC3_RGBA],yes:{transcodeFormat:a.RGBA32,engineFormat:32856,roundToMultiple4:!1}}}),this._ktx2DecoderOptions=e,e}},e.s(["_KTXTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,t,r,s){if(Array.isArray(e))return;t._invertVScale=!t.invertY;let o=t.getEngine(),a=new c(e,6),i=m(a.glInternalFormat);null!==i?(t.format=i,t._useSRGBBuffer=o._getUseSRGBBuffer(!0,!t.generateMipMaps),t._gammaSpace=!0):t.format=a.glInternalFormat;let n=a.numberOfMipmapLevels>1&&t.generateMipMaps;o._unpackFlipY(!0),a.uploadLevels(t,t.generateMipMaps),t.width=a.pixelWidth,t.height=a.pixelHeight,o._setCubeMapTextureParams(t,n,a.numberOfMipmapLevels-1),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),s&&s()}loadData(e,t,r,s){if(c.IsValid(e)){t._invertVScale=!t.invertY;let s=new c(e,1),o=m(s.glInternalFormat);null!==o?(t.format=o,t._useSRGBBuffer=t.getEngine()._getUseSRGBBuffer(!0,!t.generateMipMaps),t._gammaSpace=!0):t.format=s.glInternalFormat,r(s.pixelWidth,s.pixelHeight,t.generateMipMaps,!0,()=>{s.uploadLevels(t,t.generateMipMaps)},s.isInvalid)}else R.IsValid(e)?new R(t.getEngine())._uploadAsync(e,t,s).then(()=>{r(t.width,t.height,t.generateMipMaps,!0,()=>{},!1)},e=>{n.Logger.Warn(`Failed to load KTX2 texture data: ${e.message}`),r(0,0,!1,!1,()=>{},!0)}):(n.Logger.Error("texture missing KTX identifier"),r(0,0,!1,!1,()=>{},!0))}}],58046)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24971,e=>{"use strict";class t{constructor(e){this._pendingActions=[],this._workerInfos=e.map(e=>({workerPromise:Promise.resolve(e),idle:!0}))}dispose(){for(let e of this._workerInfos)e.workerPromise.then(e=>{e.terminate()});this._workerInfos.length=0,this._pendingActions.length=0}push(e){this._executeOnIdleWorker(e)||this._pendingActions.push(e)}_executeOnIdleWorker(e){for(let t of this._workerInfos)if(t.idle)return this._execute(t,e),!0;return!1}_execute(e,t){e.idle=!1,e.workerPromise.then(r=>{t(r,()=>{let t=this._pendingActions.shift();t?this._execute(e,t):e.idle=!0})})}}class r extends t{constructor(e,t,s=r.DefaultOptions){super([]),this._maxWorkers=e,this._createWorkerAsync=t,this._options=s}push(e){if(!this._executeOnIdleWorker(e))if(this._workerInfos.length<this._maxWorkers){let t={workerPromise:this._createWorkerAsync(),idle:!1};this._workerInfos.push(t),this._execute(t,e)}else this._pendingActions.push(e)}_execute(e,t){e.timeoutId&&(clearTimeout(e.timeoutId),delete e.timeoutId),super._execute(e,(r,s)=>{t(r,()=>{s(),e.idle&&(e.timeoutId=setTimeout(()=>{e.workerPromise.then(e=>{e.terminate()});let t=this._workerInfos.indexOf(e);-1!==t&&this._workerInfos.splice(t,1)},this._options.idleTimeElapsedBeforeRelease))})})}}r.DefaultOptions={idleTimeElapsedBeforeRelease:1e3},e.s(["AutoReleaseWorkerPool",0,r])},29614,e=>{"use strict";var t,r,s,o,a,i,n=e.i(83464);class c{constructor(e,t){if(this.data=e,this.isInvalid=!1,!c.IsValid(e)){this.isInvalid=!0,n.Logger.Error("texture missing KTX identifier");return}const r=Uint32Array.BYTES_PER_ELEMENT,s=new DataView(this.data.buffer,this.data.byteOffset+12,13*r),o=0x4030201===s.getUint32(0,!0);if(this.glType=s.getUint32(+r,o),this.glTypeSize=s.getUint32(2*r,o),this.glFormat=s.getUint32(3*r,o),this.glInternalFormat=s.getUint32(4*r,o),this.glBaseInternalFormat=s.getUint32(5*r,o),this.pixelWidth=s.getUint32(6*r,o),this.pixelHeight=s.getUint32(7*r,o),this.pixelDepth=s.getUint32(8*r,o),this.numberOfArrayElements=s.getUint32(9*r,o),this.numberOfFaces=s.getUint32(10*r,o),this.numberOfMipmapLevels=s.getUint32(11*r,o),this.bytesOfKeyValueData=s.getUint32(12*r,o),0!==this.glType){n.Logger.Error("only compressed formats currently supported"),this.isInvalid=!0;return}if(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0===this.pixelHeight||0!==this.pixelDepth){n.Logger.Error("only 2D textures currently supported"),this.isInvalid=!0;return}if(0!==this.numberOfArrayElements){n.Logger.Error("texture arrays not currently supported"),this.isInvalid=!0;return}if(this.numberOfFaces!==t){n.Logger.Error("number of faces expected"+t+", but found "+this.numberOfFaces),this.isInvalid=!0;return}this.loadType=c.COMPRESSED_2D}uploadLevels(e,t){switch(this.loadType){case c.COMPRESSED_2D:this._upload2DCompressedLevels(e,t);case c.TEX_2D:case c.COMPRESSED_3D:case c.TEX_3D:}}_upload2DCompressedLevels(e,t){let r=c.HEADER_LEN+this.bytesOfKeyValueData,s=this.pixelWidth,o=this.pixelHeight,a=t?this.numberOfMipmapLevels:1;for(let t=0;t<a;t++){let a=new Int32Array(this.data.buffer,this.data.byteOffset+r,1)[0];r+=4;for(let i=0;i<this.numberOfFaces;i++){let n=new Uint8Array(this.data.buffer,this.data.byteOffset+r,a);e.getEngine()._uploadCompressedDataToTextureDirectly(e,e.format,s,o,n,i,t),r+=a,r+=3-(a+3)%4}s=Math.max(1,.5*s),o=Math.max(1,.5*o)}}static IsValid(e){if(e.byteLength>=12){let t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&49===t[5]&&49===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1}}c.HEADER_LEN=64,c.COMPRESSED_2D=0,c.COMPRESSED_3D=1,c.TEX_2D=2,c.TEX_3D=3;var l=e.i(24971),d=e.i(29711);function T(e,t){let r=t?.jsDecoderModule||KTX2DECODER;e&&(e.wasmBaseUrl&&(r.Transcoder.WasmBaseUrl=e.wasmBaseUrl),e.wasmUASTCToASTC&&(r.LiteTranscoder_UASTC_ASTC.WasmModuleURL=e.wasmUASTCToASTC),e.wasmUASTCToBC7&&(r.LiteTranscoder_UASTC_BC7.WasmModuleURL=e.wasmUASTCToBC7),e.wasmUASTCToRGBA_UNORM&&(r.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL=e.wasmUASTCToRGBA_UNORM),e.wasmUASTCToRGBA_SRGB&&(r.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL=e.wasmUASTCToRGBA_SRGB),e.wasmUASTCToR8_UNORM&&(r.LiteTranscoder_UASTC_R8_UNORM.WasmModuleURL=e.wasmUASTCToR8_UNORM),e.wasmUASTCToRG8_UNORM&&(r.LiteTranscoder_UASTC_RG8_UNORM.WasmModuleURL=e.wasmUASTCToRG8_UNORM),e.jsMSCTranscoder&&(r.MSCTranscoder.JSModuleURL=e.jsMSCTranscoder),e.wasmMSCTranscoder&&(r.MSCTranscoder.WasmModuleURL=e.wasmMSCTranscoder),e.wasmZSTDDecoder&&(r.ZSTDDecoder.WasmModuleURL=e.wasmZSTDDecoder)),t&&(t.wasmUASTCToASTC&&(r.LiteTranscoder_UASTC_ASTC.WasmBinary=t.wasmUASTCToASTC),t.wasmUASTCToBC7&&(r.LiteTranscoder_UASTC_BC7.WasmBinary=t.wasmUASTCToBC7),t.wasmUASTCToRGBA_UNORM&&(r.LiteTranscoder_UASTC_RGBA_UNORM.WasmBinary=t.wasmUASTCToRGBA_UNORM),t.wasmUASTCToRGBA_SRGB&&(r.LiteTranscoder_UASTC_RGBA_SRGB.WasmBinary=t.wasmUASTCToRGBA_SRGB),t.wasmUASTCToR8_UNORM&&(r.LiteTranscoder_UASTC_R8_UNORM.WasmBinary=t.wasmUASTCToR8_UNORM),t.wasmUASTCToRG8_UNORM&&(r.LiteTranscoder_UASTC_RG8_UNORM.WasmBinary=t.wasmUASTCToRG8_UNORM),t.jsMSCTranscoder&&(r.MSCTranscoder.JSModule=t.jsMSCTranscoder),t.wasmMSCTranscoder&&(r.MSCTranscoder.WasmBinary=t.wasmMSCTranscoder),t.wasmZSTDDecoder&&(r.ZSTDDecoder.WasmBinary=t.wasmZSTDDecoder))}function _(e){let t;void 0===e&&"u">typeof KTX2DECODER&&(e=KTX2DECODER),onmessage=r=>{if(r.data)switch(r.data.action){case"init":{let s=r.data.urls;s&&(s.jsDecoderModule&&void 0===e&&(importScripts(s.jsDecoderModule),e=KTX2DECODER),T(s)),r.data.wasmBinaries&&T(void 0,{...r.data.wasmBinaries,jsDecoderModule:e}),t=new e.KTX2Decoder,postMessage({action:"init"});break}case"setDefaultDecoderOptions":e.KTX2Decoder.DefaultDecoderOptions=r.data.options;break;case"decode":t.decode(r.data.data,r.data.caps,r.data.options).then(e=>{let t=[];for(let r=0;r<e.mipmaps.length;++r){let s=e.mipmaps[r];s&&s.data&&t.push(s.data.buffer)}postMessage({action:"decoded",success:!0,decodedData:e},t)}).catch(e=>{postMessage({action:"decoded",success:!1,msg:e})})}}}async function u(e,t,r){return await new Promise((s,o)=>{let a=t=>{e.removeEventListener("error",a),e.removeEventListener("message",i),o(t)},i=t=>{"init"===t.data.action&&(e.removeEventListener("error",a),e.removeEventListener("message",i),s(e))};e.addEventListener("error",a),e.addEventListener("message",i),e.postMessage({action:"init",urls:r,wasmBinaries:t})})}(t=o||(o={}))[t.ETC1S=0]="ETC1S",t[t.UASTC4x4=1]="UASTC4x4",(r=a||(a={}))[r.ASTC_4X4_RGBA=0]="ASTC_4X4_RGBA",r[r.ASTC_4x4_RGBA=0]="ASTC_4x4_RGBA",r[r.BC7_RGBA=1]="BC7_RGBA",r[r.BC3_RGBA=2]="BC3_RGBA",r[r.BC1_RGB=3]="BC1_RGB",r[r.PVRTC1_4_RGBA=4]="PVRTC1_4_RGBA",r[r.PVRTC1_4_RGB=5]="PVRTC1_4_RGB",r[r.ETC2_RGBA=6]="ETC2_RGBA",r[r.ETC1_RGB=7]="ETC1_RGB",r[r.RGBA32=8]="RGBA32",r[r.R8=9]="R8",r[r.RG8=10]="RG8",(s=i||(i={}))[s.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",s[s.COMPRESSED_RGBA_ASTC_4X4_KHR=37808]="COMPRESSED_RGBA_ASTC_4X4_KHR",s[s.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",s[s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",s[s.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",s[s.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",s[s.RGBA8Format=32856]="RGBA8Format",s[s.R8Format=33321]="R8Format",s[s.RG8Format=33323]="RG8Format";class R{static GetDefaultNumWorkers(){return"object"==typeof navigator&&navigator.hardwareConcurrency?Math.min(Math.floor(.5*navigator.hardwareConcurrency),4):1}static _Initialize(e){if(R._WorkerPoolPromise||R._DecoderModulePromise)return;let t={wasmBaseUrl:d.Tools.ScriptBaseUrl,jsDecoderModule:d.Tools.GetBabylonScriptURL(this.URLConfig.jsDecoderModule,!0),wasmUASTCToASTC:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToASTC,!0),wasmUASTCToBC7:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToBC7,!0),wasmUASTCToRGBA_UNORM:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_UNORM,!0),wasmUASTCToRGBA_SRGB:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_SRGB,!0),wasmUASTCToR8_UNORM:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToR8_UNORM,!0),wasmUASTCToRG8_UNORM:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRG8_UNORM,!0),jsMSCTranscoder:d.Tools.GetBabylonScriptURL(this.URLConfig.jsMSCTranscoder,!0),wasmMSCTranscoder:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmMSCTranscoder,!0),wasmZSTDDecoder:d.Tools.GetBabylonScriptURL(this.URLConfig.wasmZSTDDecoder,!0)};e&&"function"==typeof Worker&&"u">typeof URL?R._WorkerPoolPromise=new Promise(r=>{let s=`${T}(${_})()`,o=URL.createObjectURL(new Blob([s],{type:"application/javascript"}));r(new l.AutoReleaseWorkerPool(e,async()=>await u(new Worker(o),void 0,t)))}):void 0===R._KTX2DecoderModule?R._DecoderModulePromise=d.Tools.LoadBabylonScriptAsync(t.jsDecoderModule).then(()=>(R._KTX2DecoderModule=KTX2DECODER,R._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,R._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,T(t,R._KTX2DecoderModule),new R._KTX2DecoderModule.KTX2Decoder)):(R._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,R._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,R._DecoderModulePromise=Promise.resolve(new R._KTX2DecoderModule.KTX2Decoder))}constructor(e,t=R.DefaultNumWorkers){this._engine=e;const r="object"==typeof t&&t.workerPool||R.WorkerPool;if(r)R._WorkerPoolPromise=Promise.resolve(r);else{"object"==typeof t?R._KTX2DecoderModule=t?.binariesAndModulesContainer?.jsDecoderModule:"u">typeof KTX2DECODER&&(R._KTX2DecoderModule=KTX2DECODER);const e="number"==typeof t?t:t.numWorkers??R.DefaultNumWorkers;R._Initialize(e)}}async _uploadAsync(e,t,r){let s=this._engine.getCaps(),o={astc:!!s.astc,bptc:!!s.bptc,s3tc:!!s.s3tc,pvrtc:!!s.pvrtc,etc2:!!s.etc2,etc1:!!s.etc1};if(R._WorkerPoolPromise){let s=await R._WorkerPoolPromise;return await new Promise((a,i)=>{s.push((s,n)=>{let c=e=>{s.removeEventListener("error",c),s.removeEventListener("message",l),i(e),n()},l=e=>{if("decoded"===e.data.action){if(s.removeEventListener("error",c),s.removeEventListener("message",l),e.data.success)try{this._createTexture(e.data.decodedData,t,r),a()}catch(e){i({message:e})}else i({message:e.data.msg});n()}};s.addEventListener("error",c),s.addEventListener("message",l),s.postMessage({action:"setDefaultDecoderOptions",options:R.DefaultDecoderOptions._getKTX2DecoderOptions()});let d=new Uint8Array(e.byteLength);d.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),s.postMessage({action:"decode",data:d,caps:o,options:r},[d.buffer])})})}if(R._DecoderModulePromise){let r=await R._DecoderModulePromise;return R.DefaultDecoderOptions.isDirty&&(R._KTX2DecoderModule.KTX2Decoder.DefaultDecoderOptions=R.DefaultDecoderOptions._getKTX2DecoderOptions()),await new Promise((o,a)=>{r.decode(e,s).then(e=>{this._createTexture(e,t),o()}).catch(e=>{a({message:e})})})}throw Error("KTX2 decoder module is not available")}_createTexture(e,t,r){this._engine._bindTextureDirectly(3553,t),r&&(r.transcodedFormat=e.transcodedFormat,r.isInGammaSpace=e.isInGammaSpace,r.hasAlpha=e.hasAlpha,r.transcoderName=e.transcoderName);let s=!0;switch(e.transcodedFormat){case 32856:t.type=0,t.format=5;break;case 33321:t.type=0,t.format=6;break;case 33323:t.type=0,t.format=7;break;default:t.format=e.transcodedFormat,s=!1}if(t._gammaSpace=e.isInGammaSpace,t.generateMipMaps=e.mipmaps.length>1,t.width=e.mipmaps[0].width,t.height=e.mipmaps[0].height,e.errors)throw Error("KTX2 container - could not transcode the data. "+e.errors);for(let r=0;r<e.mipmaps.length;++r){let o=e.mipmaps[r];if(!o||!o.data)throw Error("KTX2 container - could not transcode one of the image");s?(t.width=o.width,t.height=o.height,this._engine._uploadDataToTextureDirectly(t,o.data,0,r,void 0,!0)):this._engine._uploadCompressedDataToTextureDirectly(t,e.transcodedFormat,o.width,o.height,o.data,0,r)}t._extension=".ktx2",t.isReady=!0,this._engine._bindTextureDirectly(3553,null)}static IsValid(e){if(e.byteLength>=12){let t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&50===t[5]&&48===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1}}function m(e){switch(e){case 35916:return 33776;case 35918:return 33778;case 35919:return 33779;case 37493:return 37492;case 37497:return 37496;case 37495:return 37494;case 37840:return 37808;case 37841:return 37809;case 37842:return 37810;case 37843:return 37811;case 37844:return 37812;case 37845:return 37813;case 37846:return 37814;case 37847:return 37815;case 37848:return 37816;case 37849:return 37817;case 37850:return 37818;case 37851:return 37819;case 37852:return 37820;case 37853:return 37821;case 36493:return 36492}return null}R.URLConfig={jsDecoderModule:"https://cdn.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,wasmUASTCToR8_UNORM:null,wasmUASTCToRG8_UNORM:null,jsMSCTranscoder:null,wasmMSCTranscoder:null,wasmZSTDDecoder:null},R.DefaultNumWorkers=R.GetDefaultNumWorkers(),R.DefaultDecoderOptions=new class{constructor(){this._isDirty=!0,this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=!0,this._ktx2DecoderOptions={}}get isDirty(){return this._isDirty}get useRGBAIfASTCBC7NotAvailableWhenUASTC(){return this._useRGBAIfASTCBC7NotAvailableWhenUASTC}set useRGBAIfASTCBC7NotAvailableWhenUASTC(e){this._useRGBAIfASTCBC7NotAvailableWhenUASTC!==e&&(this._useRGBAIfASTCBC7NotAvailableWhenUASTC=e,this._isDirty=!0)}get useRGBAIfOnlyBC1BC3AvailableWhenUASTC(){return this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC}set useRGBAIfOnlyBC1BC3AvailableWhenUASTC(e){this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC!==e&&(this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=e,this._isDirty=!0)}get forceRGBA(){return this._forceRGBA}set forceRGBA(e){this._forceRGBA!==e&&(this._forceRGBA=e,this._isDirty=!0)}get forceR8(){return this._forceR8}set forceR8(e){this._forceR8!==e&&(this._forceR8=e,this._isDirty=!0)}get forceRG8(){return this._forceRG8}set forceRG8(e){this._forceRG8!==e&&(this._forceRG8=e,this._isDirty=!0)}get bypassTranscoders(){return this._bypassTranscoders}set bypassTranscoders(e){this._bypassTranscoders!==e&&(this._bypassTranscoders=e,this._isDirty=!0)}_getKTX2DecoderOptions(){if(!this._isDirty)return this._ktx2DecoderOptions;this._isDirty=!1;let e={};return void 0!==this._useRGBAIfASTCBC7NotAvailableWhenUASTC&&(e.useRGBAIfASTCBC7NotAvailableWhenUASTC=this._useRGBAIfASTCBC7NotAvailableWhenUASTC),void 0!==this._forceRGBA&&(e.forceRGBA=this._forceRGBA),void 0!==this._forceR8&&(e.forceR8=this._forceR8),void 0!==this._forceRG8&&(e.forceRG8=this._forceRG8),void 0!==this._bypassTranscoders&&(e.bypassTranscoders=this._bypassTranscoders),this.useRGBAIfOnlyBC1BC3AvailableWhenUASTC&&(e.transcodeFormatDecisionTree={UASTC:{transcodeFormat:[a.BC1_RGB,a.BC3_RGBA],yes:{transcodeFormat:a.RGBA32,engineFormat:32856,roundToMultiple4:!1}}}),this._ktx2DecoderOptions=e,e}},e.s(["_KTXTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,t,r,s){if(Array.isArray(e))return;t._invertVScale=!t.invertY;let o=t.getEngine(),a=new c(e,6),i=m(a.glInternalFormat);null!==i?(t.format=i,t._useSRGBBuffer=o._getUseSRGBBuffer(!0,!t.generateMipMaps),t._gammaSpace=!0):t.format=a.glInternalFormat;let n=a.numberOfMipmapLevels>1&&t.generateMipMaps;o._unpackFlipY(!0),a.uploadLevels(t,t.generateMipMaps),t.width=a.pixelWidth,t.height=a.pixelHeight,o._setCubeMapTextureParams(t,n,a.numberOfMipmapLevels-1),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),s&&s()}loadData(e,t,r,s){if(c.IsValid(e)){t._invertVScale=!t.invertY;let s=new c(e,1),o=m(s.glInternalFormat);null!==o?(t.format=o,t._useSRGBBuffer=t.getEngine()._getUseSRGBBuffer(!0,!t.generateMipMaps),t._gammaSpace=!0):t.format=s.glInternalFormat,r(s.pixelWidth,s.pixelHeight,t.generateMipMaps,!0,()=>{s.uploadLevels(t,t.generateMipMaps)},s.isInvalid)}else R.IsValid(e)?new R(t.getEngine())._uploadAsync(e,t,s).then(()=>{r(t.width,t.height,t.generateMipMaps,!0,()=>{},!1)},e=>{n.Logger.Warn(`Failed to load KTX2 texture data: ${e.message}`),r(0,0,!1,!1,()=>{},!0)}):(n.Logger.Error("texture missing KTX identifier"),r(0,0,!1,!1,()=>{},!0))}}],29614)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55611,e=>{"use strict";var n=e.i(92719),t=e.i(82350),s=e.i(48477);class o extends n.FlowGraphEventBlock{constructor(e){super(e),this.sound=this.registerDataInput("sound",t.RichTypeAny)}_preparePendingTasks(e){let n=this.sound.getValue(e);if(!n)return void this._reportError(e,"No sound provided for sound-ended event");let t=n.onEndedObservable.add(()=>{this._execute(e)});e._setExecutionVariable(this,"_soundEndedObserver",t),e._setExecutionVariable(this,"_subscribedSound",n)}_executeEvent(e,n){return!0}_cancelPendingTasks(e){let n=e._getExecutionVariable(this,"_soundEndedObserver",null),t=e._getExecutionVariable(this,"_subscribedSound",null);n&&t&&t.onEndedObservable.remove(n),e._setExecutionVariable(this,"_soundEndedObserver",null),e._setExecutionVariable(this,"_subscribedSound",null)}getClassName(){return"FlowGraphSoundEndedEventBlock"}}let d=!1;function r(){d||(d=!0,(0,s.RegisterClass)("FlowGraphSoundEndedEventBlock",o))}e.s(["FlowGraphSoundEndedEventBlock",0,o,"RegisterFlowGraphSoundEndedEventBlock",0,r],50752),r(),e.s([],16965),e.i(16965),e.i(50752),e.s(["FlowGraphSoundEndedEventBlock",0,o],55611)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27116,e=>{"use strict";var t=e.i(82531),i=e.i(82350);let s="cachedOperationValue",l="cachedExecutionId";class a extends t.FlowGraphBlock{constructor(e,t){super(t),this.value=this.registerDataOutput("value",e),this.isValid=this.registerDataOutput("isValid",i.RichTypeBoolean)}_updateOutputs(e){let t=e._getExecutionVariable(this,l,-1),i=e._getExecutionVariable(this,s,null);if(null!=i&&t===e.executionId)this.isValid.setValue(!0,e),this.value.setValue(i,e);else try{let t=this._doOperation(e);if(null==t)return void this.isValid.setValue(!1,e);e._setExecutionVariable(this,s,t),e._setExecutionVariable(this,l,e.executionId),this.value.setValue(t,e),this.isValid.setValue(!0,e)}catch(t){this.isValid.setValue(!1,e)}}}e.s(["FlowGraphCachedOperationBlock",0,a])},37525,e=>{"use strict";var t=e.i(82350),i=e.i(27116),s=e.i(48477);class l extends i.FlowGraphCachedOperationBlock{constructor(e){super(t.RichTypeNumber,e),this.sound=this.registerDataInput("sound",t.RichTypeAny)}_doOperation(e){let t=this.sound.getValue(e);if(t)return t.volume}getClassName(){return"FlowGraphGetSoundVolumeBlock"}}let a=!1;function o(){a||(a=!0,(0,s.RegisterClass)("FlowGraphGetSoundVolumeBlock",l))}e.s(["FlowGraphGetSoundVolumeBlock",0,l,"RegisterFlowGraphGetSoundVolumeBlock",0,o],53484),o(),e.s([],19475),e.i(19475),e.i(53484),e.s(["FlowGraphGetSoundVolumeBlock",0,l],37525)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37150,t=>{"use strict";var e=t.i(58667),i=t.i(57554),n=t.i(47867),a=t.i(55250),s=t.i(5382);class o{getClassName(){return"TargetedAnimation"}constructor(t){this.parent=t,this.uniqueId=s.UniqueIdGenerator.UniqueId}serialize(){let t={};return t.animation=this.animation.serialize(),t.targetId=this.target.id,t.targetUniqueId=this.target.uniqueId,t}}class r{get mask(){return this._mask}set mask(t){this._mask!==t&&(this._mask=t,this.syncWithMask(!0))}syncWithMask(t=!1){if(!this.mask&&!t){this._numActiveAnimatables=this._targetedAnimations.length;return}this._numActiveAnimatables=0;for(let t=0;t<this._animatables.length;++t){let e=this._animatables[t];!this.mask||this.mask.disabled||this.mask.retainsTarget(e.target.name)?(this._numActiveAnimatables++,e.paused&&e.restart()):e.paused||e.pause()}}removeUnmaskedAnimations(){if(this.mask&&!this.mask.disabled){for(let t=0;t<this._animatables.length;++t){let e=this._animatables[t];!this.mask.retainsTarget(e.target.name)&&(e.stop(),this._animatables.splice(t,1),--t)}for(let t=0;t<this._targetedAnimations.length;t++){let e=this._targetedAnimations[t];!this.mask.retainsTarget(e.target.name)&&(this._targetedAnimations.splice(t,1),--t)}}}get from(){return this._from}set from(t){if(this._from!==t){this._from=t;for(let t=0;t<this._animatables.length;t++)this._animatables[t].fromFrame=this._from}}get to(){return this._to}set to(t){if(this._to!==t){this._to=t;for(let t=0;t<this._animatables.length;t++)this._animatables[t].toFrame=this._to}}get isStarted(){return this._isStarted}get isPlaying(){return this._isStarted&&!this._isPaused}get speedRatio(){return this._speedRatio}set speedRatio(t){if(this._speedRatio!==t){this._speedRatio=t;for(let t=0;t<this._animatables.length;t++)this._animatables[t].speedRatio=this._speedRatio}}get loopAnimation(){return this._loopAnimation}set loopAnimation(t){if(this._loopAnimation!==t){this._loopAnimation=t;for(let t=0;t<this._animatables.length;t++)this._animatables[t].loopAnimation=this._loopAnimation}}get isAdditive(){return this._isAdditive}set isAdditive(t){if(this._isAdditive!==t){this._isAdditive=t;for(let t=0;t<this._animatables.length;t++)this._animatables[t].isAdditive=this._isAdditive}}get weight(){return this._weight}set weight(t){this._weight!==t&&(this._weight=t,this.setWeightForAllAnimatables(this._weight))}get targetedAnimations(){return this._targetedAnimations}get animatables(){return this._animatables}get children(){return this._targetedAnimations}get playOrder(){return this._playOrder}set playOrder(t){if(this._playOrder!==t&&(this._playOrder=t,this._animatables.length>0)){for(let t=0;t<this._animatables.length;t++)this._animatables[t].playOrder=this._playOrder;this._scene.sortActiveAnimatables()}}get enableBlending(){return this._enableBlending}set enableBlending(t){if(this._enableBlending!==t&&(this._enableBlending=t,null!==t))for(let e=0;e<this._targetedAnimations.length;++e)this._targetedAnimations[e].animation.enableBlending=t}get blendingSpeed(){return this._blendingSpeed}set blendingSpeed(t){if(this._blendingSpeed!==t&&(this._blendingSpeed=t,null!==t))for(let e=0;e<this._targetedAnimations.length;++e)this._targetedAnimations[e].animation.blendingSpeed=t}getLength(t,e){t=t??this._from,e=e??this._to;let i=this.targetedAnimations[0].animation.framePerSecond*this._speedRatio;return(e-t)/i}getScene(){return this._scene}constructor(t,e=null,a=-1,s=0){this.name=t,this._targetedAnimations=[],this._animatables=[],this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this._isAdditive=!1,this._weight=-1,this._playOrder=0,this._enableBlending=null,this._blendingSpeed=null,this._numActiveAnimatables=0,this._shouldStart=!0,this._parentContainer=null,this.onAnimationEndObservable=new i.Observable,this.onAnimationLoopObservable=new i.Observable,this.onAnimationGroupLoopObservable=new i.Observable,this.onAnimationGroupEndObservable=new i.Observable,this.onAnimationGroupPauseObservable=new i.Observable,this.onAnimationGroupPlayObservable=new i.Observable,this.metadata=null,this._mask=null,this._animationLoopFlags=[],this._scene=e||n.EngineStore.LastCreatedScene,this._weight=a,this._playOrder=s,this.uniqueId=this._scene.getUniqueId(),this._scene.addAnimationGroup(this)}addTargetedAnimation(t,e){let i=new o(this);i.animation=t,i.target=e;let n=t.getKeys();return this._from>n[0].frame&&(this._from=n[0].frame),this._to<n[n.length-1].frame&&(this._to=n[n.length-1].frame),null!==this._enableBlending&&(t.enableBlending=this._enableBlending),null!==this._blendingSpeed&&(t.blendingSpeed=this._blendingSpeed),this._targetedAnimations.push(i),this._shouldStart=!0,i}removeTargetedAnimation(t){for(let e=this._targetedAnimations.length-1;e>-1;e--)this._targetedAnimations[e].animation===t&&this._targetedAnimations.splice(e,1)}normalize(t=null,e=null){null==t&&(t=this._from),null==e&&(e=this._to);for(let i=0;i<this._targetedAnimations.length;i++){let n=this._targetedAnimations[i].animation.getKeys(),a=n[0],s=n[n.length-1];if(a.frame>t){let e={frame:t,value:a.value,inTangent:a.inTangent,outTangent:a.outTangent,interpolation:a.interpolation};n.splice(0,0,e)}if(s.frame<e){let t={frame:e,value:s.value,inTangent:s.inTangent,outTangent:s.outTangent,interpolation:s.interpolation};n.push(t)}}return this._from=t,this._to=e,this}_processLoop(t,e,i){t.onAnimationLoop=()=>{this.onAnimationLoopObservable.notifyObservers(e),this._animationLoopFlags[i]||(this._animationLoopFlags[i]=!0,this._animationLoopCount++,this._animationLoopCount===this._numActiveAnimatables&&(this.onAnimationGroupLoopObservable.notifyObservers(this),this._animationLoopCount=0,this._animationLoopFlags.length=0))}}start(t=!1,e=1,i,n,a){if(this._isStarted||0===this._targetedAnimations.length)return this;this._loopAnimation=t,this._shouldStart=!1,this._animationLoopCount=0,this._animationLoopFlags.length=0;for(let s=0;s<this._targetedAnimations.length;s++){let o=this._targetedAnimations[s],r=this._scene.beginDirectAnimation(o.target,[o.animation],void 0!==i?i:this._from,void 0!==n?n:this._to,t,e,void 0,void 0,void 0!==a?a:this._isAdditive);r.weight=this._weight,r.playOrder=this._playOrder,r.onAnimationEnd=()=>{this.onAnimationEndObservable.notifyObservers(o),this._checkAnimationGroupEnded(r)},this._processLoop(r,o,s),this._animatables.push(r)}return this.syncWithMask(),this._scene.sortActiveAnimatables(),this._speedRatio=e,this._isStarted=!0,this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this}pause(){if(!this._isStarted)return this;this._isPaused=!0;for(let t=0;t<this._animatables.length;t++)this._animatables[t].pause();return this.onAnimationGroupPauseObservable.notifyObservers(this),this}play(t){return this.isStarted&&this._animatables.length&&!this._shouldStart?(void 0!==t&&(this.loopAnimation=t),this.restart()):(this.stop(),this.start(t,this._speedRatio)),this}reset(){if(!this._isStarted)return this.play(),this.goToFrame(0),this.stop(!0),this;for(let t=0;t<this._animatables.length;t++)this._animatables[t].reset();return this}restart(){if(!this._isStarted)return this;for(let t=0;t<this._animatables.length;t++)this._animatables[t].restart();return this.syncWithMask(),this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this}stop(t=!1){if(!this._isStarted)return this;let e=this._animatables.slice();for(let i=0;i<e.length;i++)e[i].stop(void 0,void 0,!0,t);let i=0;for(let e=0;e<this._scene._activeAnimatables.length;e++){let n=this._scene._activeAnimatables[e];n._runtimeAnimations.length>0?this._scene._activeAnimatables[i++]=n:t&&this._checkAnimationGroupEnded(n,t)}return this._scene._activeAnimatables.length=i,this._isStarted=!1,this}setWeightForAllAnimatables(t){for(let e=0;e<this._animatables.length;e++)this._animatables[e].weight=t;return this}syncAllAnimationsWith(t){for(let e=0;e<this._animatables.length;e++)this._animatables[e].syncWith(t);return this}goToFrame(t,e=!1){if(!this._isStarted)return this;for(let i=0;i<this._animatables.length;i++)this._animatables[i].goToFrame(t,e);return this}getCurrentFrame(){return this.animatables[0]?.masterFrame||0}dispose(){if(this.isStarted&&this.stop(),this._targetedAnimations.length=0,this._animatables.length=0,this._scene.removeAnimationGroup(this),this._parentContainer){let t=this._parentContainer.animationGroups.indexOf(this);t>-1&&this._parentContainer.animationGroups.splice(t,1),this._parentContainer=null}this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear(),this.onAnimationGroupLoopObservable.clear()}_checkAnimationGroupEnded(t,e=!1){let i=this._animatables.indexOf(t);i>-1&&this._animatables.splice(i,1),this._animatables.length===this._targetedAnimations.length-this._numActiveAnimatables&&(this._isStarted=!1,e||this.onAnimationGroupEndObservable.notifyObservers(this),this._animatables.length=0)}clone(t,e,i=!1,n=!1){let a=new r(t||this.name,this._scene,this._weight,this._playOrder);for(let t of(a._from=this.from,a._to=this.to,a._speedRatio=this.speedRatio,a._loopAnimation=this.loopAnimation,a._isAdditive=this.isAdditive,a._enableBlending=this.enableBlending,a._blendingSpeed=this.blendingSpeed,a.metadata=this.metadata,a.mask=this.mask,this._targetedAnimations))a.addTargetedAnimation(i?t.animation.clone(n):t.animation,e?e(t.target):t.target);return a}serialize(){let t={};t.name=this.name,t.from=this.from,t.to=this.to,t.speedRatio=this.speedRatio,t.loopAnimation=this.loopAnimation,t.isAdditive=this.isAdditive,t.weight=this.weight,t.playOrder=this.playOrder,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,t.targetedAnimations=[];for(let e=0;e<this.targetedAnimations.length;e++){let i=this.targetedAnimations[e];t.targetedAnimations[e]=i.serialize()}return a.Tags&&a.Tags.HasTags(this)&&(t.tags=a.Tags.GetTags(this)),this.metadata&&(t.metadata=this.metadata),t}getClassName(){return"AnimationGroup"}toString(t){let e="Name: "+this.name;return e+=", type: "+this.getClassName(),t&&(e+=", from: "+this._from+", to: "+this._to+", isStarted: "+this._isStarted+", speedRatio: "+this._speedRatio+", targetedAnimations length: "+this._targetedAnimations.length+", animatables length: "+this._animatables.length),e}}function l(t,e=!0,i=!1,n){if(0===t.length)return null;n=n??t[0].weight;let a=Number.MAX_VALUE,s=-Number.MAX_VALUE;if(i)for(let e of t)e.from<a&&(a=e.from),e.to>s&&(s=e.to);let o=new r(t[0].name+"_merged",t[0].getScene(),n);for(let n of t){for(let t of(i&&n.normalize(a,s),n.targetedAnimations))o.addTargetedAnimation(t.animation,t.target);e&&n.dispose()}return o}function h(t,i,n){let s=new r(t.name,i,t.weight,t.playOrder);for(let a=0;a<t.targetedAnimations.length;a++){let o=t.targetedAnimations[a],r=(0,e.AnimationParse)(o.animation),l=n?n(o):"influence"===o.animation.property?i.getMorphTargetById(o.targetId):i.getNodeById(o.targetId);l&&s.addTargetedAnimation(r,l)}return a.Tags&&a.Tags.AddTagsTo(s,t.tags),null!==t.from&&null!==t.to&&s.normalize(t.from,t.to),void 0!==t.speedRatio&&(s._speedRatio=t.speedRatio),void 0!==t.loopAnimation&&(s._loopAnimation=t.loopAnimation),void 0!==t.isAdditive&&(s._isAdditive=t.isAdditive),void 0!==t.weight&&(s._weight=t.weight),void 0!==t.playOrder&&(s._playOrder=t.playOrder),void 0!==t.enableBlending&&(s._enableBlending=t.enableBlending),void 0!==t.blendingSpeed&&(s._blendingSpeed=t.blendingSpeed),void 0!==t.metadata&&(s.metadata=t.metadata),s}function m(t,i,n,a=!1,s){let o,r=t;(o="object"==typeof i?i:{referenceFrame:i,range:n,cloneOriginalAnimationGroup:a,clonedAnimationName:s}).cloneOriginalAnimationGroup&&(r=t.clone(o.clonedAnimationGroupName||r.name));let l=r.targetedAnimations;for(let t=0;t<l.length;t++){let i=l[t];i.animation=(0,e.AnimationMakeAnimationAdditive)(i.animation,o)}if(r.isAdditive=!0,o.clipKeys){let t=Number.MAX_VALUE,e=-Number.MAX_VALUE,i=r.targetedAnimations;for(let n=0;n<i.length;n++){let a=i[n].animation.getKeys();t>a[0].frame&&(t=a[0].frame),e<a[a.length-1].frame&&(e=a[a.length-1].frame)}let n=r;n._from=t,n._to=e}return r}function _(t,e,i,n,a){return g(t.clone(n||t.name),e,i,a)}function g(t,e,i,n){return p(t,e,i,n,!1)}function u(t,e,i,n,a){return d(t.clone(n||t.name),e,i,a)}function d(t,e,i,n){return p(t,e,i,n,!0)}function p(t,e,i,n,a=!1){let s=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=t.targetedAnimations;for(let t=0;t<r.length;t++){let l=r[t],h=n?l.animation:l.animation.clone();a&&(h.createKeyForFrame(e),h.createKeyForFrame(i));let m=h.getKeys(),_=[],g=Number.MAX_VALUE;for(let t=0;t<m.length;t++){let n=m[t];if(!a&&t>=e&&t<=i||a&&n.frame>=e&&n.frame<=i){let t={frame:n.frame,value:n.value.clone?n.value.clone():n.value,inTangent:n.inTangent,outTangent:n.outTangent,interpolation:n.interpolation,lockedTangent:n.lockedTangent};g===Number.MAX_VALUE&&(g=t.frame),t.frame-=g,_.push(t)}}if(0===_.length){r.splice(t,1),t--;continue}s>_[0].frame&&(s=_[0].frame),o<_[_.length-1].frame&&(o=_[_.length-1].frame),h.setKeys(_,!0),l.animation=h}return t._from=s,t._to=o,t}let A=!1;t.s(["AnimationGroup",0,r,"AnimationGroupClipFrames",0,u,"AnimationGroupClipFramesInPlace",0,d,"AnimationGroupClipInPlace",0,p,"AnimationGroupClipKeys",0,_,"AnimationGroupClipKeysInPlace",0,g,"AnimationGroupMakeAnimationAdditive",0,m,"AnimationGroupMergeAnimationGroups",0,l,"AnimationGroupParse",0,h,"RegisterAnimationGroup",0,function(){A||(A=!0,r.MergeAnimationGroups=l,r.Parse=h,r.MakeAnimationAdditive=m,r.ClipKeys=_,r.ClipKeysInPlace=g,r.ClipFrames=u,r.ClipFramesInPlace=d,r.ClipInPlace=p)},"TargetedAnimation",0,o])},78652,t=>{"use strict";t.s([])},45959,t=>{"use strict";t.i(78652);var e,i,n=t.i(37150),a=t.i(57554),s=t.i(10534),o=t.i(58667);class r{get currentFrame(){return this._currentFrame}get weight(){return this._weight}get currentValue(){return this._currentValue}get targetPath(){return this._targetPath}get target(){return this._currentActiveTarget}get isAdditive(){return this._host&&this._host.isAdditive}constructor(t,e,i,n){if(this._events=[],this._currentFrame=0,this._originalValue=[],this._originalBlendValue=null,this._offsetsCache={},this._highLimitsCache={},this._stopped=!1,this._blendingFactor=0,this._currentValue=null,this._currentActiveTarget=null,this._directTarget=null,this._targetPath="",this._weight=1,this._absoluteFrameOffset=0,this._previousElapsedTime=0,this._yoyoDirection=1,this._previousAbsoluteFrame=0,this._targetIsArray=!1,this._coreRuntimeAnimation=null,this._animation=e,this._target=t,this._scene=i,this._host=n,this._activeTargets=[],e._runtimeAnimations.push(this),this._animationState={key:0,repeatCount:0,loopMode:this._getCorrectLoopMode()},this._animation.dataType===o.Animation.ANIMATIONTYPE_MATRIX&&(this._animationState.workValue=s.Matrix.Zero()),this._keys=this._animation.getKeys(),this._minFrame=this._keys[0].frame,this._maxFrame=this._keys[this._keys.length-1].frame,0!==this._minFrame){const t={frame:0,value:this._keys[0].value};this._keys.splice(0,0,t)}if(this._target instanceof Array){let t=0;for(const e of this._target)this._preparePath(e,t),this._getOriginalValues(t),t++;this._targetIsArray=!0}else this._preparePath(this._target),this._getOriginalValues(),this._targetIsArray=!1,this._directTarget=this._activeTargets[0];const a=e.getEvents();if(a&&a.length>0)for(const t of a)this._events.push(t._clone());this._enableBlending=t&&t.animationPropertiesOverride?t.animationPropertiesOverride.enableBlending:this._animation.enableBlending}_preparePath(t,e=0){let i=this._animation.targetPropertyPath;if(i.length>1){let n=t;for(let t=0;t<i.length-1;t++){let e=i[t];if(void 0===(n=n[e]))throw Error(`Invalid property (${e}) in property path (${i.join(".")})`)}this._targetPath=i[i.length-1],this._activeTargets[e]=n}else this._targetPath=i[0],this._activeTargets[e]=t;if(void 0===this._activeTargets[e][this._targetPath])throw Error(`Invalid property (${this._targetPath}) in property path (${i.join(".")})`)}get animation(){return this._animation}reset(t=!1){if(t)if(this._target instanceof Array){let t=0;for(let e of this._target)void 0!==this._originalValue[t]&&this._setValue(e,this._activeTargets[t],this._originalValue[t],-1,t),t++}else void 0!==this._originalValue[0]&&this._setValue(this._target,this._directTarget,this._originalValue[0],-1,0);this._offsetsCache={},this._highLimitsCache={},this._currentFrame=0,this._blendingFactor=0;for(let t=0;t<this._events.length;t++)this._events[t].isDone=!1}isStopped(){return this._stopped}dispose(){let t=this._animation.runtimeAnimations.indexOf(this);t>-1&&this._animation.runtimeAnimations.splice(t,1)}setValue(t,e){if(this._targetIsArray){for(let i=0;i<this._target.length;i++){let n=this._target[i];this._setValue(n,this._activeTargets[i],t,e,i)}return}this._setValue(this._target,this._directTarget,t,e,0)}_getOriginalValues(t=0){let e,i=this._activeTargets[t];if(o.Animation.InheritOriginalValueFromActiveAnimations){let e=this._scene._activeAnimatables;for(let n=0;n<e.length;n++){let a=e[n]._runtimeAnimations;for(let e=0;e<a.length;e++){let n=a[e];if(n!==this&&n._targetPath===this._targetPath){for(let e=0;e<n._activeTargets.length;e++)if(n._activeTargets[e]===i&&void 0!==n._originalValue[e])return void(n._originalValue[e]&&n._originalValue[e].clone?this._originalValue[t]=n._originalValue[e].clone():this._originalValue[t]=n._originalValue[e])}}}}(e=i.getLocalMatrix&&"_matrix"===this._targetPath?i.getLocalMatrix():i[this._targetPath])&&e.clone?this._originalValue[t]=e.clone():this._originalValue[t]=e}_registerTargetForLateAnimationBinding(t,e){let i=t.target;this._scene._registeredForLateAnimationBindings.pushNoDuplicate(i),i._lateAnimationHolders||(i._lateAnimationHolders={}),i._lateAnimationHolders[t.targetPath]||(i._lateAnimationHolders[t.targetPath]={totalWeight:0,totalAdditiveWeight:0,animations:[],additiveAnimations:[],originalValue:e}),t.isAdditive?(i._lateAnimationHolders[t.targetPath].additiveAnimations.push(t),i._lateAnimationHolders[t.targetPath].totalAdditiveWeight+=t.weight):(i._lateAnimationHolders[t.targetPath].animations.push(t),i._lateAnimationHolders[t.targetPath].totalWeight+=t.weight)}_setValue(t,e,i,n,a){if(this._currentActiveTarget=e,this._weight=n,this._enableBlending&&this._blendingFactor<=1){if(!this._originalBlendValue){let t=e[this._targetPath];t.clone?this._originalBlendValue=t.clone():this._originalBlendValue=t}this._originalBlendValue.m?o.Animation.AllowMatrixDecomposeForInterpolation?this._currentValue?s.Matrix.DecomposeLerpToRef(this._originalBlendValue,i,this._blendingFactor,this._currentValue):this._currentValue=s.Matrix.DecomposeLerp(this._originalBlendValue,i,this._blendingFactor):this._currentValue?s.Matrix.LerpToRef(this._originalBlendValue,i,this._blendingFactor,this._currentValue):this._currentValue=s.Matrix.Lerp(this._originalBlendValue,i,this._blendingFactor):this._currentValue=o.Animation._UniversalLerp(this._originalBlendValue,i,this._blendingFactor);let n=t&&t.animationPropertiesOverride?t.animationPropertiesOverride.blendingSpeed:this._animation.blendingSpeed;this._blendingFactor+=n}else this._currentValue?this._currentValue.copyFrom?this._currentValue.copyFrom(i):this._currentValue=i:i?.clone?this._currentValue=i.clone():this._currentValue=i;-1!==n?this._registerTargetForLateAnimationBinding(this,this._originalValue[a]):this._animationState.loopMode===o.Animation.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT?this._currentValue.addToRef?this._currentValue.addToRef(this._originalValue[a],e[this._targetPath]):e[this._targetPath]=this._originalValue[a]+this._currentValue:e[this._targetPath]=this._currentValue,t.markAsDirty&&t.markAsDirty(this._animation.targetProperty)}_getCorrectLoopMode(){return this._target&&this._target.animationPropertiesOverride?this._target.getClassName?.()==="MorphTarget"&&null==this._target._animationPropertiesOverride?this._animation.loopMode:this._target.animationPropertiesOverride.loopMode:this._animation.loopMode}goToFrame(t,e=-1){let i=this._animation.getKeys();t<i[0].frame?t=i[0].frame:t>i[i.length-1].frame&&(t=i[i.length-1].frame);let n=this._events;if(n.length)for(let e=0;e<n.length;e++)n[e].onlyOnce||(n[e].isDone=n[e].frame<t);this._currentFrame=t;let a=this._animation._interpolate(t,this._animationState);this.setValue(a,e)}_prepareForSpeedRatioChange(t){let e=this._previousElapsedTime*(this._animation.framePerSecond*t)/1e3;this._absoluteFrameOffset=this._previousAbsoluteFrame-e}animate(t,e,i,n,a,s=-1){let r,l,h=this._animation,m=h.targetPropertyPath;if(!m||m.length<1)return this._stopped=!0,!1;let _=!0,g=this._events;if(this._coreRuntimeAnimation)l=i-e,r=this._coreRuntimeAnimation.currentFrame,this._currentFrame=r,this._animationState.repeatCount=this._coreRuntimeAnimation._animationState.repeatCount,this._animationState.highLimitValue=this._coreRuntimeAnimation._animationState.highLimitValue,this._animationState.offsetValue=this._coreRuntimeAnimation._animationState.offsetValue;else{let s;(e<this._minFrame||e>this._maxFrame)&&(e=this._minFrame),(i<this._minFrame||i>this._maxFrame)&&(i=this._maxFrame),l=i-e;let m=t*(h.framePerSecond*a)/1e3+this._absoluteFrameOffset,u=0,d=!1,p=n&&this._animationState.loopMode===o.Animation.ANIMATIONLOOPMODE_YOYO;if(p){let t=Math.sin((m-e)/l*Math.PI);m=Math.abs(t)*l+e;let i=t>=0?1:-1;this._yoyoDirection!==i&&(d=!0),this._yoyoDirection=i}if(this._previousElapsedTime=t,this._previousAbsoluteFrame=m,!n&&i>=e&&(m>=l&&a>0||m<=0&&a<0))_=!1,u=h.evaluate(i);else if(!n&&e>=i&&(m<=l&&a<0||m>=0&&a>0))_=!1,u=h.evaluate(e);else if(this._animationState.loopMode!==o.Animation.ANIMATIONLOOPMODE_CYCLE){let t=i.toString()+e.toString();if(!this._offsetsCache[t]){this._animationState.repeatCount=0,this._animationState.loopMode=o.Animation.ANIMATIONLOOPMODE_CYCLE;let n=h._interpolate(e,this._animationState),a=h._interpolate(i,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),h.dataType){case o.Animation.ANIMATIONTYPE_FLOAT:this._offsetsCache[t]=a-n;break;case o.Animation.ANIMATIONTYPE_QUATERNION:case o.Animation.ANIMATIONTYPE_VECTOR3:case o.Animation.ANIMATIONTYPE_VECTOR2:case o.Animation.ANIMATIONTYPE_SIZE:case o.Animation.ANIMATIONTYPE_COLOR3:this._offsetsCache[t]=a.subtract(n)}this._highLimitsCache[t]=a}u=this._highLimitsCache[t],s=this._offsetsCache[t]}if(void 0===s)switch(h.dataType){case o.Animation.ANIMATIONTYPE_FLOAT:s=0;break;case o.Animation.ANIMATIONTYPE_QUATERNION:s=o._StaticOffsetValueQuaternion;break;case o.Animation.ANIMATIONTYPE_VECTOR3:s=o._StaticOffsetValueVector3;break;case o.Animation.ANIMATIONTYPE_VECTOR2:s=o._StaticOffsetValueVector2;break;case o.Animation.ANIMATIONTYPE_SIZE:s=o._StaticOffsetValueSize;break;case o.Animation.ANIMATIONTYPE_COLOR3:s=o._StaticOffsetValueColor3;break;case o.Animation.ANIMATIONTYPE_COLOR4:s=o._StaticOffsetValueColor4}if(this._host&&this._host.syncRoot){let t=this._host.syncRoot,i=(t.masterFrame-t.fromFrame)/(t.toFrame-t.fromFrame);r=e+l*i}else r=m>0&&e>i||m<0&&e<i?_&&0!==l?i+m%l:e:_&&0!==l?e+m%l:i;if(!p&&(a>0&&this.currentFrame>r||a<0&&this.currentFrame<r)||p&&d){this._onLoop();for(let t=0;t<g.length;t++)g[t].onlyOnce||(g[t].isDone=!1);this._animationState.key=a>0?0:h.getKeys().length-1}this._currentFrame=r,this._animationState.repeatCount=0===l?0:m/l|0,this._animationState.highLimitValue=u,this._animationState.offsetValue=s}let u=h._interpolate(r,this._animationState);if(this.setValue(u,s),g.length){for(let t=0;t<g.length;t++)if(l>=0&&r>=g[t].frame&&g[t].frame>=e||l<0&&r<=g[t].frame&&g[t].frame<=e){let e=g[t];e.isDone||(e.onlyOnce&&(g.splice(t,1),t--),e.isDone=!0,e.action(r))}}return _||(this._stopped=!0),_}}var l=t.i(85240);class h{get syncRoot(){return this._syncRoot}get masterFrame(){return 0===this._runtimeAnimations.length?0:this._runtimeAnimations[0].currentFrame}get weight(){return this._weight}set weight(t){if(-1===t){this._weight=-1;return}this._weight=Math.min(Math.max(t,0),1)}get speedRatio(){return this._speedRatio}set speedRatio(t){for(let e=0;e<this._runtimeAnimations.length;e++)this._runtimeAnimations[e]._prepareForSpeedRatioChange(t);this._speedRatio=t,null!==this._goToFrame&&this.goToFrame(this._goToFrame)}get elapsedTime(){return null===this._localDelayOffset?0:this._scene._animationTime-this._localDelayOffset}constructor(t,e,i=0,n=100,s=!1,o=1,r,l,h,m=!1,_=0){this.target=e,this.fromFrame=i,this.toFrame=n,this.loopAnimation=s,this.onAnimationEnd=r,this.onAnimationLoop=h,this.isAdditive=m,this.playOrder=_,this._localDelayOffset=null,this._pausedDelay=null,this._manualJumpDelay=null,this._runtimeAnimations=[],this._paused=!1,this._speedRatio=1,this._weight=-1,this._previousWeight=-1,this._syncRoot=null,this._frameToSyncFromJump=null,this._goToFrame=null,this.disposeOnEnd=!0,this.animationStarted=!1,this.onAnimationEndObservable=new a.Observable,this.onAnimationLoopObservable=new a.Observable,this._scene=t,l&&this.appendAnimations(e,l),this._speedRatio=o,t._activeAnimatables.push(this)}syncWith(t){if(this._syncRoot=t,t){let t=this._scene._activeAnimatables.indexOf(this);t>-1&&(this._scene._activeAnimatables.splice(t,1),this._scene._activeAnimatables.push(this))}return this}getAnimations(){return this._runtimeAnimations}appendAnimations(t,e){for(let i=0;i<e.length;i++){let n=new r(t,e[i],this._scene,this);n._onLoop=()=>{this.onAnimationLoopObservable.notifyObservers(this),this.onAnimationLoop&&this.onAnimationLoop()},this._runtimeAnimations.push(n)}}getAnimationByTargetProperty(t){let e=this._runtimeAnimations;for(let i=0;i<e.length;i++)if(e[i].animation.targetProperty===t)return e[i].animation;return null}getRuntimeAnimationByTargetProperty(t){let e=this._runtimeAnimations;for(let i=0;i<e.length;i++)if(e[i].animation.targetProperty===t)return e[i];return null}reset(){let t=this._runtimeAnimations;for(let e=0;e<t.length;e++)t[e].reset(!0);this._localDelayOffset=null,this._pausedDelay=null}enableBlending(t){let e=this._runtimeAnimations;for(let i=0;i<e.length;i++)e[i].animation.enableBlending=!0,e[i].animation.blendingSpeed=t}disableBlending(){let t=this._runtimeAnimations;for(let e=0;e<t.length;e++)t[e].animation.enableBlending=!1}goToFrame(t,e=!1){let i=this._runtimeAnimations;if(i[0]){let e=i[0].animation.framePerSecond;this._frameToSyncFromJump=this._frameToSyncFromJump??i[0].currentFrame;let n=0===this.speedRatio?0:(t-this._frameToSyncFromJump)/e*1e3/this.speedRatio;this._manualJumpDelay=-n}for(let n=0;n<i.length;n++)i[n].goToFrame(t,e?this._weight:-1);this._goToFrame=t}get paused(){return this._paused}pause(){this._paused||(this._paused=!0)}restart(){this._paused=!1}_raiseOnAnimationEnd(){this.onAnimationEnd&&this.onAnimationEnd(),this.onAnimationEndObservable.notifyObservers(this)}stop(t,e,i=!1,n=!1){if(t||e){let a=this._scene._activeAnimatables.indexOf(this);if(a>-1){let s=this._runtimeAnimations;for(let i=s.length-1;i>=0;i--){let n=s[i];(!t||n.animation.name==t)&&(!e||e(n.target))&&(n.dispose(),s.splice(i,1))}0==s.length&&(i||this._scene._activeAnimatables.splice(a,1),n||this._raiseOnAnimationEnd())}}else{let t=this._scene._activeAnimatables.indexOf(this);if(t>-1){i||this._scene._activeAnimatables.splice(t,1);let e=this._runtimeAnimations;for(let t=0;t<e.length;t++)e[t].dispose();this._runtimeAnimations.length=0,n||this._raiseOnAnimationEnd()}}}async waitAsync(){return await new Promise(t=>{this.onAnimationEndObservable.add(()=>{t(this)},void 0,void 0,this,!0)})}_animate(t){let e;if(this._paused)return this.animationStarted=!1,null===this._pausedDelay&&(this._pausedDelay=t),!0;if(null===this._localDelayOffset?(this._localDelayOffset=t,this._pausedDelay=null):null!==this._pausedDelay&&(this._localDelayOffset+=t-this._pausedDelay,this._pausedDelay=null),null!==this._manualJumpDelay&&(this._localDelayOffset+=this.speedRatio<0?-this._manualJumpDelay:this._manualJumpDelay,this._manualJumpDelay=null,this._frameToSyncFromJump=null),this._goToFrame=null,!h.ProcessPausedAnimatables&&0===this._weight&&0===this._previousWeight)return!0;this._previousWeight=this._weight;let i=!1,n=this._runtimeAnimations;for(e=0;e<n.length;e++){let a=n[e].animate(t-this._localDelayOffset,this.fromFrame,this.toFrame,this.loopAnimation,this._speedRatio,this._weight);i=i||a}if(this.animationStarted=i,!i){if(this.disposeOnEnd)for(e=this._scene._activeAnimatables.indexOf(this),this._scene._activeAnimatables.splice(e,1),e=0;e<n.length;e++)n[e].dispose();this._raiseOnAnimationEnd(),this.disposeOnEnd&&(this.onAnimationEnd=null,this.onAnimationLoop=null,this.onAnimationLoopObservable.clear(),this.onAnimationEndObservable.clear())}return i}}h.ProcessPausedAnimatables=!1;var m=t.i(14975),_=t.i(56770);let g=!1;g=!0,e=_.Scene,(i=m.Bone)&&(i.prototype.copyAnimationRange=function(t,e,i,n=!1,a=null){let s,r,l;0===this.animations.length&&(this.animations.push(new o.Animation(this.name,"_matrix",t.animations[0].framePerSecond,o.Animation.ANIMATIONTYPE_MATRIX,0)),this.animations[0].setKeys([]));let h=t.animations[0].getRange(e);if(!h)return!1;let m=h.from,_=h.to,g=t.animations[0].getKeys(),u=t.length,d=t.getParent(),p=this.getParent(),A=n&&d&&u&&this.length&&u!==this.length,c=A&&p&&d?p.length/d.length:1,f=n&&!p&&a&&(1!==a.x||1!==a.y||1!==a.z),b=this.animations[0].getKeys();for(let t=0,e=g.length;t<e;t++)(s=g[t]).frame>=m&&s.frame<=_&&(n?(l=s.value.clone(),A?(r=l.getTranslation(),l.setTranslation(r.scaleInPlace(c))):f&&a?(r=l.getTranslation(),l.setTranslation(r.multiplyInPlace(a))):l=s.value):l=s.value,b.push({frame:s.frame+i,value:l}));return this.animations[0].createRange(e,m+i,_+i),!0}),e&&(e.prototype._animate=function(t){if(!this.animationsEnabled)return;let e=l.PrecisionDate.Now;if(!this._animationTimeLast){if(this._pendingData.length>0)return;this._animationTimeLast=e}this.deltaTime=void 0!==t?t:this.useConstantAnimationDeltaTime?16:(e-this._animationTimeLast)*this.animationTimeScale,this._animationTimeLast=e;let i=this._activeAnimatables;if(0===i.length)return;this._animationTime+=this.deltaTime;let n=this._animationTime;for(let t=0;t<i.length;t++){let e=i[t];!e._animate(n)&&e.disposeOnEnd&&t--}!function(t){if(t._registeredForLateAnimationBindings.length){for(let e=0;e<t._registeredForLateAnimationBindings.length;e++){let i=t._registeredForLateAnimationBindings.data[e];for(let t in i._lateAnimationHolders){let e=i._lateAnimationHolders[t],n=e.animations[0],a=e.originalValue;if(null==a)continue;let r=o.Animation.AllowMatrixDecomposeForInterpolation&&a.m,l=i[t];if(r)l=function(t){let e;if(0===t.totalWeight&&0===t.totalAdditiveWeight)return t.originalValue;let i=1,n=s.TmpVectors.Vector3[0],a=s.TmpVectors.Vector3[1],o=s.TmpVectors.Quaternion[0],r=0,l=t.animations[0],h=t.originalValue,m=!1;if(t.totalWeight<1)e=1-t.totalWeight,h.decompose(a,o,n);else{if(r=1,i=t.totalWeight,1==(e=l.weight/i))if(!t.totalAdditiveWeight)return l.currentValue;else m=!0;l.currentValue.decompose(a,o,n)}if(!m){a.scaleInPlace(e),n.scaleInPlace(e),o.scaleInPlace(e);for(let l=r;l<t.animations.length;l++){let r=t.animations[l];if(0===r.weight)continue;e=r.weight/i;let h=s.TmpVectors.Vector3[2],m=s.TmpVectors.Vector3[3],_=s.TmpVectors.Quaternion[1];r.currentValue.decompose(m,_,h),m.scaleAndAddToRef(e,a),_.scaleAndAddToRef(s.Quaternion.Dot(o,_)>0?e:-e,o),h.scaleAndAddToRef(e,n)}o.normalize()}for(let e=0;e<t.additiveAnimations.length;e++){let i=t.additiveAnimations[e];if(0===i.weight)continue;let r=s.TmpVectors.Vector3[2],l=s.TmpVectors.Vector3[3],h=s.TmpVectors.Quaternion[1];i.currentValue.decompose(l,h,r),l.multiplyToRef(a,l),s.Vector3.LerpToRef(a,l,i.weight,a),o.multiplyToRef(h,h),s.Quaternion.SlerpToRef(o,h,i.weight,o),r.scaleAndAddToRef(i.weight,n)}let _=l?l._animationState.workValue:s.TmpVectors.Matrix[0].clone();return s.Matrix.ComposeToRef(a,o,n,_),_}(e);else if(void 0!==a.w)l=function(t,e){if(0===t.totalWeight&&0===t.totalAdditiveWeight)return e;let i=t.animations[0],n=t.originalValue,a=e;if(0===t.totalWeight&&t.totalAdditiveWeight>0)a.copyFrom(n);else if(1===t.animations.length){if(s.Quaternion.SlerpToRef(n,i.currentValue,Math.min(1,t.totalWeight),a),0===t.totalAdditiveWeight)return a}else if(t.animations.length>1){let i,o,r=1;if(t.totalWeight<1){let e=1-t.totalWeight;o=[],(i=[]).push(n),o.push(e)}else{if(2===t.animations.length&&(s.Quaternion.SlerpToRef(t.animations[0].currentValue,t.animations[1].currentValue,t.animations[1].weight/t.totalWeight,e),0===t.totalAdditiveWeight))return e;i=[],o=[],r=t.totalWeight}for(let e=0;e<t.animations.length;e++){let n=t.animations[e];i.push(n.currentValue),o.push(n.weight/r)}let l=0;for(let t=0;t<i.length;){if(!t){s.Quaternion.SlerpToRef(i[t],i[t+1],o[t+1]/(o[t]+o[t+1]),e),a=e,l=o[t]+o[t+1],t+=2;continue}l+=o[t],s.Quaternion.SlerpToRef(a,i[t],o[t]/l,a),t++}}for(let e=0;e<t.additiveAnimations.length;e++){let i=t.additiveAnimations[e];0!==i.weight&&(a.multiplyToRef(i.currentValue,s.TmpVectors.Quaternion[0]),s.Quaternion.SlerpToRef(a,s.TmpVectors.Quaternion[0],i.weight,a))}return a}(e,l||s.Quaternion.Identity());else{let t=0,i=1,s=n&&n._animationState.loopMode===o.Animation.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT;if(e.totalWeight<1)l=s?a.clone?a.clone():a:n&&a.scale?a.scale(1-e.totalWeight):n?a*(1-e.totalWeight):a.clone?a.clone():a;else if(n){i=e.totalWeight;let o=n.weight/i;l=1!==o?n.currentValue.scale?n.currentValue.scale(o):n.currentValue*o:n.currentValue,s&&(l.addToRef?l.addToRef(a,l):l+=a),t=1}for(let n=t;n<e.animations.length;n++){let t=e.animations[n],a=t.weight/i;a&&(t.currentValue.scaleAndAddToRef?t.currentValue.scaleAndAddToRef(a,l):l+=t.currentValue*a)}for(let t=0;t<e.additiveAnimations.length;t++){let i=e.additiveAnimations[t],n=i.weight;n&&(i.currentValue.scaleAndAddToRef?i.currentValue.scaleAndAddToRef(n,l):l+=i.currentValue*n)}}i[t]=l}i._lateAnimationHolders={}}t._registeredForLateAnimationBindings.reset()}}(this)},e.prototype.sortActiveAnimatables=function(){this._activeAnimatables.sort((t,e)=>t.playOrder-e.playOrder)},e.prototype.beginWeightedAnimation=function(t,e,i,n=1,a,s=1,o,r,l,h,m=!1){let _=this.beginAnimation(t,e,i,a,s,o,r,!1,l,h,m);return _.weight=n,_},e.prototype.beginAnimation=function(t,e,i,n,a=1,s,o,r=!0,l,m,_=!1){if(a<0){let t=e;e=i,i=t,a=-a}e>i&&(a=-a),r&&this.stopAnimation(t,void 0,l),o||(o=new h(this,t,e,i,n,a,s,void 0,m,_));let g=!l||l(t);if(t.animations&&g&&o.appendAnimations(t,t.animations),t.getAnimatables){let h=t.getAnimatables();for(let t=0;t<h.length;t++)this.beginAnimation(h[t],e,i,n,a,s,o,r,l,m)}return o.reset(),o},e.prototype.beginHierarchyAnimation=function(t,e,i,n,a,s=1,o,r,l=!0,h,m,_=!1){let g=t.getDescendants(e),u=[];for(let e of(u.push(this.beginAnimation(t,i,n,a,s,o,r,l,h,void 0,_)),g))u.push(this.beginAnimation(e,i,n,a,s,o,r,l,h,void 0,_));return u},e.prototype.beginDirectAnimation=function(t,e,i,n,a,s=1,o,r,l=!1){if(s<0){let t=i;i=n,n=t,s=-s}return i>n&&(s=-s),new h(this,t,i,n,a,s,o,e,r,l)},e.prototype.beginDirectHierarchyAnimation=function(t,e,i,n,a,s,o,r,l,h=!1){let m=t.getDescendants(e),_=[];for(let e of(_.push(this.beginDirectAnimation(t,i,n,a,s,o,r,l,h)),m))_.push(this.beginDirectAnimation(e,i,n,a,s,o,r,l,h));return _},e.prototype.getAnimatableByTarget=function(t){for(let e=0;e<this._activeAnimatables.length;e++)if(this._activeAnimatables[e].target===t)return this._activeAnimatables[e];return null},e.prototype.getAllAnimatablesByTarget=function(t){let e=[];for(let i=0;i<this._activeAnimatables.length;i++)this._activeAnimatables[i].target===t&&e.push(this._activeAnimatables[i]);return e},e.prototype.stopAnimation=function(t,e,i){for(let n of this.getAllAnimatablesByTarget(t))n.stop(e,i)},e.prototype.stopAllAnimations=function(){if(this._activeAnimatables){for(let t=0;t<this._activeAnimatables.length;t++)this._activeAnimatables[t].stop(void 0,void 0,!0);this._activeAnimatables.length=0}for(let t of this.animationGroups)t.stop()}),(0,n.RegisterAnimationGroup)(),t.s([],45959)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27116,t=>{"use strict";var e=t.i(82531),i=t.i(82350);let s="cachedOperationValue",r="cachedExecutionId";class a extends e.FlowGraphBlock{constructor(t,e){super(e),this.value=this.registerDataOutput("value",t),this.isValid=this.registerDataOutput("isValid",i.RichTypeBoolean)}_updateOutputs(t){let e=t._getExecutionVariable(this,r,-1),i=t._getExecutionVariable(this,s,null);if(null!=i&&e===t.executionId)this.isValid.setValue(!0,t),this.value.setValue(i,t);else try{let e=this._doOperation(t);if(null==e)return void this.isValid.setValue(!1,t);t._setExecutionVariable(this,s,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,a])},90546,t=>{"use strict";var e=t.i(82350),i=t.i(27116),s=t.i(48477);class r extends i.FlowGraphCachedOperationBlock{constructor(t){super(e.RichTypeAny,t),this.config=t,this.object=this.registerDataInput("object",e.RichTypeAny,t.object),this.propertyName=this.registerDataInput("propertyName",e.RichTypeString,t.propertyName),this.customGetFunction=this.registerDataInput("customGetFunction",e.RichTypeAny)}_doOperation(t){let e,i=this.customGetFunction.getValue(t);if(i)e=i(this.object.getValue(t),this.propertyName.getValue(t),t);else{let i=this.object.getValue(t),s=this.propertyName.getValue(t);e=i&&s?this._getPropertyValue(i,s):void 0}return e}_getPropertyValue(t,e){let i=e.split("."),s=t;for(let t of i)if(void 0===(s=s[t]))return;return s}getClassName(){return"FlowGraphGetPropertyBlock"}}let a=!1;function o(){a||(a=!0,(0,s.RegisterClass)("FlowGraphGetPropertyBlock",r))}t.s(["FlowGraphGetPropertyBlock",0,r,"RegisterFlowGraphGetPropertyBlock",0,o],89108),o(),t.s([],60495),t.i(60495),t.i(89108),t.s(["FlowGraphGetPropertyBlock",0,r],90546)}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1609,e=>{"use strict";var r=e.i(1719);let o="helperFunctions",a=`const float PI=3.1415926535897932384626433832795;const float TWO_PI=6.283185307179586;const float HALF_PI=1.5707963267948966;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float RECIPROCAL_PI4=0.07957747154594767;const float HALF_MIN=5.96046448e-08;
|
|
2
2
|
const float LinearEncodePowerApprox=2.2;const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);const float Epsilon=0.0000001;
|
|
3
3
|
#define saturate(x) clamp(x,0.0,1.0)
|
|
4
4
|
#define absEps(x) abs(x)+Epsilon
|
|
@@ -116,7 +116,7 @@ float uint2float(uint i) {return uintBitsToFloat(0x3F800000u | (i>>9u))-1.0;}
|
|
|
116
116
|
vec2 plasticSequence(const uint rstate) {return vec2(uint2float(rstate*3242174889u),
|
|
117
117
|
uint2float(rstate*2447445414u));}
|
|
118
118
|
#endif
|
|
119
|
-
`;r.ShaderStore.IncludesShadersStore[o]||(r.ShaderStore.IncludesShadersStore[o]=a),e.s(["helperFunctions",0,{name:o,shader:a}])},
|
|
119
|
+
`;r.ShaderStore.IncludesShadersStore[o]||(r.ShaderStore.IncludesShadersStore[o]=a),e.s(["helperFunctions",0,{name:o,shader:a}])},93822,e=>{"use strict";var r=e.i(1719),o=e.i(1609);let a="rgbdDecodePixelShader",t=`varying vec2 vUV;uniform sampler2D textureSampler;
|
|
120
120
|
#include<helperFunctions>
|
|
121
121
|
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
122
122
|
void main(void)
|