@incodetech/core 0.0.0-dev-20260714-324b5b5f → 0.0.0-dev-20260715-a93e8b97

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.
Files changed (282) hide show
  1. package/dist/{3dAvatarProvider-CjCu0kkb.esm.js → 3dAvatarProvider-D9H4rR6_.esm.js} +811 -880
  2. package/dist/Actor-iTq7YY48.d.ts +1 -0
  3. package/dist/{BrowserStorageProvider-CBXGCHnK.esm.js → BrowserStorageProvider-P6aUarE9.esm.js} +1 -2
  4. package/dist/{BrowserTimerProvider-CHloo0eQ.esm.js → BrowserTimerProvider-BXhgNxLt.esm.js} +1 -2
  5. package/dist/{BrowserVisibilityObserverProvider-B04zvOXW.esm.js → BrowserVisibilityObserverProvider-sJclps4C.esm.js} +1 -3
  6. package/dist/{Face2DProvider-BHP2bgkR.esm.js → Face2DProvider-xWUeSJZI.esm.js} +10 -22
  7. package/dist/{createFaceAvatar-v31npknQ.d.ts → FaceDetectionProvider-BHweGBEM.d.ts} +108 -159
  8. package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +23 -0
  9. package/dist/IStorageCapability-B8IGxCwe.d.ts +131 -0
  10. package/dist/{ITimerCapability-G7lQg-be.esm.js → ITimerCapability-DgdDzp8G.esm.js} +1 -2
  11. package/dist/{Manager-D4FerOEH.d.ts → Manager-CQQ99QOI.d.ts} +1 -0
  12. package/dist/{MotionSensorProvider-BkHKMCPE.esm.js → MotionSensorProvider-DYvM90IX.esm.js} +1 -2
  13. package/dist/{OpenViduRecordingProvider-DBD6mCgy.esm.js → OpenViduRecordingProvider-Du98qevC.esm.js} +2 -4
  14. package/dist/{PrivacyLensProvider-DdNBghgC.esm.js → PrivacyLensProvider-BrYSd1dr.esm.js} +2 -5
  15. package/dist/StateMachine-EDpYWy0i.d.ts +6 -0
  16. package/dist/{StreamCanvasCapture-CRk7c7u7.esm.js → StreamCanvasCapture-D2XcXCZ4.esm.js} +2 -4
  17. package/dist/{WasmUtilProvider-BNQ2PBjG.esm.js → WasmUtilProvider-DAshwHhX.esm.js} +38 -71
  18. package/dist/{addressSearch-B2NxSpHl.esm.js → addressSearch-DH-IPF-w.esm.js} +10 -21
  19. package/dist/ae-signature.d.ts +2 -6
  20. package/dist/ae-signature.esm.js +10 -11
  21. package/dist/antifraud.d.ts +1 -6
  22. package/dist/antifraud.esm.js +3 -8
  23. package/dist/{antifraudManager-Cb7V8LfR.d.ts → antifraudManager-BY36bS12.d.ts} +3 -3
  24. package/dist/{antifraudManager-C1xnhF2Q.esm.js → antifraudManager-CL2YhiVX.esm.js} +11 -8
  25. package/dist/{antifraudStateMachine-BQVw46N5.esm.js → antifraudStateMachine-Bf-IiCq7.esm.js} +5 -7
  26. package/dist/{api-DsbUi7TO.esm.js → api-BDTZNnca.esm.js} +1 -2
  27. package/dist/{apiError-DkOXfFBu.esm.js → apiError-COvIGYWe.esm.js} +1 -2
  28. package/dist/authentication.d.ts +2 -19
  29. package/dist/authentication.esm.js +3 -34
  30. package/dist/{authenticationManager-DmPg9VgS.esm.js → authenticationManager-BjnJUZ7F.esm.js} +7 -10
  31. package/dist/{authenticationManager-DrjNztmP.d.ts → authenticationManager-G-k-13Fe.d.ts} +3 -4
  32. package/dist/{authenticationStateMachine-Cdoy3vJD.esm.js → authenticationStateMachine-BHDR91Bt.esm.js} +11 -15
  33. package/dist/avatar.d.ts +2 -2
  34. package/dist/avatar.esm.js +2 -3
  35. package/dist/{backCameraStream-DYnfq7Hr.esm.js → backCameraStream-Heg6vA1j.esm.js} +4 -7
  36. package/dist/browser-DlFgHpoC-DnyrCR8r.esm.js +1513 -0
  37. package/dist/callback-645_omgz.d.ts +133 -0
  38. package/dist/{camera-B0yWS33x.esm.js → camera-BmFEyPP_.esm.js} +1 -2
  39. package/dist/camera.d.ts +1 -2
  40. package/dist/camera.esm.js +2 -6
  41. package/dist/{canvas-DsJa51yU.esm.js → canvas-E1zGkel4.esm.js} +1 -2
  42. package/dist/certificate-issuance.d.ts +34 -39
  43. package/dist/certificate-issuance.esm.js +4 -11
  44. package/dist/{certificateIssuanceStateMachine-CpewPqas.esm.js → certificateIssuanceStateMachine-Ce568YfR.esm.js} +7 -11
  45. package/dist/{clientLifecycle-CCJMDjFe.esm.js → clientLifecycle-DzT65Fvf.esm.js} +23 -29
  46. package/dist/consent.d.ts +1 -4
  47. package/dist/consent.esm.js +3 -8
  48. package/dist/{consentManager-r4MTIoV3.esm.js → consentManager-D3GyyH5u.esm.js} +5 -7
  49. package/dist/{consentManager-Bguy13dF.d.ts → consentManager-yCbkXL97.d.ts} +63 -69
  50. package/dist/{consentStateMachine-DnqwsZ7o.esm.js → consentStateMachine-Pc3Ez3mV.esm.js} +5 -7
  51. package/dist/{cpf-B9htWzDt.esm.js → cpf-BIADjddF.esm.js} +1 -2
  52. package/dist/cpf-ocr.d.ts +1 -5
  53. package/dist/cpf-ocr.esm.js +2 -8
  54. package/dist/{cpfOcrManager-CYRwoqZp.d.ts → cpfOcrManager-CQkUAeWO.d.ts} +21 -23
  55. package/dist/{cpfOcrManager-D6ZQ9kkv.esm.js → cpfOcrManager-Cwm0MesJ.esm.js} +7 -12
  56. package/dist/createFaceAvatar-BEj18KXi.d.ts +50 -0
  57. package/dist/{createFaceAvatar-B3VyVrXD.esm.js → createFaceAvatar-CwVapQiu.esm.js} +5 -9
  58. package/dist/cross-document-data-match.d.ts +1 -5
  59. package/dist/cross-document-data-match.esm.js +2 -8
  60. package/dist/{crossDocumentDataMatchManager-DoFG_S91.esm.js → crossDocumentDataMatchManager-9rdIO8Qk.esm.js} +12 -12
  61. package/dist/{crossDocumentDataMatchManager-CnHoAGC7.d.ts → crossDocumentDataMatchManager-Dq8Z3SOg.d.ts} +3 -3
  62. package/dist/curp-validation.d.ts +1 -11
  63. package/dist/curp-validation.esm.js +3 -8
  64. package/dist/{curpValidationManager-CeEgDRDi.d.ts → curpValidationManager--HSBTwOy.d.ts} +4 -6
  65. package/dist/{curpValidationManager-D6jt1Gs9.esm.js → curpValidationManager-C2i9Lzx9.esm.js} +11 -7
  66. package/dist/{curpValidationStateMachine-Dlw4qfFb.esm.js → curpValidationStateMachine-7i3TD8J2.esm.js} +22 -14
  67. package/dist/custom-fields.d.ts +2 -5
  68. package/dist/custom-fields.esm.js +24 -11
  69. package/dist/custom-watchlist.d.ts +1 -3
  70. package/dist/custom-watchlist.esm.js +11 -10
  71. package/dist/{customWatchlistStateMachine-D8w0mNxm.esm.js → customWatchlistStateMachine-D23XTxl2.esm.js} +5 -7
  72. package/dist/{dateUtils-BW6mBV6p.esm.js → dateUtils-CvG0FvK8.esm.js} +1 -2
  73. package/dist/{deepsightService-CV1NAkg9.esm.js → deepsightLoader-BHZHj5YL.esm.js} +62 -14
  74. package/dist/deepsightService-CR-CYdka.d.ts +218 -0
  75. package/dist/device.d.ts +0 -1
  76. package/dist/device.esm.js +5 -10
  77. package/dist/document-capture.d.ts +1 -6
  78. package/dist/document-capture.esm.js +3 -16
  79. package/dist/document-upload.d.ts +48 -55
  80. package/dist/document-upload.esm.js +8 -14
  81. package/dist/{documentCaptureManager-pufyUaQz.esm.js → documentCaptureManager-DijbJFun.esm.js} +5 -7
  82. package/dist/{documentCaptureManager-Bq-w6I9V.d.ts → documentCaptureManager-zMtVz5_U.d.ts} +239 -248
  83. package/dist/{documentCaptureStateMachine-CaJgb_Vn.esm.js → documentCaptureStateMachine-qgsrlcVh.esm.js} +11 -15
  84. package/dist/dynamic-forms.d.ts +1 -4
  85. package/dist/dynamic-forms.esm.js +3 -10
  86. package/dist/{dynamicFormsManager-C3jlNlWK.esm.js → dynamicFormsManager-COik5bJ7.esm.js} +41 -7
  87. package/dist/{dynamicFormsManager-DSNMQlC3.d.ts → dynamicFormsManager-Dposae2l.d.ts} +3 -4
  88. package/dist/{dynamicFormsStateMachine-DdpJI6ne.esm.js → dynamicFormsStateMachine-BV-Fn13x.esm.js} +7 -11
  89. package/dist/ekyb.d.ts +4 -137
  90. package/dist/ekyb.esm.js +3 -179
  91. package/dist/ekybManager-CBX0tM04.d.ts +159 -0
  92. package/dist/ekybManager-Crvx8Zvi.esm.js +178 -0
  93. package/dist/{ekybStateMachine-BFc8dP4s.esm.js → ekybStateMachine-BS2Lk7wc.esm.js} +16 -25
  94. package/dist/ekyc.d.ts +2 -7
  95. package/dist/ekyc.esm.js +3 -11
  96. package/dist/{ekycManager-KcUwIdYs.d.ts → ekycManager-BFpHbBoT.d.ts} +4 -5
  97. package/dist/{ekycManager-thjwh_uT.esm.js → ekycManager-BSMlIpGA.esm.js} +14 -7
  98. package/dist/{ekycStateMachine-66T_0Hhx.esm.js → ekycStateMachine-a7oP-XWo.esm.js} +140 -201
  99. package/dist/electronic-signature.d.ts +2 -5
  100. package/dist/electronic-signature.esm.js +2 -10
  101. package/dist/{electronicSignatureManager-CzMj-Tjm.esm.js → electronicSignatureManager-DSZu9OHT.esm.js} +9 -14
  102. package/dist/email.d.ts +1 -5
  103. package/dist/email.esm.js +3 -10
  104. package/dist/{emailManager-BW2hseKJ.d.ts → emailManager-CADXW_9X.d.ts} +4 -7
  105. package/dist/{emailManager-DOA8AXYQ.esm.js → emailManager-c-mDLieD.esm.js} +76 -12
  106. package/dist/{emailStateMachine-B2MptyiU.esm.js → emailStateMachine-ChNwY22u.esm.js} +7 -9
  107. package/dist/{endpoints-CwrFQfW7.esm.js → endpoints-DLQ0g4-R.esm.js} +33 -2
  108. package/dist/{events-aeCkGlnn.esm.js → events-Dy8PyVO5.esm.js} +4 -168
  109. package/dist/events.d.ts +1 -9
  110. package/dist/events.esm.js +2 -4
  111. package/dist/extensibility.d.ts +31 -42
  112. package/dist/extensibility.esm.js +29 -83
  113. package/dist/{externalFetch-hvmz_npP.esm.js → externalFetch-BKBThAUC.esm.js} +2 -4
  114. package/dist/face-match.d.ts +1 -5
  115. package/dist/face-match.esm.js +3 -8
  116. package/dist/{faceCaptureManagerFactory-B-xH9qFE.d.ts → faceCaptureManagerFactory-BWD3O4Eg.d.ts} +50 -14
  117. package/dist/{faceCaptureManagerFactory-CaZrDuyt.esm.js → faceCaptureManagerFactory-Dg2k8SHH.esm.js} +49 -28
  118. package/dist/{faceCaptureSetup-tS-cBPM-.esm.js → faceCaptureSetup-IySY5GWV.esm.js} +12 -15
  119. package/dist/{faceMatchManager-z7hbiLBH.esm.js → faceMatchManager-B7jlv77Q.esm.js} +24 -7
  120. package/dist/{faceMatchManager-D3vnftrf.d.ts → faceMatchManager-CJQG1W1u.d.ts} +4 -4
  121. package/dist/{faceMatchStateMachine-R89dO4W8.esm.js → faceMatchStateMachine-DD7FxtUj.esm.js} +6 -9
  122. package/dist/field-comparison.d.ts +1 -4
  123. package/dist/field-comparison.esm.js +2 -7
  124. package/dist/{fieldComparisonManager-D3ii0cu6.esm.js → fieldComparisonManager-5LlxYad-.esm.js} +6 -11
  125. package/dist/{fieldComparisonManager-r99cyWRu.d.ts → fieldComparisonManager-CBvEGxFx.d.ts} +3 -5
  126. package/dist/fiscal-qr.d.ts +1 -6
  127. package/dist/fiscal-qr.esm.js +14 -29
  128. package/dist/flow-events.d.ts +2 -9
  129. package/dist/flow.d.ts +13 -19
  130. package/dist/flow.esm.js +109 -34
  131. package/dist/{flowCompletionService-CmLw0M5w.esm.js → flowCompletionService-DQSC7Kso.esm.js} +4 -6
  132. package/dist/{flowServices-DJ9JHUL7.esm.js → flowServices-DsJYCiwe.esm.js} +10 -11
  133. package/dist/geolocation.d.ts +1 -4
  134. package/dist/geolocation.esm.js +3 -9
  135. package/dist/{geolocationManager-DC_bGi5H.d.ts → geolocationManager-BWhRzBjk.d.ts} +3 -4
  136. package/dist/{geolocationManager-nxDgjkIR.esm.js → geolocationManager-D58ehBHU.esm.js} +19 -8
  137. package/dist/{geolocationStateMachine-ZsXToaEg.esm.js → geolocationStateMachine-BorcBNZ6.esm.js} +6 -8
  138. package/dist/getBrowser-Cb8Zgrgp.esm.js +7 -0
  139. package/dist/{getDeviceClass-BdgmyOOu.esm.js → getDeviceClass-CeBiEayS.esm.js} +1 -2
  140. package/dist/{getDeviceClass-DsNb6nEl.esm.js → getDeviceClass-CkgnSJel.esm.js} +3 -5
  141. package/dist/{getBrowser-CZ66VtC7.esm.js → getParsedUserAgent-pJjATANs.esm.js} +109 -30
  142. package/dist/government-validation.d.ts +3 -6
  143. package/dist/government-validation.esm.js +7 -13
  144. package/dist/{governmentValidationStateMachine-RUvohGIS.esm.js → governmentValidationStateMachine-DkakcwTj.esm.js} +8 -11
  145. package/dist/home.d.ts +14 -22
  146. package/dist/home.esm.js +3 -8
  147. package/dist/http.d.ts +0 -1
  148. package/dist/http.esm.js +2 -4
  149. package/dist/id-ocr.d.ts +1 -5
  150. package/dist/id-ocr.esm.js +3 -9
  151. package/dist/id-verification.d.ts +1 -4
  152. package/dist/id-verification.esm.js +3 -8
  153. package/dist/id.d.ts +105 -18
  154. package/dist/id.esm.js +40 -50
  155. package/dist/{idCaptureDefaults-BRzPff0h.esm.js → idCaptureDefaults-Dzfws4i0.esm.js} +9 -16
  156. package/dist/{idCaptureManager-CzyKv7x6.d.ts → idCaptureManager-CSGbGORT.d.ts} +12 -113
  157. package/dist/{idCaptureManager-CYB66p05.esm.js → idCaptureManager-DCY4xeZq.esm.js} +117 -23
  158. package/dist/{idCaptureStateMachine-DvVBwX8W.esm.js → idCaptureStateMachine-BmWTK_71.esm.js} +56 -195
  159. package/dist/{idOcrManager--cuvWT7w.esm.js → idOcrManager-niAg-BE0.esm.js} +4 -7
  160. package/dist/{idOcrManager-xoiz0VTM.d.ts → idOcrManager-vXa7GdRh.d.ts} +60 -66
  161. package/dist/{idOcrStateMachine-BUpCUsFQ.esm.js → idOcrStateMachine-CpZZL411.esm.js} +13 -18
  162. package/dist/{idVerificationManager-CJU8hWW7.d.ts → idVerificationManager-BB4Pj_N6.d.ts} +31 -35
  163. package/dist/{idVerificationManager-BhAwLh2D.esm.js → idVerificationManager-CujJqsiX.esm.js} +4 -7
  164. package/dist/{idVerificationStateMachine-BM9O-8Ef.esm.js → idVerificationStateMachine-D-1GlgC5.esm.js} +5 -7
  165. package/dist/identity-reuse.d.ts +1 -4
  166. package/dist/identity-reuse.esm.js +3 -8
  167. package/dist/{identityReuseManager-CsfUX8Dn.d.ts → identityReuseManager-D6pD4hcZ.d.ts} +38 -43
  168. package/dist/{identityReuseManager-BHdQQJ5P.esm.js → identityReuseManager-DHfJZTVo.esm.js} +24 -7
  169. package/dist/{identityReuseStateMachine-9A4J3lOb.esm.js → identityReuseStateMachine-CM45EBrb.esm.js} +6 -8
  170. package/dist/index-B8weJxmL.d.ts +1 -0
  171. package/dist/index-BKOWUhxG.d.ts +258 -0
  172. package/dist/{index-B7ULcS1Z.d.ts → index-CKbmDFNq.d.ts} +160 -165
  173. package/dist/{index-BTIELBrO.d.ts → index-DQ2fdqoI.d.ts} +3 -3
  174. package/dist/index.d.ts +1 -3
  175. package/dist/index.esm.js +2 -15
  176. package/dist/{invokeOnCaptureCallback-C1cpCmPj.esm.js → invokeOnCaptureCallback-B-QfsCQY.esm.js} +2 -4
  177. package/dist/{lib-DQrpzNM-.esm.js → lib-DAyUtOTj.esm.js} +1510 -1589
  178. package/dist/mandatory-consent.d.ts +1 -10
  179. package/dist/mandatory-consent.esm.js +3 -8
  180. package/dist/{mandatoryConsentManager-DOcK1k6q.esm.js → mandatoryConsentManager-CQC-zA4P.esm.js} +4 -7
  181. package/dist/{mandatoryConsentManager-B6UkLbPK.d.ts → mandatoryConsentManager-PO3w2Drz.d.ts} +59 -65
  182. package/dist/{mandatoryConsentStateMachine-HU0NnLsD.esm.js → mandatoryConsentStateMachine-BN4Obfl7.esm.js} +5 -7
  183. package/dist/{mediaRecorderOptions-BIn657lu.esm.js → mediaRecorderOptions-BhSZDDNb.esm.js} +2 -4
  184. package/dist/{mediapipeShared-Bk_3uEgM.esm.js → mediapipeShared-B0iQQ5k7.esm.js} +2 -6
  185. package/dist/{onDeviceFaceResults-DZ1DdAUQ.esm.js → onDeviceFaceResults-bMkSjnEw.esm.js} +18 -84
  186. package/dist/openviduLazy-CCDpFWg1.esm.js +10 -0
  187. package/dist/{otp-Cc9mVS4s.d.ts → otp-CEWfTj9v.d.ts} +0 -1
  188. package/dist/{otp-Bfnzf7I3.esm.js → otp-D2k3PeSL.esm.js} +3 -14
  189. package/dist/{permissionGuards-CayfS8OY.esm.js → permissionGuards-DguX5vFY.esm.js} +2 -4
  190. package/dist/{permissionServices-B7lD6fiG.esm.js → permissionServices-DwNCUB2I.esm.js} +4 -9
  191. package/dist/personhood.d.ts +13 -20
  192. package/dist/personhood.esm.js +153 -72
  193. package/dist/phone.d.ts +1 -5
  194. package/dist/phone.esm.js +3 -10
  195. package/dist/{phoneManager-DfcjlYoj.d.ts → phoneManager-BBU8Lq0O.d.ts} +4 -7
  196. package/dist/{phoneManager-C2hbNl_W.esm.js → phoneManager-KbcmjEeH.esm.js} +82 -12
  197. package/dist/{phoneStateMachine-ZaquBwPP.esm.js → phoneStateMachine-wDQtaT38.esm.js} +7 -9
  198. package/dist/{platform-BoeUeUrV.esm.js → platform-wmV7oTAJ.esm.js} +1 -9
  199. package/dist/qe-signature.d.ts +2 -6
  200. package/dist/qe-signature.esm.js +10 -11
  201. package/dist/{recordingService-JeiGqSH-.esm.js → recordingService-BkNxvoPo.esm.js} +15 -19
  202. package/dist/redirect-to-mobile.d.ts +1 -6
  203. package/dist/redirect-to-mobile.esm.js +3 -10
  204. package/dist/{redirectToMobileManager-CArNr2Fc.esm.js → redirectToMobileManager-EGXGKftv.esm.js} +25 -8
  205. package/dist/{redirectToMobileManager-BFf63F5S.d.ts → redirectToMobileManager-NVQM3o5P.d.ts} +3 -4
  206. package/dist/{redirectToMobileStateMachine-CFh7ch0g.esm.js → redirectToMobileStateMachine-D-8ipBq2.esm.js} +7 -9
  207. package/dist/rolldown-runtime-FZ4Itg2g.esm.js +42 -0
  208. package/dist/{runChildModule-DuSlT0xP.esm.js → runChildModule-Crz1nHwJ.esm.js} +5 -9
  209. package/dist/selfie.d.ts +7 -20
  210. package/dist/selfie.esm.js +40 -46
  211. package/dist/{selfieManager-CfKSPlLr.d.ts → selfieManager-CN8wJ14s.d.ts} +3 -4
  212. package/dist/{selfieManager-BjeZW2gH.esm.js → selfieManager-DGAmtI6G.esm.js} +7 -10
  213. package/dist/{selfieStateMachine-BBA0IGUj.esm.js → selfieStateMachine-n1wz3DyM.esm.js} +15 -20
  214. package/dist/selfieUploadService-B4LnSIf6.esm.js +62 -0
  215. package/dist/session-Q6nnQjxf.esm.js +1 -0
  216. package/dist/session.d.ts +2 -9
  217. package/dist/session.esm.js +153 -15
  218. package/dist/sessionInitializer-bJXy8nBC.esm.js +1801 -0
  219. package/dist/{setup-C9azSPgy.d.ts → setup-CgBvqGWw.d.ts} +2 -4
  220. package/dist/{setup-DANe2FE8.esm.js → setup-Do9V2eMX.esm.js} +126 -18
  221. package/dist/signature.d.ts +2 -6
  222. package/dist/signature.esm.js +6 -9
  223. package/dist/{signatureStateMachine-Bw615tMS.esm.js → signatureStateMachine-BmKPC5A9.esm.js} +5 -7
  224. package/dist/spawn-D9jgw9pW.d.ts +1441 -0
  225. package/dist/{stats-BVy52wLy.esm.js → stats-Bu6bL_CX.esm.js} +3 -5
  226. package/dist/stats.esm.js +2 -5
  227. package/dist/topLevelStateName-B5i2avbh.esm.js +41 -0
  228. package/dist/{tri-Cn0g8xLX.esm.js → tri-N-xlKhZK.esm.js} +3 -7
  229. package/dist/tri.d.ts +2 -2
  230. package/dist/tri.esm-BIjHhBJ2.esm.js +2620 -0
  231. package/dist/tri.esm.js +2 -4
  232. package/dist/trust-graph.d.ts +4 -5
  233. package/dist/trust-graph.esm.js +13 -9
  234. package/dist/{types-Db2ooXIu.esm.js → types-BN5RPPIZ.esm.js} +1 -2
  235. package/dist/{types-CHY2ZSXW.d.ts → types-BfgmV7s7.d.ts} +2 -2
  236. package/dist/{types-DhN4qd9T.d.ts → types-BnEHzP1K.d.ts} +3 -5
  237. package/dist/{types-Bq6I7Tbd.d.ts → types-Vb4P9ovf.d.ts} +1 -3
  238. package/dist/{types-CFx_SPaH.d.ts → types-ctqh-iS4.d.ts} +80 -6
  239. package/dist/{urlUtils-CpiYwn7w.esm.js → urlUtils-D6phjq1-.esm.js} +1 -2
  240. package/dist/{video-DXf5H9rY.esm.js → video-BtSWtHy1.esm.js} +1 -2
  241. package/dist/video-selfie.d.ts +8 -15
  242. package/dist/video-selfie.esm.js +77 -103
  243. package/dist/{videoSelfieSteps-DAky5sq5.esm.js → videoSelfieSteps-DHcibfYH.esm.js} +1 -2
  244. package/dist/wasm.d.ts +2 -4
  245. package/dist/wasm.esm.js +3 -15
  246. package/dist/watchlist-for-business.d.ts +1 -3
  247. package/dist/watchlist-for-business.esm.js +9 -9
  248. package/dist/watchlist.d.ts +1 -3
  249. package/dist/watchlist.esm.js +11 -10
  250. package/dist/{watchlistForBusinessStateMachine-wzZuYOIU.esm.js → watchlistForBusinessStateMachine-BC_-3fJs.esm.js} +5 -7
  251. package/dist/{watchlistStateMachine-C0fEH_Xu.esm.js → watchlistStateMachine-CL2j3aRl.esm.js} +5 -7
  252. package/dist/workflow.d.ts +127 -149
  253. package/dist/workflow.esm.js +75 -80
  254. package/dist/xstate-actors.esm-CtI5S0f4.esm.js +310 -0
  255. package/dist/{xstate.esm-nY3M5UYm.esm.js → xstate.esm-Cf4e0Cfd.esm.js} +136 -610
  256. package/package.json +4 -4
  257. package/dist/Actor-D__xf-S9.d.ts +0 -2
  258. package/dist/FaceDetectionProvider-sjxLCtCj.d.ts +0 -119
  259. package/dist/IWasmUtilCapability-67CL2B5T.d.ts +0 -150
  260. package/dist/StateMachine-IH5gwvRc.d.ts +0 -2
  261. package/dist/StreamCanvasCapture-B-gbqrCw.d.ts +0 -42
  262. package/dist/ae-signature-eQWjmzE8.esm.js +0 -12
  263. package/dist/browser-DlFgHpoC-71PTjAHo.esm.js +0 -1425
  264. package/dist/browserSimulation-CQjwFn0Z.esm.js +0 -1256
  265. package/dist/canvas-6lBxtuDn.d.ts +0 -112
  266. package/dist/chunk-CIKcdghV.esm.js +0 -49
  267. package/dist/deepsightLoader-D1JQF1f2.esm.js +0 -67
  268. package/dist/deepsightService-szDosYMr.d.ts +0 -69
  269. package/dist/http-Be7sLlwP.esm.js +0 -0
  270. package/dist/index-CmD84PXB.d.ts +0 -93
  271. package/dist/openviduLazy-C5QPlhKX.esm.js +0 -3
  272. package/dist/openviduLazy-Cv86aS2h.esm.js +0 -12
  273. package/dist/qe-signature-Ces-NrOq.esm.js +0 -12
  274. package/dist/session--C2lbjK5.esm.js +0 -152
  275. package/dist/sessionInitializer-BlxIyOag.esm.js +0 -548
  276. package/dist/tri.esm-DJDT0c68.esm.js +0 -2593
  277. /package/dist/{IVisibilityObserverCapability-BWiR2wii.d.ts → IVisibilityObserverCapability-D4tvIB5v.d.ts} +0 -0
  278. /package/dist/{camera-d1f2p-kb.d.ts → camera-9wWD-pwg.d.ts} +0 -0
  279. /package/dist/{flowCompletionService-oENcBdj6.d.ts → flowCompletionService-BlAHsKyv.d.ts} +0 -0
  280. /package/dist/{types-B6J7yeLF.d.ts → types-BT-aiBYV.d.ts} +0 -0
  281. /package/dist/{types-D54cpe17.d.ts → types-Bk_6dmDa.d.ts} +0 -0
  282. /package/dist/{warmup-6G-VPvwz.d.ts → warmup-Dv2alr2-.d.ts} +0 -0
@@ -1,75 +1,11 @@
1
- import { t as createHiddenVideoElement } from "./video-DXf5H9rY.esm.js";
2
- import { i as dtAlpha, n as asRvfc, r as createFaceLandmarker, t as MAX_EMA_DT_MS } from "./mediapipeShared-Bk_3uEgM.esm.js";
3
-
4
- //#region ../../node_modules/.pnpm/three@0.169.0/node_modules/three/build/three.module.js
1
+ import { t as createHiddenVideoElement } from "./video-BtSWtHy1.esm.js";
2
+ import { n as createFaceLandmarker, r as dtAlpha, t as asRvfc } from "./mediapipeShared-B0iQQ5k7.esm.js";
5
3
  /**
6
4
  * @license
7
5
  * Copyright 2010-2024 Three.js Authors
8
6
  * SPDX-License-Identifier: MIT
9
7
  */
10
- const REVISION = "169";
11
- const CullFaceNone = 0;
12
- const CullFaceBack = 1;
13
- const CullFaceFront = 2;
14
- const PCFShadowMap = 1;
15
- const PCFSoftShadowMap = 2;
16
- const VSMShadowMap = 3;
17
- const FrontSide = 0;
18
- const BackSide = 1;
19
- const DoubleSide = 2;
20
- const NoBlending = 0;
21
- const NormalBlending = 1;
22
- const AdditiveBlending = 2;
23
- const SubtractiveBlending = 3;
24
- const MultiplyBlending = 4;
25
- const CustomBlending = 5;
26
- const AddEquation = 100;
27
- const SubtractEquation = 101;
28
- const ReverseSubtractEquation = 102;
29
- const MinEquation = 103;
30
- const MaxEquation = 104;
31
- const ZeroFactor = 200;
32
- const OneFactor = 201;
33
- const SrcColorFactor = 202;
34
- const OneMinusSrcColorFactor = 203;
35
- const SrcAlphaFactor = 204;
36
- const OneMinusSrcAlphaFactor = 205;
37
- const DstAlphaFactor = 206;
38
- const OneMinusDstAlphaFactor = 207;
39
- const DstColorFactor = 208;
40
- const OneMinusDstColorFactor = 209;
41
- const SrcAlphaSaturateFactor = 210;
42
- const ConstantColorFactor = 211;
43
- const OneMinusConstantColorFactor = 212;
44
- const ConstantAlphaFactor = 213;
45
- const OneMinusConstantAlphaFactor = 214;
46
- const NeverDepth = 0;
47
- const AlwaysDepth = 1;
48
- const LessDepth = 2;
49
- const LessEqualDepth = 3;
50
- const EqualDepth = 4;
51
- const GreaterEqualDepth = 5;
52
- const GreaterDepth = 6;
53
- const NotEqualDepth = 7;
54
- const MultiplyOperation = 0;
55
- const MixOperation = 1;
56
- const AddOperation = 2;
57
- const NoToneMapping = 0;
58
- const LinearToneMapping = 1;
59
- const ReinhardToneMapping = 2;
60
- const CineonToneMapping = 3;
61
- const ACESFilmicToneMapping = 4;
62
- const CustomToneMapping = 5;
63
- const AgXToneMapping = 6;
64
- const NeutralToneMapping = 7;
65
8
  const AttachedBindMode = "attached";
66
- const DetachedBindMode = "detached";
67
- const UVMapping = 300;
68
- const CubeReflectionMapping = 301;
69
- const CubeRefractionMapping = 302;
70
- const EquirectangularReflectionMapping = 303;
71
- const EquirectangularRefractionMapping = 304;
72
- const CubeUVReflectionMapping = 306;
73
9
  const RepeatWrapping = 1e3;
74
10
  const ClampToEdgeWrapping = 1001;
75
11
  const MirroredRepeatWrapping = 1002;
@@ -142,14 +78,8 @@ const ZeroCurvatureEnding = 2400;
142
78
  const ZeroSlopeEnding = 2401;
143
79
  const WrapAroundEnding = 2402;
144
80
  const NormalAnimationBlendMode = 2500;
145
- const TrianglesDrawMode = 0;
146
- const TriangleStripDrawMode = 1;
147
- const TriangleFanDrawMode = 2;
148
81
  const BasicDepthPacking = 3200;
149
82
  const RGBADepthPacking = 3201;
150
- const TangentSpaceNormalMap = 0;
151
- const ObjectSpaceNormalMap = 1;
152
- const NoColorSpace = "";
153
83
  const SRGBColorSpace = "srgb";
154
84
  const LinearSRGBColorSpace = "srgb-linear";
155
85
  const DisplayP3ColorSpace = "display-p3";
@@ -157,22 +87,10 @@ const LinearDisplayP3ColorSpace = "display-p3-linear";
157
87
  const LinearTransfer = "linear";
158
88
  const SRGBTransfer = "srgb";
159
89
  const Rec709Primaries = "rec709";
160
- const P3Primaries = "p3";
161
90
  const KeepStencilOp = 7680;
162
- const AlwaysStencilFunc = 519;
163
- const NeverCompare = 512;
164
- const LessCompare = 513;
165
- const EqualCompare = 514;
166
- const LessEqualCompare = 515;
167
- const GreaterCompare = 516;
168
- const NotEqualCompare = 517;
169
- const GreaterEqualCompare = 518;
170
- const AlwaysCompare = 519;
171
91
  const StaticDrawUsage = 35044;
172
92
  const DynamicDrawUsage = 35048;
173
- const GLSL3 = "300 es";
174
93
  const WebGLCoordinateSystem = 2e3;
175
- const WebGPUCoordinateSystem = 2001;
176
94
  /**
177
95
  * https://github.com/mrdoob/eventdispatcher.js/
178
96
  */
@@ -1089,7 +1007,7 @@ var Matrix3 = class Matrix3 {
1089
1007
  return new this.constructor().fromArray(this.elements);
1090
1008
  }
1091
1009
  };
1092
- const _m3 = /* @__PURE__ */ new Matrix3();
1010
+ const _m3 = /*@__PURE__*/ new Matrix3();
1093
1011
  function arrayNeedsUint32(array) {
1094
1012
  for (let i = array.length - 1; i >= 0; --i) if (array[i] >= 65535) return true;
1095
1013
  return false;
@@ -1152,8 +1070,8 @@ function toReversedProjectionMatrix(projectionMatrix) {
1152
1070
  * Reference:
1153
1071
  * - http://www.russellcottrell.com/photo/matrixCalculator.htm
1154
1072
  */
1155
- const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /* @__PURE__ */ new Matrix3().set(.8224621, .177538, 0, .0331941, .9668058, 0, .0170827, .0723974, .9105199);
1156
- const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /* @__PURE__ */ new Matrix3().set(1.2249401, -.2249404, 0, -.0420569, 1.0420571, 0, -.0196376, -.0786361, 1.0982735);
1073
+ const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new Matrix3().set(.8224621, .177538, 0, .0331941, .9668058, 0, .0170827, .0723974, .9105199);
1074
+ const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new Matrix3().set(1.2249401, -.2249404, 0, -.0420569, 1.0420571, 0, -.0196376, -.0786361, 1.0982735);
1157
1075
  /**
1158
1076
  * Defines supported color spaces by transfer function and primaries,
1159
1077
  * and provides conversions to/from the Linear-sRGB reference space.
@@ -1183,7 +1101,7 @@ const COLOR_SPACES = {
1183
1101
  },
1184
1102
  [LinearDisplayP3ColorSpace]: {
1185
1103
  transfer: LinearTransfer,
1186
- primaries: P3Primaries,
1104
+ primaries: "p3",
1187
1105
  luminanceCoefficients: [
1188
1106
  .2289,
1189
1107
  .6917,
@@ -1194,7 +1112,7 @@ const COLOR_SPACES = {
1194
1112
  },
1195
1113
  [DisplayP3ColorSpace]: {
1196
1114
  transfer: SRGBTransfer,
1197
- primaries: P3Primaries,
1115
+ primaries: "p3",
1198
1116
  luminanceCoefficients: [
1199
1117
  .2289,
1200
1118
  .6917,
@@ -1204,7 +1122,7 @@ const COLOR_SPACES = {
1204
1122
  fromReference: (color) => color.applyMatrix3(LINEAR_SRGB_TO_LINEAR_DISPLAY_P3).convertLinearToSRGB()
1205
1123
  }
1206
1124
  };
1207
- const SUPPORTED_WORKING_COLOR_SPACES = new Set([LinearSRGBColorSpace, LinearDisplayP3ColorSpace]);
1125
+ const SUPPORTED_WORKING_COLOR_SPACES = /* @__PURE__ */ new Set([LinearSRGBColorSpace, LinearDisplayP3ColorSpace]);
1208
1126
  const ColorManagement = {
1209
1127
  enabled: true,
1210
1128
  _workingColorSpace: LinearSRGBColorSpace,
@@ -1231,7 +1149,7 @@ const ColorManagement = {
1231
1149
  return COLOR_SPACES[colorSpace].primaries;
1232
1150
  },
1233
1151
  getTransfer: function(colorSpace) {
1234
- if (colorSpace === NoColorSpace) return LinearTransfer;
1152
+ if (colorSpace === "") return LinearTransfer;
1235
1153
  return COLOR_SPACES[colorSpace].transfer;
1236
1154
  },
1237
1155
  getLuminanceCoefficients: function(target, colorSpace = this._workingColorSpace) {
@@ -1341,7 +1259,7 @@ function serializeImage(image) {
1341
1259
  }
1342
1260
  let _textureId = 0;
1343
1261
  var Texture = class Texture extends EventDispatcher {
1344
- constructor(image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = Texture.DEFAULT_ANISOTROPY, colorSpace = NoColorSpace) {
1262
+ constructor(image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = Texture.DEFAULT_ANISOTROPY, colorSpace = "") {
1345
1263
  super();
1346
1264
  this.isTexture = true;
1347
1265
  Object.defineProperty(this, "id", { value: _textureId++ });
@@ -1456,7 +1374,7 @@ var Texture = class Texture extends EventDispatcher {
1456
1374
  this.dispatchEvent({ type: "dispose" });
1457
1375
  }
1458
1376
  transformUv(uv) {
1459
- if (this.mapping !== UVMapping) return uv;
1377
+ if (this.mapping !== 300) return uv;
1460
1378
  uv.applyMatrix3(this.matrix);
1461
1379
  if (uv.x < 0 || uv.x > 1) switch (this.wrapS) {
1462
1380
  case RepeatWrapping:
@@ -1496,7 +1414,7 @@ var Texture = class Texture extends EventDispatcher {
1496
1414
  }
1497
1415
  };
1498
1416
  Texture.DEFAULT_IMAGE = null;
1499
- Texture.DEFAULT_MAPPING = UVMapping;
1417
+ Texture.DEFAULT_MAPPING = 300;
1500
1418
  Texture.DEFAULT_ANISOTROPY = 1;
1501
1419
  var Vector4 = class Vector4 {
1502
1420
  constructor(x = 0, y = 0, z = 0, w = 1) {
@@ -2805,8 +2723,8 @@ var Vector3 = class Vector3 {
2805
2723
  yield this.z;
2806
2724
  }
2807
2725
  };
2808
- const _vector$c = /* @__PURE__ */ new Vector3();
2809
- const _quaternion$4 = /* @__PURE__ */ new Quaternion();
2726
+ const _vector$c = /*@__PURE__*/ new Vector3();
2727
+ const _quaternion$4 = /*@__PURE__*/ new Quaternion();
2810
2728
  var Box3 = class {
2811
2729
  constructor(min = new Vector3(Infinity, Infinity, Infinity), max = new Vector3(-Infinity, -Infinity, -Infinity)) {
2812
2730
  this.isBox3 = true;
@@ -3056,27 +2974,27 @@ var Box3 = class {
3056
2974
  }
3057
2975
  };
3058
2976
  const _points = [
3059
- /* @__PURE__ */ new Vector3(),
3060
- /* @__PURE__ */ new Vector3(),
3061
- /* @__PURE__ */ new Vector3(),
3062
- /* @__PURE__ */ new Vector3(),
3063
- /* @__PURE__ */ new Vector3(),
3064
- /* @__PURE__ */ new Vector3(),
3065
- /* @__PURE__ */ new Vector3(),
3066
- /* @__PURE__ */ new Vector3()
2977
+ /*@__PURE__*/ new Vector3(),
2978
+ /*@__PURE__*/ new Vector3(),
2979
+ /*@__PURE__*/ new Vector3(),
2980
+ /*@__PURE__*/ new Vector3(),
2981
+ /*@__PURE__*/ new Vector3(),
2982
+ /*@__PURE__*/ new Vector3(),
2983
+ /*@__PURE__*/ new Vector3(),
2984
+ /*@__PURE__*/ new Vector3()
3067
2985
  ];
3068
- const _vector$b = /* @__PURE__ */ new Vector3();
3069
- const _box$4 = /* @__PURE__ */ new Box3();
3070
- const _v0$3 = /* @__PURE__ */ new Vector3();
3071
- const _v1$7 = /* @__PURE__ */ new Vector3();
3072
- const _v2$4 = /* @__PURE__ */ new Vector3();
3073
- const _f0 = /* @__PURE__ */ new Vector3();
3074
- const _f1 = /* @__PURE__ */ new Vector3();
3075
- const _f2 = /* @__PURE__ */ new Vector3();
3076
- const _center = /* @__PURE__ */ new Vector3();
3077
- const _extents = /* @__PURE__ */ new Vector3();
3078
- const _triangleNormal = /* @__PURE__ */ new Vector3();
3079
- const _testAxis = /* @__PURE__ */ new Vector3();
2986
+ const _vector$b = /*@__PURE__*/ new Vector3();
2987
+ const _box$4 = /*@__PURE__*/ new Box3();
2988
+ const _v0$3 = /*@__PURE__*/ new Vector3();
2989
+ const _v1$7 = /*@__PURE__*/ new Vector3();
2990
+ const _v2$4 = /*@__PURE__*/ new Vector3();
2991
+ const _f0 = /*@__PURE__*/ new Vector3();
2992
+ const _f1 = /*@__PURE__*/ new Vector3();
2993
+ const _f2 = /*@__PURE__*/ new Vector3();
2994
+ const _center = /*@__PURE__*/ new Vector3();
2995
+ const _extents = /*@__PURE__*/ new Vector3();
2996
+ const _triangleNormal = /*@__PURE__*/ new Vector3();
2997
+ const _testAxis = /*@__PURE__*/ new Vector3();
3080
2998
  function satForAxes(axes, v0, v1, v2, extents) {
3081
2999
  for (let i = 0, j = axes.length - 3; i <= j; i += 3) {
3082
3000
  _testAxis.fromArray(axes, i);
@@ -3088,9 +3006,9 @@ function satForAxes(axes, v0, v1, v2, extents) {
3088
3006
  }
3089
3007
  return true;
3090
3008
  }
3091
- const _box$3 = /* @__PURE__ */ new Box3();
3092
- const _v1$6 = /* @__PURE__ */ new Vector3();
3093
- const _v2$3 = /* @__PURE__ */ new Vector3();
3009
+ const _box$3 = /*@__PURE__*/ new Box3();
3010
+ const _v1$6 = /*@__PURE__*/ new Vector3();
3011
+ const _v2$3 = /*@__PURE__*/ new Vector3();
3094
3012
  var Sphere = class {
3095
3013
  constructor(center = new Vector3(), radius = -1) {
3096
3014
  this.isSphere = true;
@@ -3204,13 +3122,13 @@ var Sphere = class {
3204
3122
  return new this.constructor().copy(this);
3205
3123
  }
3206
3124
  };
3207
- const _vector$a = /* @__PURE__ */ new Vector3();
3208
- const _segCenter = /* @__PURE__ */ new Vector3();
3209
- const _segDir = /* @__PURE__ */ new Vector3();
3210
- const _diff = /* @__PURE__ */ new Vector3();
3211
- const _edge1 = /* @__PURE__ */ new Vector3();
3212
- const _edge2 = /* @__PURE__ */ new Vector3();
3213
- const _normal$1 = /* @__PURE__ */ new Vector3();
3125
+ const _vector$a = /*@__PURE__*/ new Vector3();
3126
+ const _segCenter = /*@__PURE__*/ new Vector3();
3127
+ const _segDir = /*@__PURE__*/ new Vector3();
3128
+ const _diff = /*@__PURE__*/ new Vector3();
3129
+ const _edge1 = /*@__PURE__*/ new Vector3();
3130
+ const _edge2 = /*@__PURE__*/ new Vector3();
3131
+ const _normal$1 = /*@__PURE__*/ new Vector3();
3214
3132
  var Ray = class {
3215
3133
  constructor(origin = new Vector3(), direction = new Vector3(0, 0, -1)) {
3216
3134
  this.origin = origin;
@@ -3884,10 +3802,10 @@ var Matrix4 = class Matrix4 {
3884
3802
  const a = (right + left) / (right - left);
3885
3803
  const b = (top + bottom) / (top - bottom);
3886
3804
  let c, d;
3887
- if (coordinateSystem === WebGLCoordinateSystem) {
3805
+ if (coordinateSystem === 2e3) {
3888
3806
  c = -(far + near) / (far - near);
3889
3807
  d = -2 * far * near / (far - near);
3890
- } else if (coordinateSystem === WebGPUCoordinateSystem) {
3808
+ } else if (coordinateSystem === 2001) {
3891
3809
  c = -far / (far - near);
3892
3810
  d = -far * near / (far - near);
3893
3811
  } else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + coordinateSystem);
@@ -3917,10 +3835,10 @@ var Matrix4 = class Matrix4 {
3917
3835
  const x = (right + left) * w;
3918
3836
  const y = (top + bottom) * h;
3919
3837
  let z, zInv;
3920
- if (coordinateSystem === WebGLCoordinateSystem) {
3838
+ if (coordinateSystem === 2e3) {
3921
3839
  z = (far + near) * p;
3922
3840
  zInv = -2 * p;
3923
- } else if (coordinateSystem === WebGPUCoordinateSystem) {
3841
+ } else if (coordinateSystem === 2001) {
3924
3842
  z = near * p;
3925
3843
  zInv = -1 * p;
3926
3844
  } else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + coordinateSystem);
@@ -3973,15 +3891,15 @@ var Matrix4 = class Matrix4 {
3973
3891
  return array;
3974
3892
  }
3975
3893
  };
3976
- const _v1$5 = /* @__PURE__ */ new Vector3();
3977
- const _m1$4 = /* @__PURE__ */ new Matrix4();
3978
- const _zero = /* @__PURE__ */ new Vector3(0, 0, 0);
3979
- const _one = /* @__PURE__ */ new Vector3(1, 1, 1);
3980
- const _x = /* @__PURE__ */ new Vector3();
3981
- const _y = /* @__PURE__ */ new Vector3();
3982
- const _z = /* @__PURE__ */ new Vector3();
3983
- const _matrix$2 = /* @__PURE__ */ new Matrix4();
3984
- const _quaternion$3 = /* @__PURE__ */ new Quaternion();
3894
+ const _v1$5 = /*@__PURE__*/ new Vector3();
3895
+ const _m1$4 = /*@__PURE__*/ new Matrix4();
3896
+ const _zero = /*@__PURE__*/ new Vector3(0, 0, 0);
3897
+ const _one = /*@__PURE__*/ new Vector3(1, 1, 1);
3898
+ const _x = /*@__PURE__*/ new Vector3();
3899
+ const _y = /*@__PURE__*/ new Vector3();
3900
+ const _z = /*@__PURE__*/ new Vector3();
3901
+ const _matrix$2 = /*@__PURE__*/ new Matrix4();
3902
+ const _quaternion$3 = /*@__PURE__*/ new Quaternion();
3985
3903
  var Euler = class Euler {
3986
3904
  constructor(x = 0, y = 0, z = 0, order = Euler.DEFAULT_ORDER) {
3987
3905
  this.isEuler = true;
@@ -4181,16 +4099,16 @@ var Layers = class {
4181
4099
  }
4182
4100
  };
4183
4101
  let _object3DId = 0;
4184
- const _v1$4 = /* @__PURE__ */ new Vector3();
4185
- const _q1 = /* @__PURE__ */ new Quaternion();
4186
- const _m1$3 = /* @__PURE__ */ new Matrix4();
4187
- const _target = /* @__PURE__ */ new Vector3();
4188
- const _position$3 = /* @__PURE__ */ new Vector3();
4189
- const _scale$2 = /* @__PURE__ */ new Vector3();
4190
- const _quaternion$2 = /* @__PURE__ */ new Quaternion();
4191
- const _xAxis = /* @__PURE__ */ new Vector3(1, 0, 0);
4192
- const _yAxis = /* @__PURE__ */ new Vector3(0, 1, 0);
4193
- const _zAxis = /* @__PURE__ */ new Vector3(0, 0, 1);
4102
+ const _v1$4 = /*@__PURE__*/ new Vector3();
4103
+ const _q1 = /*@__PURE__*/ new Quaternion();
4104
+ const _m1$3 = /*@__PURE__*/ new Matrix4();
4105
+ const _target = /*@__PURE__*/ new Vector3();
4106
+ const _position$3 = /*@__PURE__*/ new Vector3();
4107
+ const _scale$2 = /*@__PURE__*/ new Vector3();
4108
+ const _quaternion$2 = /*@__PURE__*/ new Quaternion();
4109
+ const _xAxis = /*@__PURE__*/ new Vector3(1, 0, 0);
4110
+ const _yAxis = /*@__PURE__*/ new Vector3(0, 1, 0);
4111
+ const _zAxis = /*@__PURE__*/ new Vector3(0, 0, 1);
4194
4112
  const _addedEvent = { type: "added" };
4195
4113
  const _removedEvent = { type: "removed" };
4196
4114
  const _childaddedEvent = {
@@ -4666,22 +4584,22 @@ var Object3D = class Object3D extends EventDispatcher {
4666
4584
  return this;
4667
4585
  }
4668
4586
  };
4669
- Object3D.DEFAULT_UP = /* @__PURE__ */ new Vector3(0, 1, 0);
4587
+ Object3D.DEFAULT_UP = /*@__PURE__*/ new Vector3(0, 1, 0);
4670
4588
  Object3D.DEFAULT_MATRIX_AUTO_UPDATE = true;
4671
4589
  Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;
4672
- const _v0$2 = /* @__PURE__ */ new Vector3();
4673
- const _v1$3 = /* @__PURE__ */ new Vector3();
4674
- const _v2$2 = /* @__PURE__ */ new Vector3();
4675
- const _v3$2 = /* @__PURE__ */ new Vector3();
4676
- const _vab = /* @__PURE__ */ new Vector3();
4677
- const _vac = /* @__PURE__ */ new Vector3();
4678
- const _vbc = /* @__PURE__ */ new Vector3();
4679
- const _vap = /* @__PURE__ */ new Vector3();
4680
- const _vbp = /* @__PURE__ */ new Vector3();
4681
- const _vcp = /* @__PURE__ */ new Vector3();
4682
- const _v40 = /* @__PURE__ */ new Vector4();
4683
- const _v41 = /* @__PURE__ */ new Vector4();
4684
- const _v42 = /* @__PURE__ */ new Vector4();
4590
+ const _v0$2 = /*@__PURE__*/ new Vector3();
4591
+ const _v1$3 = /*@__PURE__*/ new Vector3();
4592
+ const _v2$2 = /*@__PURE__*/ new Vector3();
4593
+ const _v3$2 = /*@__PURE__*/ new Vector3();
4594
+ const _vab = /*@__PURE__*/ new Vector3();
4595
+ const _vac = /*@__PURE__*/ new Vector3();
4596
+ const _vbc = /*@__PURE__*/ new Vector3();
4597
+ const _vap = /*@__PURE__*/ new Vector3();
4598
+ const _vbp = /*@__PURE__*/ new Vector3();
4599
+ const _vcp = /*@__PURE__*/ new Vector3();
4600
+ const _v40 = /*@__PURE__*/ new Vector4();
4601
+ const _v41 = /*@__PURE__*/ new Vector4();
4602
+ const _v42 = /*@__PURE__*/ new Vector4();
4685
4603
  var Triangle = class Triangle {
4686
4604
  constructor(a = new Vector3(), b = new Vector3(), c = new Vector3()) {
4687
4605
  this.a = a;
@@ -5193,7 +5111,7 @@ var Color = class {
5193
5111
  getStyle(colorSpace = SRGBColorSpace) {
5194
5112
  ColorManagement.fromWorkingColorSpace(_color$1.copy(this), colorSpace);
5195
5113
  const r = _color$1.r, g = _color$1.g, b = _color$1.b;
5196
- if (colorSpace !== SRGBColorSpace) return `color(${colorSpace} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`;
5114
+ if (colorSpace !== "srgb") return `color(${colorSpace} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`;
5197
5115
  return `rgb(${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)})`;
5198
5116
  }
5199
5117
  offsetHSL(h, s, l) {
@@ -5301,7 +5219,7 @@ var Color = class {
5301
5219
  yield this.b;
5302
5220
  }
5303
5221
  };
5304
- const _color$1 = /* @__PURE__ */ new Color();
5222
+ const _color$1 = /*@__PURE__*/ new Color();
5305
5223
  Color.NAMES = _colorKeywords;
5306
5224
  let _materialId = 0;
5307
5225
  var Material = class extends EventDispatcher {
@@ -5312,25 +5230,25 @@ var Material = class extends EventDispatcher {
5312
5230
  this.uuid = generateUUID();
5313
5231
  this.name = "";
5314
5232
  this.type = "Material";
5315
- this.blending = NormalBlending;
5316
- this.side = FrontSide;
5233
+ this.blending = 1;
5234
+ this.side = 0;
5317
5235
  this.vertexColors = false;
5318
5236
  this.opacity = 1;
5319
5237
  this.transparent = false;
5320
5238
  this.alphaHash = false;
5321
- this.blendSrc = SrcAlphaFactor;
5322
- this.blendDst = OneMinusSrcAlphaFactor;
5323
- this.blendEquation = AddEquation;
5239
+ this.blendSrc = 204;
5240
+ this.blendDst = 205;
5241
+ this.blendEquation = 100;
5324
5242
  this.blendSrcAlpha = null;
5325
5243
  this.blendDstAlpha = null;
5326
5244
  this.blendEquationAlpha = null;
5327
5245
  this.blendColor = new Color(0, 0, 0);
5328
5246
  this.blendAlpha = 0;
5329
- this.depthFunc = LessEqualDepth;
5247
+ this.depthFunc = 3;
5330
5248
  this.depthTest = true;
5331
5249
  this.depthWrite = true;
5332
5250
  this.stencilWriteMask = 255;
5333
- this.stencilFunc = AlwaysStencilFunc;
5251
+ this.stencilFunc = 519;
5334
5252
  this.stencilRef = 0;
5335
5253
  this.stencilFuncMask = 255;
5336
5254
  this.stencilFail = KeepStencilOp;
@@ -5478,30 +5396,30 @@ var Material = class extends EventDispatcher {
5478
5396
  if (this.size !== void 0) data.size = this.size;
5479
5397
  if (this.shadowSide !== null) data.shadowSide = this.shadowSide;
5480
5398
  if (this.sizeAttenuation !== void 0) data.sizeAttenuation = this.sizeAttenuation;
5481
- if (this.blending !== NormalBlending) data.blending = this.blending;
5482
- if (this.side !== FrontSide) data.side = this.side;
5399
+ if (this.blending !== 1) data.blending = this.blending;
5400
+ if (this.side !== 0) data.side = this.side;
5483
5401
  if (this.vertexColors === true) data.vertexColors = true;
5484
5402
  if (this.opacity < 1) data.opacity = this.opacity;
5485
5403
  if (this.transparent === true) data.transparent = true;
5486
- if (this.blendSrc !== SrcAlphaFactor) data.blendSrc = this.blendSrc;
5487
- if (this.blendDst !== OneMinusSrcAlphaFactor) data.blendDst = this.blendDst;
5488
- if (this.blendEquation !== AddEquation) data.blendEquation = this.blendEquation;
5404
+ if (this.blendSrc !== 204) data.blendSrc = this.blendSrc;
5405
+ if (this.blendDst !== 205) data.blendDst = this.blendDst;
5406
+ if (this.blendEquation !== 100) data.blendEquation = this.blendEquation;
5489
5407
  if (this.blendSrcAlpha !== null) data.blendSrcAlpha = this.blendSrcAlpha;
5490
5408
  if (this.blendDstAlpha !== null) data.blendDstAlpha = this.blendDstAlpha;
5491
5409
  if (this.blendEquationAlpha !== null) data.blendEquationAlpha = this.blendEquationAlpha;
5492
5410
  if (this.blendColor && this.blendColor.isColor) data.blendColor = this.blendColor.getHex();
5493
5411
  if (this.blendAlpha !== 0) data.blendAlpha = this.blendAlpha;
5494
- if (this.depthFunc !== LessEqualDepth) data.depthFunc = this.depthFunc;
5412
+ if (this.depthFunc !== 3) data.depthFunc = this.depthFunc;
5495
5413
  if (this.depthTest === false) data.depthTest = this.depthTest;
5496
5414
  if (this.depthWrite === false) data.depthWrite = this.depthWrite;
5497
5415
  if (this.colorWrite === false) data.colorWrite = this.colorWrite;
5498
5416
  if (this.stencilWriteMask !== 255) data.stencilWriteMask = this.stencilWriteMask;
5499
- if (this.stencilFunc !== AlwaysStencilFunc) data.stencilFunc = this.stencilFunc;
5417
+ if (this.stencilFunc !== 519) data.stencilFunc = this.stencilFunc;
5500
5418
  if (this.stencilRef !== 0) data.stencilRef = this.stencilRef;
5501
5419
  if (this.stencilFuncMask !== 255) data.stencilFuncMask = this.stencilFuncMask;
5502
- if (this.stencilFail !== KeepStencilOp) data.stencilFail = this.stencilFail;
5503
- if (this.stencilZFail !== KeepStencilOp) data.stencilZFail = this.stencilZFail;
5504
- if (this.stencilZPass !== KeepStencilOp) data.stencilZPass = this.stencilZPass;
5420
+ if (this.stencilFail !== 7680) data.stencilFail = this.stencilFail;
5421
+ if (this.stencilZFail !== 7680) data.stencilZFail = this.stencilZFail;
5422
+ if (this.stencilZPass !== 7680) data.stencilZPass = this.stencilZPass;
5505
5423
  if (this.stencilWrite === true) data.stencilWrite = this.stencilWrite;
5506
5424
  if (this.rotation !== void 0 && this.rotation !== 0) data.rotation = this.rotation;
5507
5425
  if (this.polygonOffset === true) data.polygonOffset = true;
@@ -5529,9 +5447,9 @@ var Material = class extends EventDispatcher {
5529
5447
  function extractFromCache(cache) {
5530
5448
  const values = [];
5531
5449
  for (const key in cache) {
5532
- const data$1 = cache[key];
5533
- delete data$1.metadata;
5534
- values.push(data$1);
5450
+ const data = cache[key];
5451
+ delete data.metadata;
5452
+ values.push(data);
5535
5453
  }
5536
5454
  return values;
5537
5455
  }
@@ -5624,7 +5542,7 @@ var MeshBasicMaterial = class extends Material {
5624
5542
  this.alphaMap = null;
5625
5543
  this.envMap = null;
5626
5544
  this.envMapRotation = new Euler();
5627
- this.combine = MultiplyOperation;
5545
+ this.combine = 0;
5628
5546
  this.reflectivity = 1;
5629
5547
  this.refractionRatio = .98;
5630
5548
  this.wireframe = false;
@@ -5657,8 +5575,8 @@ var MeshBasicMaterial = class extends Material {
5657
5575
  return this;
5658
5576
  }
5659
5577
  };
5660
- const _vector$9 = /* @__PURE__ */ new Vector3();
5661
- const _vector2$1 = /* @__PURE__ */ new Vector2();
5578
+ const _vector$9 = /*@__PURE__*/ new Vector3();
5579
+ const _vector2$1 = /*@__PURE__*/ new Vector2();
5662
5580
  var BufferAttribute = class {
5663
5581
  constructor(array, itemSize, normalized = false) {
5664
5582
  if (Array.isArray(array)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
@@ -5852,7 +5770,7 @@ var BufferAttribute = class {
5852
5770
  normalized: this.normalized
5853
5771
  };
5854
5772
  if (this.name !== "") data.name = this.name;
5855
- if (this.usage !== StaticDrawUsage) data.usage = this.usage;
5773
+ if (this.usage !== 35044) data.usage = this.usage;
5856
5774
  return data;
5857
5775
  }
5858
5776
  };
@@ -5872,12 +5790,12 @@ var Float32BufferAttribute = class extends BufferAttribute {
5872
5790
  }
5873
5791
  };
5874
5792
  let _id$2 = 0;
5875
- const _m1$2 = /* @__PURE__ */ new Matrix4();
5876
- const _obj = /* @__PURE__ */ new Object3D();
5877
- const _offset = /* @__PURE__ */ new Vector3();
5878
- const _box$2 = /* @__PURE__ */ new Box3();
5879
- const _boxMorphTargets = /* @__PURE__ */ new Box3();
5880
- const _vector$8 = /* @__PURE__ */ new Vector3();
5793
+ const _m1$2 = /*@__PURE__*/ new Matrix4();
5794
+ const _obj = /*@__PURE__*/ new Object3D();
5795
+ const _offset = /*@__PURE__*/ new Vector3();
5796
+ const _box$2 = /*@__PURE__*/ new Box3();
5797
+ const _boxMorphTargets = /*@__PURE__*/ new Box3();
5798
+ const _vector$8 = /*@__PURE__*/ new Vector3();
5881
5799
  var BufferGeometry = class BufferGeometry extends EventDispatcher {
5882
5800
  constructor() {
5883
5801
  super();
@@ -6211,15 +6129,15 @@ var BufferGeometry = class BufferGeometry extends EventDispatcher {
6211
6129
  }
6212
6130
  }
6213
6131
  toNonIndexed() {
6214
- function convertBufferAttribute(attribute, indices$1) {
6132
+ function convertBufferAttribute(attribute, indices) {
6215
6133
  const array = attribute.array;
6216
6134
  const itemSize = attribute.itemSize;
6217
6135
  const normalized = attribute.normalized;
6218
- const array2 = new array.constructor(indices$1.length * itemSize);
6136
+ const array2 = new array.constructor(indices.length * itemSize);
6219
6137
  let index = 0, index2 = 0;
6220
- for (let i = 0, l = indices$1.length; i < l; i++) {
6221
- if (attribute.isInterleavedBufferAttribute) index = indices$1[i] * attribute.data.stride + attribute.offset;
6222
- else index = indices$1[i] * itemSize;
6138
+ for (let i = 0, l = indices.length; i < l; i++) {
6139
+ if (attribute.isInterleavedBufferAttribute) index = indices[i] * attribute.data.stride + attribute.offset;
6140
+ else index = indices[i] * itemSize;
6223
6141
  for (let j = 0; j < itemSize; j++) array2[index2++] = array[index++];
6224
6142
  }
6225
6143
  return new BufferAttribute(array2, itemSize, normalized);
@@ -6353,17 +6271,17 @@ var BufferGeometry = class BufferGeometry extends EventDispatcher {
6353
6271
  this.dispatchEvent({ type: "dispose" });
6354
6272
  }
6355
6273
  };
6356
- const _inverseMatrix$3 = /* @__PURE__ */ new Matrix4();
6357
- const _ray$3 = /* @__PURE__ */ new Ray();
6358
- const _sphere$6 = /* @__PURE__ */ new Sphere();
6359
- const _sphereHitAt = /* @__PURE__ */ new Vector3();
6360
- const _vA$1 = /* @__PURE__ */ new Vector3();
6361
- const _vB$1 = /* @__PURE__ */ new Vector3();
6362
- const _vC$1 = /* @__PURE__ */ new Vector3();
6363
- const _tempA = /* @__PURE__ */ new Vector3();
6364
- const _morphA = /* @__PURE__ */ new Vector3();
6365
- const _intersectionPoint = /* @__PURE__ */ new Vector3();
6366
- const _intersectionPointWorld = /* @__PURE__ */ new Vector3();
6274
+ const _inverseMatrix$3 = /*@__PURE__*/ new Matrix4();
6275
+ const _ray$3 = /*@__PURE__*/ new Ray();
6276
+ const _sphere$6 = /*@__PURE__*/ new Sphere();
6277
+ const _sphereHitAt = /*@__PURE__*/ new Vector3();
6278
+ const _vA$1 = /*@__PURE__*/ new Vector3();
6279
+ const _vB$1 = /*@__PURE__*/ new Vector3();
6280
+ const _vC$1 = /*@__PURE__*/ new Vector3();
6281
+ const _tempA = /*@__PURE__*/ new Vector3();
6282
+ const _morphA = /*@__PURE__*/ new Vector3();
6283
+ const _intersectionPoint = /*@__PURE__*/ new Vector3();
6284
+ const _intersectionPointWorld = /*@__PURE__*/ new Vector3();
6367
6285
  var Mesh = class extends Object3D {
6368
6286
  constructor(geometry = new BufferGeometry(), material = new MeshBasicMaterial()) {
6369
6287
  super();
@@ -6515,8 +6433,8 @@ var Mesh = class extends Object3D {
6515
6433
  };
6516
6434
  function checkIntersection$1(object, material, raycaster, ray, pA, pB, pC, point) {
6517
6435
  let intersect;
6518
- if (material.side === BackSide) intersect = ray.intersectTriangle(pC, pB, pA, true, point);
6519
- else intersect = ray.intersectTriangle(pA, pB, pC, material.side === FrontSide, point);
6436
+ if (material.side === 1) intersect = ray.intersectTriangle(pC, pB, pA, true, point);
6437
+ else intersect = ray.intersectTriangle(pA, pB, pC, material.side === 0, point);
6520
6438
  if (intersect === null) return null;
6521
6439
  _intersectionPointWorld.copy(point);
6522
6440
  _intersectionPointWorld.applyMatrix4(object.matrixWorld);
@@ -6587,12 +6505,12 @@ var BoxGeometry = class BoxGeometry extends BufferGeometry {
6587
6505
  this.setAttribute("position", new Float32BufferAttribute(vertices, 3));
6588
6506
  this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
6589
6507
  this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
6590
- function buildPlane(u, v, w, udir, vdir, width$1, height$1, depth$1, gridX, gridY, materialIndex) {
6591
- const segmentWidth = width$1 / gridX;
6592
- const segmentHeight = height$1 / gridY;
6593
- const widthHalf = width$1 / 2;
6594
- const heightHalf = height$1 / 2;
6595
- const depthHalf = depth$1 / 2;
6508
+ function buildPlane(u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex) {
6509
+ const segmentWidth = width / gridX;
6510
+ const segmentHeight = height / gridY;
6511
+ const widthHalf = width / 2;
6512
+ const heightHalf = height / 2;
6513
+ const depthHalf = depth / 2;
6596
6514
  const gridX1 = gridX + 1;
6597
6515
  const gridY1 = gridY + 1;
6598
6516
  let vertexCounter = 0;
@@ -6607,7 +6525,7 @@ var BoxGeometry = class BoxGeometry extends BufferGeometry {
6607
6525
  vertices.push(vector.x, vector.y, vector.z);
6608
6526
  vector[u] = 0;
6609
6527
  vector[v] = 0;
6610
- vector[w] = depth$1 > 0 ? 1 : -1;
6528
+ vector[w] = depth > 0 ? 1 : -1;
6611
6529
  normals.push(vector.x, vector.y, vector.z);
6612
6530
  uvs.push(ix / gridX);
6613
6531
  uvs.push(1 - iy / gridY);
@@ -6812,20 +6730,20 @@ var Camera = class extends Object3D {
6812
6730
  return new this.constructor().copy(this);
6813
6731
  }
6814
6732
  };
6815
- const _v3$1 = /* @__PURE__ */ new Vector3();
6816
- const _minTarget = /* @__PURE__ */ new Vector2();
6817
- const _maxTarget = /* @__PURE__ */ new Vector2();
6733
+ const _v3$1 = /*@__PURE__*/ new Vector3();
6734
+ const _minTarget = /*@__PURE__*/ new Vector2();
6735
+ const _maxTarget = /*@__PURE__*/ new Vector2();
6818
6736
  var PerspectiveCamera = class extends Camera {
6819
- constructor(fov$1 = 50, aspect$1 = 1, near = .1, far = 2e3) {
6737
+ constructor(fov = 50, aspect = 1, near = .1, far = 2e3) {
6820
6738
  super();
6821
6739
  this.isPerspectiveCamera = true;
6822
6740
  this.type = "PerspectiveCamera";
6823
- this.fov = fov$1;
6741
+ this.fov = fov;
6824
6742
  this.zoom = 1;
6825
6743
  this.near = near;
6826
6744
  this.far = far;
6827
6745
  this.focus = 10;
6828
- this.aspect = aspect$1;
6746
+ this.aspect = aspect;
6829
6747
  this.view = null;
6830
6748
  this.filmGauge = 35;
6831
6749
  this.filmOffset = 0;
@@ -7017,7 +6935,7 @@ var CubeCamera = class extends Object3D {
7017
6935
  const cameras = this.children.concat();
7018
6936
  const [cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ] = cameras;
7019
6937
  for (const camera of cameras) this.remove(camera);
7020
- if (coordinateSystem === WebGLCoordinateSystem) {
6938
+ if (coordinateSystem === 2e3) {
7021
6939
  cameraPX.up.set(0, 1, 0);
7022
6940
  cameraPX.lookAt(1, 0, 0);
7023
6941
  cameraNX.up.set(0, 1, 0);
@@ -7030,7 +6948,7 @@ var CubeCamera = class extends Object3D {
7030
6948
  cameraPZ.lookAt(0, 0, 1);
7031
6949
  cameraNZ.up.set(0, 1, 0);
7032
6950
  cameraNZ.lookAt(0, 0, -1);
7033
- } else if (coordinateSystem === WebGPUCoordinateSystem) {
6951
+ } else if (coordinateSystem === 2001) {
7034
6952
  cameraPX.up.set(0, -1, 0);
7035
6953
  cameraPX.lookAt(-1, 0, 0);
7036
6954
  cameraNX.up.set(0, -1, 0);
@@ -7085,7 +7003,7 @@ var CubeCamera = class extends Object3D {
7085
7003
  var CubeTexture = class extends Texture {
7086
7004
  constructor(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace) {
7087
7005
  images = images !== void 0 ? images : [];
7088
- mapping = mapping !== void 0 ? mapping : CubeReflectionMapping;
7006
+ mapping = mapping !== void 0 ? mapping : 301;
7089
7007
  super(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace);
7090
7008
  this.isCubeTexture = true;
7091
7009
  this.flipY = false;
@@ -7106,14 +7024,15 @@ var WebGLCubeRenderTarget = class extends WebGLRenderTarget {
7106
7024
  height: size,
7107
7025
  depth: 1
7108
7026
  };
7109
- this.texture = new CubeTexture([
7027
+ const images = [
7110
7028
  image,
7111
7029
  image,
7112
7030
  image,
7113
7031
  image,
7114
7032
  image,
7115
7033
  image
7116
- ], options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace);
7034
+ ];
7035
+ this.texture = new CubeTexture(images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace);
7117
7036
  this.texture.isRenderTargetTexture = true;
7118
7037
  this.texture.generateMipmaps = options.generateMipmaps !== void 0 ? options.generateMipmaps : false;
7119
7038
  this.texture.minFilter = options.minFilter !== void 0 ? options.minFilter : LinearFilter;
@@ -7170,13 +7089,13 @@ var WebGLCubeRenderTarget = class extends WebGLRenderTarget {
7170
7089
  uniforms: cloneUniforms(shader.uniforms),
7171
7090
  vertexShader: shader.vertexShader,
7172
7091
  fragmentShader: shader.fragmentShader,
7173
- side: BackSide,
7174
- blending: NoBlending
7092
+ side: 1,
7093
+ blending: 0
7175
7094
  });
7176
7095
  material.uniforms.tEquirect.value = texture;
7177
7096
  const mesh = new Mesh(geometry, material);
7178
7097
  const currentMinFilter = texture.minFilter;
7179
- if (texture.minFilter === LinearMipmapLinearFilter) texture.minFilter = LinearFilter;
7098
+ if (texture.minFilter === 1008) texture.minFilter = LinearFilter;
7180
7099
  new CubeCamera(1, 10, this).update(renderer, mesh);
7181
7100
  texture.minFilter = currentMinFilter;
7182
7101
  mesh.geometry.dispose();
@@ -7192,9 +7111,9 @@ var WebGLCubeRenderTarget = class extends WebGLRenderTarget {
7192
7111
  renderer.setRenderTarget(currentRenderTarget);
7193
7112
  }
7194
7113
  };
7195
- const _vector1 = /* @__PURE__ */ new Vector3();
7196
- const _vector2 = /* @__PURE__ */ new Vector3();
7197
- const _normalMatrix = /* @__PURE__ */ new Matrix3();
7114
+ const _vector1 = /*@__PURE__*/ new Vector3();
7115
+ const _vector2 = /*@__PURE__*/ new Vector3();
7116
+ const _normalMatrix = /*@__PURE__*/ new Matrix3();
7198
7117
  var Plane = class {
7199
7118
  constructor(normal = new Vector3(1, 0, 0), constant = 0) {
7200
7119
  this.isPlane = true;
@@ -7289,8 +7208,8 @@ var Plane = class {
7289
7208
  return new this.constructor().copy(this);
7290
7209
  }
7291
7210
  };
7292
- const _sphere$5 = /* @__PURE__ */ new Sphere();
7293
- const _vector$7 = /* @__PURE__ */ new Vector3();
7211
+ const _sphere$5 = /*@__PURE__*/ new Sphere();
7212
+ const _vector$7 = /*@__PURE__*/ new Vector3();
7294
7213
  var Frustum = class {
7295
7214
  constructor(p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane()) {
7296
7215
  this.planes = [
@@ -7329,8 +7248,8 @@ var Frustum = class {
7329
7248
  planes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize();
7330
7249
  planes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize();
7331
7250
  planes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize();
7332
- if (coordinateSystem === WebGLCoordinateSystem) planes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();
7333
- else if (coordinateSystem === WebGPUCoordinateSystem) planes[5].setComponents(me2, me6, me10, me14).normalize();
7251
+ if (coordinateSystem === 2e3) planes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();
7252
+ else if (coordinateSystem === 2001) planes[5].setComponents(me2, me6, me10, me14).normalize();
7334
7253
  else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + coordinateSystem);
7335
7254
  return this;
7336
7255
  }
@@ -7701,21 +7620,21 @@ const ShaderChunk = {
7701
7620
  */
7702
7621
  const UniformsLib = {
7703
7622
  common: {
7704
- diffuse: { value: /* @__PURE__ */ new Color(16777215) },
7623
+ diffuse: { value: /*@__PURE__*/ new Color(16777215) },
7705
7624
  opacity: { value: 1 },
7706
7625
  map: { value: null },
7707
- mapTransform: { value: /* @__PURE__ */ new Matrix3() },
7626
+ mapTransform: { value: /*@__PURE__*/ new Matrix3() },
7708
7627
  alphaMap: { value: null },
7709
- alphaMapTransform: { value: /* @__PURE__ */ new Matrix3() },
7628
+ alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },
7710
7629
  alphaTest: { value: 0 }
7711
7630
  },
7712
7631
  specularmap: {
7713
7632
  specularMap: { value: null },
7714
- specularMapTransform: { value: /* @__PURE__ */ new Matrix3() }
7633
+ specularMapTransform: { value: /*@__PURE__*/ new Matrix3() }
7715
7634
  },
7716
7635
  envmap: {
7717
7636
  envMap: { value: null },
7718
- envMapRotation: { value: /* @__PURE__ */ new Matrix3() },
7637
+ envMapRotation: { value: /*@__PURE__*/ new Matrix3() },
7719
7638
  flipEnvMap: { value: -1 },
7720
7639
  reflectivity: { value: 1 },
7721
7640
  ior: { value: 1.5 },
@@ -7724,47 +7643,47 @@ const UniformsLib = {
7724
7643
  aomap: {
7725
7644
  aoMap: { value: null },
7726
7645
  aoMapIntensity: { value: 1 },
7727
- aoMapTransform: { value: /* @__PURE__ */ new Matrix3() }
7646
+ aoMapTransform: { value: /*@__PURE__*/ new Matrix3() }
7728
7647
  },
7729
7648
  lightmap: {
7730
7649
  lightMap: { value: null },
7731
7650
  lightMapIntensity: { value: 1 },
7732
- lightMapTransform: { value: /* @__PURE__ */ new Matrix3() }
7651
+ lightMapTransform: { value: /*@__PURE__*/ new Matrix3() }
7733
7652
  },
7734
7653
  bumpmap: {
7735
7654
  bumpMap: { value: null },
7736
- bumpMapTransform: { value: /* @__PURE__ */ new Matrix3() },
7655
+ bumpMapTransform: { value: /*@__PURE__*/ new Matrix3() },
7737
7656
  bumpScale: { value: 1 }
7738
7657
  },
7739
7658
  normalmap: {
7740
7659
  normalMap: { value: null },
7741
- normalMapTransform: { value: /* @__PURE__ */ new Matrix3() },
7742
- normalScale: { value: /* @__PURE__ */ new Vector2(1, 1) }
7660
+ normalMapTransform: { value: /*@__PURE__*/ new Matrix3() },
7661
+ normalScale: { value: /*@__PURE__*/ new Vector2(1, 1) }
7743
7662
  },
7744
7663
  displacementmap: {
7745
7664
  displacementMap: { value: null },
7746
- displacementMapTransform: { value: /* @__PURE__ */ new Matrix3() },
7665
+ displacementMapTransform: { value: /*@__PURE__*/ new Matrix3() },
7747
7666
  displacementScale: { value: 1 },
7748
7667
  displacementBias: { value: 0 }
7749
7668
  },
7750
7669
  emissivemap: {
7751
7670
  emissiveMap: { value: null },
7752
- emissiveMapTransform: { value: /* @__PURE__ */ new Matrix3() }
7671
+ emissiveMapTransform: { value: /*@__PURE__*/ new Matrix3() }
7753
7672
  },
7754
7673
  metalnessmap: {
7755
7674
  metalnessMap: { value: null },
7756
- metalnessMapTransform: { value: /* @__PURE__ */ new Matrix3() }
7675
+ metalnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }
7757
7676
  },
7758
7677
  roughnessmap: {
7759
7678
  roughnessMap: { value: null },
7760
- roughnessMapTransform: { value: /* @__PURE__ */ new Matrix3() }
7679
+ roughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }
7761
7680
  },
7762
7681
  gradientmap: { gradientMap: { value: null } },
7763
7682
  fog: {
7764
7683
  fogDensity: { value: 25e-5 },
7765
7684
  fogNear: { value: 1 },
7766
7685
  fogFar: { value: 2e3 },
7767
- fogColor: { value: /* @__PURE__ */ new Color(16777215) }
7686
+ fogColor: { value: /*@__PURE__*/ new Color(16777215) }
7768
7687
  },
7769
7688
  lights: {
7770
7689
  ambientLightColor: { value: [] },
@@ -7857,31 +7776,31 @@ const UniformsLib = {
7857
7776
  ltc_2: { value: null }
7858
7777
  },
7859
7778
  points: {
7860
- diffuse: { value: /* @__PURE__ */ new Color(16777215) },
7779
+ diffuse: { value: /*@__PURE__*/ new Color(16777215) },
7861
7780
  opacity: { value: 1 },
7862
7781
  size: { value: 1 },
7863
7782
  scale: { value: 1 },
7864
7783
  map: { value: null },
7865
7784
  alphaMap: { value: null },
7866
- alphaMapTransform: { value: /* @__PURE__ */ new Matrix3() },
7785
+ alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },
7867
7786
  alphaTest: { value: 0 },
7868
- uvTransform: { value: /* @__PURE__ */ new Matrix3() }
7787
+ uvTransform: { value: /*@__PURE__*/ new Matrix3() }
7869
7788
  },
7870
7789
  sprite: {
7871
- diffuse: { value: /* @__PURE__ */ new Color(16777215) },
7790
+ diffuse: { value: /*@__PURE__*/ new Color(16777215) },
7872
7791
  opacity: { value: 1 },
7873
- center: { value: /* @__PURE__ */ new Vector2(.5, .5) },
7792
+ center: { value: /*@__PURE__*/ new Vector2(.5, .5) },
7874
7793
  rotation: { value: 0 },
7875
7794
  map: { value: null },
7876
- mapTransform: { value: /* @__PURE__ */ new Matrix3() },
7795
+ mapTransform: { value: /*@__PURE__*/ new Matrix3() },
7877
7796
  alphaMap: { value: null },
7878
- alphaMapTransform: { value: /* @__PURE__ */ new Matrix3() },
7797
+ alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },
7879
7798
  alphaTest: { value: 0 }
7880
7799
  }
7881
7800
  };
7882
7801
  const ShaderLib = {
7883
7802
  basic: {
7884
- uniforms: /* @__PURE__ */ mergeUniforms([
7803
+ uniforms: /*@__PURE__*/ mergeUniforms([
7885
7804
  UniformsLib.common,
7886
7805
  UniformsLib.specularmap,
7887
7806
  UniformsLib.envmap,
@@ -7893,7 +7812,7 @@ const ShaderLib = {
7893
7812
  fragmentShader: ShaderChunk.meshbasic_frag
7894
7813
  },
7895
7814
  lambert: {
7896
- uniforms: /* @__PURE__ */ mergeUniforms([
7815
+ uniforms: /*@__PURE__*/ mergeUniforms([
7897
7816
  UniformsLib.common,
7898
7817
  UniformsLib.specularmap,
7899
7818
  UniformsLib.envmap,
@@ -7905,13 +7824,13 @@ const ShaderLib = {
7905
7824
  UniformsLib.displacementmap,
7906
7825
  UniformsLib.fog,
7907
7826
  UniformsLib.lights,
7908
- { emissive: { value: /* @__PURE__ */ new Color(0) } }
7827
+ { emissive: { value: /*@__PURE__*/ new Color(0) } }
7909
7828
  ]),
7910
7829
  vertexShader: ShaderChunk.meshlambert_vert,
7911
7830
  fragmentShader: ShaderChunk.meshlambert_frag
7912
7831
  },
7913
7832
  phong: {
7914
- uniforms: /* @__PURE__ */ mergeUniforms([
7833
+ uniforms: /*@__PURE__*/ mergeUniforms([
7915
7834
  UniformsLib.common,
7916
7835
  UniformsLib.specularmap,
7917
7836
  UniformsLib.envmap,
@@ -7924,8 +7843,8 @@ const ShaderLib = {
7924
7843
  UniformsLib.fog,
7925
7844
  UniformsLib.lights,
7926
7845
  {
7927
- emissive: { value: /* @__PURE__ */ new Color(0) },
7928
- specular: { value: /* @__PURE__ */ new Color(1118481) },
7846
+ emissive: { value: /*@__PURE__*/ new Color(0) },
7847
+ specular: { value: /*@__PURE__*/ new Color(1118481) },
7929
7848
  shininess: { value: 30 }
7930
7849
  }
7931
7850
  ]),
@@ -7933,7 +7852,7 @@ const ShaderLib = {
7933
7852
  fragmentShader: ShaderChunk.meshphong_frag
7934
7853
  },
7935
7854
  standard: {
7936
- uniforms: /* @__PURE__ */ mergeUniforms([
7855
+ uniforms: /*@__PURE__*/ mergeUniforms([
7937
7856
  UniformsLib.common,
7938
7857
  UniformsLib.envmap,
7939
7858
  UniformsLib.aomap,
@@ -7947,7 +7866,7 @@ const ShaderLib = {
7947
7866
  UniformsLib.fog,
7948
7867
  UniformsLib.lights,
7949
7868
  {
7950
- emissive: { value: /* @__PURE__ */ new Color(0) },
7869
+ emissive: { value: /*@__PURE__*/ new Color(0) },
7951
7870
  roughness: { value: 1 },
7952
7871
  metalness: { value: 0 },
7953
7872
  envMapIntensity: { value: 1 }
@@ -7957,7 +7876,7 @@ const ShaderLib = {
7957
7876
  fragmentShader: ShaderChunk.meshphysical_frag
7958
7877
  },
7959
7878
  toon: {
7960
- uniforms: /* @__PURE__ */ mergeUniforms([
7879
+ uniforms: /*@__PURE__*/ mergeUniforms([
7961
7880
  UniformsLib.common,
7962
7881
  UniformsLib.aomap,
7963
7882
  UniformsLib.lightmap,
@@ -7968,13 +7887,13 @@ const ShaderLib = {
7968
7887
  UniformsLib.gradientmap,
7969
7888
  UniformsLib.fog,
7970
7889
  UniformsLib.lights,
7971
- { emissive: { value: /* @__PURE__ */ new Color(0) } }
7890
+ { emissive: { value: /*@__PURE__*/ new Color(0) } }
7972
7891
  ]),
7973
7892
  vertexShader: ShaderChunk.meshtoon_vert,
7974
7893
  fragmentShader: ShaderChunk.meshtoon_frag
7975
7894
  },
7976
7895
  matcap: {
7977
- uniforms: /* @__PURE__ */ mergeUniforms([
7896
+ uniforms: /*@__PURE__*/ mergeUniforms([
7978
7897
  UniformsLib.common,
7979
7898
  UniformsLib.bumpmap,
7980
7899
  UniformsLib.normalmap,
@@ -7986,12 +7905,12 @@ const ShaderLib = {
7986
7905
  fragmentShader: ShaderChunk.meshmatcap_frag
7987
7906
  },
7988
7907
  points: {
7989
- uniforms: /* @__PURE__ */ mergeUniforms([UniformsLib.points, UniformsLib.fog]),
7908
+ uniforms: /*@__PURE__*/ mergeUniforms([UniformsLib.points, UniformsLib.fog]),
7990
7909
  vertexShader: ShaderChunk.points_vert,
7991
7910
  fragmentShader: ShaderChunk.points_frag
7992
7911
  },
7993
7912
  dashed: {
7994
- uniforms: /* @__PURE__ */ mergeUniforms([
7913
+ uniforms: /*@__PURE__*/ mergeUniforms([
7995
7914
  UniformsLib.common,
7996
7915
  UniformsLib.fog,
7997
7916
  {
@@ -8004,12 +7923,12 @@ const ShaderLib = {
8004
7923
  fragmentShader: ShaderChunk.linedashed_frag
8005
7924
  },
8006
7925
  depth: {
8007
- uniforms: /* @__PURE__ */ mergeUniforms([UniformsLib.common, UniformsLib.displacementmap]),
7926
+ uniforms: /*@__PURE__*/ mergeUniforms([UniformsLib.common, UniformsLib.displacementmap]),
8008
7927
  vertexShader: ShaderChunk.depth_vert,
8009
7928
  fragmentShader: ShaderChunk.depth_frag
8010
7929
  },
8011
7930
  normal: {
8012
- uniforms: /* @__PURE__ */ mergeUniforms([
7931
+ uniforms: /*@__PURE__*/ mergeUniforms([
8013
7932
  UniformsLib.common,
8014
7933
  UniformsLib.bumpmap,
8015
7934
  UniformsLib.normalmap,
@@ -8020,13 +7939,13 @@ const ShaderLib = {
8020
7939
  fragmentShader: ShaderChunk.meshnormal_frag
8021
7940
  },
8022
7941
  sprite: {
8023
- uniforms: /* @__PURE__ */ mergeUniforms([UniformsLib.sprite, UniformsLib.fog]),
7942
+ uniforms: /*@__PURE__*/ mergeUniforms([UniformsLib.sprite, UniformsLib.fog]),
8024
7943
  vertexShader: ShaderChunk.sprite_vert,
8025
7944
  fragmentShader: ShaderChunk.sprite_frag
8026
7945
  },
8027
7946
  background: {
8028
7947
  uniforms: {
8029
- uvTransform: { value: /* @__PURE__ */ new Matrix3() },
7948
+ uvTransform: { value: /*@__PURE__*/ new Matrix3() },
8030
7949
  t2D: { value: null },
8031
7950
  backgroundIntensity: { value: 1 }
8032
7951
  },
@@ -8039,7 +7958,7 @@ const ShaderLib = {
8039
7958
  flipEnvMap: { value: -1 },
8040
7959
  backgroundBlurriness: { value: 0 },
8041
7960
  backgroundIntensity: { value: 1 },
8042
- backgroundRotation: { value: /* @__PURE__ */ new Matrix3() }
7961
+ backgroundRotation: { value: /*@__PURE__*/ new Matrix3() }
8043
7962
  },
8044
7963
  vertexShader: ShaderChunk.backgroundCube_vert,
8045
7964
  fragmentShader: ShaderChunk.backgroundCube_frag
@@ -8059,11 +7978,11 @@ const ShaderLib = {
8059
7978
  fragmentShader: ShaderChunk.equirect_frag
8060
7979
  },
8061
7980
  distanceRGBA: {
8062
- uniforms: /* @__PURE__ */ mergeUniforms([
7981
+ uniforms: /*@__PURE__*/ mergeUniforms([
8063
7982
  UniformsLib.common,
8064
7983
  UniformsLib.displacementmap,
8065
7984
  {
8066
- referencePosition: { value: /* @__PURE__ */ new Vector3() },
7985
+ referencePosition: { value: /*@__PURE__*/ new Vector3() },
8067
7986
  nearDistance: { value: 1 },
8068
7987
  farDistance: { value: 1e3 }
8069
7988
  }
@@ -8072,11 +7991,11 @@ const ShaderLib = {
8072
7991
  fragmentShader: ShaderChunk.distanceRGBA_frag
8073
7992
  },
8074
7993
  shadow: {
8075
- uniforms: /* @__PURE__ */ mergeUniforms([
7994
+ uniforms: /*@__PURE__*/ mergeUniforms([
8076
7995
  UniformsLib.lights,
8077
7996
  UniformsLib.fog,
8078
7997
  {
8079
- color: { value: /* @__PURE__ */ new Color(0) },
7998
+ color: { value: /*@__PURE__*/ new Color(0) },
8080
7999
  opacity: { value: 1 }
8081
8000
  }
8082
8001
  ]),
@@ -8085,51 +8004,51 @@ const ShaderLib = {
8085
8004
  }
8086
8005
  };
8087
8006
  ShaderLib.physical = {
8088
- uniforms: /* @__PURE__ */ mergeUniforms([ShaderLib.standard.uniforms, {
8007
+ uniforms: /*@__PURE__*/ mergeUniforms([ShaderLib.standard.uniforms, {
8089
8008
  clearcoat: { value: 0 },
8090
8009
  clearcoatMap: { value: null },
8091
- clearcoatMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8010
+ clearcoatMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8092
8011
  clearcoatNormalMap: { value: null },
8093
- clearcoatNormalMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8094
- clearcoatNormalScale: { value: /* @__PURE__ */ new Vector2(1, 1) },
8012
+ clearcoatNormalMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8013
+ clearcoatNormalScale: { value: /*@__PURE__*/ new Vector2(1, 1) },
8095
8014
  clearcoatRoughness: { value: 0 },
8096
8015
  clearcoatRoughnessMap: { value: null },
8097
- clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8016
+ clearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8098
8017
  dispersion: { value: 0 },
8099
8018
  iridescence: { value: 0 },
8100
8019
  iridescenceMap: { value: null },
8101
- iridescenceMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8020
+ iridescenceMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8102
8021
  iridescenceIOR: { value: 1.3 },
8103
8022
  iridescenceThicknessMinimum: { value: 100 },
8104
8023
  iridescenceThicknessMaximum: { value: 400 },
8105
8024
  iridescenceThicknessMap: { value: null },
8106
- iridescenceThicknessMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8025
+ iridescenceThicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8107
8026
  sheen: { value: 0 },
8108
- sheenColor: { value: /* @__PURE__ */ new Color(0) },
8027
+ sheenColor: { value: /*@__PURE__*/ new Color(0) },
8109
8028
  sheenColorMap: { value: null },
8110
- sheenColorMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8029
+ sheenColorMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8111
8030
  sheenRoughness: { value: 1 },
8112
8031
  sheenRoughnessMap: { value: null },
8113
- sheenRoughnessMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8032
+ sheenRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8114
8033
  transmission: { value: 0 },
8115
8034
  transmissionMap: { value: null },
8116
- transmissionMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8117
- transmissionSamplerSize: { value: /* @__PURE__ */ new Vector2() },
8035
+ transmissionMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8036
+ transmissionSamplerSize: { value: /*@__PURE__*/ new Vector2() },
8118
8037
  transmissionSamplerMap: { value: null },
8119
8038
  thickness: { value: 0 },
8120
8039
  thicknessMap: { value: null },
8121
- thicknessMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8040
+ thicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8122
8041
  attenuationDistance: { value: 0 },
8123
- attenuationColor: { value: /* @__PURE__ */ new Color(0) },
8124
- specularColor: { value: /* @__PURE__ */ new Color(1, 1, 1) },
8042
+ attenuationColor: { value: /*@__PURE__*/ new Color(0) },
8043
+ specularColor: { value: /*@__PURE__*/ new Color(1, 1, 1) },
8125
8044
  specularColorMap: { value: null },
8126
- specularColorMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8045
+ specularColorMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8127
8046
  specularIntensity: { value: 1 },
8128
8047
  specularIntensityMap: { value: null },
8129
- specularIntensityMapTransform: { value: /* @__PURE__ */ new Matrix3() },
8130
- anisotropyVector: { value: /* @__PURE__ */ new Vector2() },
8048
+ specularIntensityMapTransform: { value: /*@__PURE__*/ new Matrix3() },
8049
+ anisotropyVector: { value: /*@__PURE__*/ new Vector2() },
8131
8050
  anisotropyMap: { value: null },
8132
- anisotropyMapTransform: { value: /* @__PURE__ */ new Matrix3() }
8051
+ anisotropyMapTransform: { value: /*@__PURE__*/ new Matrix3() }
8133
8052
  }]),
8134
8053
  vertexShader: ShaderChunk.meshphysical_vert,
8135
8054
  fragmentShader: ShaderChunk.meshphysical_frag
@@ -8139,8 +8058,8 @@ const _rgb = {
8139
8058
  b: 0,
8140
8059
  g: 0
8141
8060
  };
8142
- const _e1$1 = /* @__PURE__ */ new Euler();
8143
- const _m1$1 = /* @__PURE__ */ new Matrix4();
8061
+ const _e1$1 = /*@__PURE__*/ new Euler();
8062
+ const _m1$1 = /*@__PURE__*/ new Matrix4();
8144
8063
  function WebGLBackground(renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha) {
8145
8064
  const clearColor = new Color(0);
8146
8065
  let clearAlpha = alpha === true ? 0 : 1;
@@ -8174,21 +8093,21 @@ function WebGLBackground(renderer, cubemaps, cubeuvmaps, state, objects, alpha,
8174
8093
  }
8175
8094
  function addToRenderList(renderList, scene) {
8176
8095
  const background = getBackground(scene);
8177
- if (background && (background.isCubeTexture || background.mapping === CubeUVReflectionMapping)) {
8096
+ if (background && (background.isCubeTexture || background.mapping === 306)) {
8178
8097
  if (boxMesh === void 0) {
8179
8098
  boxMesh = new Mesh(new BoxGeometry(1, 1, 1), new ShaderMaterial({
8180
8099
  name: "BackgroundCubeMaterial",
8181
8100
  uniforms: cloneUniforms(ShaderLib.backgroundCube.uniforms),
8182
8101
  vertexShader: ShaderLib.backgroundCube.vertexShader,
8183
8102
  fragmentShader: ShaderLib.backgroundCube.fragmentShader,
8184
- side: BackSide,
8103
+ side: 1,
8185
8104
  depthTest: false,
8186
8105
  depthWrite: false,
8187
8106
  fog: false
8188
8107
  }));
8189
8108
  boxMesh.geometry.deleteAttribute("normal");
8190
8109
  boxMesh.geometry.deleteAttribute("uv");
8191
- boxMesh.onBeforeRender = function(renderer$1, scene$1, camera) {
8110
+ boxMesh.onBeforeRender = function(renderer, scene, camera) {
8192
8111
  this.matrixWorld.copyPosition(camera.matrixWorld);
8193
8112
  };
8194
8113
  Object.defineProperty(boxMesh.material, "envMap", { get: function() {
@@ -8225,7 +8144,7 @@ function WebGLBackground(renderer, cubemaps, cubeuvmaps, state, objects, alpha,
8225
8144
  uniforms: cloneUniforms(ShaderLib.background.uniforms),
8226
8145
  vertexShader: ShaderLib.background.vertexShader,
8227
8146
  fragmentShader: ShaderLib.background.fragmentShader,
8228
- side: FrontSide,
8147
+ side: 0,
8229
8148
  depthTest: false,
8230
8149
  depthWrite: false,
8231
8150
  fog: false
@@ -8251,24 +8170,24 @@ function WebGLBackground(renderer, cubemaps, cubeuvmaps, state, objects, alpha,
8251
8170
  renderList.unshift(planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null);
8252
8171
  }
8253
8172
  }
8254
- function setClear(color, alpha$1) {
8173
+ function setClear(color, alpha) {
8255
8174
  color.getRGB(_rgb, getUnlitUniformColorSpace(renderer));
8256
- state.buffers.color.setClear(_rgb.r, _rgb.g, _rgb.b, alpha$1, premultipliedAlpha);
8175
+ state.buffers.color.setClear(_rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha);
8257
8176
  }
8258
8177
  return {
8259
8178
  getClearColor: function() {
8260
8179
  return clearColor;
8261
8180
  },
8262
- setClearColor: function(color, alpha$1 = 1) {
8181
+ setClearColor: function(color, alpha = 1) {
8263
8182
  clearColor.set(color);
8264
- clearAlpha = alpha$1;
8183
+ clearAlpha = alpha;
8265
8184
  setClear(clearColor, clearAlpha);
8266
8185
  },
8267
8186
  getClearAlpha: function() {
8268
8187
  return clearAlpha;
8269
8188
  },
8270
- setClearAlpha: function(alpha$1) {
8271
- clearAlpha = alpha$1;
8189
+ setClearAlpha: function(alpha) {
8190
+ clearAlpha = alpha;
8272
8191
  setClear(clearColor, clearAlpha);
8273
8192
  },
8274
8193
  render,
@@ -8369,11 +8288,11 @@ function WebGLBindingStates(gl, attributes) {
8369
8288
  }
8370
8289
  function saveCache(object, geometry, program, index) {
8371
8290
  const cache = {};
8372
- const attributes$1 = geometry.attributes;
8291
+ const attributes = geometry.attributes;
8373
8292
  let attributesNum = 0;
8374
8293
  const programAttributes = program.getAttributes();
8375
8294
  for (const name in programAttributes) if (programAttributes[name].location >= 0) {
8376
- let attribute = attributes$1[name];
8295
+ let attribute = attributes[name];
8377
8296
  if (attribute === void 0) {
8378
8297
  if (name === "instanceMatrix" && object.instanceMatrix) attribute = object.instanceMatrix;
8379
8298
  if (name === "instanceColor" && object.instanceColor) attribute = object.instanceColor;
@@ -8442,7 +8361,7 @@ function WebGLBindingStates(gl, attributes) {
8442
8361
  const buffer = attribute.buffer;
8443
8362
  const type = attribute.type;
8444
8363
  const bytesPerElement = attribute.bytesPerElement;
8445
- const integer = type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === IntType;
8364
+ const integer = type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === 1013;
8446
8365
  if (geometryAttribute.isInterleavedBufferAttribute) {
8447
8366
  const data = geometryAttribute.data;
8448
8367
  const stride = data.stride;
@@ -8480,7 +8399,7 @@ function WebGLBindingStates(gl, attributes) {
8480
8399
  }
8481
8400
  disableUnusedAttributes();
8482
8401
  }
8483
- function dispose$1() {
8402
+ function dispose() {
8484
8403
  reset();
8485
8404
  for (const geometryId in bindingStates) {
8486
8405
  const programMap = bindingStates[geometryId];
@@ -8536,7 +8455,7 @@ function WebGLBindingStates(gl, attributes) {
8536
8455
  setup,
8537
8456
  reset,
8538
8457
  resetDefaultState,
8539
- dispose: dispose$1,
8458
+ dispose,
8540
8459
  releaseStatesOfGeometry,
8541
8460
  releaseStatesOfProgram,
8542
8461
  initAttributes,
@@ -8593,20 +8512,20 @@ function WebGLCapabilities(gl, extensions, parameters, utils) {
8593
8512
  return maxAnisotropy;
8594
8513
  }
8595
8514
  function textureFormatReadable(textureFormat) {
8596
- if (textureFormat !== RGBAFormat && utils.convert(textureFormat) !== gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT)) return false;
8515
+ if (textureFormat !== 1023 && utils.convert(textureFormat) !== gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT)) return false;
8597
8516
  return true;
8598
8517
  }
8599
8518
  function textureTypeReadable(textureType) {
8600
- const halfFloatSupportedByExt = textureType === HalfFloatType && (extensions.has("EXT_color_buffer_half_float") || extensions.has("EXT_color_buffer_float"));
8601
- if (textureType !== UnsignedByteType && utils.convert(textureType) !== gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) && textureType !== FloatType && !halfFloatSupportedByExt) return false;
8519
+ const halfFloatSupportedByExt = textureType === 1016 && (extensions.has("EXT_color_buffer_half_float") || extensions.has("EXT_color_buffer_float"));
8520
+ if (textureType !== 1009 && utils.convert(textureType) !== gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) && textureType !== 1015 && !halfFloatSupportedByExt) return false;
8602
8521
  return true;
8603
8522
  }
8604
- function getMaxPrecision(precision$1) {
8605
- if (precision$1 === "highp") {
8523
+ function getMaxPrecision(precision) {
8524
+ if (precision === "highp") {
8606
8525
  if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) return "highp";
8607
- precision$1 = "mediump";
8526
+ precision = "mediump";
8608
8527
  }
8609
- if (precision$1 === "mediump") {
8528
+ if (precision === "mediump") {
8610
8529
  if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) return "mediump";
8611
8530
  }
8612
8531
  return "lowp";
@@ -8730,14 +8649,14 @@ function WebGLClipping(properties) {
8730
8649
  function WebGLCubeMaps(renderer) {
8731
8650
  let cubemaps = /* @__PURE__ */ new WeakMap();
8732
8651
  function mapTextureMapping(texture, mapping) {
8733
- if (mapping === EquirectangularReflectionMapping) texture.mapping = CubeReflectionMapping;
8734
- else if (mapping === EquirectangularRefractionMapping) texture.mapping = CubeRefractionMapping;
8652
+ if (mapping === 303) texture.mapping = 301;
8653
+ else if (mapping === 304) texture.mapping = 302;
8735
8654
  return texture;
8736
8655
  }
8737
8656
  function get(texture) {
8738
8657
  if (texture && texture.isTexture) {
8739
8658
  const mapping = texture.mapping;
8740
- if (mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping) if (cubemaps.has(texture)) {
8659
+ if (mapping === 303 || mapping === 304) if (cubemaps.has(texture)) {
8741
8660
  const cubemap = cubemaps.get(texture).texture;
8742
8661
  return mapTextureMapping(cubemap, texture.mapping);
8743
8662
  } else {
@@ -8762,12 +8681,12 @@ function WebGLCubeMaps(renderer) {
8762
8681
  cubemap.dispose();
8763
8682
  }
8764
8683
  }
8765
- function dispose$1() {
8684
+ function dispose() {
8766
8685
  cubemaps = /* @__PURE__ */ new WeakMap();
8767
8686
  }
8768
8687
  return {
8769
8688
  get,
8770
- dispose: dispose$1
8689
+ dispose
8771
8690
  };
8772
8691
  }
8773
8692
  var OrthographicCamera = class extends Camera {
@@ -8863,8 +8782,8 @@ const EXTRA_LOD_SIGMA = [
8863
8782
  .582
8864
8783
  ];
8865
8784
  const MAX_SAMPLES = 20;
8866
- const _flatCamera = /* @__PURE__ */ new OrthographicCamera();
8867
- const _clearColor = /* @__PURE__ */ new Color();
8785
+ const _flatCamera = /*@__PURE__*/ new OrthographicCamera();
8786
+ const _clearColor = /*@__PURE__*/ new Color();
8868
8787
  let _oldTarget = null;
8869
8788
  let _oldActiveCubeFace = 0;
8870
8789
  let _oldActiveMipmapLevel = 0;
@@ -8872,16 +8791,16 @@ let _oldXrEnabled = false;
8872
8791
  const PHI = (1 + Math.sqrt(5)) / 2;
8873
8792
  const INV_PHI = 1 / PHI;
8874
8793
  const _axisDirections = [
8875
- /* @__PURE__ */ new Vector3(-PHI, INV_PHI, 0),
8876
- /* @__PURE__ */ new Vector3(PHI, INV_PHI, 0),
8877
- /* @__PURE__ */ new Vector3(-INV_PHI, 0, PHI),
8878
- /* @__PURE__ */ new Vector3(INV_PHI, 0, PHI),
8879
- /* @__PURE__ */ new Vector3(0, PHI, -INV_PHI),
8880
- /* @__PURE__ */ new Vector3(0, PHI, INV_PHI),
8881
- /* @__PURE__ */ new Vector3(-1, 1, -1),
8882
- /* @__PURE__ */ new Vector3(1, 1, -1),
8883
- /* @__PURE__ */ new Vector3(-1, 1, 1),
8884
- /* @__PURE__ */ new Vector3(1, 1, 1)
8794
+ /*@__PURE__*/ new Vector3(-PHI, INV_PHI, 0),
8795
+ /*@__PURE__*/ new Vector3(PHI, INV_PHI, 0),
8796
+ /*@__PURE__*/ new Vector3(-INV_PHI, 0, PHI),
8797
+ /*@__PURE__*/ new Vector3(INV_PHI, 0, PHI),
8798
+ /*@__PURE__*/ new Vector3(0, PHI, -INV_PHI),
8799
+ /*@__PURE__*/ new Vector3(0, PHI, INV_PHI),
8800
+ /*@__PURE__*/ new Vector3(-1, 1, -1),
8801
+ /*@__PURE__*/ new Vector3(1, 1, -1),
8802
+ /*@__PURE__*/ new Vector3(-1, 1, 1),
8803
+ /*@__PURE__*/ new Vector3(1, 1, 1)
8885
8804
  ];
8886
8805
  /**
8887
8806
  * This class generates a Prefiltered, Mipmapped Radiance Environment Map
@@ -8997,7 +8916,7 @@ var PMREMGenerator = class {
8997
8916
  _setViewport(outputTarget, 0, 0, outputTarget.width, outputTarget.height);
8998
8917
  }
8999
8918
  _fromTexture(texture, renderTarget) {
9000
- if (texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping) this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width || texture.image[0].image.width);
8919
+ if (texture.mapping === 301 || texture.mapping === 302) this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width || texture.image[0].image.width);
9001
8920
  else this._setSize(texture.image.width / 4);
9002
8921
  _oldTarget = this._renderer.getRenderTarget();
9003
8922
  _oldActiveCubeFace = this._renderer.getActiveCubeFace();
@@ -9058,11 +8977,11 @@ var PMREMGenerator = class {
9058
8977
  const originalAutoClear = renderer.autoClear;
9059
8978
  const toneMapping = renderer.toneMapping;
9060
8979
  renderer.getClearColor(_clearColor);
9061
- renderer.toneMapping = NoToneMapping;
8980
+ renderer.toneMapping = 0;
9062
8981
  renderer.autoClear = false;
9063
8982
  const backgroundMaterial = new MeshBasicMaterial({
9064
8983
  name: "PMREM.Background",
9065
- side: BackSide,
8984
+ side: 1,
9066
8985
  depthWrite: false,
9067
8986
  depthTest: false
9068
8987
  });
@@ -9105,7 +9024,7 @@ var PMREMGenerator = class {
9105
9024
  }
9106
9025
  _textureToCubeUV(texture, cubeUVRenderTarget) {
9107
9026
  const renderer = this._renderer;
9108
- const isCubeTexture = texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping;
9027
+ const isCubeTexture = texture.mapping === 301 || texture.mapping === 302;
9109
9028
  if (isCubeTexture) {
9110
9029
  if (this._cubemapMaterial === null) this._cubemapMaterial = _getCubemapMaterial();
9111
9030
  this._cubemapMaterial.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;
@@ -9267,7 +9186,7 @@ function _createPlanes(lodMax) {
9267
9186
  }
9268
9187
  function _createRenderTarget(width, height, params) {
9269
9188
  const cubeUVRenderTarget = new WebGLRenderTarget(width, height, params);
9270
- cubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;
9189
+ cubeUVRenderTarget.texture.mapping = 306;
9271
9190
  cubeUVRenderTarget.texture.name = "PMREM.cubeUv";
9272
9191
  cubeUVRenderTarget.scissorTest = true;
9273
9192
  return cubeUVRenderTarget;
@@ -9358,7 +9277,7 @@ function _getBlurShader(lodMax, width, height) {
9358
9277
 
9359
9278
  }
9360
9279
  `,
9361
- blending: NoBlending,
9280
+ blending: 0,
9362
9281
  depthTest: false,
9363
9282
  depthWrite: false
9364
9283
  });
@@ -9388,7 +9307,7 @@ function _getEquirectMaterial() {
9388
9307
 
9389
9308
  }
9390
9309
  `,
9391
- blending: NoBlending,
9310
+ blending: 0,
9392
9311
  depthTest: false,
9393
9312
  depthWrite: false
9394
9313
  });
@@ -9418,7 +9337,7 @@ function _getCubemapMaterial() {
9418
9337
 
9419
9338
  }
9420
9339
  `,
9421
- blending: NoBlending,
9340
+ blending: 0,
9422
9341
  depthTest: false,
9423
9342
  depthWrite: false
9424
9343
  });
@@ -9487,8 +9406,8 @@ function WebGLCubeUVMaps(renderer) {
9487
9406
  function get(texture) {
9488
9407
  if (texture && texture.isTexture) {
9489
9408
  const mapping = texture.mapping;
9490
- const isEquirectMap = mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping;
9491
- const isCubeMap = mapping === CubeReflectionMapping || mapping === CubeRefractionMapping;
9409
+ const isEquirectMap = mapping === 303 || mapping === 304;
9410
+ const isCubeMap = mapping === 301 || mapping === 302;
9492
9411
  if (isEquirectMap || isCubeMap) {
9493
9412
  let renderTarget = cubeUVmaps.get(texture);
9494
9413
  const currentPMREMVersion = renderTarget !== void 0 ? renderTarget.texture.pmremVersion : 0;
@@ -9529,7 +9448,7 @@ function WebGLCubeUVMaps(renderer) {
9529
9448
  cubemapUV.dispose();
9530
9449
  }
9531
9450
  }
9532
- function dispose$1() {
9451
+ function dispose() {
9533
9452
  cubeUVmaps = /* @__PURE__ */ new WeakMap();
9534
9453
  if (pmremGenerator !== null) {
9535
9454
  pmremGenerator.dispose();
@@ -9538,7 +9457,7 @@ function WebGLCubeUVMaps(renderer) {
9538
9457
  }
9539
9458
  return {
9540
9459
  get,
9541
- dispose: dispose$1
9460
+ dispose
9542
9461
  };
9543
9462
  }
9544
9463
  function WebGLExtensions(gl) {
@@ -9875,7 +9794,7 @@ function WebGLObjects(gl, geometries, attributes, info) {
9875
9794
  }
9876
9795
  return buffergeometry;
9877
9796
  }
9878
- function dispose$1() {
9797
+ function dispose() {
9879
9798
  updateMap = /* @__PURE__ */ new WeakMap();
9880
9799
  }
9881
9800
  function onInstancedMeshDispose(event) {
@@ -9886,14 +9805,14 @@ function WebGLObjects(gl, geometries, attributes, info) {
9886
9805
  }
9887
9806
  return {
9888
9807
  update,
9889
- dispose: dispose$1
9808
+ dispose
9890
9809
  };
9891
9810
  }
9892
9811
  var DepthTexture = class extends Texture {
9893
9812
  constructor(width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format = DepthFormat) {
9894
- if (format !== DepthFormat && format !== DepthStencilFormat) throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
9895
- if (type === void 0 && format === DepthFormat) type = UnsignedIntType;
9896
- if (type === void 0 && format === DepthStencilFormat) type = UnsignedInt248Type;
9813
+ if (format !== 1026 && format !== 1027) throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
9814
+ if (type === void 0 && format === 1026) type = UnsignedIntType;
9815
+ if (type === void 0 && format === 1027) type = UnsignedInt248Type;
9897
9816
  super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);
9898
9817
  this.isDepthTexture = true;
9899
9818
  this.image = {
@@ -9959,16 +9878,16 @@ var DepthTexture = class extends Texture {
9959
9878
  * like .set for an optional property of the object
9960
9879
  *
9961
9880
  */
9962
- const emptyTexture = /* @__PURE__ */ new Texture();
9963
- const emptyShadowTexture = /* @__PURE__ */ new DepthTexture(1, 1);
9964
- const emptyArrayTexture = /* @__PURE__ */ new DataArrayTexture();
9965
- const empty3dTexture = /* @__PURE__ */ new Data3DTexture();
9966
- const emptyCubeTexture = /* @__PURE__ */ new CubeTexture();
9881
+ const emptyTexture = /*@__PURE__*/ new Texture();
9882
+ const emptyShadowTexture = /*@__PURE__*/ new DepthTexture(1, 1);
9883
+ const emptyArrayTexture = /*@__PURE__*/ new DataArrayTexture();
9884
+ const empty3dTexture = /*@__PURE__*/ new Data3DTexture();
9885
+ const emptyCubeTexture = /*@__PURE__*/ new CubeTexture();
9967
9886
  const arrayCacheF32 = [];
9968
9887
  const arrayCacheI32 = [];
9969
- const mat4array = new Float32Array(16);
9970
- const mat3array = new Float32Array(9);
9971
- const mat2array = new Float32Array(4);
9888
+ const mat4array = /* @__PURE__ */ new Float32Array(16);
9889
+ const mat3array = /* @__PURE__ */ new Float32Array(9);
9890
+ const mat2array = /* @__PURE__ */ new Float32Array(4);
9972
9891
  function flatten(array, nBlocks, blockSize) {
9973
9892
  const firstElem = array[0];
9974
9893
  if (firstElem <= 0 || firstElem > 0) return array;
@@ -10215,7 +10134,7 @@ function setValueT1(gl, v, textures) {
10215
10134
  }
10216
10135
  let emptyTexture2D;
10217
10136
  if (this.type === gl.SAMPLER_2D_SHADOW) {
10218
- emptyShadowTexture.compareFunction = LessEqualCompare;
10137
+ emptyShadowTexture.compareFunction = 515;
10219
10138
  emptyTexture2D = emptyShadowTexture;
10220
10139
  } else emptyTexture2D = emptyTexture;
10221
10140
  textures.setTexture2D(v || emptyTexture2D, unit);
@@ -10532,8 +10451,8 @@ function getEncodingComponents(colorSpace) {
10532
10451
  const encodingPrimaries = ColorManagement.getPrimaries(colorSpace);
10533
10452
  let gamutMapping;
10534
10453
  if (workingPrimaries === encodingPrimaries) gamutMapping = "";
10535
- else if (workingPrimaries === P3Primaries && encodingPrimaries === Rec709Primaries) gamutMapping = "LinearDisplayP3ToLinearSRGB";
10536
- else if (workingPrimaries === Rec709Primaries && encodingPrimaries === P3Primaries) gamutMapping = "LinearSRGBToLinearDisplayP3";
10454
+ else if (workingPrimaries === "p3" && encodingPrimaries === "rec709") gamutMapping = "LinearDisplayP3ToLinearSRGB";
10455
+ else if (workingPrimaries === "rec709" && encodingPrimaries === "p3") gamutMapping = "LinearSRGBToLinearDisplayP3";
10537
10456
  switch (colorSpace) {
10538
10457
  case LinearSRGBColorSpace:
10539
10458
  case LinearDisplayP3ColorSpace: return [gamutMapping, "LinearTransferOETF"];
@@ -10561,25 +10480,25 @@ function getTexelEncodingFunction(functionName, colorSpace) {
10561
10480
  function getToneMappingFunction(functionName, toneMapping) {
10562
10481
  let toneMappingName;
10563
10482
  switch (toneMapping) {
10564
- case LinearToneMapping:
10483
+ case 1:
10565
10484
  toneMappingName = "Linear";
10566
10485
  break;
10567
- case ReinhardToneMapping:
10486
+ case 2:
10568
10487
  toneMappingName = "Reinhard";
10569
10488
  break;
10570
- case CineonToneMapping:
10489
+ case 3:
10571
10490
  toneMappingName = "Cineon";
10572
10491
  break;
10573
- case ACESFilmicToneMapping:
10492
+ case 4:
10574
10493
  toneMappingName = "ACESFilmic";
10575
10494
  break;
10576
- case AgXToneMapping:
10495
+ case 6:
10577
10496
  toneMappingName = "AgX";
10578
10497
  break;
10579
- case NeutralToneMapping:
10498
+ case 7:
10580
10499
  toneMappingName = "Neutral";
10581
10500
  break;
10582
- case CustomToneMapping:
10501
+ case 5:
10583
10502
  toneMappingName = "Custom";
10584
10503
  break;
10585
10504
  default:
@@ -10588,7 +10507,7 @@ function getToneMappingFunction(functionName, toneMapping) {
10588
10507
  }
10589
10508
  return "vec3 " + functionName + "( vec3 color ) { return " + toneMappingName + "ToneMapping( color ); }";
10590
10509
  }
10591
- const _v0$1 = /* @__PURE__ */ new Vector3();
10510
+ const _v0$1 = /*@__PURE__*/ new Vector3();
10592
10511
  function getLuminanceFunction() {
10593
10512
  ColorManagement.getLuminanceCoefficients(_v0$1);
10594
10513
  return [
@@ -10689,19 +10608,19 @@ function generatePrecision(parameters) {
10689
10608
  }
10690
10609
  function generateShadowMapTypeDefine(parameters) {
10691
10610
  let shadowMapTypeDefine = "SHADOWMAP_TYPE_BASIC";
10692
- if (parameters.shadowMapType === PCFShadowMap) shadowMapTypeDefine = "SHADOWMAP_TYPE_PCF";
10693
- else if (parameters.shadowMapType === PCFSoftShadowMap) shadowMapTypeDefine = "SHADOWMAP_TYPE_PCF_SOFT";
10694
- else if (parameters.shadowMapType === VSMShadowMap) shadowMapTypeDefine = "SHADOWMAP_TYPE_VSM";
10611
+ if (parameters.shadowMapType === 1) shadowMapTypeDefine = "SHADOWMAP_TYPE_PCF";
10612
+ else if (parameters.shadowMapType === 2) shadowMapTypeDefine = "SHADOWMAP_TYPE_PCF_SOFT";
10613
+ else if (parameters.shadowMapType === 3) shadowMapTypeDefine = "SHADOWMAP_TYPE_VSM";
10695
10614
  return shadowMapTypeDefine;
10696
10615
  }
10697
10616
  function generateEnvMapTypeDefine(parameters) {
10698
10617
  let envMapTypeDefine = "ENVMAP_TYPE_CUBE";
10699
10618
  if (parameters.envMap) switch (parameters.envMapMode) {
10700
- case CubeReflectionMapping:
10701
- case CubeRefractionMapping:
10619
+ case 301:
10620
+ case 302:
10702
10621
  envMapTypeDefine = "ENVMAP_TYPE_CUBE";
10703
10622
  break;
10704
- case CubeUVReflectionMapping:
10623
+ case 306:
10705
10624
  envMapTypeDefine = "ENVMAP_TYPE_CUBE_UV";
10706
10625
  break;
10707
10626
  }
@@ -10710,7 +10629,7 @@ function generateEnvMapTypeDefine(parameters) {
10710
10629
  function generateEnvMapModeDefine(parameters) {
10711
10630
  let envMapModeDefine = "ENVMAP_MODE_REFLECTION";
10712
10631
  if (parameters.envMap) switch (parameters.envMapMode) {
10713
- case CubeRefractionMapping:
10632
+ case 302:
10714
10633
  envMapModeDefine = "ENVMAP_MODE_REFRACTION";
10715
10634
  break;
10716
10635
  }
@@ -10719,13 +10638,13 @@ function generateEnvMapModeDefine(parameters) {
10719
10638
  function generateEnvMapBlendingDefine(parameters) {
10720
10639
  let envMapBlendingDefine = "ENVMAP_BLENDING_NONE";
10721
10640
  if (parameters.envMap) switch (parameters.combine) {
10722
- case MultiplyOperation:
10641
+ case 0:
10723
10642
  envMapBlendingDefine = "ENVMAP_BLENDING_MULTIPLY";
10724
10643
  break;
10725
- case MixOperation:
10644
+ case 1:
10726
10645
  envMapBlendingDefine = "ENVMAP_BLENDING_MIX";
10727
10646
  break;
10728
- case AddOperation:
10647
+ case 2:
10729
10648
  envMapBlendingDefine = "ENVMAP_BLENDING_ADD";
10730
10649
  break;
10731
10650
  }
@@ -10970,9 +10889,9 @@ function WebGLProgram(renderer, cacheKey, parameters, bindingStates) {
10970
10889
  "uniform mat4 viewMatrix;",
10971
10890
  "uniform vec3 cameraPosition;",
10972
10891
  "uniform bool isOrthographic;",
10973
- parameters.toneMapping !== NoToneMapping ? "#define TONE_MAPPING" : "",
10974
- parameters.toneMapping !== NoToneMapping ? ShaderChunk["tonemapping_pars_fragment"] : "",
10975
- parameters.toneMapping !== NoToneMapping ? getToneMappingFunction("toneMapping", parameters.toneMapping) : "",
10892
+ parameters.toneMapping !== 0 ? "#define TONE_MAPPING" : "",
10893
+ parameters.toneMapping !== 0 ? ShaderChunk["tonemapping_pars_fragment"] : "",
10894
+ parameters.toneMapping !== 0 ? getToneMappingFunction("toneMapping", parameters.toneMapping) : "",
10976
10895
  parameters.dithering ? "#define DITHERING" : "",
10977
10896
  parameters.opaque ? "#define OPAQUE" : "",
10978
10897
  ShaderChunk["colorspace_pars_fragment"],
@@ -11000,8 +10919,8 @@ function WebGLProgram(renderer, cacheKey, parameters, bindingStates) {
11000
10919
  ].join("\n") + "\n" + prefixVertex;
11001
10920
  prefixFragment = [
11002
10921
  "#define varying in",
11003
- parameters.glslVersion === GLSL3 ? "" : "layout(location = 0) out highp vec4 pc_fragColor;",
11004
- parameters.glslVersion === GLSL3 ? "" : "#define gl_FragColor pc_fragColor",
10922
+ parameters.glslVersion === "300 es" ? "" : "layout(location = 0) out highp vec4 pc_fragColor;",
10923
+ parameters.glslVersion === "300 es" ? "" : "#define gl_FragColor pc_fragColor",
11005
10924
  "#define gl_FragDepthEXT gl_FragDepth",
11006
10925
  "#define texture2D texture",
11007
10926
  "#define textureCube texture",
@@ -11023,7 +10942,7 @@ function WebGLProgram(renderer, cacheKey, parameters, bindingStates) {
11023
10942
  if (parameters.index0AttributeName !== void 0) gl.bindAttribLocation(program, 0, parameters.index0AttributeName);
11024
10943
  else if (parameters.morphTargets === true) gl.bindAttribLocation(program, 0, "position");
11025
10944
  gl.linkProgram(program);
11026
- function onFirstUse(self$1) {
10945
+ function onFirstUse(self) {
11027
10946
  if (renderer.debug.checkShaderErrors) {
11028
10947
  const programLog = gl.getProgramInfoLog(program).trim();
11029
10948
  const vertexLog = gl.getShaderInfoLog(glVertexShader).trim();
@@ -11036,11 +10955,11 @@ function WebGLProgram(renderer, cacheKey, parameters, bindingStates) {
11036
10955
  else {
11037
10956
  const vertexErrors = getShaderErrors(gl, glVertexShader, "vertex");
11038
10957
  const fragmentErrors = getShaderErrors(gl, glFragmentShader, "fragment");
11039
- console.error("THREE.WebGLProgram: Shader Error " + gl.getError() + " - VALIDATE_STATUS " + gl.getProgramParameter(program, gl.VALIDATE_STATUS) + "\n\nMaterial Name: " + self$1.name + "\nMaterial Type: " + self$1.type + "\n\nProgram Info Log: " + programLog + "\n" + vertexErrors + "\n" + fragmentErrors);
10958
+ console.error("THREE.WebGLProgram: Shader Error " + gl.getError() + " - VALIDATE_STATUS " + gl.getProgramParameter(program, gl.VALIDATE_STATUS) + "\n\nMaterial Name: " + self.name + "\nMaterial Type: " + self.type + "\n\nProgram Info Log: " + programLog + "\n" + vertexErrors + "\n" + fragmentErrors);
11040
10959
  }
11041
10960
  } else if (programLog !== "") console.warn("THREE.WebGLProgram: Program Info Log:", programLog);
11042
10961
  else if (vertexLog === "" || fragmentLog === "") haveDiagnostics = false;
11043
- if (haveDiagnostics) self$1.diagnostics = {
10962
+ if (haveDiagnostics) self.diagnostics = {
11044
10963
  runnable,
11045
10964
  programLog,
11046
10965
  vertexShader: {
@@ -11191,7 +11110,7 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11191
11110
  const geometry = object.geometry;
11192
11111
  const environment = material.isMeshStandardMaterial ? scene.environment : null;
11193
11112
  const envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || environment);
11194
- const envMapCubeUVHeight = !!envMap && envMap.mapping === CubeUVReflectionMapping ? envMap.image.height : null;
11113
+ const envMapCubeUVHeight = !!envMap && envMap.mapping === 306 ? envMap.image.height : null;
11195
11114
  const shaderID = shaderIDs[material.type];
11196
11115
  if (material.precision !== null) {
11197
11116
  precision = capabilities.getMaxPrecision(material.precision);
@@ -11254,7 +11173,7 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11254
11173
  const HAS_ALPHATEST = material.alphaTest > 0;
11255
11174
  const HAS_ALPHAHASH = !!material.alphaHash;
11256
11175
  const HAS_EXTENSIONS = !!material.extensions;
11257
- let toneMapping = NoToneMapping;
11176
+ let toneMapping = 0;
11258
11177
  if (material.toneMapped) {
11259
11178
  if (currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true) toneMapping = renderer.toneMapping;
11260
11179
  }
@@ -11289,8 +11208,8 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11289
11208
  normalMap: HAS_NORMALMAP,
11290
11209
  displacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP,
11291
11210
  emissiveMap: HAS_EMISSIVEMAP,
11292
- normalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === ObjectSpaceNormalMap,
11293
- normalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === TangentSpaceNormalMap,
11211
+ normalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === 1,
11212
+ normalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === 0,
11294
11213
  metalnessMap: HAS_METALNESSMAP,
11295
11214
  roughnessMap: HAS_ROUGHNESSMAP,
11296
11215
  anisotropy: HAS_ANISOTROPY,
@@ -11313,7 +11232,7 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11313
11232
  transmissionMap: HAS_TRANSMISSIONMAP,
11314
11233
  thicknessMap: HAS_THICKNESSMAP,
11315
11234
  gradientMap: HAS_GRADIENTMAP,
11316
- opaque: material.transparent === false && material.blending === NormalBlending && material.alphaToCoverage === false,
11235
+ opaque: material.transparent === false && material.blending === 1 && material.alphaToCoverage === false,
11317
11236
  alphaMap: HAS_ALPHAMAP,
11318
11237
  alphaTest: HAS_ALPHATEST,
11319
11238
  alphaHash: HAS_ALPHAHASH,
@@ -11375,10 +11294,10 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11375
11294
  shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,
11376
11295
  shadowMapType: renderer.shadowMap.type,
11377
11296
  toneMapping,
11378
- decodeVideoTexture: HAS_MAP && material.map.isVideoTexture === true && ColorManagement.getTransfer(material.map.colorSpace) === SRGBTransfer,
11297
+ decodeVideoTexture: HAS_MAP && material.map.isVideoTexture === true && ColorManagement.getTransfer(material.map.colorSpace) === "srgb",
11379
11298
  premultipliedAlpha: material.premultipliedAlpha,
11380
- doubleSided: material.side === DoubleSide,
11381
- flipSided: material.side === BackSide,
11299
+ doubleSided: material.side === 2,
11300
+ flipSided: material.side === 1,
11382
11301
  useDepthPacking: material.depthPacking >= 0,
11383
11302
  depthPacking: material.depthPacking || 0,
11384
11303
  index0AttributeName: material.index0AttributeName,
@@ -11547,7 +11466,7 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11547
11466
  function releaseShaderCache(material) {
11548
11467
  _customShaders.remove(material);
11549
11468
  }
11550
- function dispose$1() {
11469
+ function dispose() {
11551
11470
  _customShaders.dispose();
11552
11471
  }
11553
11472
  return {
@@ -11558,7 +11477,7 @@ function WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities,
11558
11477
  releaseProgram,
11559
11478
  releaseShaderCache,
11560
11479
  programs,
11561
- dispose: dispose$1
11480
+ dispose
11562
11481
  };
11563
11482
  }
11564
11483
  function WebGLProperties() {
@@ -11580,7 +11499,7 @@ function WebGLProperties() {
11580
11499
  function update(object, key, value) {
11581
11500
  properties.get(object)[key] = value;
11582
11501
  }
11583
- function dispose$1() {
11502
+ function dispose() {
11584
11503
  properties = /* @__PURE__ */ new WeakMap();
11585
11504
  }
11586
11505
  return {
@@ -11588,7 +11507,7 @@ function WebGLProperties() {
11588
11507
  get,
11589
11508
  remove,
11590
11509
  update,
11591
- dispose: dispose$1
11510
+ dispose
11592
11511
  };
11593
11512
  }
11594
11513
  function painterSortStable(a, b) {
@@ -11696,12 +11615,12 @@ function WebGLRenderLists() {
11696
11615
  } else list = listArray[renderCallDepth];
11697
11616
  return list;
11698
11617
  }
11699
- function dispose$1() {
11618
+ function dispose() {
11700
11619
  lists = /* @__PURE__ */ new WeakMap();
11701
11620
  }
11702
11621
  return {
11703
11622
  get,
11704
- dispose: dispose$1
11623
+ dispose
11705
11624
  };
11706
11625
  }
11707
11626
  function UniformsCache() {
@@ -12108,12 +12027,12 @@ function WebGLRenderStates(extensions) {
12108
12027
  } else renderState = renderStateArray[renderCallDepth];
12109
12028
  return renderState;
12110
12029
  }
12111
- function dispose$1() {
12030
+ function dispose() {
12112
12031
  renderStates = /* @__PURE__ */ new WeakMap();
12113
12032
  }
12114
12033
  return {
12115
12034
  get,
12116
- dispose: dispose$1
12035
+ dispose
12117
12036
  };
12118
12037
  }
12119
12038
  var MeshDepthMaterial = class extends Material {
@@ -12172,9 +12091,9 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12172
12091
  let _frustum = new Frustum();
12173
12092
  const _shadowMapSize = new Vector2(), _viewportSize = new Vector2(), _viewport = new Vector4(), _depthMaterial = new MeshDepthMaterial({ depthPacking: RGBADepthPacking }), _distanceMaterial = new MeshDistanceMaterial(), _materialCache = {}, _maxTextureSize = capabilities.maxTextureSize;
12174
12093
  const shadowSide = {
12175
- [FrontSide]: BackSide,
12176
- [BackSide]: FrontSide,
12177
- [DoubleSide]: DoubleSide
12094
+ [0]: 1,
12095
+ [1]: 0,
12096
+ [2]: 2
12178
12097
  };
12179
12098
  const shadowMaterialVertical = new ShaderMaterial({
12180
12099
  defines: { VSM_SAMPLES: 8 },
@@ -12205,7 +12124,7 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12205
12124
  this.enabled = false;
12206
12125
  this.autoUpdate = true;
12207
12126
  this.needsUpdate = false;
12208
- this.type = PCFShadowMap;
12127
+ this.type = 1;
12209
12128
  let _previousType = this.type;
12210
12129
  this.render = function(lights, scene, camera) {
12211
12130
  if (scope.enabled === false) return;
@@ -12215,12 +12134,12 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12215
12134
  const activeCubeFace = renderer.getActiveCubeFace();
12216
12135
  const activeMipmapLevel = renderer.getActiveMipmapLevel();
12217
12136
  const _state = renderer.state;
12218
- _state.setBlending(NoBlending);
12137
+ _state.setBlending(0);
12219
12138
  _state.buffers.color.setClear(1, 1, 1, 1);
12220
12139
  _state.buffers.depth.setTest(true);
12221
12140
  _state.setScissorTest(false);
12222
- const toVSM = _previousType !== VSMShadowMap && this.type === VSMShadowMap;
12223
- const fromVSM = _previousType === VSMShadowMap && this.type !== VSMShadowMap;
12141
+ const toVSM = _previousType !== 3 && this.type === 3;
12142
+ const fromVSM = _previousType === 3 && this.type !== 3;
12224
12143
  for (let i = 0, il = lights.length; i < il; i++) {
12225
12144
  const light = lights[i];
12226
12145
  const shadow = light.shadow;
@@ -12246,7 +12165,7 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12246
12165
  }
12247
12166
  }
12248
12167
  if (shadow.map === null || toVSM === true || fromVSM === true) {
12249
- const pars = this.type !== VSMShadowMap ? {
12168
+ const pars = this.type !== 3 ? {
12250
12169
  minFilter: NearestFilter,
12251
12170
  magFilter: NearestFilter
12252
12171
  } : {};
@@ -12266,7 +12185,7 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12266
12185
  _frustum = shadow.getFrustum();
12267
12186
  renderObject(scene, camera, shadow.camera, light, this.type);
12268
12187
  }
12269
- if (shadow.isPointLightShadow !== true && this.type === VSMShadowMap) VSMPass(shadow, camera);
12188
+ if (shadow.isPointLightShadow !== true && this.type === 3) VSMPass(shadow, camera);
12270
12189
  shadow.needsUpdate = false;
12271
12190
  }
12272
12191
  _previousType = this.type;
@@ -12319,7 +12238,7 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12319
12238
  }
12320
12239
  result.visible = material.visible;
12321
12240
  result.wireframe = material.wireframe;
12322
- if (type === VSMShadowMap) result.side = material.shadowSide !== null ? material.shadowSide : material.side;
12241
+ if (type === 3) result.side = material.shadowSide !== null ? material.shadowSide : material.side;
12323
12242
  else result.side = material.shadowSide !== null ? material.shadowSide : shadowSide[material.side];
12324
12243
  result.alphaMap = material.alphaMap;
12325
12244
  result.alphaTest = material.alphaTest;
@@ -12341,7 +12260,7 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12341
12260
  function renderObject(object, camera, shadowCamera, light, type) {
12342
12261
  if (object.visible === false) return;
12343
12262
  if (object.layers.test(camera.layers) && (object.isMesh || object.isLine || object.isPoints)) {
12344
- if ((object.castShadow || object.receiveShadow && type === VSMShadowMap) && (!object.frustumCulled || _frustum.intersectsObject(object))) {
12263
+ if ((object.castShadow || object.receiveShadow && type === 3) && (!object.frustumCulled || _frustum.intersectsObject(object))) {
12345
12264
  object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld);
12346
12265
  const geometry = objects.update(object);
12347
12266
  const material = object.material;
@@ -12381,14 +12300,14 @@ function WebGLShadowMap(renderer, objects, capabilities) {
12381
12300
  }
12382
12301
  }
12383
12302
  const reversedFuncs = {
12384
- [NeverDepth]: AlwaysDepth,
12385
- [LessDepth]: GreaterDepth,
12386
- [EqualDepth]: NotEqualDepth,
12387
- [LessEqualDepth]: GreaterEqualDepth,
12388
- [AlwaysDepth]: NeverDepth,
12389
- [GreaterDepth]: LessDepth,
12390
- [NotEqualDepth]: EqualDepth,
12391
- [GreaterEqualDepth]: LessEqualDepth
12303
+ [0]: 1,
12304
+ [2]: 6,
12305
+ [4]: 7,
12306
+ [3]: 5,
12307
+ [1]: 0,
12308
+ [6]: 2,
12309
+ [7]: 4,
12310
+ [5]: 3
12392
12311
  };
12393
12312
  function WebGLState(gl) {
12394
12313
  function ColorBuffer() {
@@ -12449,28 +12368,28 @@ function WebGLState(gl) {
12449
12368
  if (reversed) depthFunc = reversedFuncs[depthFunc];
12450
12369
  if (currentDepthFunc !== depthFunc) {
12451
12370
  switch (depthFunc) {
12452
- case NeverDepth:
12371
+ case 0:
12453
12372
  gl.depthFunc(gl.NEVER);
12454
12373
  break;
12455
- case AlwaysDepth:
12374
+ case 1:
12456
12375
  gl.depthFunc(gl.ALWAYS);
12457
12376
  break;
12458
- case LessDepth:
12377
+ case 2:
12459
12378
  gl.depthFunc(gl.LESS);
12460
12379
  break;
12461
- case LessEqualDepth:
12380
+ case 3:
12462
12381
  gl.depthFunc(gl.LEQUAL);
12463
12382
  break;
12464
- case EqualDepth:
12383
+ case 4:
12465
12384
  gl.depthFunc(gl.EQUAL);
12466
12385
  break;
12467
- case GreaterEqualDepth:
12386
+ case 5:
12468
12387
  gl.depthFunc(gl.GEQUAL);
12469
12388
  break;
12470
- case GreaterDepth:
12389
+ case 6:
12471
12390
  gl.depthFunc(gl.GREATER);
12472
12391
  break;
12473
- case NotEqualDepth:
12392
+ case 7:
12474
12393
  gl.depthFunc(gl.NOTEQUAL);
12475
12394
  break;
12476
12395
  default: gl.depthFunc(gl.LEQUAL);
@@ -12598,7 +12517,7 @@ function WebGLState(gl) {
12598
12517
  const currentScissor = new Vector4().fromArray(scissorParam);
12599
12518
  const currentViewport = new Vector4().fromArray(viewportParam);
12600
12519
  function createTexture(type, target, count, dimensions) {
12601
- const data = new Uint8Array(4);
12520
+ const data = /* @__PURE__ */ new Uint8Array(4);
12602
12521
  const texture = gl.createTexture();
12603
12522
  gl.bindTexture(type, texture);
12604
12523
  gl.texParameteri(type, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
@@ -12616,11 +12535,11 @@ function WebGLState(gl) {
12616
12535
  depthBuffer.setClear(1);
12617
12536
  stencilBuffer.setClear(0);
12618
12537
  enable(gl.DEPTH_TEST);
12619
- depthBuffer.setFunc(LessEqualDepth);
12538
+ depthBuffer.setFunc(3);
12620
12539
  setFlipSided(false);
12621
- setCullFace(CullFaceBack);
12540
+ setCullFace(1);
12622
12541
  enable(gl.CULL_FACE);
12623
- setBlending(NoBlending);
12542
+ setBlending(0);
12624
12543
  function enable(id) {
12625
12544
  if (enabledCapabilities[id] !== true) {
12626
12545
  gl.enable(id);
@@ -12644,25 +12563,25 @@ function WebGLState(gl) {
12644
12563
  return false;
12645
12564
  }
12646
12565
  function drawBuffers(renderTarget, framebuffer) {
12647
- let drawBuffers$1 = defaultDrawbuffers;
12566
+ let drawBuffers = defaultDrawbuffers;
12648
12567
  let needsUpdate = false;
12649
12568
  if (renderTarget) {
12650
- drawBuffers$1 = currentDrawbuffers.get(framebuffer);
12651
- if (drawBuffers$1 === void 0) {
12652
- drawBuffers$1 = [];
12653
- currentDrawbuffers.set(framebuffer, drawBuffers$1);
12569
+ drawBuffers = currentDrawbuffers.get(framebuffer);
12570
+ if (drawBuffers === void 0) {
12571
+ drawBuffers = [];
12572
+ currentDrawbuffers.set(framebuffer, drawBuffers);
12654
12573
  }
12655
12574
  const textures = renderTarget.textures;
12656
- if (drawBuffers$1.length !== textures.length || drawBuffers$1[0] !== gl.COLOR_ATTACHMENT0) {
12657
- for (let i = 0, il = textures.length; i < il; i++) drawBuffers$1[i] = gl.COLOR_ATTACHMENT0 + i;
12658
- drawBuffers$1.length = textures.length;
12575
+ if (drawBuffers.length !== textures.length || drawBuffers[0] !== gl.COLOR_ATTACHMENT0) {
12576
+ for (let i = 0, il = textures.length; i < il; i++) drawBuffers[i] = gl.COLOR_ATTACHMENT0 + i;
12577
+ drawBuffers.length = textures.length;
12659
12578
  needsUpdate = true;
12660
12579
  }
12661
- } else if (drawBuffers$1[0] !== gl.BACK) {
12662
- drawBuffers$1[0] = gl.BACK;
12580
+ } else if (drawBuffers[0] !== gl.BACK) {
12581
+ drawBuffers[0] = gl.BACK;
12663
12582
  needsUpdate = true;
12664
12583
  }
12665
- if (needsUpdate) gl.drawBuffers(drawBuffers$1);
12584
+ if (needsUpdate) gl.drawBuffers(drawBuffers);
12666
12585
  }
12667
12586
  function useProgram(program) {
12668
12587
  if (currentProgram !== program) {
@@ -12673,31 +12592,31 @@ function WebGLState(gl) {
12673
12592
  return false;
12674
12593
  }
12675
12594
  const equationToGL = {
12676
- [AddEquation]: gl.FUNC_ADD,
12677
- [SubtractEquation]: gl.FUNC_SUBTRACT,
12678
- [ReverseSubtractEquation]: gl.FUNC_REVERSE_SUBTRACT
12595
+ [100]: gl.FUNC_ADD,
12596
+ [101]: gl.FUNC_SUBTRACT,
12597
+ [102]: gl.FUNC_REVERSE_SUBTRACT
12679
12598
  };
12680
- equationToGL[MinEquation] = gl.MIN;
12681
- equationToGL[MaxEquation] = gl.MAX;
12599
+ equationToGL[103] = gl.MIN;
12600
+ equationToGL[104] = gl.MAX;
12682
12601
  const factorToGL = {
12683
- [ZeroFactor]: gl.ZERO,
12684
- [OneFactor]: gl.ONE,
12685
- [SrcColorFactor]: gl.SRC_COLOR,
12686
- [SrcAlphaFactor]: gl.SRC_ALPHA,
12687
- [SrcAlphaSaturateFactor]: gl.SRC_ALPHA_SATURATE,
12688
- [DstColorFactor]: gl.DST_COLOR,
12689
- [DstAlphaFactor]: gl.DST_ALPHA,
12690
- [OneMinusSrcColorFactor]: gl.ONE_MINUS_SRC_COLOR,
12691
- [OneMinusSrcAlphaFactor]: gl.ONE_MINUS_SRC_ALPHA,
12692
- [OneMinusDstColorFactor]: gl.ONE_MINUS_DST_COLOR,
12693
- [OneMinusDstAlphaFactor]: gl.ONE_MINUS_DST_ALPHA,
12694
- [ConstantColorFactor]: gl.CONSTANT_COLOR,
12695
- [OneMinusConstantColorFactor]: gl.ONE_MINUS_CONSTANT_COLOR,
12696
- [ConstantAlphaFactor]: gl.CONSTANT_ALPHA,
12697
- [OneMinusConstantAlphaFactor]: gl.ONE_MINUS_CONSTANT_ALPHA
12602
+ [200]: gl.ZERO,
12603
+ [201]: gl.ONE,
12604
+ [202]: gl.SRC_COLOR,
12605
+ [204]: gl.SRC_ALPHA,
12606
+ [210]: gl.SRC_ALPHA_SATURATE,
12607
+ [208]: gl.DST_COLOR,
12608
+ [206]: gl.DST_ALPHA,
12609
+ [203]: gl.ONE_MINUS_SRC_COLOR,
12610
+ [205]: gl.ONE_MINUS_SRC_ALPHA,
12611
+ [209]: gl.ONE_MINUS_DST_COLOR,
12612
+ [207]: gl.ONE_MINUS_DST_ALPHA,
12613
+ [211]: gl.CONSTANT_COLOR,
12614
+ [212]: gl.ONE_MINUS_CONSTANT_COLOR,
12615
+ [213]: gl.CONSTANT_ALPHA,
12616
+ [214]: gl.ONE_MINUS_CONSTANT_ALPHA
12698
12617
  };
12699
12618
  function setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, blendColor, blendAlpha, premultipliedAlpha) {
12700
- if (blending === NoBlending) {
12619
+ if (blending === 0) {
12701
12620
  if (currentBlendingEnabled === true) {
12702
12621
  disable(gl.BLEND);
12703
12622
  currentBlendingEnabled = false;
@@ -12708,24 +12627,24 @@ function WebGLState(gl) {
12708
12627
  enable(gl.BLEND);
12709
12628
  currentBlendingEnabled = true;
12710
12629
  }
12711
- if (blending !== CustomBlending) {
12630
+ if (blending !== 5) {
12712
12631
  if (blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha) {
12713
- if (currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation) {
12632
+ if (currentBlendEquation !== 100 || currentBlendEquationAlpha !== 100) {
12714
12633
  gl.blendEquation(gl.FUNC_ADD);
12715
- currentBlendEquation = AddEquation;
12716
- currentBlendEquationAlpha = AddEquation;
12634
+ currentBlendEquation = 100;
12635
+ currentBlendEquationAlpha = 100;
12717
12636
  }
12718
12637
  if (premultipliedAlpha) switch (blending) {
12719
- case NormalBlending:
12638
+ case 1:
12720
12639
  gl.blendFuncSeparate(gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
12721
12640
  break;
12722
- case AdditiveBlending:
12641
+ case 2:
12723
12642
  gl.blendFunc(gl.ONE, gl.ONE);
12724
12643
  break;
12725
- case SubtractiveBlending:
12644
+ case 3:
12726
12645
  gl.blendFuncSeparate(gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE);
12727
12646
  break;
12728
- case MultiplyBlending:
12647
+ case 4:
12729
12648
  gl.blendFuncSeparate(gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA);
12730
12649
  break;
12731
12650
  default:
@@ -12733,16 +12652,16 @@ function WebGLState(gl) {
12733
12652
  break;
12734
12653
  }
12735
12654
  else switch (blending) {
12736
- case NormalBlending:
12655
+ case 1:
12737
12656
  gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
12738
12657
  break;
12739
- case AdditiveBlending:
12658
+ case 2:
12740
12659
  gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
12741
12660
  break;
12742
- case SubtractiveBlending:
12661
+ case 3:
12743
12662
  gl.blendFuncSeparate(gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE);
12744
12663
  break;
12745
- case MultiplyBlending:
12664
+ case 4:
12746
12665
  gl.blendFunc(gl.ZERO, gl.SRC_COLOR);
12747
12666
  break;
12748
12667
  default:
@@ -12784,11 +12703,11 @@ function WebGLState(gl) {
12784
12703
  currentPremultipledAlpha = false;
12785
12704
  }
12786
12705
  function setMaterial(material, frontFaceCW) {
12787
- material.side === DoubleSide ? disable(gl.CULL_FACE) : enable(gl.CULL_FACE);
12788
- let flipSided = material.side === BackSide;
12706
+ material.side === 2 ? disable(gl.CULL_FACE) : enable(gl.CULL_FACE);
12707
+ let flipSided = material.side === 1;
12789
12708
  if (frontFaceCW) flipSided = !flipSided;
12790
12709
  setFlipSided(flipSided);
12791
- material.blending === NormalBlending && material.transparent === false ? setBlending(NoBlending) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.blendColor, material.blendAlpha, material.premultipliedAlpha);
12710
+ material.blending === 1 && material.transparent === false ? setBlending(0) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.blendColor, material.blendAlpha, material.premultipliedAlpha);
12792
12711
  depthBuffer.setFunc(material.depthFunc);
12793
12712
  depthBuffer.setTest(material.depthTest);
12794
12713
  depthBuffer.setMask(material.depthWrite);
@@ -12811,10 +12730,10 @@ function WebGLState(gl) {
12811
12730
  }
12812
12731
  }
12813
12732
  function setCullFace(cullFace) {
12814
- if (cullFace !== CullFaceNone) {
12733
+ if (cullFace !== 0) {
12815
12734
  enable(gl.CULL_FACE);
12816
- if (cullFace !== currentCullFace) if (cullFace === CullFaceBack) gl.cullFace(gl.BACK);
12817
- else if (cullFace === CullFaceFront) gl.cullFace(gl.FRONT);
12735
+ if (cullFace !== currentCullFace) if (cullFace === 1) gl.cullFace(gl.BACK);
12736
+ else if (cullFace === 2) gl.cullFace(gl.FRONT);
12818
12737
  else gl.cullFace(gl.FRONT_AND_BACK);
12819
12738
  } else disable(gl.CULL_FACE);
12820
12739
  currentCullFace = cullFace;
@@ -12945,16 +12864,16 @@ function WebGLState(gl) {
12945
12864
  console.error("THREE.WebGLState:", error);
12946
12865
  }
12947
12866
  }
12948
- function scissor(scissor$1) {
12949
- if (currentScissor.equals(scissor$1) === false) {
12950
- gl.scissor(scissor$1.x, scissor$1.y, scissor$1.z, scissor$1.w);
12951
- currentScissor.copy(scissor$1);
12867
+ function scissor(scissor) {
12868
+ if (currentScissor.equals(scissor) === false) {
12869
+ gl.scissor(scissor.x, scissor.y, scissor.z, scissor.w);
12870
+ currentScissor.copy(scissor);
12952
12871
  }
12953
12872
  }
12954
- function viewport(viewport$1) {
12955
- if (currentViewport.equals(viewport$1) === false) {
12956
- gl.viewport(viewport$1.x, viewport$1.y, viewport$1.z, viewport$1.w);
12957
- currentViewport.copy(viewport$1);
12873
+ function viewport(viewport) {
12874
+ if (currentViewport.equals(viewport) === false) {
12875
+ gl.viewport(viewport.x, viewport.y, viewport.z, viewport.w);
12876
+ currentViewport.copy(viewport);
12958
12877
  }
12959
12878
  }
12960
12879
  function updateUBOMapping(uniformsGroup, program) {
@@ -13163,7 +13082,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13163
13082
  const supportsInvalidateFramebuffer = typeof navigator === "undefined" ? false : /OculusBrowser/g.test(navigator.userAgent);
13164
13083
  const _imageDimensions = new Vector2();
13165
13084
  const _videoTextures = /* @__PURE__ */ new WeakMap();
13166
- let _canvas$1;
13085
+ let _canvas;
13167
13086
  const _sources = /* @__PURE__ */ new WeakMap();
13168
13087
  let useOffscreenCanvas = false;
13169
13088
  try {
@@ -13179,8 +13098,8 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13179
13098
  if (scale < 1) if (typeof HTMLImageElement !== "undefined" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== "undefined" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== "undefined" && image instanceof ImageBitmap || typeof VideoFrame !== "undefined" && image instanceof VideoFrame) {
13180
13099
  const width = Math.floor(scale * dimensions.width);
13181
13100
  const height = Math.floor(scale * dimensions.height);
13182
- if (_canvas$1 === void 0) _canvas$1 = createCanvas(width, height);
13183
- const canvas = needsNewCanvas ? createCanvas(width, height) : _canvas$1;
13101
+ if (_canvas === void 0) _canvas = createCanvas(width, height);
13102
+ const canvas = needsNewCanvas ? createCanvas(width, height) : _canvas;
13184
13103
  canvas.width = width;
13185
13104
  canvas.height = height;
13186
13105
  canvas.getContext("2d").drawImage(image, 0, 0, width, height);
@@ -13193,7 +13112,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13193
13112
  return image;
13194
13113
  }
13195
13114
  function textureNeedsGenerateMipmaps(texture) {
13196
- return texture.generateMipmaps && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;
13115
+ return texture.generateMipmaps && texture.minFilter !== 1003 && texture.minFilter !== 1006;
13197
13116
  }
13198
13117
  function generateMipmap(target) {
13199
13118
  _gl.generateMipmap(target);
@@ -13253,7 +13172,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13253
13172
  const transfer = forceLinearTransfer ? LinearTransfer : ColorManagement.getTransfer(colorSpace);
13254
13173
  if (glType === _gl.FLOAT) internalFormat = _gl.RGBA32F;
13255
13174
  if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGBA16F;
13256
- if (glType === _gl.UNSIGNED_BYTE) internalFormat = transfer === SRGBTransfer ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;
13175
+ if (glType === _gl.UNSIGNED_BYTE) internalFormat = transfer === "srgb" ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;
13257
13176
  if (glType === _gl.UNSIGNED_SHORT_4_4_4_4) internalFormat = _gl.RGBA4;
13258
13177
  if (glType === _gl.UNSIGNED_SHORT_5_5_5_1) internalFormat = _gl.RGB5_A1;
13259
13178
  }
@@ -13263,19 +13182,19 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13263
13182
  function getInternalDepthFormat(useStencil, depthType) {
13264
13183
  let glInternalFormat;
13265
13184
  if (useStencil) {
13266
- if (depthType === null || depthType === UnsignedIntType || depthType === UnsignedInt248Type) glInternalFormat = _gl.DEPTH24_STENCIL8;
13267
- else if (depthType === FloatType) glInternalFormat = _gl.DEPTH32F_STENCIL8;
13268
- else if (depthType === UnsignedShortType) {
13185
+ if (depthType === null || depthType === 1014 || depthType === 1020) glInternalFormat = _gl.DEPTH24_STENCIL8;
13186
+ else if (depthType === 1015) glInternalFormat = _gl.DEPTH32F_STENCIL8;
13187
+ else if (depthType === 1012) {
13269
13188
  glInternalFormat = _gl.DEPTH24_STENCIL8;
13270
13189
  console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.");
13271
13190
  }
13272
- } else if (depthType === null || depthType === UnsignedIntType || depthType === UnsignedInt248Type) glInternalFormat = _gl.DEPTH_COMPONENT24;
13273
- else if (depthType === FloatType) glInternalFormat = _gl.DEPTH_COMPONENT32F;
13274
- else if (depthType === UnsignedShortType) glInternalFormat = _gl.DEPTH_COMPONENT16;
13191
+ } else if (depthType === null || depthType === 1014 || depthType === 1020) glInternalFormat = _gl.DEPTH_COMPONENT24;
13192
+ else if (depthType === 1015) glInternalFormat = _gl.DEPTH_COMPONENT32F;
13193
+ else if (depthType === 1012) glInternalFormat = _gl.DEPTH_COMPONENT16;
13275
13194
  return glInternalFormat;
13276
13195
  }
13277
13196
  function getMipLevels(texture, image) {
13278
- if (textureNeedsGenerateMipmaps(texture) === true || texture.isFramebufferTexture && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter) return Math.log2(Math.max(image.width, image.height)) + 1;
13197
+ if (textureNeedsGenerateMipmaps(texture) === true || texture.isFramebufferTexture && texture.minFilter !== 1003 && texture.minFilter !== 1006) return Math.log2(Math.max(image.width, image.height)) + 1;
13279
13198
  else if (texture.mipmaps !== void 0 && texture.mipmaps.length > 0) return texture.mipmaps.length;
13280
13199
  else if (texture.isCompressedTexture && Array.isArray(texture.image)) return image.mipmaps.length;
13281
13200
  else return 1;
@@ -13421,17 +13340,17 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13421
13340
  [LinearMipmapLinearFilter]: _gl.LINEAR_MIPMAP_LINEAR
13422
13341
  };
13423
13342
  const compareToGL = {
13424
- [NeverCompare]: _gl.NEVER,
13425
- [AlwaysCompare]: _gl.ALWAYS,
13426
- [LessCompare]: _gl.LESS,
13427
- [LessEqualCompare]: _gl.LEQUAL,
13428
- [EqualCompare]: _gl.EQUAL,
13429
- [GreaterEqualCompare]: _gl.GEQUAL,
13430
- [GreaterCompare]: _gl.GREATER,
13431
- [NotEqualCompare]: _gl.NOTEQUAL
13343
+ [512]: _gl.NEVER,
13344
+ [519]: _gl.ALWAYS,
13345
+ [513]: _gl.LESS,
13346
+ [515]: _gl.LEQUAL,
13347
+ [514]: _gl.EQUAL,
13348
+ [518]: _gl.GEQUAL,
13349
+ [516]: _gl.GREATER,
13350
+ [517]: _gl.NOTEQUAL
13432
13351
  };
13433
13352
  function setTextureParameters(textureType, texture) {
13434
- if (texture.type === FloatType && extensions.has("OES_texture_float_linear") === false && (texture.magFilter === LinearFilter || texture.magFilter === LinearMipmapNearestFilter || texture.magFilter === NearestMipmapLinearFilter || texture.magFilter === LinearMipmapLinearFilter || texture.minFilter === LinearFilter || texture.minFilter === LinearMipmapNearestFilter || texture.minFilter === NearestMipmapLinearFilter || texture.minFilter === LinearMipmapLinearFilter)) console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.");
13353
+ if (texture.type === 1015 && extensions.has("OES_texture_float_linear") === false && (texture.magFilter === 1006 || texture.magFilter === 1007 || texture.magFilter === 1005 || texture.magFilter === 1008 || texture.minFilter === 1006 || texture.minFilter === 1007 || texture.minFilter === 1005 || texture.minFilter === 1008)) console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.");
13435
13354
  _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[texture.wrapS]);
13436
13355
  _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[texture.wrapT]);
13437
13356
  if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[texture.wrapR]);
@@ -13442,9 +13361,9 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13442
13361
  _gl.texParameteri(textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[texture.compareFunction]);
13443
13362
  }
13444
13363
  if (extensions.has("EXT_texture_filter_anisotropic") === true) {
13445
- if (texture.magFilter === NearestFilter) return;
13446
- if (texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter) return;
13447
- if (texture.type === FloatType && extensions.has("OES_texture_float_linear") === false) return;
13364
+ if (texture.magFilter === 1003) return;
13365
+ if (texture.minFilter !== 1005 && texture.minFilter !== 1008) return;
13366
+ if (texture.type === 1015 && extensions.has("OES_texture_float_linear") === false) return;
13448
13367
  if (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) {
13449
13368
  const extension = extensions.get("EXT_texture_filter_anisotropic");
13450
13369
  _gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, capabilities.getMaxAnisotropy()));
@@ -13496,8 +13415,8 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13496
13415
  if (source.version !== sourceProperties.__version || forceUpload === true) {
13497
13416
  state.activeTexture(_gl.TEXTURE0 + slot);
13498
13417
  const workingPrimaries = ColorManagement.getPrimaries(ColorManagement.workingColorSpace);
13499
- const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(texture.colorSpace);
13500
- const unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;
13418
+ const texturePrimaries = texture.colorSpace === "" ? null : ColorManagement.getPrimaries(texture.colorSpace);
13419
+ const unpackConversion = texture.colorSpace === "" || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;
13501
13420
  _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);
13502
13421
  _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha);
13503
13422
  _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment);
@@ -13535,7 +13454,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13535
13454
  if (useTexStorage && allocateMemory) state.texStorage3D(_gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height, image.depth);
13536
13455
  for (let i = 0, il = mipmaps.length; i < il; i++) {
13537
13456
  mipmap = mipmaps[i];
13538
- if (texture.format !== RGBAFormat) if (glFormat !== null) if (useTexStorage) {
13457
+ if (texture.format !== 1023) if (glFormat !== null) if (useTexStorage) {
13539
13458
  if (dataReady) if (texture.layerUpdates.size > 0) {
13540
13459
  const layerByteLength = getByteLength(mipmap.width, mipmap.height, texture.format, texture.type);
13541
13460
  for (const layerIndex of texture.layerUpdates) {
@@ -13554,7 +13473,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13554
13473
  if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);
13555
13474
  for (let i = 0, il = mipmaps.length; i < il; i++) {
13556
13475
  mipmap = mipmaps[i];
13557
- if (texture.format !== RGBAFormat) if (glFormat !== null) if (useTexStorage) {
13476
+ if (texture.format !== 1023) if (glFormat !== null) if (useTexStorage) {
13558
13477
  if (dataReady) state.compressedTexSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data);
13559
13478
  } else state.compressedTexImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);
13560
13479
  else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
@@ -13622,8 +13541,8 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13622
13541
  if (source.version !== sourceProperties.__version || forceUpload === true) {
13623
13542
  state.activeTexture(_gl.TEXTURE0 + slot);
13624
13543
  const workingPrimaries = ColorManagement.getPrimaries(ColorManagement.workingColorSpace);
13625
- const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(texture.colorSpace);
13626
- const unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;
13544
+ const texturePrimaries = texture.colorSpace === "" ? null : ColorManagement.getPrimaries(texture.colorSpace);
13545
+ const unpackConversion = texture.colorSpace === "" || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;
13627
13546
  _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);
13628
13547
  _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha);
13629
13548
  _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment);
@@ -13649,7 +13568,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13649
13568
  mipmaps = cubeImage[i].mipmaps;
13650
13569
  for (let j = 0; j < mipmaps.length; j++) {
13651
13570
  const mipmap = mipmaps[j];
13652
- if (texture.format !== RGBAFormat) if (glFormat !== null) if (useTexStorage) {
13571
+ if (texture.format !== 1023) if (glFormat !== null) if (useTexStorage) {
13653
13572
  if (dataReady) state.compressedTexSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data);
13654
13573
  } else state.compressedTexImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);
13655
13574
  else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()");
@@ -13747,9 +13666,9 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13747
13666
  setTexture2D(renderTarget.depthTexture, 0);
13748
13667
  const webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture;
13749
13668
  const samples = getRenderTargetSamples(renderTarget);
13750
- if (renderTarget.depthTexture.format === DepthFormat) if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);
13669
+ if (renderTarget.depthTexture.format === 1026) if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);
13751
13670
  else _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);
13752
- else if (renderTarget.depthTexture.format === DepthStencilFormat) if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);
13671
+ else if (renderTarget.depthTexture.format === 1027) if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);
13753
13672
  else _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);
13754
13673
  else throw new Error("Unknown depthTexture format");
13755
13674
  }
@@ -13842,12 +13761,12 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13842
13761
  renderTargetProperties.__webglColorRenderbuffer = [];
13843
13762
  state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);
13844
13763
  for (let i = 0; i < textures.length; i++) {
13845
- const texture$1 = textures[i];
13764
+ const texture = textures[i];
13846
13765
  renderTargetProperties.__webglColorRenderbuffer[i] = _gl.createRenderbuffer();
13847
13766
  _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);
13848
- const glFormat = utils.convert(texture$1.format, texture$1.colorSpace);
13849
- const glType = utils.convert(texture$1.type);
13850
- const glInternalFormat = getInternalFormat(texture$1.internalFormat, glFormat, glType, texture$1.colorSpace, renderTarget.isXRRenderTarget === true);
13767
+ const glFormat = utils.convert(texture.format, texture.colorSpace);
13768
+ const glType = utils.convert(texture.type);
13769
+ const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true);
13851
13770
  const samples = getRenderTargetSamples(renderTarget);
13852
13771
  _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);
13853
13772
  _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);
@@ -13980,8 +13899,8 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
13980
13899
  const format = texture.format;
13981
13900
  const type = texture.type;
13982
13901
  if (texture.isCompressedTexture === true || texture.isVideoTexture === true) return image;
13983
- if (colorSpace !== LinearSRGBColorSpace && colorSpace !== NoColorSpace) if (ColorManagement.getTransfer(colorSpace) === SRGBTransfer) {
13984
- if (format !== RGBAFormat || type !== UnsignedByteType) console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.");
13902
+ if (colorSpace !== "srgb-linear" && colorSpace !== "") if (ColorManagement.getTransfer(colorSpace) === "srgb") {
13903
+ if (format !== 1023 || type !== 1009) console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.");
13985
13904
  } else console.error("THREE.WebGLTextures: Unsupported texture color space:", colorSpace);
13986
13905
  return image;
13987
13906
  }
@@ -14013,102 +13932,102 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
14013
13932
  this.useMultisampledRTT = useMultisampledRTT;
14014
13933
  }
14015
13934
  function WebGLUtils(gl, extensions) {
14016
- function convert(p, colorSpace = NoColorSpace) {
13935
+ function convert(p, colorSpace = "") {
14017
13936
  let extension;
14018
13937
  const transfer = ColorManagement.getTransfer(colorSpace);
14019
- if (p === UnsignedByteType) return gl.UNSIGNED_BYTE;
14020
- if (p === UnsignedShort4444Type) return gl.UNSIGNED_SHORT_4_4_4_4;
14021
- if (p === UnsignedShort5551Type) return gl.UNSIGNED_SHORT_5_5_5_1;
14022
- if (p === UnsignedInt5999Type) return gl.UNSIGNED_INT_5_9_9_9_REV;
14023
- if (p === ByteType) return gl.BYTE;
14024
- if (p === ShortType) return gl.SHORT;
14025
- if (p === UnsignedShortType) return gl.UNSIGNED_SHORT;
14026
- if (p === IntType) return gl.INT;
14027
- if (p === UnsignedIntType) return gl.UNSIGNED_INT;
14028
- if (p === FloatType) return gl.FLOAT;
14029
- if (p === HalfFloatType) return gl.HALF_FLOAT;
14030
- if (p === AlphaFormat) return gl.ALPHA;
14031
- if (p === RGBFormat) return gl.RGB;
14032
- if (p === RGBAFormat) return gl.RGBA;
14033
- if (p === LuminanceFormat) return gl.LUMINANCE;
14034
- if (p === LuminanceAlphaFormat) return gl.LUMINANCE_ALPHA;
14035
- if (p === DepthFormat) return gl.DEPTH_COMPONENT;
14036
- if (p === DepthStencilFormat) return gl.DEPTH_STENCIL;
14037
- if (p === RedFormat) return gl.RED;
14038
- if (p === RedIntegerFormat) return gl.RED_INTEGER;
14039
- if (p === RGFormat) return gl.RG;
14040
- if (p === RGIntegerFormat) return gl.RG_INTEGER;
14041
- if (p === RGBAIntegerFormat) return gl.RGBA_INTEGER;
14042
- if (p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format) if (transfer === SRGBTransfer) {
13938
+ if (p === 1009) return gl.UNSIGNED_BYTE;
13939
+ if (p === 1017) return gl.UNSIGNED_SHORT_4_4_4_4;
13940
+ if (p === 1018) return gl.UNSIGNED_SHORT_5_5_5_1;
13941
+ if (p === 35902) return gl.UNSIGNED_INT_5_9_9_9_REV;
13942
+ if (p === 1010) return gl.BYTE;
13943
+ if (p === 1011) return gl.SHORT;
13944
+ if (p === 1012) return gl.UNSIGNED_SHORT;
13945
+ if (p === 1013) return gl.INT;
13946
+ if (p === 1014) return gl.UNSIGNED_INT;
13947
+ if (p === 1015) return gl.FLOAT;
13948
+ if (p === 1016) return gl.HALF_FLOAT;
13949
+ if (p === 1021) return gl.ALPHA;
13950
+ if (p === 1022) return gl.RGB;
13951
+ if (p === 1023) return gl.RGBA;
13952
+ if (p === 1024) return gl.LUMINANCE;
13953
+ if (p === 1025) return gl.LUMINANCE_ALPHA;
13954
+ if (p === 1026) return gl.DEPTH_COMPONENT;
13955
+ if (p === 1027) return gl.DEPTH_STENCIL;
13956
+ if (p === 1028) return gl.RED;
13957
+ if (p === 1029) return gl.RED_INTEGER;
13958
+ if (p === 1030) return gl.RG;
13959
+ if (p === 1031) return gl.RG_INTEGER;
13960
+ if (p === 1033) return gl.RGBA_INTEGER;
13961
+ if (p === 33776 || p === 33777 || p === 33778 || p === 33779) if (transfer === "srgb") {
14043
13962
  extension = extensions.get("WEBGL_compressed_texture_s3tc_srgb");
14044
13963
  if (extension !== null) {
14045
- if (p === RGB_S3TC_DXT1_Format) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;
14046
- if (p === RGBA_S3TC_DXT1_Format) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
14047
- if (p === RGBA_S3TC_DXT3_Format) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
14048
- if (p === RGBA_S3TC_DXT5_Format) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
13964
+ if (p === 33776) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;
13965
+ if (p === 33777) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
13966
+ if (p === 33778) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
13967
+ if (p === 33779) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
14049
13968
  } else return null;
14050
13969
  } else {
14051
13970
  extension = extensions.get("WEBGL_compressed_texture_s3tc");
14052
13971
  if (extension !== null) {
14053
- if (p === RGB_S3TC_DXT1_Format) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;
14054
- if (p === RGBA_S3TC_DXT1_Format) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;
14055
- if (p === RGBA_S3TC_DXT3_Format) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;
14056
- if (p === RGBA_S3TC_DXT5_Format) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;
13972
+ if (p === 33776) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;
13973
+ if (p === 33777) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;
13974
+ if (p === 33778) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;
13975
+ if (p === 33779) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;
14057
13976
  } else return null;
14058
13977
  }
14059
- if (p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format) {
13978
+ if (p === 35840 || p === 35841 || p === 35842 || p === 35843) {
14060
13979
  extension = extensions.get("WEBGL_compressed_texture_pvrtc");
14061
13980
  if (extension !== null) {
14062
- if (p === RGB_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
14063
- if (p === RGB_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
14064
- if (p === RGBA_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
14065
- if (p === RGBA_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
13981
+ if (p === 35840) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
13982
+ if (p === 35841) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
13983
+ if (p === 35842) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
13984
+ if (p === 35843) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
14066
13985
  } else return null;
14067
13986
  }
14068
- if (p === RGB_ETC1_Format || p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format) {
13987
+ if (p === 36196 || p === 37492 || p === 37496) {
14069
13988
  extension = extensions.get("WEBGL_compressed_texture_etc");
14070
13989
  if (extension !== null) {
14071
- if (p === RGB_ETC1_Format || p === RGB_ETC2_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;
14072
- if (p === RGBA_ETC2_EAC_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;
13990
+ if (p === 36196 || p === 37492) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;
13991
+ if (p === 37496) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;
14073
13992
  } else return null;
14074
13993
  }
14075
- if (p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format) {
13994
+ if (p === 37808 || p === 37809 || p === 37810 || p === 37811 || p === 37812 || p === 37813 || p === 37814 || p === 37815 || p === 37816 || p === 37817 || p === 37818 || p === 37819 || p === 37820 || p === 37821) {
14076
13995
  extension = extensions.get("WEBGL_compressed_texture_astc");
14077
13996
  if (extension !== null) {
14078
- if (p === RGBA_ASTC_4x4_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;
14079
- if (p === RGBA_ASTC_5x4_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;
14080
- if (p === RGBA_ASTC_5x5_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;
14081
- if (p === RGBA_ASTC_6x5_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;
14082
- if (p === RGBA_ASTC_6x6_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;
14083
- if (p === RGBA_ASTC_8x5_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;
14084
- if (p === RGBA_ASTC_8x6_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;
14085
- if (p === RGBA_ASTC_8x8_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;
14086
- if (p === RGBA_ASTC_10x5_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;
14087
- if (p === RGBA_ASTC_10x6_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;
14088
- if (p === RGBA_ASTC_10x8_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;
14089
- if (p === RGBA_ASTC_10x10_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;
14090
- if (p === RGBA_ASTC_12x10_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;
14091
- if (p === RGBA_ASTC_12x12_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;
13997
+ if (p === 37808) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;
13998
+ if (p === 37809) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;
13999
+ if (p === 37810) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;
14000
+ if (p === 37811) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;
14001
+ if (p === 37812) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;
14002
+ if (p === 37813) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;
14003
+ if (p === 37814) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;
14004
+ if (p === 37815) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;
14005
+ if (p === 37816) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;
14006
+ if (p === 37817) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;
14007
+ if (p === 37818) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;
14008
+ if (p === 37819) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;
14009
+ if (p === 37820) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;
14010
+ if (p === 37821) return transfer === "srgb" ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;
14092
14011
  } else return null;
14093
14012
  }
14094
- if (p === RGBA_BPTC_Format || p === RGB_BPTC_SIGNED_Format || p === RGB_BPTC_UNSIGNED_Format) {
14013
+ if (p === 36492 || p === 36494 || p === 36495) {
14095
14014
  extension = extensions.get("EXT_texture_compression_bptc");
14096
14015
  if (extension !== null) {
14097
- if (p === RGBA_BPTC_Format) return transfer === SRGBTransfer ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;
14098
- if (p === RGB_BPTC_SIGNED_Format) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
14099
- if (p === RGB_BPTC_UNSIGNED_Format) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;
14016
+ if (p === 36492) return transfer === "srgb" ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;
14017
+ if (p === 36494) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
14018
+ if (p === 36495) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;
14100
14019
  } else return null;
14101
14020
  }
14102
- if (p === RED_RGTC1_Format || p === SIGNED_RED_RGTC1_Format || p === RED_GREEN_RGTC2_Format || p === SIGNED_RED_GREEN_RGTC2_Format) {
14021
+ if (p === 36283 || p === 36284 || p === 36285 || p === 36286) {
14103
14022
  extension = extensions.get("EXT_texture_compression_rgtc");
14104
14023
  if (extension !== null) {
14105
- if (p === RGBA_BPTC_Format) return extension.COMPRESSED_RED_RGTC1_EXT;
14106
- if (p === SIGNED_RED_RGTC1_Format) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;
14107
- if (p === RED_GREEN_RGTC2_Format) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;
14108
- if (p === SIGNED_RED_GREEN_RGTC2_Format) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
14024
+ if (p === 36492) return extension.COMPRESSED_RED_RGTC1_EXT;
14025
+ if (p === 36284) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;
14026
+ if (p === 36285) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;
14027
+ if (p === 36286) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
14109
14028
  } else return null;
14110
14029
  }
14111
- if (p === UnsignedInt248Type) return gl.UNSIGNED_INT_24_8;
14030
+ if (p === 1020) return gl.UNSIGNED_INT_24_8;
14112
14031
  return gl[p] !== void 0 ? gl[p] : null;
14113
14032
  }
14114
14033
  return { convert };
@@ -14221,7 +14140,7 @@ var WebXRController = class {
14221
14140
  const distance = indexTip.position.distanceTo(thumbTip.position);
14222
14141
  const distanceToPinch = .02;
14223
14142
  const threshold = .005;
14224
- if (hand.inputState.pinching && distance > distanceToPinch + threshold) {
14143
+ if (hand.inputState.pinching && distance > .025) {
14225
14144
  hand.inputState.pinching = false;
14226
14145
  this.dispatchEvent({
14227
14146
  type: "pinchend",
@@ -14579,13 +14498,13 @@ var WebXRManager = class extends EventDispatcher {
14579
14498
  const inputSource = event.added[i];
14580
14499
  let controllerIndex = controllerInputSources.indexOf(inputSource);
14581
14500
  if (controllerIndex === -1) {
14582
- for (let i$1 = 0; i$1 < controllers.length; i$1++) if (i$1 >= controllerInputSources.length) {
14501
+ for (let i = 0; i < controllers.length; i++) if (i >= controllerInputSources.length) {
14583
14502
  controllerInputSources.push(inputSource);
14584
- controllerIndex = i$1;
14503
+ controllerIndex = i;
14585
14504
  break;
14586
- } else if (controllerInputSources[i$1] === null) {
14587
- controllerInputSources[i$1] = inputSource;
14588
- controllerIndex = i$1;
14505
+ } else if (controllerInputSources[i] === null) {
14506
+ controllerInputSources[i] = inputSource;
14507
+ controllerIndex = i;
14589
14508
  break;
14590
14509
  }
14591
14510
  if (controllerIndex === -1) break;
@@ -14602,12 +14521,12 @@ var WebXRManager = class extends EventDispatcher {
14602
14521
  * And that near and far planes are identical for both cameras.
14603
14522
  * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765
14604
14523
  */
14605
- function setProjectionFromUnion(camera, cameraL$1, cameraR$1) {
14606
- cameraLPos.setFromMatrixPosition(cameraL$1.matrixWorld);
14607
- cameraRPos.setFromMatrixPosition(cameraR$1.matrixWorld);
14524
+ function setProjectionFromUnion(camera, cameraL, cameraR) {
14525
+ cameraLPos.setFromMatrixPosition(cameraL.matrixWorld);
14526
+ cameraRPos.setFromMatrixPosition(cameraR.matrixWorld);
14608
14527
  const ipd = cameraLPos.distanceTo(cameraRPos);
14609
- const projL = cameraL$1.projectionMatrix.elements;
14610
- const projR = cameraR$1.projectionMatrix.elements;
14528
+ const projL = cameraL.projectionMatrix.elements;
14529
+ const projR = cameraR.projectionMatrix.elements;
14611
14530
  const near = projL[14] / (projL[10] - 1);
14612
14531
  const far = projL[14] / (projL[10] + 1);
14613
14532
  const topFov = (projL[9] + 1) / projL[5];
@@ -14618,14 +14537,14 @@ var WebXRManager = class extends EventDispatcher {
14618
14537
  const right = near * rightFov;
14619
14538
  const zOffset = ipd / (-leftFov + rightFov);
14620
14539
  const xOffset = zOffset * -leftFov;
14621
- cameraL$1.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);
14540
+ cameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);
14622
14541
  camera.translateX(xOffset);
14623
14542
  camera.translateZ(zOffset);
14624
14543
  camera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);
14625
14544
  camera.matrixWorldInverse.copy(camera.matrixWorld).invert();
14626
14545
  if (projL[10] === -1) {
14627
- camera.projectionMatrix.copy(cameraL$1.projectionMatrix);
14628
- camera.projectionMatrixInverse.copy(cameraL$1.projectionMatrixInverse);
14546
+ camera.projectionMatrix.copy(cameraL.projectionMatrix);
14547
+ camera.projectionMatrixInverse.copy(cameraL.projectionMatrixInverse);
14629
14548
  } else {
14630
14549
  const near2 = near + zOffset;
14631
14550
  const far2 = far + zOffset;
@@ -14661,24 +14580,24 @@ var WebXRManager = class extends EventDispatcher {
14661
14580
  _currentDepthFar = cameraXR.far;
14662
14581
  }
14663
14582
  const parent = camera.parent;
14664
- const cameras$1 = cameraXR.cameras;
14583
+ const cameras = cameraXR.cameras;
14665
14584
  updateCamera(cameraXR, parent);
14666
- for (let i = 0; i < cameras$1.length; i++) updateCamera(cameras$1[i], parent);
14667
- if (cameras$1.length === 2) setProjectionFromUnion(cameraXR, cameraL, cameraR);
14585
+ for (let i = 0; i < cameras.length; i++) updateCamera(cameras[i], parent);
14586
+ if (cameras.length === 2) setProjectionFromUnion(cameraXR, cameraL, cameraR);
14668
14587
  else cameraXR.projectionMatrix.copy(cameraL.projectionMatrix);
14669
14588
  updateUserCamera(camera, cameraXR, parent);
14670
14589
  };
14671
- function updateUserCamera(camera, cameraXR$1, parent) {
14672
- if (parent === null) camera.matrix.copy(cameraXR$1.matrixWorld);
14590
+ function updateUserCamera(camera, cameraXR, parent) {
14591
+ if (parent === null) camera.matrix.copy(cameraXR.matrixWorld);
14673
14592
  else {
14674
14593
  camera.matrix.copy(parent.matrixWorld);
14675
14594
  camera.matrix.invert();
14676
- camera.matrix.multiply(cameraXR$1.matrixWorld);
14595
+ camera.matrix.multiply(cameraXR.matrixWorld);
14677
14596
  }
14678
14597
  camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);
14679
14598
  camera.updateMatrixWorld(true);
14680
- camera.projectionMatrix.copy(cameraXR$1.projectionMatrix);
14681
- camera.projectionMatrixInverse.copy(cameraXR$1.projectionMatrixInverse);
14599
+ camera.projectionMatrix.copy(cameraXR.projectionMatrix);
14600
+ camera.projectionMatrixInverse.copy(cameraXR.projectionMatrixInverse);
14682
14601
  if (camera.isPerspectiveCamera) {
14683
14602
  camera.fov = RAD2DEG * 2 * Math.atan(1 / camera.projectionMatrix.elements[5]);
14684
14603
  camera.zoom = 1;
@@ -14773,8 +14692,8 @@ var WebXRManager = class extends EventDispatcher {
14773
14692
  this.dispose = function() {};
14774
14693
  }
14775
14694
  };
14776
- const _e1 = /* @__PURE__ */ new Euler();
14777
- const _m1 = /* @__PURE__ */ new Matrix4();
14695
+ const _e1 = /*@__PURE__*/ new Euler();
14696
+ const _m1 = /*@__PURE__*/ new Matrix4();
14778
14697
  function WebGLMaterials(renderer, properties) {
14779
14698
  function refreshTransformUniform(map, uniform) {
14780
14699
  if (map.matrixAutoUpdate === true) map.updateMatrix();
@@ -14834,13 +14753,13 @@ function WebGLMaterials(renderer, properties) {
14834
14753
  uniforms.bumpMap.value = material.bumpMap;
14835
14754
  refreshTransformUniform(material.bumpMap, uniforms.bumpMapTransform);
14836
14755
  uniforms.bumpScale.value = material.bumpScale;
14837
- if (material.side === BackSide) uniforms.bumpScale.value *= -1;
14756
+ if (material.side === 1) uniforms.bumpScale.value *= -1;
14838
14757
  }
14839
14758
  if (material.normalMap) {
14840
14759
  uniforms.normalMap.value = material.normalMap;
14841
14760
  refreshTransformUniform(material.normalMap, uniforms.normalMapTransform);
14842
14761
  uniforms.normalScale.value.copy(material.normalScale);
14843
- if (material.side === BackSide) uniforms.normalScale.value.negate();
14762
+ if (material.side === 1) uniforms.normalScale.value.negate();
14844
14763
  }
14845
14764
  if (material.displacementMap) {
14846
14765
  uniforms.displacementMap.value = material.displacementMap;
@@ -14978,7 +14897,7 @@ function WebGLMaterials(renderer, properties) {
14978
14897
  uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;
14979
14898
  refreshTransformUniform(material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform);
14980
14899
  uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);
14981
- if (material.side === BackSide) uniforms.clearcoatNormalScale.value.negate();
14900
+ if (material.side === 1) uniforms.clearcoatNormalScale.value.negate();
14982
14901
  }
14983
14902
  }
14984
14903
  if (material.dispersion > 0) uniforms.dispersion.value = material.dispersion;
@@ -15104,7 +15023,7 @@ function WebGLUniformsGroups(gl, info, capabilities, state) {
15104
15023
  let arrayOffset = 0;
15105
15024
  for (let k = 0; k < values.length; k++) {
15106
15025
  const value = values[k];
15107
- const info$1 = getUniformSize(value);
15026
+ const info = getUniformSize(value);
15108
15027
  if (typeof value === "number" || typeof value === "boolean") {
15109
15028
  uniform.__data[0] = value;
15110
15029
  gl.bufferSubData(gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data);
@@ -15123,7 +15042,7 @@ function WebGLUniformsGroups(gl, info, capabilities, state) {
15123
15042
  uniform.__data[11] = 0;
15124
15043
  } else {
15125
15044
  value.toArray(uniform.__data, arrayOffset);
15126
- arrayOffset += info$1.storage / Float32Array.BYTES_PER_ELEMENT;
15045
+ arrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT;
15127
15046
  }
15128
15047
  }
15129
15048
  gl.bufferSubData(gl.UNIFORM_BUFFER, offset, uniform.__data);
@@ -15164,15 +15083,15 @@ function WebGLUniformsGroups(gl, info, capabilities, state) {
15164
15083
  const values = Array.isArray(uniform.value) ? uniform.value : [uniform.value];
15165
15084
  for (let k = 0, kl = values.length; k < kl; k++) {
15166
15085
  const value = values[k];
15167
- const info$1 = getUniformSize(value);
15168
- const chunkOffset$1 = offset % chunkSize;
15169
- const chunkPadding = chunkOffset$1 % info$1.boundary;
15170
- const chunkStart = chunkOffset$1 + chunkPadding;
15086
+ const info = getUniformSize(value);
15087
+ const chunkOffset = offset % chunkSize;
15088
+ const chunkPadding = chunkOffset % info.boundary;
15089
+ const chunkStart = chunkOffset + chunkPadding;
15171
15090
  offset += chunkPadding;
15172
- if (chunkStart !== 0 && chunkSize - chunkStart < info$1.storage) offset += chunkSize - chunkStart;
15173
- uniform.__data = new Float32Array(info$1.storage / Float32Array.BYTES_PER_ELEMENT);
15091
+ if (chunkStart !== 0 && chunkSize - chunkStart < info.storage) offset += chunkSize - chunkStart;
15092
+ uniform.__data = new Float32Array(info.storage / Float32Array.BYTES_PER_ELEMENT);
15174
15093
  uniform.__offset = offset;
15175
- offset += info$1.storage;
15094
+ offset += info.storage;
15176
15095
  }
15177
15096
  }
15178
15097
  }
@@ -15183,31 +15102,31 @@ function WebGLUniformsGroups(gl, info, capabilities, state) {
15183
15102
  return this;
15184
15103
  }
15185
15104
  function getUniformSize(value) {
15186
- const info$1 = {
15105
+ const info = {
15187
15106
  boundary: 0,
15188
15107
  storage: 0
15189
15108
  };
15190
15109
  if (typeof value === "number" || typeof value === "boolean") {
15191
- info$1.boundary = 4;
15192
- info$1.storage = 4;
15110
+ info.boundary = 4;
15111
+ info.storage = 4;
15193
15112
  } else if (value.isVector2) {
15194
- info$1.boundary = 8;
15195
- info$1.storage = 8;
15113
+ info.boundary = 8;
15114
+ info.storage = 8;
15196
15115
  } else if (value.isVector3 || value.isColor) {
15197
- info$1.boundary = 16;
15198
- info$1.storage = 12;
15116
+ info.boundary = 16;
15117
+ info.storage = 12;
15199
15118
  } else if (value.isVector4) {
15200
- info$1.boundary = 16;
15201
- info$1.storage = 16;
15119
+ info.boundary = 16;
15120
+ info.storage = 16;
15202
15121
  } else if (value.isMatrix3) {
15203
- info$1.boundary = 48;
15204
- info$1.storage = 48;
15122
+ info.boundary = 48;
15123
+ info.storage = 48;
15205
15124
  } else if (value.isMatrix4) {
15206
- info$1.boundary = 64;
15207
- info$1.storage = 64;
15125
+ info.boundary = 64;
15126
+ info.storage = 64;
15208
15127
  } else if (value.isTexture) console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.");
15209
15128
  else console.warn("THREE.WebGLRenderer: Unsupported uniform value type.", value);
15210
- return info$1;
15129
+ return info;
15211
15130
  }
15212
15131
  function onUniformsGroupsDispose(event) {
15213
15132
  const uniformsGroup = event.target;
@@ -15218,7 +15137,7 @@ function WebGLUniformsGroups(gl, info, capabilities, state) {
15218
15137
  delete buffers[uniformsGroup.id];
15219
15138
  delete updateList[uniformsGroup.id];
15220
15139
  }
15221
- function dispose$1() {
15140
+ function dispose() {
15222
15141
  for (const id in buffers) gl.deleteBuffer(buffers[id]);
15223
15142
  allocatedBindingPoints = [];
15224
15143
  buffers = {};
@@ -15227,7 +15146,7 @@ function WebGLUniformsGroups(gl, info, capabilities, state) {
15227
15146
  return {
15228
15147
  bind,
15229
15148
  update,
15230
- dispose: dispose$1
15149
+ dispose
15231
15150
  };
15232
15151
  }
15233
15152
  var WebGLRenderer = class {
@@ -15239,15 +15158,23 @@ var WebGLRenderer = class {
15239
15158
  if (typeof WebGLRenderingContext !== "undefined" && context instanceof WebGLRenderingContext) throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");
15240
15159
  _alpha = context.getContextAttributes().alpha;
15241
15160
  } else _alpha = alpha;
15242
- const uintClearColor = new Uint32Array(4);
15243
- const intClearColor = new Int32Array(4);
15161
+ const uintClearColor = /* @__PURE__ */ new Uint32Array(4);
15162
+ const intClearColor = /* @__PURE__ */ new Int32Array(4);
15244
15163
  let currentRenderList = null;
15245
15164
  let currentRenderState = null;
15246
15165
  const renderListStack = [];
15247
15166
  const renderStateStack = [];
15248
15167
  this.domElement = canvas;
15249
15168
  this.debug = {
15169
+ /**
15170
+ * Enables error checking and reporting when shader programs are being compiled
15171
+ * @type {boolean}
15172
+ */
15250
15173
  checkShaderErrors: true,
15174
+ /**
15175
+ * Callback for custom error reporting.
15176
+ * @type {?Function}
15177
+ */
15251
15178
  onShaderError: null
15252
15179
  };
15253
15180
  this.autoClear = true;
@@ -15258,7 +15185,7 @@ var WebGLRenderer = class {
15258
15185
  this.clippingPlanes = [];
15259
15186
  this.localClippingEnabled = false;
15260
15187
  this._outputColorSpace = SRGBColorSpace;
15261
- this.toneMapping = NoToneMapping;
15188
+ this.toneMapping = 0;
15262
15189
  this.toneMappingExposure = 1;
15263
15190
  const _this = this;
15264
15191
  let _isContextLost = false;
@@ -15284,8 +15211,8 @@ var WebGLRenderer = class {
15284
15211
  let _clippingEnabled = false;
15285
15212
  let _localClippingEnabled = false;
15286
15213
  const _currentProjectionMatrix = new Matrix4();
15287
- const _projScreenMatrix$2 = new Matrix4();
15288
- const _vector3$1 = new Vector3();
15214
+ const _projScreenMatrix = new Matrix4();
15215
+ const _vector3 = new Vector3();
15289
15216
  const _vector4 = new Vector4();
15290
15217
  const _emptyScene = {
15291
15218
  background: null,
@@ -15313,7 +15240,7 @@ var WebGLRenderer = class {
15313
15240
  powerPreference,
15314
15241
  failIfMajorPerformanceCaveat
15315
15242
  };
15316
- if ("setAttribute" in canvas) canvas.setAttribute("data-engine", `three.js r${REVISION}`);
15243
+ if ("setAttribute" in canvas) canvas.setAttribute("data-engine", `three.js r169`);
15317
15244
  canvas.addEventListener("webglcontextlost", onContextLost, false);
15318
15245
  canvas.addEventListener("webglcontextrestored", onContextRestore, false);
15319
15246
  canvas.addEventListener("webglcontextcreationerror", onContextCreationError, false);
@@ -15465,17 +15392,17 @@ var WebGLRenderer = class {
15465
15392
  this.setClearAlpha = function() {
15466
15393
  background.setClearAlpha.apply(background, arguments);
15467
15394
  };
15468
- this.clear = function(color = true, depth$1 = true, stencil$1 = true) {
15395
+ this.clear = function(color = true, depth = true, stencil = true) {
15469
15396
  let bits = 0;
15470
15397
  if (color) {
15471
15398
  let isIntegerFormat = false;
15472
15399
  if (_currentRenderTarget !== null) {
15473
15400
  const targetFormat = _currentRenderTarget.texture.format;
15474
- isIntegerFormat = targetFormat === RGBAIntegerFormat || targetFormat === RGIntegerFormat || targetFormat === RedIntegerFormat;
15401
+ isIntegerFormat = targetFormat === 1033 || targetFormat === 1031 || targetFormat === 1029;
15475
15402
  }
15476
15403
  if (isIntegerFormat) {
15477
15404
  const targetType = _currentRenderTarget.texture.type;
15478
- const isUnsignedType = targetType === UnsignedByteType || targetType === UnsignedIntType || targetType === UnsignedShortType || targetType === UnsignedInt248Type || targetType === UnsignedShort4444Type || targetType === UnsignedShort5551Type;
15405
+ const isUnsignedType = targetType === 1009 || targetType === 1014 || targetType === 1012 || targetType === 1020 || targetType === 1017 || targetType === 1018;
15479
15406
  const clearColor = background.getClearColor();
15480
15407
  const a = background.getClearAlpha();
15481
15408
  const r = clearColor.r;
@@ -15496,11 +15423,11 @@ var WebGLRenderer = class {
15496
15423
  }
15497
15424
  } else bits |= _gl.COLOR_BUFFER_BIT;
15498
15425
  }
15499
- if (depth$1) {
15426
+ if (depth) {
15500
15427
  bits |= _gl.DEPTH_BUFFER_BIT;
15501
15428
  _gl.clearDepth(this.capabilities.reverseDepthBuffer ? 0 : 1);
15502
15429
  }
15503
- if (stencil$1) {
15430
+ if (stencil) {
15504
15431
  bits |= _gl.STENCIL_BUFFER_BIT;
15505
15432
  this.state.buffers.stencil.setMask(4294967295);
15506
15433
  }
@@ -15628,10 +15555,10 @@ var WebGLRenderer = class {
15628
15555
  else if (!extensions.get("WEBGL_multi_draw")) {
15629
15556
  const starts = object._multiDrawStarts;
15630
15557
  const counts = object._multiDrawCounts;
15631
- const drawCount$1 = object._multiDrawCount;
15558
+ const drawCount = object._multiDrawCount;
15632
15559
  const bytesPerElement = index ? attributes.get(index).bytesPerElement : 1;
15633
15560
  const uniforms = properties.get(material).currentProgram.getUniforms();
15634
- for (let i = 0; i < drawCount$1; i++) {
15561
+ for (let i = 0; i < drawCount; i++) {
15635
15562
  uniforms.setValue(_gl, "_gl_DrawID", i);
15636
15563
  renderer.render(starts[i] / bytesPerElement, counts[i]);
15637
15564
  }
@@ -15644,14 +15571,14 @@ var WebGLRenderer = class {
15644
15571
  } else renderer.render(drawStart, drawCount);
15645
15572
  };
15646
15573
  function prepareMaterial(material, scene, object) {
15647
- if (material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false) {
15648
- material.side = BackSide;
15574
+ if (material.transparent === true && material.side === 2 && material.forceSinglePass === false) {
15575
+ material.side = 1;
15649
15576
  material.needsUpdate = true;
15650
15577
  getProgram(material, scene, object);
15651
- material.side = FrontSide;
15578
+ material.side = 0;
15652
15579
  material.needsUpdate = true;
15653
15580
  getProgram(material, scene, object);
15654
- material.side = DoubleSide;
15581
+ material.side = 2;
15655
15582
  } else getProgram(material, scene, object);
15656
15583
  }
15657
15584
  this.compile = function(scene, camera, targetScene = null) {
@@ -15672,32 +15599,32 @@ var WebGLRenderer = class {
15672
15599
  }
15673
15600
  });
15674
15601
  currentRenderState.setupLights();
15675
- const materials$1 = /* @__PURE__ */ new Set();
15602
+ const materials = /* @__PURE__ */ new Set();
15676
15603
  scene.traverse(function(object) {
15677
15604
  if (!(object.isMesh || object.isPoints || object.isLine || object.isSprite)) return;
15678
15605
  const material = object.material;
15679
15606
  if (material) if (Array.isArray(material)) for (let i = 0; i < material.length; i++) {
15680
15607
  const material2 = material[i];
15681
15608
  prepareMaterial(material2, targetScene, object);
15682
- materials$1.add(material2);
15609
+ materials.add(material2);
15683
15610
  }
15684
15611
  else {
15685
15612
  prepareMaterial(material, targetScene, object);
15686
- materials$1.add(material);
15613
+ materials.add(material);
15687
15614
  }
15688
15615
  });
15689
15616
  renderStateStack.pop();
15690
15617
  currentRenderState = null;
15691
- return materials$1;
15618
+ return materials;
15692
15619
  };
15693
15620
  this.compileAsync = function(scene, camera, targetScene = null) {
15694
- const materials$1 = this.compile(scene, camera, targetScene);
15621
+ const materials = this.compile(scene, camera, targetScene);
15695
15622
  return new Promise((resolve) => {
15696
15623
  function checkMaterialsReady() {
15697
- materials$1.forEach(function(material) {
15698
- if (properties.get(material).currentProgram.isReady()) materials$1.delete(material);
15624
+ materials.forEach(function(material) {
15625
+ if (properties.get(material).currentProgram.isReady()) materials.delete(material);
15699
15626
  });
15700
- if (materials$1.size === 0) {
15627
+ if (materials.size === 0) {
15701
15628
  resolve(scene);
15702
15629
  return;
15703
15630
  }
@@ -15743,8 +15670,8 @@ var WebGLRenderer = class {
15743
15670
  currentRenderState = renderStates.get(scene, renderStateStack.length);
15744
15671
  currentRenderState.init(camera);
15745
15672
  renderStateStack.push(currentRenderState);
15746
- _projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
15747
- _frustum.setFromProjectionMatrix(_projScreenMatrix$2);
15673
+ _projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
15674
+ _frustum.setFromProjectionMatrix(_projScreenMatrix);
15748
15675
  _localClippingEnabled = this.localClippingEnabled;
15749
15676
  _clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled);
15750
15677
  currentRenderList = renderLists.get(scene, renderListStack.length);
@@ -15812,7 +15739,7 @@ var WebGLRenderer = class {
15812
15739
  if (object.castShadow) currentRenderState.pushShadow(object);
15813
15740
  } else if (object.isSprite) {
15814
15741
  if (!object.frustumCulled || _frustum.intersectsSprite(object)) {
15815
- if (sortObjects) _vector4.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix$2);
15742
+ if (sortObjects) _vector4.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);
15816
15743
  const geometry = objects.update(object);
15817
15744
  const material = object.material;
15818
15745
  if (material.visible) currentRenderList.push(object, geometry, material, groupOrder, _vector4.z, null);
@@ -15829,7 +15756,7 @@ var WebGLRenderer = class {
15829
15756
  if (geometry.boundingSphere === null) geometry.computeBoundingSphere();
15830
15757
  _vector4.copy(geometry.boundingSphere.center);
15831
15758
  }
15832
- _vector4.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix$2);
15759
+ _vector4.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix);
15833
15760
  }
15834
15761
  if (Array.isArray(material)) {
15835
15762
  const groups = geometry.groups;
@@ -15845,10 +15772,10 @@ var WebGLRenderer = class {
15845
15772
  const children = object.children;
15846
15773
  for (let i = 0, l = children.length; i < l; i++) projectObject(children[i], camera, groupOrder, sortObjects);
15847
15774
  }
15848
- function renderScene(currentRenderList$1, scene, camera, viewport) {
15849
- const opaqueObjects = currentRenderList$1.opaque;
15850
- const transmissiveObjects = currentRenderList$1.transmissive;
15851
- const transparentObjects = currentRenderList$1.transparent;
15775
+ function renderScene(currentRenderList, scene, camera, viewport) {
15776
+ const opaqueObjects = currentRenderList.opaque;
15777
+ const transmissiveObjects = currentRenderList.transmissive;
15778
+ const transparentObjects = currentRenderList.transparent;
15852
15779
  currentRenderState.setupLightsView(camera);
15853
15780
  if (_clippingEnabled === true) clipping.setGlobalState(_this.clippingPlanes, camera);
15854
15781
  if (viewport) state.viewport(_currentViewport.copy(viewport));
@@ -15883,7 +15810,7 @@ var WebGLRenderer = class {
15883
15810
  _this.clear();
15884
15811
  if (_renderBackground) background.render(scene);
15885
15812
  const currentToneMapping = _this.toneMapping;
15886
- _this.toneMapping = NoToneMapping;
15813
+ _this.toneMapping = 0;
15887
15814
  const currentCameraViewport = camera.viewport;
15888
15815
  if (camera.viewport !== void 0) camera.viewport = void 0;
15889
15816
  currentRenderState.setupLightsView(camera);
@@ -15899,9 +15826,9 @@ var WebGLRenderer = class {
15899
15826
  const geometry = renderItem.geometry;
15900
15827
  const material = renderItem.material;
15901
15828
  const group = renderItem.group;
15902
- if (material.side === DoubleSide && object.layers.test(camera.layers)) {
15829
+ if (material.side === 2 && object.layers.test(camera.layers)) {
15903
15830
  const currentSide = material.side;
15904
- material.side = BackSide;
15831
+ material.side = 1;
15905
15832
  material.needsUpdate = true;
15906
15833
  renderObject(object, scene, camera, geometry, material, group);
15907
15834
  material.side = currentSide;
@@ -15935,14 +15862,14 @@ var WebGLRenderer = class {
15935
15862
  object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);
15936
15863
  object.normalMatrix.getNormalMatrix(object.modelViewMatrix);
15937
15864
  material.onBeforeRender(_this, scene, camera, geometry, object, group);
15938
- if (material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false) {
15939
- material.side = BackSide;
15865
+ if (material.transparent === true && material.side === 2 && material.forceSinglePass === false) {
15866
+ material.side = 1;
15940
15867
  material.needsUpdate = true;
15941
15868
  _this.renderBufferDirect(camera, scene, geometry, material, object, group);
15942
- material.side = FrontSide;
15869
+ material.side = 0;
15943
15870
  material.needsUpdate = true;
15944
15871
  _this.renderBufferDirect(camera, scene, geometry, material, object, group);
15945
- material.side = DoubleSide;
15872
+ material.side = 2;
15946
15873
  } else _this.renderBufferDirect(camera, scene, geometry, material, object, group);
15947
15874
  object.onAfterRender(_this, scene, camera, geometry, material, group);
15948
15875
  }
@@ -15952,8 +15879,8 @@ var WebGLRenderer = class {
15952
15879
  const lights = currentRenderState.state.lights;
15953
15880
  const shadowsArray = currentRenderState.state.shadowsArray;
15954
15881
  const lightsStateVersion = lights.state.version;
15955
- const parameters$1 = programCache.getParameters(material, lights.state, shadowsArray, scene, object);
15956
- const programCacheKey = programCache.getProgramCacheKey(parameters$1);
15882
+ const parameters = programCache.getParameters(material, lights.state, shadowsArray, scene, object);
15883
+ const programCacheKey = programCache.getProgramCacheKey(parameters);
15957
15884
  let programs = materialProperties.programs;
15958
15885
  materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;
15959
15886
  materialProperties.fog = scene.fog;
@@ -15967,19 +15894,19 @@ var WebGLRenderer = class {
15967
15894
  let program = programs.get(programCacheKey);
15968
15895
  if (program !== void 0) {
15969
15896
  if (materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion) {
15970
- updateCommonMaterialProperties(material, parameters$1);
15897
+ updateCommonMaterialProperties(material, parameters);
15971
15898
  return program;
15972
15899
  }
15973
15900
  } else {
15974
- parameters$1.uniforms = programCache.getUniforms(material);
15975
- material.onBeforeCompile(parameters$1, _this);
15976
- program = programCache.acquireProgram(parameters$1, programCacheKey);
15901
+ parameters.uniforms = programCache.getUniforms(material);
15902
+ material.onBeforeCompile(parameters, _this);
15903
+ program = programCache.acquireProgram(parameters, programCacheKey);
15977
15904
  programs.set(programCacheKey, program);
15978
- materialProperties.uniforms = parameters$1.uniforms;
15905
+ materialProperties.uniforms = parameters.uniforms;
15979
15906
  }
15980
15907
  const uniforms = materialProperties.uniforms;
15981
15908
  if (!material.isShaderMaterial && !material.isRawShaderMaterial || material.clipping === true) uniforms.clippingPlanes = clipping.uniform;
15982
- updateCommonMaterialProperties(material, parameters$1);
15909
+ updateCommonMaterialProperties(material, parameters);
15983
15910
  materialProperties.needsLights = materialNeedsLights(material);
15984
15911
  materialProperties.lightsStateVersion = lightsStateVersion;
15985
15912
  if (materialProperties.needsLights) {
@@ -16014,24 +15941,24 @@ var WebGLRenderer = class {
16014
15941
  }
16015
15942
  return materialProperties.uniformsList;
16016
15943
  }
16017
- function updateCommonMaterialProperties(material, parameters$1) {
15944
+ function updateCommonMaterialProperties(material, parameters) {
16018
15945
  const materialProperties = properties.get(material);
16019
- materialProperties.outputColorSpace = parameters$1.outputColorSpace;
16020
- materialProperties.batching = parameters$1.batching;
16021
- materialProperties.batchingColor = parameters$1.batchingColor;
16022
- materialProperties.instancing = parameters$1.instancing;
16023
- materialProperties.instancingColor = parameters$1.instancingColor;
16024
- materialProperties.instancingMorph = parameters$1.instancingMorph;
16025
- materialProperties.skinning = parameters$1.skinning;
16026
- materialProperties.morphTargets = parameters$1.morphTargets;
16027
- materialProperties.morphNormals = parameters$1.morphNormals;
16028
- materialProperties.morphColors = parameters$1.morphColors;
16029
- materialProperties.morphTargetsCount = parameters$1.morphTargetsCount;
16030
- materialProperties.numClippingPlanes = parameters$1.numClippingPlanes;
16031
- materialProperties.numIntersection = parameters$1.numClipIntersection;
16032
- materialProperties.vertexAlphas = parameters$1.vertexAlphas;
16033
- materialProperties.vertexTangents = parameters$1.vertexTangents;
16034
- materialProperties.toneMapping = parameters$1.toneMapping;
15946
+ materialProperties.outputColorSpace = parameters.outputColorSpace;
15947
+ materialProperties.batching = parameters.batching;
15948
+ materialProperties.batchingColor = parameters.batchingColor;
15949
+ materialProperties.instancing = parameters.instancing;
15950
+ materialProperties.instancingColor = parameters.instancingColor;
15951
+ materialProperties.instancingMorph = parameters.instancingMorph;
15952
+ materialProperties.skinning = parameters.skinning;
15953
+ materialProperties.morphTargets = parameters.morphTargets;
15954
+ materialProperties.morphNormals = parameters.morphNormals;
15955
+ materialProperties.morphColors = parameters.morphColors;
15956
+ materialProperties.morphTargetsCount = parameters.morphTargetsCount;
15957
+ materialProperties.numClippingPlanes = parameters.numClippingPlanes;
15958
+ materialProperties.numIntersection = parameters.numClipIntersection;
15959
+ materialProperties.vertexAlphas = parameters.vertexAlphas;
15960
+ materialProperties.vertexTangents = parameters.vertexTangents;
15961
+ materialProperties.toneMapping = parameters.toneMapping;
16035
15962
  }
16036
15963
  function setProgram(camera, scene, geometry, material, object) {
16037
15964
  if (scene.isScene !== true) scene = _emptyScene;
@@ -16045,7 +15972,7 @@ var WebGLRenderer = class {
16045
15972
  const morphTargets = !!geometry.morphAttributes.position;
16046
15973
  const morphNormals = !!geometry.morphAttributes.normal;
16047
15974
  const morphColors = !!geometry.morphAttributes.color;
16048
- let toneMapping = NoToneMapping;
15975
+ let toneMapping = 0;
16049
15976
  if (material.toneMapped) {
16050
15977
  if (_currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true) toneMapping = _this.toneMapping;
16051
15978
  }
@@ -16113,7 +16040,7 @@ var WebGLRenderer = class {
16113
16040
  } else p_uniforms.setValue(_gl, "projectionMatrix", camera.projectionMatrix);
16114
16041
  p_uniforms.setValue(_gl, "viewMatrix", camera.matrixWorldInverse);
16115
16042
  const uCamPos = p_uniforms.map.cameraPosition;
16116
- if (uCamPos !== void 0) uCamPos.setValue(_gl, _vector3$1.setFromMatrixPosition(camera.matrixWorld));
16043
+ if (uCamPos !== void 0) uCamPos.setValue(_gl, _vector3.setFromMatrixPosition(camera.matrixWorld));
16117
16044
  if (capabilities.logarithmicDepthBuffer) p_uniforms.setValue(_gl, "logDepthBufFC", 2 / (Math.log(camera.far + 1) / Math.LN2));
16118
16045
  if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) p_uniforms.setValue(_gl, "isOrthographic", camera.isOrthographicCamera === true);
16119
16046
  if (_currentCamera !== camera) {
@@ -16294,8 +16221,8 @@ var WebGLRenderer = class {
16294
16221
  }
16295
16222
  if (x >= 0 && x <= renderTarget.width - width && y >= 0 && y <= renderTarget.height - height) _gl.readPixels(x, y, width, height, utils.convert(textureFormat), utils.convert(textureType), buffer);
16296
16223
  } finally {
16297
- const framebuffer$1 = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null;
16298
- state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer$1);
16224
+ const framebuffer = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null;
16225
+ state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);
16299
16226
  }
16300
16227
  }
16301
16228
  };
@@ -16408,20 +16335,20 @@ var WebGLRenderer = class {
16408
16335
  dstTexture = arguments[3];
16409
16336
  level = arguments[4] || 0;
16410
16337
  }
16411
- let width, height, depth$1, minX, minY, minZ;
16338
+ let width, height, depth, minX, minY, minZ;
16412
16339
  let dstX, dstY, dstZ;
16413
16340
  const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[level] : srcTexture.image;
16414
16341
  if (srcRegion !== null) {
16415
16342
  width = srcRegion.max.x - srcRegion.min.x;
16416
16343
  height = srcRegion.max.y - srcRegion.min.y;
16417
- depth$1 = srcRegion.max.z - srcRegion.min.z;
16344
+ depth = srcRegion.max.z - srcRegion.min.z;
16418
16345
  minX = srcRegion.min.x;
16419
16346
  minY = srcRegion.min.y;
16420
16347
  minZ = srcRegion.min.z;
16421
16348
  } else {
16422
16349
  width = image.width;
16423
16350
  height = image.height;
16424
- depth$1 = image.depth;
16351
+ depth = image.depth;
16425
16352
  minX = 0;
16426
16353
  minY = 0;
16427
16354
  minZ = 0;
@@ -16461,9 +16388,9 @@ var WebGLRenderer = class {
16461
16388
  _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, minX);
16462
16389
  _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, minY);
16463
16390
  _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, minZ);
16464
- if (srcTexture.isDataTexture || srcTexture.isData3DTexture) _gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ, width, height, depth$1, glFormat, glType, image.data);
16465
- else if (dstTexture.isCompressedArrayTexture) _gl.compressedTexSubImage3D(glTarget, level, dstX, dstY, dstZ, width, height, depth$1, glFormat, image.data);
16466
- else _gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ, width, height, depth$1, glFormat, glType, image);
16391
+ if (srcTexture.isDataTexture || srcTexture.isData3DTexture) _gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ, width, height, depth, glFormat, glType, image.data);
16392
+ else if (dstTexture.isCompressedArrayTexture) _gl.compressedTexSubImage3D(glTarget, level, dstX, dstY, dstZ, width, height, depth, glFormat, image.data);
16393
+ else _gl.texSubImage3D(glTarget, level, dstX, dstY, dstZ, width, height, depth, glFormat, glType, image);
16467
16394
  _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, currentUnpackRowLen);
16468
16395
  _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, currentUnpackImageHeight);
16469
16396
  _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, currentUnpackSkipPixels);
@@ -16500,8 +16427,8 @@ var WebGLRenderer = class {
16500
16427
  set outputColorSpace(colorSpace) {
16501
16428
  this._outputColorSpace = colorSpace;
16502
16429
  const gl = this.getContext();
16503
- gl.drawingBufferColorSpace = colorSpace === DisplayP3ColorSpace ? "display-p3" : "srgb";
16504
- gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? "display-p3" : "srgb";
16430
+ gl.drawingBufferColorSpace = colorSpace === "display-p3" ? "display-p3" : "srgb";
16431
+ gl.unpackColorSpace = ColorManagement.workingColorSpace === "display-p3-linear" ? "display-p3" : "srgb";
16505
16432
  }
16506
16433
  };
16507
16434
  var Scene = class extends Object3D {
@@ -16615,7 +16542,7 @@ var InterleavedBuffer = class {
16615
16542
  };
16616
16543
  }
16617
16544
  };
16618
- const _vector$6 = /* @__PURE__ */ new Vector3();
16545
+ const _vector$6 = /*@__PURE__*/ new Vector3();
16619
16546
  var InterleavedBufferAttribute = class InterleavedBufferAttribute {
16620
16547
  constructor(interleavedBuffer, itemSize, offset, normalized = false) {
16621
16548
  this.isInterleavedBufferAttribute = true;
@@ -16786,15 +16713,15 @@ var InterleavedBufferAttribute = class InterleavedBufferAttribute {
16786
16713
  }
16787
16714
  }
16788
16715
  };
16789
- const _basePosition = /* @__PURE__ */ new Vector3();
16790
- const _skinIndex = /* @__PURE__ */ new Vector4();
16791
- const _skinWeight = /* @__PURE__ */ new Vector4();
16792
- const _vector3 = /* @__PURE__ */ new Vector3();
16793
- const _matrix4 = /* @__PURE__ */ new Matrix4();
16794
- const _vertex = /* @__PURE__ */ new Vector3();
16795
- const _sphere$4 = /* @__PURE__ */ new Sphere();
16796
- const _inverseMatrix$2 = /* @__PURE__ */ new Matrix4();
16797
- const _ray$2 = /* @__PURE__ */ new Ray();
16716
+ const _basePosition = /*@__PURE__*/ new Vector3();
16717
+ const _skinIndex = /*@__PURE__*/ new Vector4();
16718
+ const _skinWeight = /*@__PURE__*/ new Vector4();
16719
+ const _vector3 = /*@__PURE__*/ new Vector3();
16720
+ const _matrix4 = /*@__PURE__*/ new Matrix4();
16721
+ const _vertex = /*@__PURE__*/ new Vector3();
16722
+ const _sphere$4 = /*@__PURE__*/ new Sphere();
16723
+ const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();
16724
+ const _ray$2 = /*@__PURE__*/ new Ray();
16798
16725
  var SkinnedMesh = class extends Mesh {
16799
16726
  constructor(geometry, material) {
16800
16727
  super(geometry, material);
@@ -16882,8 +16809,8 @@ var SkinnedMesh = class extends Mesh {
16882
16809
  }
16883
16810
  updateMatrixWorld(force) {
16884
16811
  super.updateMatrixWorld(force);
16885
- if (this.bindMode === AttachedBindMode) this.bindMatrixInverse.copy(this.matrixWorld).invert();
16886
- else if (this.bindMode === DetachedBindMode) this.bindMatrixInverse.copy(this.bindMatrix).invert();
16812
+ if (this.bindMode === "attached") this.bindMatrixInverse.copy(this.matrixWorld).invert();
16813
+ else if (this.bindMode === "detached") this.bindMatrixInverse.copy(this.bindMatrix).invert();
16887
16814
  else console.warn("THREE.SkinnedMesh: Unrecognized bindMode: " + this.bindMode);
16888
16815
  }
16889
16816
  applyBoneTransform(index, vector) {
@@ -16925,8 +16852,8 @@ var DataTexture = class extends Texture {
16925
16852
  this.unpackAlignment = 1;
16926
16853
  }
16927
16854
  };
16928
- const _offsetMatrix = /* @__PURE__ */ new Matrix4();
16929
- const _identityMatrix$1 = /* @__PURE__ */ new Matrix4();
16855
+ const _offsetMatrix = /*@__PURE__*/ new Matrix4();
16856
+ const _identityMatrix$1 = /*@__PURE__*/ new Matrix4();
16930
16857
  var Skeleton = class Skeleton {
16931
16858
  constructor(bones = [], boneInverses = []) {
16932
16859
  this.uuid = generateUUID();
@@ -17065,13 +16992,13 @@ var InstancedBufferAttribute = class extends BufferAttribute {
17065
16992
  return data;
17066
16993
  }
17067
16994
  };
17068
- const _instanceLocalMatrix = /* @__PURE__ */ new Matrix4();
17069
- const _instanceWorldMatrix = /* @__PURE__ */ new Matrix4();
16995
+ const _instanceLocalMatrix = /*@__PURE__*/ new Matrix4();
16996
+ const _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();
17070
16997
  const _instanceIntersects = [];
17071
- const _box3 = /* @__PURE__ */ new Box3();
17072
- const _identity = /* @__PURE__ */ new Matrix4();
17073
- const _mesh$1 = /* @__PURE__ */ new Mesh();
17074
- const _sphere$3 = /* @__PURE__ */ new Sphere();
16998
+ const _box3 = /*@__PURE__*/ new Box3();
16999
+ const _identity = /*@__PURE__*/ new Matrix4();
17000
+ const _mesh$1 = /*@__PURE__*/ new Mesh();
17001
+ const _sphere$3 = /*@__PURE__*/ new Sphere();
17075
17002
  var InstancedMesh = class extends Mesh {
17076
17003
  constructor(geometry, material, count) {
17077
17004
  super(geometry, material);
@@ -17207,13 +17134,13 @@ var LineBasicMaterial = class extends Material {
17207
17134
  return this;
17208
17135
  }
17209
17136
  };
17210
- const _vStart = /* @__PURE__ */ new Vector3();
17211
- const _vEnd = /* @__PURE__ */ new Vector3();
17212
- const _inverseMatrix$1 = /* @__PURE__ */ new Matrix4();
17213
- const _ray$1 = /* @__PURE__ */ new Ray();
17214
- const _sphere$1 = /* @__PURE__ */ new Sphere();
17215
- const _intersectPointOnRay = /* @__PURE__ */ new Vector3();
17216
- const _intersectPointOnSegment = /* @__PURE__ */ new Vector3();
17137
+ const _vStart = /*@__PURE__*/ new Vector3();
17138
+ const _vEnd = /*@__PURE__*/ new Vector3();
17139
+ const _inverseMatrix$1 = /*@__PURE__*/ new Matrix4();
17140
+ const _ray$1 = /*@__PURE__*/ new Ray();
17141
+ const _sphere$1 = /*@__PURE__*/ new Sphere();
17142
+ const _intersectPointOnRay = /*@__PURE__*/ new Vector3();
17143
+ const _intersectPointOnSegment = /*@__PURE__*/ new Vector3();
17217
17144
  var Line = class extends Object3D {
17218
17145
  constructor(geometry = new BufferGeometry(), material = new LineBasicMaterial()) {
17219
17146
  super();
@@ -17324,8 +17251,8 @@ function checkIntersection(object, raycaster, ray, thresholdSq, a, b) {
17324
17251
  object
17325
17252
  };
17326
17253
  }
17327
- const _start = /* @__PURE__ */ new Vector3();
17328
- const _end = /* @__PURE__ */ new Vector3();
17254
+ const _start = /*@__PURE__*/ new Vector3();
17255
+ const _end = /*@__PURE__*/ new Vector3();
17329
17256
  var LineSegments = class extends Line {
17330
17257
  constructor(geometry, material) {
17331
17258
  super(geometry, material);
@@ -17379,10 +17306,10 @@ var PointsMaterial = class extends Material {
17379
17306
  return this;
17380
17307
  }
17381
17308
  };
17382
- const _inverseMatrix = /* @__PURE__ */ new Matrix4();
17383
- const _ray = /* @__PURE__ */ new Ray();
17384
- const _sphere = /* @__PURE__ */ new Sphere();
17385
- const _position$2 = /* @__PURE__ */ new Vector3();
17309
+ const _inverseMatrix = /*@__PURE__*/ new Matrix4();
17310
+ const _ray = /*@__PURE__*/ new Ray();
17311
+ const _sphere = /*@__PURE__*/ new Sphere();
17312
+ const _position$2 = /*@__PURE__*/ new Vector3();
17386
17313
  var Points = class extends Object3D {
17387
17314
  constructor(geometry = new BufferGeometry(), material = new PointsMaterial()) {
17388
17315
  super();
@@ -17488,7 +17415,7 @@ var MeshStandardMaterial = class extends Material {
17488
17415
  this.bumpMap = null;
17489
17416
  this.bumpScale = 1;
17490
17417
  this.normalMap = null;
17491
- this.normalMapType = TangentSpaceNormalMap;
17418
+ this.normalMapType = 0;
17492
17419
  this.normalScale = new Vector2(1, 1);
17493
17420
  this.displacementMap = null;
17494
17421
  this.displacementScale = 1;
@@ -18443,7 +18370,7 @@ var LoadingManager = class {
18443
18370
  };
18444
18371
  }
18445
18372
  };
18446
- const DefaultLoadingManager = /* @__PURE__ */ new LoadingManager();
18373
+ const DefaultLoadingManager = /*@__PURE__*/ new LoadingManager();
18447
18374
  var Loader = class {
18448
18375
  constructor(manager) {
18449
18376
  this.manager = manager !== void 0 ? manager : DefaultLoadingManager;
@@ -18703,9 +18630,9 @@ var Light = class extends Object3D {
18703
18630
  return data;
18704
18631
  }
18705
18632
  };
18706
- const _projScreenMatrix$1 = /* @__PURE__ */ new Matrix4();
18707
- const _lightPositionWorld$1 = /* @__PURE__ */ new Vector3();
18708
- const _lookTarget$1 = /* @__PURE__ */ new Vector3();
18633
+ const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();
18634
+ const _lightPositionWorld$1 = /*@__PURE__*/ new Vector3();
18635
+ const _lookTarget$1 = /*@__PURE__*/ new Vector3();
18709
18636
  var LightShadow = class {
18710
18637
  constructor(camera) {
18711
18638
  this.camera = camera;
@@ -18785,12 +18712,12 @@ var SpotLightShadow = class extends LightShadow {
18785
18712
  }
18786
18713
  updateMatrices(light) {
18787
18714
  const camera = this.camera;
18788
- const fov$1 = RAD2DEG * 2 * light.angle * this.focus;
18789
- const aspect$1 = this.mapSize.width / this.mapSize.height;
18715
+ const fov = RAD2DEG * 2 * light.angle * this.focus;
18716
+ const aspect = this.mapSize.width / this.mapSize.height;
18790
18717
  const far = light.distance || camera.far;
18791
- if (fov$1 !== camera.fov || aspect$1 !== camera.aspect || far !== camera.far) {
18792
- camera.fov = fov$1;
18793
- camera.aspect = aspect$1;
18718
+ if (fov !== camera.fov || aspect !== camera.aspect || far !== camera.far) {
18719
+ camera.fov = fov;
18720
+ camera.aspect = aspect;
18794
18721
  camera.far = far;
18795
18722
  camera.updateProjectionMatrix();
18796
18723
  }
@@ -18837,9 +18764,9 @@ var SpotLight = class extends Light {
18837
18764
  return this;
18838
18765
  }
18839
18766
  };
18840
- const _projScreenMatrix = /* @__PURE__ */ new Matrix4();
18841
- const _lightPositionWorld = /* @__PURE__ */ new Vector3();
18842
- const _lookTarget = /* @__PURE__ */ new Vector3();
18767
+ const _projScreenMatrix = /*@__PURE__*/ new Matrix4();
18768
+ const _lightPositionWorld = /*@__PURE__*/ new Vector3();
18769
+ const _lookTarget = /*@__PURE__*/ new Vector3();
18843
18770
  var PointLightShadow = class extends LightShadow {
18844
18771
  constructor() {
18845
18772
  super(new PerspectiveCamera(90, 1, .5, 500));
@@ -19075,14 +19002,14 @@ function now() {
19075
19002
  return performance.now();
19076
19003
  }
19077
19004
  const _RESERVED_CHARS_RE = "\\[\\]\\.:\\/";
19078
- const _reservedRe = new RegExp("[" + _RESERVED_CHARS_RE + "]", "g");
19079
- const _wordChar = "[^" + _RESERVED_CHARS_RE + "]";
19005
+ const _reservedRe = /* @__PURE__ */ new RegExp("[\\[\\]\\.:\\/]", "g");
19006
+ const _wordChar = "[^\\[\\]\\.:\\/]";
19080
19007
  const _wordCharOrDot = "[^" + _RESERVED_CHARS_RE.replace("\\.", "") + "]";
19081
- const _directoryRe = /* @__PURE__ */ /((?:WC+[\/:])*)/.source.replace("WC", _wordChar);
19082
- const _nodeRe = /* @__PURE__ */ /(WCOD+)?/.source.replace("WCOD", _wordCharOrDot);
19083
- const _objectRe = /* @__PURE__ */ /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", _wordChar);
19084
- const _propertyRe = /* @__PURE__ */ /\.(WC+)(?:\[(.+)\])?/.source.replace("WC", _wordChar);
19085
- const _trackRe = /* @__PURE__ */ new RegExp("^" + _directoryRe + _nodeRe + _objectRe + _propertyRe + "$");
19008
+ const _directoryRe = /*@__PURE__*/ /((?:WC+[\/:])*)/.source.replace("WC", _wordChar);
19009
+ const _nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace("WCOD", _wordCharOrDot);
19010
+ const _objectRe = /*@__PURE__*/ /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", _wordChar);
19011
+ const _propertyRe = /*@__PURE__*/ /\.(WC+)(?:\[(.+)\])?/.source.replace("WC", _wordChar);
19012
+ const _trackRe = new RegExp("^" + _directoryRe + _nodeRe + _objectRe + _propertyRe + "$");
19086
19013
  const _supportedObjectNames = [
19087
19014
  "material",
19088
19015
  "materials",
@@ -19401,7 +19328,6 @@ PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [
19401
19328
  PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate
19402
19329
  ]
19403
19330
  ];
19404
- const _controlInterpolantsResultBuffer = new Float32Array(1);
19405
19331
  var GLBufferAttribute = class {
19406
19332
  constructor(buffer, type, itemSize, elementSize, count) {
19407
19333
  this.isGLBufferAttribute = true;
@@ -19506,10 +19432,9 @@ var AxesHelper = class extends LineSegments {
19506
19432
  this.material.dispose();
19507
19433
  }
19508
19434
  };
19509
- if (typeof __THREE_DEVTOOLS__ !== "undefined") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: REVISION } }));
19435
+ if (typeof __THREE_DEVTOOLS__ !== "undefined") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "169" } }));
19510
19436
  if (typeof window !== "undefined") if (window.__THREE__) console.warn("WARNING: Multiple instances of Three.js being imported.");
19511
- else window.__THREE__ = REVISION;
19512
-
19437
+ else window.__THREE__ = "169";
19513
19438
  //#endregion
19514
19439
  //#region ../../node_modules/.pnpm/three@0.169.0/node_modules/three/examples/jsm/utils/BufferGeometryUtils.js
19515
19440
  /**
@@ -19518,11 +19443,11 @@ else window.__THREE__ = REVISION;
19518
19443
  * @return {BufferGeometry}
19519
19444
  */
19520
19445
  function toTrianglesDrawMode(geometry, drawMode) {
19521
- if (drawMode === TrianglesDrawMode) {
19446
+ if (drawMode === 0) {
19522
19447
  console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.");
19523
19448
  return geometry;
19524
19449
  }
19525
- if (drawMode === TriangleFanDrawMode || drawMode === TriangleStripDrawMode) {
19450
+ if (drawMode === 2 || drawMode === 1) {
19526
19451
  let index = geometry.getIndex();
19527
19452
  if (index === null) {
19528
19453
  const indices = [];
@@ -19538,7 +19463,7 @@ function toTrianglesDrawMode(geometry, drawMode) {
19538
19463
  }
19539
19464
  const numberOfTriangles = index.count - 2;
19540
19465
  const newIndices = [];
19541
- if (drawMode === TriangleFanDrawMode) for (let i = 1; i <= numberOfTriangles; i++) {
19466
+ if (drawMode === 2) for (let i = 1; i <= numberOfTriangles; i++) {
19542
19467
  newIndices.push(index.getX(0));
19543
19468
  newIndices.push(index.getX(i));
19544
19469
  newIndices.push(index.getX(i + 1));
@@ -19562,7 +19487,6 @@ function toTrianglesDrawMode(geometry, drawMode) {
19562
19487
  return geometry;
19563
19488
  }
19564
19489
  }
19565
-
19566
19490
  //#endregion
19567
19491
  //#region ../../node_modules/.pnpm/three@0.169.0/node_modules/three/examples/jsm/loaders/GLTFLoader.js
19568
19492
  var GLTFLoader = class extends Loader {
@@ -19852,13 +19776,13 @@ var GLTFLightsExtension = class {
19852
19776
  return this._loadLight(index);
19853
19777
  }
19854
19778
  createNodeAttachment(nodeIndex) {
19855
- const self$1 = this;
19779
+ const self = this;
19856
19780
  const parser = this.parser;
19857
19781
  const nodeDef = parser.json.nodes[nodeIndex];
19858
19782
  const lightIndex = (nodeDef.extensions && nodeDef.extensions[this.name] || {}).light;
19859
19783
  if (lightIndex === void 0) return null;
19860
19784
  return this._loadLight(lightIndex).then(function(light) {
19861
- return parser._getNodeRef(self$1.cache, lightIndex, light);
19785
+ return parser._getNodeRef(self.cache, lightIndex, light);
19862
19786
  });
19863
19787
  }
19864
19788
  };
@@ -20329,8 +20253,8 @@ var GLTFMeshoptCompression = class {
20329
20253
  const count = extensionDef.count;
20330
20254
  const stride = extensionDef.byteStride;
20331
20255
  const source = new Uint8Array(res, byteOffset, byteLength);
20332
- if (decoder.decodeGltfBufferAsync) return decoder.decodeGltfBufferAsync(count, stride, source, extensionDef.mode, extensionDef.filter).then(function(res$1) {
20333
- return res$1.buffer;
20256
+ if (decoder.decodeGltfBufferAsync) return decoder.decodeGltfBufferAsync(count, stride, source, extensionDef.mode, extensionDef.filter).then(function(res) {
20257
+ return res.buffer;
20334
20258
  });
20335
20259
  else return decoder.ready.then(function() {
20336
20260
  const result = new ArrayBuffer(count * stride);
@@ -20652,7 +20576,7 @@ function createDefaultMaterial(cache) {
20652
20576
  roughness: 1,
20653
20577
  transparent: false,
20654
20578
  depthTest: true,
20655
- side: FrontSide
20579
+ side: 0
20656
20580
  });
20657
20581
  return cache["DefaultMaterial"];
20658
20582
  }
@@ -21134,10 +21058,10 @@ var GLTFParser = class {
21134
21058
  texture.name = textureDef.name || sourceDef.name || "";
21135
21059
  if (texture.name === "" && typeof sourceDef.uri === "string" && sourceDef.uri.startsWith("data:image/") === false) texture.name = sourceDef.uri;
21136
21060
  const sampler = (json.samplers || {})[textureDef.sampler] || {};
21137
- texture.magFilter = WEBGL_FILTERS[sampler.magFilter] || LinearFilter;
21138
- texture.minFilter = WEBGL_FILTERS[sampler.minFilter] || LinearMipmapLinearFilter;
21139
- texture.wrapS = WEBGL_WRAPPINGS[sampler.wrapS] || RepeatWrapping;
21140
- texture.wrapT = WEBGL_WRAPPINGS[sampler.wrapT] || RepeatWrapping;
21061
+ texture.magFilter = WEBGL_FILTERS[sampler.magFilter] || 1006;
21062
+ texture.minFilter = WEBGL_FILTERS[sampler.minFilter] || 1008;
21063
+ texture.wrapS = WEBGL_WRAPPINGS[sampler.wrapS] || 1e3;
21064
+ texture.wrapT = WEBGL_WRAPPINGS[sampler.wrapT] || 1e3;
21141
21065
  parser.associations.set(texture, { textures: textureIndex });
21142
21066
  return texture;
21143
21067
  }).catch(function() {
@@ -21152,17 +21076,17 @@ var GLTFParser = class {
21152
21076
  const options = this.options;
21153
21077
  if (this.sourceCache[sourceIndex] !== void 0) return this.sourceCache[sourceIndex].then((texture) => texture.clone());
21154
21078
  const sourceDef = json.images[sourceIndex];
21155
- const URL$1 = self.URL || self.webkitURL;
21079
+ const URL = self.URL || self.webkitURL;
21156
21080
  let sourceURI = sourceDef.uri || "";
21157
21081
  let isObjectURL = false;
21158
21082
  if (sourceDef.bufferView !== void 0) sourceURI = parser.getDependency("bufferView", sourceDef.bufferView).then(function(bufferView) {
21159
21083
  isObjectURL = true;
21160
21084
  const blob = new Blob([bufferView], { type: sourceDef.mimeType });
21161
- sourceURI = URL$1.createObjectURL(blob);
21085
+ sourceURI = URL.createObjectURL(blob);
21162
21086
  return sourceURI;
21163
21087
  });
21164
21088
  else if (sourceDef.uri === void 0) throw new Error("THREE.GLTFLoader: Image " + sourceIndex + " is missing URI and bufferView");
21165
- const promise = Promise.resolve(sourceURI).then(function(sourceURI$1) {
21089
+ const promise = Promise.resolve(sourceURI).then(function(sourceURI) {
21166
21090
  return new Promise(function(resolve, reject) {
21167
21091
  let onLoad = resolve;
21168
21092
  if (loader.isImageBitmapLoader === true) onLoad = function(imageBitmap) {
@@ -21170,10 +21094,10 @@ var GLTFParser = class {
21170
21094
  texture.needsUpdate = true;
21171
21095
  resolve(texture);
21172
21096
  };
21173
- loader.load(LoaderUtils.resolveURL(sourceURI$1, options.path), onLoad, void 0, reject);
21097
+ loader.load(LoaderUtils.resolveURL(sourceURI, options.path), onLoad, void 0, reject);
21174
21098
  });
21175
21099
  }).then(function(texture) {
21176
- if (isObjectURL === true) URL$1.revokeObjectURL(sourceURI);
21100
+ if (isObjectURL === true) URL.revokeObjectURL(sourceURI);
21177
21101
  assignExtrasToUserData(texture, sourceDef);
21178
21102
  texture.userData.mimeType = sourceDef.mimeType || getImageURIMimeType(sourceDef.uri);
21179
21103
  return texture;
@@ -21315,7 +21239,7 @@ var GLTFParser = class {
21315
21239
  return ext.extendMaterialParams && ext.extendMaterialParams(materialIndex, materialParams);
21316
21240
  })));
21317
21241
  }
21318
- if (materialDef.doubleSided === true) materialParams.side = DoubleSide;
21242
+ if (materialDef.doubleSided === true) materialParams.side = 2;
21319
21243
  const alphaMode = materialDef.alphaMode || ALPHA_MODES.OPAQUE;
21320
21244
  if (alphaMode === ALPHA_MODES.BLEND) {
21321
21245
  materialParams.transparent = true;
@@ -21424,8 +21348,8 @@ var GLTFParser = class {
21424
21348
  if (primitive.mode === WEBGL_CONSTANTS.TRIANGLES || primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP || primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN || primitive.mode === void 0) {
21425
21349
  mesh = meshDef.isSkinnedMesh === true ? new SkinnedMesh(geometry, material) : new Mesh(geometry, material);
21426
21350
  if (mesh.isSkinnedMesh === true) mesh.normalizeSkinWeights();
21427
- if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP) mesh.geometry = toTrianglesDrawMode(mesh.geometry, TriangleStripDrawMode);
21428
- else if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN) mesh.geometry = toTrianglesDrawMode(mesh.geometry, TriangleFanDrawMode);
21351
+ if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP) mesh.geometry = toTrianglesDrawMode(mesh.geometry, 1);
21352
+ else if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN) mesh.geometry = toTrianglesDrawMode(mesh.geometry, 2);
21429
21353
  } else if (primitive.mode === WEBGL_CONSTANTS.LINES) mesh = new LineSegments(geometry, material);
21430
21354
  else if (primitive.mode === WEBGL_CONSTANTS.LINE_STRIP) mesh = new Line(geometry, material);
21431
21355
  else if (primitive.mode === WEBGL_CONSTANTS.LINE_LOOP) mesh = new LineLoop(geometry, material);
@@ -21669,9 +21593,9 @@ var GLTFParser = class {
21669
21593
  const reduceAssociations = (node) => {
21670
21594
  const reducedAssociations = /* @__PURE__ */ new Map();
21671
21595
  for (const [key, value] of parser.associations) if (key instanceof Material || key instanceof Texture) reducedAssociations.set(key, value);
21672
- node.traverse((node$1) => {
21673
- const mappings = parser.associations.get(node$1);
21674
- if (mappings != null) reducedAssociations.set(node$1, mappings);
21596
+ node.traverse((node) => {
21597
+ const mappings = parser.associations.get(node);
21598
+ if (mappings != null) reducedAssociations.set(node, mappings);
21675
21599
  });
21676
21600
  return reducedAssociations;
21677
21601
  };
@@ -21704,8 +21628,6 @@ var GLTFParser = class {
21704
21628
  case 1:
21705
21629
  TypedKeyframeTrack = NumberKeyframeTrack;
21706
21630
  break;
21707
- case 2:
21708
- case 3:
21709
21631
  default:
21710
21632
  TypedKeyframeTrack = VectorKeyframeTrack;
21711
21633
  break;
@@ -21812,19 +21734,18 @@ function addPrimitiveAttributes(geometry, primitiveDef, parser) {
21812
21734
  pending.push(assignAttributeAccessor(attributes[gltfAttributeName], threeAttributeName));
21813
21735
  }
21814
21736
  if (primitiveDef.indices !== void 0 && !geometry.index) {
21815
- const accessor = parser.getDependency("accessor", primitiveDef.indices).then(function(accessor$1) {
21816
- geometry.setIndex(accessor$1);
21737
+ const accessor = parser.getDependency("accessor", primitiveDef.indices).then(function(accessor) {
21738
+ geometry.setIndex(accessor);
21817
21739
  });
21818
21740
  pending.push(accessor);
21819
21741
  }
21820
- if (ColorManagement.workingColorSpace !== LinearSRGBColorSpace && "COLOR_0" in attributes) console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ColorManagement.workingColorSpace}" not supported.`);
21742
+ if (ColorManagement.workingColorSpace !== "srgb-linear" && "COLOR_0" in attributes) console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ColorManagement.workingColorSpace}" not supported.`);
21821
21743
  assignExtrasToUserData(geometry, primitiveDef);
21822
21744
  computeBounds(geometry, primitiveDef, parser);
21823
21745
  return Promise.all(pending).then(function() {
21824
21746
  return primitiveDef.targets !== void 0 ? addMorphTargets(geometry, primitiveDef.targets, parser) : geometry;
21825
21747
  });
21826
21748
  }
21827
-
21828
21749
  //#endregion
21829
21750
  //#region ../../node_modules/.pnpm/@pixiv+three-vrm@3.5.3_three@0.169.0/node_modules/@pixiv/three-vrm/lib/three-vrm.module.js
21830
21751
  /*!
@@ -22255,9 +22176,11 @@ var _VRMExpressionMaterialColorBind = class _VRMExpressionMaterialColorBind2 {
22255
22176
  this.type = type;
22256
22177
  this.targetValue = targetValue;
22257
22178
  this.targetAlpha = targetAlpha != null ? targetAlpha : 1;
22179
+ const color = this._initColorBindState();
22180
+ const alpha = this._initAlphaBindState();
22258
22181
  this._state = {
22259
- color: this._initColorBindState(),
22260
- alpha: this._initAlphaBindState()
22182
+ color,
22183
+ alpha
22261
22184
  };
22262
22185
  }
22263
22186
  applyWeight(weight) {
@@ -23682,9 +23605,9 @@ var FanBufferGeometry = class extends BufferGeometry {
23682
23605
  this.radius = 0;
23683
23606
  this._currentTheta = 0;
23684
23607
  this._currentRadius = 0;
23685
- this._attrPos = new BufferAttribute(new Float32Array(195), 3);
23608
+ this._attrPos = new BufferAttribute(/* @__PURE__ */ new Float32Array(195), 3);
23686
23609
  this.setAttribute("position", this._attrPos);
23687
- this._attrIndex = new BufferAttribute(new Uint16Array(189), 1);
23610
+ this._attrIndex = new BufferAttribute(/* @__PURE__ */ new Uint16Array(189), 1);
23688
23611
  this.setIndex(this._attrIndex);
23689
23612
  this._buildIndex();
23690
23613
  this.update();
@@ -23721,9 +23644,9 @@ var LineAndSphereBufferGeometry = class extends BufferGeometry {
23721
23644
  this._currentRadius = 0;
23722
23645
  this.tail = new Vector3();
23723
23646
  this._currentTail = new Vector3();
23724
- this._attrPos = new BufferAttribute(new Float32Array(294), 3);
23647
+ this._attrPos = new BufferAttribute(/* @__PURE__ */ new Float32Array(294), 3);
23725
23648
  this.setAttribute("position", this._attrPos);
23726
- this._attrIndex = new BufferAttribute(new Uint16Array(194), 1);
23649
+ this._attrIndex = new BufferAttribute(/* @__PURE__ */ new Uint16Array(194), 1);
23727
23650
  this.setIndex(this._attrIndex);
23728
23651
  this._buildIndex();
23729
23652
  this.update();
@@ -23783,7 +23706,7 @@ var VRMLookAtHelper = class extends Group {
23783
23706
  color: 65280,
23784
23707
  transparent: true,
23785
23708
  opacity: .5,
23786
- side: DoubleSide,
23709
+ side: 2,
23787
23710
  depthTest: false,
23788
23711
  depthWrite: false
23789
23712
  });
@@ -23797,7 +23720,7 @@ var VRMLookAtHelper = class extends Group {
23797
23720
  color: 16711680,
23798
23721
  transparent: true,
23799
23722
  opacity: .5,
23800
- side: DoubleSide,
23723
+ side: 2,
23801
23724
  depthTest: false,
23802
23725
  depthWrite: false
23803
23726
  });
@@ -24553,7 +24476,7 @@ var colorSpaceEncodingMap = {
24553
24476
  srgb: 3001
24554
24477
  };
24555
24478
  function setTextureColorSpace(texture, colorSpace) {
24556
- if (parseInt(REVISION, 10) >= 152) texture.colorSpace = colorSpace;
24479
+ if (parseInt("169", 10) >= 152) texture.colorSpace = colorSpace;
24557
24480
  else texture.encoding = colorSpaceEncodingMap[colorSpace];
24558
24481
  }
24559
24482
  var GLTFMToonMaterialParamsAssignHelper = class {
@@ -24600,9 +24523,21 @@ var GLTFMToonMaterialParamsAssignHelper = class {
24600
24523
  var mtoon_default = "// #define PHONG\n\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n\n#include <common>\n\n// #include <uv_pars_vertex>\n#ifdef MTOON_USE_UV\n varying vec2 vUv;\n\n // COMPAT: pre-r151 uses a common uvTransform\n #if THREE_VRM_THREE_REVISION < 151\n uniform mat3 uvTransform;\n #endif\n#endif\n\n// #include <uv2_pars_vertex>\n// COMAPT: pre-r151 uses uv2 for lightMap and aoMap\n#if THREE_VRM_THREE_REVISION < 151\n #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n attribute vec2 uv2;\n varying vec2 vUv2;\n uniform mat3 uv2Transform;\n #endif\n#endif\n\n// #include <displacementmap_pars_vertex>\n// #include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n#ifdef USE_OUTLINEWIDTHMULTIPLYTEXTURE\n uniform sampler2D outlineWidthMultiplyTexture;\n uniform mat3 outlineWidthMultiplyTextureUvTransform;\n#endif\n\nuniform float outlineWidthFactor;\n\nvoid main() {\n\n // #include <uv_vertex>\n #ifdef MTOON_USE_UV\n // COMPAT: pre-r151 uses a common uvTransform\n #if THREE_VRM_THREE_REVISION >= 151\n vUv = uv;\n #else\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #endif\n\n // #include <uv2_vertex>\n // COMAPT: pre-r151 uses uv2 for lightMap and aoMap\n #if THREE_VRM_THREE_REVISION < 151\n #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n #endif\n #endif\n\n #include <color_vertex>\n\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n\n // we need this to compute the outline properly\n objectNormal = normalize( objectNormal );\n\n #include <defaultnormal_vertex>\n\n #ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #endif\n\n #include <begin_vertex>\n\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n // #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n\n vViewPosition = - mvPosition.xyz;\n\n #ifdef OUTLINE\n float worldNormalLength = length( transformedNormal );\n vec3 outlineOffset = outlineWidthFactor * worldNormalLength * objectNormal;\n\n #ifdef USE_OUTLINEWIDTHMULTIPLYTEXTURE\n vec2 outlineWidthMultiplyTextureUv = ( outlineWidthMultiplyTextureUvTransform * vec3( vUv, 1 ) ).xy;\n float outlineTex = texture2D( outlineWidthMultiplyTexture, outlineWidthMultiplyTextureUv ).g;\n outlineOffset *= outlineTex;\n #endif\n\n #ifdef OUTLINE_WIDTH_SCREEN\n outlineOffset *= vViewPosition.z / projectionMatrix[ 1 ].y;\n #endif\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( outlineOffset + transformed, 1.0 );\n\n gl_Position.z += 1E-6 * gl_Position.w; // anti-artifact magic\n #endif\n\n #include <worldpos_vertex>\n // #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n\n}";
24601
24524
  var mtoon_default2 = "// #define PHONG\n\nuniform vec3 litFactor;\n\nuniform float opacity;\n\nuniform vec3 shadeColorFactor;\n#ifdef USE_SHADEMULTIPLYTEXTURE\n uniform sampler2D shadeMultiplyTexture;\n uniform mat3 shadeMultiplyTextureUvTransform;\n#endif\n\nuniform float shadingShiftFactor;\nuniform float shadingToonyFactor;\n\n#ifdef USE_SHADINGSHIFTTEXTURE\n uniform sampler2D shadingShiftTexture;\n uniform mat3 shadingShiftTextureUvTransform;\n uniform float shadingShiftTextureScale;\n#endif\n\nuniform float giEqualizationFactor;\n\nuniform vec3 parametricRimColorFactor;\n#ifdef USE_RIMMULTIPLYTEXTURE\n uniform sampler2D rimMultiplyTexture;\n uniform mat3 rimMultiplyTextureUvTransform;\n#endif\nuniform float rimLightingMixFactor;\nuniform float parametricRimFresnelPowerFactor;\nuniform float parametricRimLiftFactor;\n\n#ifdef USE_MATCAPTEXTURE\n uniform vec3 matcapFactor;\n uniform sampler2D matcapTexture;\n uniform mat3 matcapTextureUvTransform;\n#endif\n\nuniform vec3 emissive;\nuniform float emissiveIntensity;\n\nuniform vec3 outlineColorFactor;\nuniform float outlineLightingMixFactor;\n\n#ifdef USE_UVANIMATIONMASKTEXTURE\n uniform sampler2D uvAnimationMaskTexture;\n uniform mat3 uvAnimationMaskTextureUvTransform;\n#endif\n\nuniform float uvAnimationScrollXOffset;\nuniform float uvAnimationScrollYOffset;\nuniform float uvAnimationRotationPhase;\n\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n\n// #include <uv_pars_fragment>\n#if ( defined( MTOON_USE_UV ) && !defined( MTOON_UVS_VERTEX_ONLY ) )\n varying vec2 vUv;\n#endif\n\n// #include <uv2_pars_fragment>\n// COMAPT: pre-r151 uses uv2 for lightMap and aoMap\n#if THREE_VRM_THREE_REVISION < 151\n #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n varying vec2 vUv2;\n #endif\n#endif\n\n#include <map_pars_fragment>\n\n#ifdef USE_MAP\n uniform mat3 mapUvTransform;\n#endif\n\n// #include <alphamap_pars_fragment>\n\n#include <alphatest_pars_fragment>\n\n#include <aomap_pars_fragment>\n// #include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapUvTransform;\n#endif\n\n// #include <envmap_common_pars_fragment>\n// #include <envmap_pars_fragment>\n// #include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n\n// #include <bsdfs>\n// COMPAT: pre-r151 doesn't have BRDF_Lambert in <common>\n#if THREE_VRM_THREE_REVISION < 151\n vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n }\n#endif\n\n#include <lights_pars_begin>\n\n#include <normal_pars_fragment>\n\n// #include <lights_phong_pars_fragment>\nvarying vec3 vViewPosition;\n\nstruct MToonMaterial {\n vec3 diffuseColor;\n vec3 shadeColor;\n float shadingShift;\n};\n\nfloat linearstep( float a, float b, float t ) {\n return clamp( ( t - a ) / ( b - a ), 0.0, 1.0 );\n}\n\n/**\n * Convert NdotL into toon shading factor using shadingShift and shadingToony\n */\nfloat getShading(\n const in float dotNL,\n const in float shadow,\n const in float shadingShift\n) {\n float shading = dotNL;\n shading = shading + shadingShift;\n shading = linearstep( -1.0 + shadingToonyFactor, 1.0 - shadingToonyFactor, shading );\n shading *= shadow;\n return shading;\n}\n\n/**\n * Mix diffuseColor and shadeColor using shading factor and light color\n */\nvec3 getDiffuse(\n const in MToonMaterial material,\n const in float shading,\n in vec3 lightColor\n) {\n #ifdef DEBUG_LITSHADERATE\n return vec3( BRDF_Lambert( shading * lightColor ) );\n #endif\n\n vec3 col = lightColor * BRDF_Lambert( mix( material.shadeColor, material.diffuseColor, shading ) );\n\n // The \"comment out if you want to PBR absolutely\" line\n #ifdef V0_COMPAT_SHADE\n col = min( col, material.diffuseColor );\n #endif\n\n return col;\n}\n\n// COMPAT: pre-r156 uses a struct GeometricContext\n#if THREE_VRM_THREE_REVISION >= 157\n void RE_Direct_MToon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in MToonMaterial material, const in float shadow, inout ReflectedLight reflectedLight ) {\n float dotNL = clamp( dot( geometryNormal, directLight.direction ), -1.0, 1.0 );\n vec3 irradiance = directLight.color;\n\n // directSpecular will be used for rim lighting, not an actual specular\n reflectedLight.directSpecular += irradiance;\n\n irradiance *= dotNL;\n\n float shading = getShading( dotNL, shadow, material.shadingShift );\n\n // toon shaded diffuse\n reflectedLight.directDiffuse += getDiffuse( material, shading, directLight.color );\n }\n\n void RE_IndirectDiffuse_MToon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in MToonMaterial material, inout ReflectedLight reflectedLight ) {\n // indirect diffuse will use diffuseColor, no shadeColor involved\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n // directSpecular will be used for rim lighting, not an actual specular\n reflectedLight.directSpecular += irradiance;\n }\n#else\n void RE_Direct_MToon( const in IncidentLight directLight, const in GeometricContext geometry, const in MToonMaterial material, const in float shadow, inout ReflectedLight reflectedLight ) {\n float dotNL = clamp( dot( geometry.normal, directLight.direction ), -1.0, 1.0 );\n vec3 irradiance = directLight.color;\n\n // directSpecular will be used for rim lighting, not an actual specular\n reflectedLight.directSpecular += irradiance;\n\n irradiance *= dotNL;\n\n float shading = getShading( dotNL, shadow, material.shadingShift );\n\n // toon shaded diffuse\n reflectedLight.directDiffuse += getDiffuse( material, shading, directLight.color );\n }\n\n void RE_IndirectDiffuse_MToon( const in vec3 irradiance, const in GeometricContext geometry, const in MToonMaterial material, inout ReflectedLight reflectedLight ) {\n // indirect diffuse will use diffuseColor, no shadeColor involved\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n // directSpecular will be used for rim lighting, not an actual specular\n reflectedLight.directSpecular += irradiance;\n }\n#endif\n\n#define RE_Direct RE_Direct_MToon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_MToon\n#define Material_LightProbeLOD( material ) (0)\n\n#include <shadowmap_pars_fragment>\n// #include <bumpmap_pars_fragment>\n\n// #include <normalmap_pars_fragment>\n#ifdef USE_NORMALMAP\n\n uniform sampler2D normalMap;\n uniform mat3 normalMapUvTransform;\n uniform vec2 normalScale;\n\n#endif\n\n// COMPAT: pre-r151\n// USE_NORMALMAP_OBJECTSPACE used to be OBJECTSPACE_NORMALMAP in pre-r151\n#if defined( USE_NORMALMAP_OBJECTSPACE ) || defined( OBJECTSPACE_NORMALMAP )\n\n uniform mat3 normalMatrix;\n\n#endif\n\n// COMPAT: pre-r151\n// USE_NORMALMAP_TANGENTSPACE used to be TANGENTSPACE_NORMALMAP in pre-r151\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( TANGENTSPACE_NORMALMAP ) )\n\n // Per-Pixel Tangent Space Normal Mapping\n // http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html\n\n // three-vrm specific change: it requires `uv` as an input in order to support uv scrolls\n\n // Temporary compat against shader change @ Three.js r126, r151\n #if THREE_VRM_THREE_REVISION >= 151\n\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n\n vec3 N = surf_norm;\n\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\n return mat3( T * scale, B * scale, N );\n\n }\n\n #else\n\n vec3 perturbNormal2Arb( vec2 uv, vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n\n vec3 N = normalize( surf_norm );\n\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n\n // three-vrm specific change: Workaround for the issue that happens when delta of uv = 0.0\n // TODO: Is this still required? Or shall I make a PR about it?\n if ( length( T ) == 0.0 || length( B ) == 0.0 ) {\n return surf_norm;\n }\n\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\n return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\n }\n\n #endif\n\n#endif\n\n// #include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\n// == post correction ==========================================================\nvoid postCorrection() {\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}\n\n// == main procedure ===========================================================\nvoid main() {\n #include <clipping_planes_fragment>\n\n vec2 uv = vec2(0.5, 0.5);\n\n #if ( defined( MTOON_USE_UV ) && !defined( MTOON_UVS_VERTEX_ONLY ) )\n uv = vUv;\n\n float uvAnimMask = 1.0;\n #ifdef USE_UVANIMATIONMASKTEXTURE\n vec2 uvAnimationMaskTextureUv = ( uvAnimationMaskTextureUvTransform * vec3( uv, 1 ) ).xy;\n uvAnimMask = texture2D( uvAnimationMaskTexture, uvAnimationMaskTextureUv ).b;\n #endif\n\n float uvRotCos = cos( uvAnimationRotationPhase * uvAnimMask );\n float uvRotSin = sin( uvAnimationRotationPhase * uvAnimMask );\n uv = mat2( uvRotCos, -uvRotSin, uvRotSin, uvRotCos ) * ( uv - 0.5 ) + 0.5;\n uv = uv + vec2( uvAnimationScrollXOffset, uvAnimationScrollYOffset ) * uvAnimMask;\n #endif\n\n #ifdef DEBUG_UV\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #if ( defined( MTOON_USE_UV ) && !defined( MTOON_UVS_VERTEX_ONLY ) )\n gl_FragColor = vec4( uv, 0.0, 1.0 );\n #endif\n return;\n #endif\n\n vec4 diffuseColor = vec4( litFactor, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive * emissiveIntensity;\n\n #include <logdepthbuf_fragment>\n\n // #include <map_fragment>\n #ifdef USE_MAP\n vec2 mapUv = ( mapUvTransform * vec3( uv, 1 ) ).xy;\n vec4 sampledDiffuseColor = texture2D( map, mapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n #endif\n diffuseColor *= sampledDiffuseColor;\n #endif\n\n // #include <color_fragment>\n #if ( defined( USE_COLOR ) && !defined( IGNORE_VERTEX_COLOR ) )\n diffuseColor.rgb *= vColor;\n #endif\n\n // #include <alphamap_fragment>\n\n #include <alphatest_fragment>\n\n // #include <specularmap_fragment>\n\n // #include <normal_fragment_begin>\n float faceDirection = gl_FrontFacing ? 1.0 : -1.0;\n\n #ifdef FLAT_SHADED\n\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n\n #else\n\n vec3 normal = normalize( vNormal );\n\n #ifdef DOUBLE_SIDED\n\n normal *= faceDirection;\n\n #endif\n\n #endif\n\n #ifdef USE_NORMALMAP\n\n vec2 normalMapUv = ( normalMapUvTransform * vec3( uv, 1 ) ).xy;\n\n #endif\n\n #ifdef USE_NORMALMAP_TANGENTSPACE\n\n #ifdef USE_TANGENT\n\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\n #else\n\n mat3 tbn = getTangentFrame( - vViewPosition, normal, normalMapUv );\n\n #endif\n\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n\n #endif\n\n #endif\n\n #ifdef USE_CLEARCOAT_NORMALMAP\n\n #ifdef USE_TANGENT\n\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\n #else\n\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\n #endif\n\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n\n #endif\n\n #endif\n\n // non perturbed normal for clearcoat among others\n\n vec3 nonPerturbedNormal = normal;\n\n #ifdef OUTLINE\n normal *= -1.0;\n #endif\n\n // #include <normal_fragment_maps>\n\n // COMPAT: pre-r151\n // USE_NORMALMAP_OBJECTSPACE used to be OBJECTSPACE_NORMALMAP in pre-r151\n #if defined( USE_NORMALMAP_OBJECTSPACE ) || defined( OBJECTSPACE_NORMALMAP )\n\n normal = texture2D( normalMap, normalMapUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals\n\n #ifdef FLIP_SIDED\n\n normal = - normal;\n\n #endif\n\n #ifdef DOUBLE_SIDED\n\n normal = normal * faceDirection;\n\n #endif\n\n normal = normalize( normalMatrix * normal );\n\n // COMPAT: pre-r151\n // USE_NORMALMAP_TANGENTSPACE used to be TANGENTSPACE_NORMALMAP in pre-r151\n #elif defined( USE_NORMALMAP_TANGENTSPACE ) || defined( TANGENTSPACE_NORMALMAP )\n\n vec3 mapN = texture2D( normalMap, normalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n\n // COMPAT: pre-r151\n #if THREE_VRM_THREE_REVISION >= 151 || defined( USE_TANGENT )\n\n normal = normalize( tbn * mapN );\n\n #else\n\n normal = perturbNormal2Arb( uv, -vViewPosition, normal, mapN, faceDirection );\n\n #endif\n\n #endif\n\n // #include <emissivemap_fragment>\n #ifdef USE_EMISSIVEMAP\n vec2 emissiveMapUv = ( emissiveMapUvTransform * vec3( uv, 1 ) ).xy;\n totalEmissiveRadiance *= texture2D( emissiveMap, emissiveMapUv ).rgb;\n #endif\n\n #ifdef DEBUG_NORMAL\n gl_FragColor = vec4( 0.5 + 0.5 * normal, 1.0 );\n return;\n #endif\n\n // -- MToon: lighting --------------------------------------------------------\n // accumulation\n // #include <lights_phong_fragment>\n MToonMaterial material;\n\n material.diffuseColor = diffuseColor.rgb;\n\n material.shadeColor = shadeColorFactor;\n #ifdef USE_SHADEMULTIPLYTEXTURE\n vec2 shadeMultiplyTextureUv = ( shadeMultiplyTextureUvTransform * vec3( uv, 1 ) ).xy;\n material.shadeColor *= texture2D( shadeMultiplyTexture, shadeMultiplyTextureUv ).rgb;\n #endif\n\n #if ( defined( USE_COLOR ) && !defined( IGNORE_VERTEX_COLOR ) )\n material.shadeColor.rgb *= vColor;\n #endif\n\n material.shadingShift = shadingShiftFactor;\n #ifdef USE_SHADINGSHIFTTEXTURE\n vec2 shadingShiftTextureUv = ( shadingShiftTextureUvTransform * vec3( uv, 1 ) ).xy;\n material.shadingShift += texture2D( shadingShiftTexture, shadingShiftTextureUv ).r * shadingShiftTextureScale;\n #endif\n\n // #include <lights_fragment_begin>\n\n // MToon Specific changes:\n // Since we want to take shadows into account of shading instead of irradiance,\n // we had to modify the codes that multiplies the results of shadowmap into color of direct lights.\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n vec3 geometryPosition = - vViewPosition;\n vec3 geometryNormal = normal;\n vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n vec3 geometryClearcoatNormal;\n\n #ifdef USE_CLEARCOAT\n\n geometryClearcoatNormal = clearcoatNormal;\n\n #endif\n #else\n GeometricContext geometry;\n\n geometry.position = - vViewPosition;\n geometry.normal = normal;\n geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n #ifdef USE_CLEARCOAT\n\n geometry.clearcoatNormal = clearcoatNormal;\n\n #endif\n #endif\n\n IncidentLight directLight;\n\n // since these variables will be used in unrolled loop, we have to define in prior\n float shadow;\n\n #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n pointLight = pointLights[ i ];\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #else\n getPointLightInfo( pointLight, geometry, directLight );\n #endif\n\n shadow = 1.0;\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n // COMPAT: pre-r166\n // r166 introduced shadowIntensity\n #if THREE_VRM_THREE_REVISION >= 166\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #else\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n #endif\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, shadow, reflectedLight );\n #else\n RE_Direct( directLight, geometry, material, shadow, reflectedLight );\n #endif\n\n }\n #pragma unroll_loop_end\n\n #endif\n\n #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n SpotLight spotLight;\n // COMPAT: pre-r144 uses NUM_SPOT_LIGHT_SHADOWS, r144+ uses NUM_SPOT_LIGHT_COORDS\n #if THREE_VRM_THREE_REVISION >= 144\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_COORDS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #elif defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n spotLight = spotLights[ i ];\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #else\n getSpotLightInfo( spotLight, geometry, directLight );\n #endif\n\n shadow = 1.0;\n // COMPAT: pre-r144 uses NUM_SPOT_LIGHT_SHADOWS and vSpotShadowCoord, r144+ uses NUM_SPOT_LIGHT_COORDS and vSpotLightCoord\n // COMPAT: pre-r166 does not have shadowIntensity, r166+ has shadowIntensity\n #if THREE_VRM_THREE_REVISION >= 166\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_COORDS )\n spotLightShadow = spotLightShadows[ i ];\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n #elif THREE_VRM_THREE_REVISION >= 144\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_COORDS )\n spotLightShadow = spotLightShadows[ i ];\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n #elif defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n #endif\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, shadow, reflectedLight );\n #else\n RE_Direct( directLight, geometry, material, shadow, reflectedLight );\n #endif\n\n }\n #pragma unroll_loop_end\n\n #endif\n\n #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n directionalLight = directionalLights[ i ];\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n getDirectionalLightInfo( directionalLight, directLight );\n #else\n getDirectionalLightInfo( directionalLight, geometry, directLight );\n #endif\n\n shadow = 1.0;\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n // COMPAT: pre-r166\n // r166 introduced shadowIntensity\n #if THREE_VRM_THREE_REVISION >= 166\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #else\n shadow = all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n #endif\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, shadow, reflectedLight );\n #else\n RE_Direct( directLight, geometry, material, shadow, reflectedLight );\n #endif\n\n }\n #pragma unroll_loop_end\n\n #endif\n\n // #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n // RectAreaLight rectAreaLight;\n\n // #pragma unroll_loop_start\n // for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n // rectAreaLight = rectAreaLights[ i ];\n // RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\n // }\n // #pragma unroll_loop_end\n\n // #endif\n\n #if defined( RE_IndirectDiffuse )\n\n vec3 iblIrradiance = vec3( 0.0 );\n\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n // COMPAT: pre-r156 doesn't have a define USE_LIGHT_PROBES\n #if THREE_VRM_THREE_REVISION >= 157\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #else\n irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n #endif\n\n #if ( NUM_HEMI_LIGHTS > 0 )\n\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n // COMPAT: pre-r156 uses a struct GeometricContext\n #if THREE_VRM_THREE_REVISION >= 157\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n #else\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n #endif\n\n }\n #pragma unroll_loop_end\n\n #endif\n\n #endif\n\n // #if defined( RE_IndirectSpecular )\n\n // vec3 radiance = vec3( 0.0 );\n // vec3 clearcoatRadiance = vec3( 0.0 );\n\n // #endif\n\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n\n // modulation\n #include <aomap_fragment>\n\n vec3 col = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\n #ifdef DEBUG_LITSHADERATE\n gl_FragColor = vec4( col, diffuseColor.a );\n postCorrection();\n return;\n #endif\n\n // -- MToon: rim lighting -----------------------------------------\n vec3 viewDir = normalize( vViewPosition );\n\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n reflectedLight.directSpecular /= PI;\n #endif\n vec3 rimMix = mix( vec3( 1.0 ), reflectedLight.directSpecular, rimLightingMixFactor );\n\n vec3 rim = parametricRimColorFactor * pow( saturate( 1.0 - dot( viewDir, normal ) + parametricRimLiftFactor ), parametricRimFresnelPowerFactor );\n\n #ifdef USE_MATCAPTEXTURE\n {\n vec3 x = normalize( vec3( viewDir.z, 0.0, -viewDir.x ) );\n vec3 y = cross( viewDir, x ); // guaranteed to be normalized\n vec2 sphereUv = 0.5 + 0.5 * vec2( dot( x, normal ), -dot( y, normal ) );\n sphereUv = ( matcapTextureUvTransform * vec3( sphereUv, 1 ) ).xy;\n vec3 matcap = texture2D( matcapTexture, sphereUv ).rgb;\n rim += matcapFactor * matcap;\n }\n #endif\n\n #ifdef USE_RIMMULTIPLYTEXTURE\n vec2 rimMultiplyTextureUv = ( rimMultiplyTextureUvTransform * vec3( uv, 1 ) ).xy;\n rim *= texture2D( rimMultiplyTexture, rimMultiplyTextureUv ).rgb;\n #endif\n\n col += rimMix * rim;\n\n // -- MToon: Emission --------------------------------------------------------\n col += totalEmissiveRadiance;\n\n // #include <envmap_fragment>\n\n // -- Almost done! -----------------------------------------------------------\n #if defined( OUTLINE )\n col = outlineColorFactor.rgb * mix( vec3( 1.0 ), col, outlineLightingMixFactor );\n #endif\n\n #ifdef OPAQUE\n diffuseColor.a = 1.0;\n #endif\n\n gl_FragColor = vec4( col, diffuseColor.a );\n postCorrection();\n}\n";
24602
24525
  var MToonMaterialDebugMode = {
24526
+ /**
24527
+ * Render normally.
24528
+ */
24603
24529
  None: "none",
24530
+ /**
24531
+ * Visualize normals of the surface.
24532
+ */
24604
24533
  Normal: "normal",
24534
+ /**
24535
+ * Visualize lit/shade of the surface.
24536
+ */
24605
24537
  LitShadeRate: "litShadeRate",
24538
+ /**
24539
+ * Visualize UV of the surface.
24540
+ */
24606
24541
  UV: "uv"
24607
24542
  };
24608
24543
  var MToonMaterialOutlineWidthMode = {
@@ -24615,7 +24550,7 @@ var encodingColorSpaceMap = {
24615
24550
  3001: "srgb"
24616
24551
  };
24617
24552
  function getTextureColorSpace(texture) {
24618
- if (parseInt(REVISION, 10) >= 152) return texture.colorSpace;
24553
+ if (parseInt("169", 10) >= 152) return texture.colorSpace;
24619
24554
  else return encodingColorSpaceMap[texture.encoding];
24620
24555
  }
24621
24556
  var MToonMaterial = class extends ShaderMaterial {
@@ -24629,7 +24564,7 @@ var MToonMaterial = class extends ShaderMaterial {
24629
24564
  this.uvAnimationScrollYSpeedFactor = 0;
24630
24565
  this.uvAnimationRotationSpeedFactor = 0;
24631
24566
  this.fog = true;
24632
- this.normalMapType = TangentSpaceNormalMap;
24567
+ this.normalMapType = 0;
24633
24568
  this._ignoreVertexColor = true;
24634
24569
  this._v0CompatShade = false;
24635
24570
  this._debugMode = MToonMaterialDebugMode.None;
@@ -24694,11 +24629,9 @@ var MToonMaterial = class extends ShaderMaterial {
24694
24629
  this.rimMultiplyTexture ? `rimMultiplyTextureColorSpace:${getTextureColorSpace(this.rimMultiplyTexture)}` : ""
24695
24630
  ].join(",");
24696
24631
  this.onBeforeCompile = (shader) => {
24697
- const threeRevision = parseInt(REVISION, 10);
24698
24632
  const defines = Object.entries(__spreadValues(__spreadValues({}, this._generateDefines()), this.defines)).filter(([token, macro]) => !!macro).map(([token, macro]) => `#define ${token} ${macro}`).join("\n") + "\n";
24699
24633
  shader.vertexShader = defines + shader.vertexShader;
24700
24634
  shader.fragmentShader = defines + shader.fragmentShader;
24701
- if (threeRevision < 154) shader.fragmentShader = shader.fragmentShader.replace("#include <colorspace_fragment>", "#include <encodings_fragment>");
24702
24635
  };
24703
24636
  }
24704
24637
  get color() {
@@ -25009,7 +24942,7 @@ var MToonMaterial = class extends ShaderMaterial {
25009
24942
  * Returns a map object of preprocessor token and macro of the shader program.
25010
24943
  */
25011
24944
  _generateDefines() {
25012
- const threeRevision = parseInt(REVISION, 10);
24945
+ const threeRevision = parseInt("169", 10);
25013
24946
  const useUvInVert = this.outlineWidthMultiplyTexture !== null;
25014
24947
  const useUvInFrag = this.map !== null || this.normalMap !== null || this.emissiveMap !== null || this.shadeMultiplyTexture !== null || this.shadingShiftTexture !== null || this.rimMultiplyTexture !== null || this.uvAnimationMaskTexture !== null;
25015
24948
  return {
@@ -25196,7 +25129,7 @@ var _MToonMaterialLoaderPlugin = class _MToonMaterialLoaderPlugin2 {
25196
25129
  const outlineMaterial = surfaceMaterial.clone();
25197
25130
  outlineMaterial.name += " (Outline)";
25198
25131
  outlineMaterial.isOutline = true;
25199
- outlineMaterial.side = BackSide;
25132
+ outlineMaterial.side = 1;
25200
25133
  mesh.material.push(outlineMaterial);
25201
25134
  const geometry = mesh.geometry;
25202
25135
  const primitiveVertices = geometry.index ? geometry.index.count : geometry.attributes.position.count / 3;
@@ -25348,7 +25281,7 @@ var VRMMaterialsV0CompatPlugin = class {
25348
25281
  });
25349
25282
  }
25350
25283
  _parseV0MToonProperties(materialProperties, schemaMaterial) {
25351
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q$1, _r, _s, _t, _u, _v, _w, _x$1, _y$1, _z$1, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa;
25284
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa;
25352
25285
  const isTransparent = (_b = (_a = materialProperties.keywordMap) == null ? void 0 : _a["_ALPHABLEND_ON"]) != null ? _b : false;
25353
25286
  const transparentWithZWrite = ((_c = materialProperties.floatProperties) == null ? void 0 : _c["_ZWrite"]) === 1 && isTransparent;
25354
25287
  const renderQueueOffsetNumber = this._v0ParseRenderQueue(materialProperties);
@@ -25375,7 +25308,7 @@ var VRMMaterialsV0CompatPlugin = class {
25375
25308
  scale: normalTextureScale,
25376
25309
  extensions: __spreadValues2({}, textureTransformExt)
25377
25310
  } : void 0;
25378
- const emissiveFactor = ((_q$1 = (_p = materialProperties.vectorProperties) == null ? void 0 : _p["_EmissionColor"]) != null ? _q$1 : [
25311
+ const emissiveFactor = ((_q = (_p = materialProperties.vectorProperties) == null ? void 0 : _p["_EmissionColor"]) != null ? _q : [
25379
25312
  0,
25380
25313
  0,
25381
25314
  0,
@@ -25398,10 +25331,10 @@ var VRMMaterialsV0CompatPlugin = class {
25398
25331
  extensions: __spreadValues2({}, textureTransformExt)
25399
25332
  } : void 0;
25400
25333
  let shadingShiftFactor = (_w = (_v = materialProperties.floatProperties) == null ? void 0 : _v["_ShadeShift"]) != null ? _w : 0;
25401
- let shadingToonyFactor = (_y$1 = (_x$1 = materialProperties.floatProperties) == null ? void 0 : _x$1["_ShadeToony"]) != null ? _y$1 : .9;
25334
+ let shadingToonyFactor = (_y = (_x = materialProperties.floatProperties) == null ? void 0 : _x["_ShadeToony"]) != null ? _y : .9;
25402
25335
  shadingToonyFactor = MathUtils.lerp(shadingToonyFactor, 1, .5 + .5 * shadingShiftFactor);
25403
25336
  shadingShiftFactor = -shadingShiftFactor - (1 - shadingToonyFactor);
25404
- const giIntensityFactor = (_A = (_z$1 = materialProperties.floatProperties) == null ? void 0 : _z$1["_IndirectLightIntensity"]) != null ? _A : .1;
25337
+ const giIntensityFactor = (_A = (_z = materialProperties.floatProperties) == null ? void 0 : _z["_IndirectLightIntensity"]) != null ? _A : .1;
25405
25338
  const giEqualizationFactor = giIntensityFactor ? 1 - giIntensityFactor : void 0;
25406
25339
  const matcapTextureIndex = (_B = materialProperties.textureProperties) == null ? void 0 : _B["_SphereAdd"];
25407
25340
  const matcapFactor = matcapTextureIndex != null ? [
@@ -26046,9 +25979,9 @@ var ColliderShapeCapsuleBufferGeometry = class extends BufferGeometry {
26046
25979
  this._currentOffset = new Vector3();
26047
25980
  this._currentTail = new Vector3();
26048
25981
  this._shape = shape;
26049
- this._attrPos = new BufferAttribute(new Float32Array(396), 3);
25982
+ this._attrPos = new BufferAttribute(/* @__PURE__ */ new Float32Array(396), 3);
26050
25983
  this.setAttribute("position", this._attrPos);
26051
- this._attrIndex = new BufferAttribute(new Uint16Array(264), 1);
25984
+ this._attrIndex = new BufferAttribute(/* @__PURE__ */ new Uint16Array(264), 1);
26052
25985
  this.setIndex(this._attrIndex);
26053
25986
  this._buildIndex();
26054
25987
  this.update();
@@ -26115,9 +26048,9 @@ var ColliderShapePlaneBufferGeometry = class extends BufferGeometry {
26115
26048
  this._currentOffset = new Vector3();
26116
26049
  this._currentNormal = new Vector3();
26117
26050
  this._shape = shape;
26118
- this._attrPos = new BufferAttribute(new Float32Array(18), 3);
26051
+ this._attrPos = new BufferAttribute(/* @__PURE__ */ new Float32Array(18), 3);
26119
26052
  this.setAttribute("position", this._attrPos);
26120
- this._attrIndex = new BufferAttribute(new Uint16Array(10), 1);
26053
+ this._attrIndex = new BufferAttribute(/* @__PURE__ */ new Uint16Array(10), 1);
26121
26054
  this.setIndex(this._attrIndex);
26122
26055
  this._buildIndex();
26123
26056
  this.update();
@@ -26161,9 +26094,9 @@ var ColliderShapeSphereBufferGeometry = class extends BufferGeometry {
26161
26094
  this._currentRadius = 0;
26162
26095
  this._currentOffset = new Vector3();
26163
26096
  this._shape = shape;
26164
- this._attrPos = new BufferAttribute(new Float32Array(288), 3);
26097
+ this._attrPos = new BufferAttribute(/* @__PURE__ */ new Float32Array(288), 3);
26165
26098
  this.setAttribute("position", this._attrPos);
26166
- this._attrIndex = new BufferAttribute(new Uint16Array(192), 1);
26099
+ this._attrIndex = new BufferAttribute(/* @__PURE__ */ new Uint16Array(192), 1);
26167
26100
  this.setIndex(this._attrIndex);
26168
26101
  this._buildIndex();
26169
26102
  this.update();
@@ -26239,9 +26172,9 @@ var SpringBoneBufferGeometry = class extends BufferGeometry {
26239
26172
  this._currentRadius = 0;
26240
26173
  this._currentTail = new Vector3();
26241
26174
  this._springBone = springBone;
26242
- this._attrPos = new BufferAttribute(new Float32Array(294), 3);
26175
+ this._attrPos = new BufferAttribute(/* @__PURE__ */ new Float32Array(294), 3);
26243
26176
  this.setAttribute("position", this._attrPos);
26244
- this._attrIndex = new BufferAttribute(new Uint16Array(194), 1);
26177
+ this._attrIndex = new BufferAttribute(/* @__PURE__ */ new Uint16Array(194), 1);
26245
26178
  this.setIndex(this._attrIndex);
26246
26179
  this._buildIndex();
26247
26180
  this.update();
@@ -26866,8 +26799,10 @@ var _VRMSpringBoneLoaderPlugin = class _VRMSpringBoneLoaderPlugin2 {
26866
26799
  let prevSchemaJoint;
26867
26800
  schemaJoints.forEach((schemaJoint) => {
26868
26801
  if (prevSchemaJoint) {
26869
- const node = threeNodes[prevSchemaJoint.node];
26870
- const child = threeNodes[schemaJoint.node];
26802
+ const nodeIndex = prevSchemaJoint.node;
26803
+ const node = threeNodes[nodeIndex];
26804
+ const childIndex = schemaJoint.node;
26805
+ const child = threeNodes[childIndex];
26871
26806
  const setting = {
26872
26807
  hitRadius: prevSchemaJoint.hitRadius,
26873
26808
  dragForce: prevSchemaJoint.dragForce,
@@ -27225,8 +27160,7 @@ function combineSkeletons(root) {
27225
27160
  for (const group of groups) {
27226
27161
  const { boneInverseMap, meshes } = group;
27227
27162
  const newBones = Array.from(boneInverseMap.keys());
27228
- const newBoneInverses = Array.from(boneInverseMap.values());
27229
- const newSkeleton = new Skeleton(newBones, newBoneInverses);
27163
+ const newSkeleton = new Skeleton(newBones, Array.from(boneInverseMap.values()));
27230
27164
  const skeletonKey = skeletonDispatcher.getOrCreate(newSkeleton);
27231
27165
  for (const mesh of meshes) {
27232
27166
  const skinIndexAttr = mesh.geometry.getAttribute("skinIndex");
@@ -27663,7 +27597,6 @@ VRMUtils.rotateVRM0 = rotateVRM0;
27663
27597
  * @pixiv/three-vrm-springbone is distributed under MIT License
27664
27598
  * https://github.com/pixiv/three-vrm/blob/release/LICENSE
27665
27599
  */
27666
-
27667
27600
  //#endregion
27668
27601
  //#region ../infra/src/avatar/avatarDefaults.ts
27669
27602
  /**
@@ -27764,7 +27697,6 @@ function resolveAvatarConfig(overrides) {
27764
27697
  vrmModelPath: pick("vrmModelPath", overrides, defaults.vrmModelPath)
27765
27698
  };
27766
27699
  }
27767
-
27768
27700
  //#endregion
27769
27701
  //#region ../infra/src/avatar/3d-default-avatar/3dAvatarProvider.ts
27770
27702
  /**
@@ -27871,12 +27803,12 @@ var Avatar3DProvider = class {
27871
27803
  this.prevCalPitch = NaN;
27872
27804
  this.prevCalRoll = NaN;
27873
27805
  this.seeded = false;
27874
- this.loop = (now$1) => {
27806
+ this.loop = (now) => {
27875
27807
  if (this.stopped) return;
27876
27808
  this.scheduleNextFrame();
27877
- if (now$1 - this.lastFrameAt < this.minFrameIntervalMs) return;
27878
- const dtMs = clamp(this.lastFrameAt > 0 ? now$1 - this.lastFrameAt : this.minFrameIntervalMs, 1, MAX_EMA_DT_MS);
27879
- this.lastFrameAt = now$1;
27809
+ if (now - this.lastFrameAt < this.minFrameIntervalMs) return;
27810
+ const dtMs = clamp(this.lastFrameAt > 0 ? now - this.lastFrameAt : this.minFrameIntervalMs, 1, 100);
27811
+ this.lastFrameAt = now;
27880
27812
  const video = this.videoHandle?.element;
27881
27813
  if (!video || video.readyState < 2 || !this.landmarker) return;
27882
27814
  const vw = video.videoWidth;
@@ -27893,7 +27825,7 @@ var Avatar3DProvider = class {
27893
27825
  this.inputCtx.drawImage(video, 0, 0, vw, vh);
27894
27826
  let result = null;
27895
27827
  try {
27896
- result = this.landmarker.detectForVideo(this.inputCanvas, now$1);
27828
+ result = this.landmarker.detectForVideo(this.inputCanvas, now);
27897
27829
  this.detectFailures = 0;
27898
27830
  } catch {
27899
27831
  result = null;
@@ -27901,10 +27833,10 @@ var Avatar3DProvider = class {
27901
27833
  this.maybeRecoverLandmarker();
27902
27834
  }
27903
27835
  if (result?.faceLandmarks?.[0]?.length) {
27904
- this.lastFaceSeenAt = now$1;
27836
+ this.lastFaceSeenAt = now;
27905
27837
  this.applyBlendshapes(result, dtMs);
27906
27838
  this.applyFacePose(result, dtMs);
27907
- } else if (now$1 - this.lastFaceSeenAt > FACE_LOST_GRACE_MS) this.decayToNeutral();
27839
+ } else if (now - this.lastFaceSeenAt > FACE_LOST_GRACE_MS) this.decayToNeutral();
27908
27840
  const delta = Math.min(this.clock.getDelta(), MAX_UPDATE_DELTA_S);
27909
27841
  this.vrm?.update(delta);
27910
27842
  if (this.renderer && this.scene && this.camera) this.renderer.render(this.scene, this.camera);
@@ -28076,7 +28008,7 @@ var Avatar3DProvider = class {
28076
28008
  const vrmName = BLENDSHAPE_TO_VRM[c.categoryName];
28077
28009
  if (vrmName) incoming.set(vrmName, Math.max(incoming.get(vrmName) ?? 0, c.score));
28078
28010
  }
28079
- for (const vrmName of new Set([...Object.values(BLENDSHAPE_TO_VRM), ...this.smoothedExpr.keys()])) {
28011
+ for (const vrmName of /* @__PURE__ */ new Set([...Object.values(BLENDSHAPE_TO_VRM), ...this.smoothedExpr.keys()])) {
28080
28012
  const target = incoming.get(vrmName) ?? 0;
28081
28013
  const prev = this.smoothedExpr.get(vrmName) ?? 0;
28082
28014
  const next = prev + (target - prev) * dtAlpha(EXPRESSION_ALPHA, dtMs);
@@ -28104,14 +28036,14 @@ var Avatar3DProvider = class {
28104
28036
  const forehead = lm[LM_FOREHEAD];
28105
28037
  const chin = lm[LM_CHIN];
28106
28038
  if (!nose || !eyeLo || !eyeLi || !eyeRo || !eyeRi || !forehead || !chin) return;
28107
- const aspect$1 = this.inputCanvas.width > 0 ? this.inputCanvas.height / this.inputCanvas.width : 1;
28039
+ const aspect = this.inputCanvas.width > 0 ? this.inputCanvas.height / this.inputCanvas.width : 1;
28108
28040
  const eyeLx = (eyeLo.x + eyeLi.x) / 2;
28109
28041
  const eyeRx = (eyeRo.x + eyeRi.x) / 2;
28110
- const eyeLy = (eyeLo.y + eyeLi.y) / 2 * aspect$1;
28111
- const eyeRy = (eyeRo.y + eyeRi.y) / 2 * aspect$1;
28112
- const noseY = nose.y * aspect$1;
28113
- const foreheadY = forehead.y * aspect$1;
28114
- const chinY = chin.y * aspect$1;
28042
+ const eyeLy = (eyeLo.y + eyeLi.y) / 2 * aspect;
28043
+ const eyeRy = (eyeRo.y + eyeRi.y) / 2 * aspect;
28044
+ const noseY = nose.y * aspect;
28045
+ const foreheadY = forehead.y * aspect;
28046
+ const chinY = chin.y * aspect;
28115
28047
  const eyeMidX = (eyeLx + eyeRx) / 2;
28116
28048
  const eyeMidY = (eyeLy + eyeRy) / 2;
28117
28049
  const faceMidY = (foreheadY + chinY) / 2;
@@ -28140,9 +28072,9 @@ var Avatar3DProvider = class {
28140
28072
  }
28141
28073
  if (this.neutralFrames >= NEUTRAL_CALIBRATION_FRAMES) {
28142
28074
  const n = this.neutralFrames;
28143
- this.nYaw = clamp(this.nYaw / n, -YAW_BIAS_MAX, YAW_BIAS_MAX);
28075
+ this.nYaw = clamp(this.nYaw / n, -.06, YAW_BIAS_MAX);
28144
28076
  this.nPitch /= n;
28145
- this.nRoll = clamp(this.nRoll / n, -ROLL_BIAS_MAX, ROLL_BIAS_MAX);
28077
+ this.nRoll = clamp(this.nRoll / n, -.05, ROLL_BIAS_MAX);
28146
28078
  this.nCx /= n;
28147
28079
  this.nCy /= n;
28148
28080
  this.nDist /= n;
@@ -28157,7 +28089,7 @@ var Avatar3DProvider = class {
28157
28089
  const dPitch = deadzone(pitch - this.nPitch, DZ_ROT);
28158
28090
  const dYaw = deadzone(yaw - this.nYaw, DZ_ROT);
28159
28091
  const dRollDz = deadzone(dRoll, DZ_ROLL);
28160
- this.tmpEuler.set(clamp(dPitch * PITCH_GAIN * ROT_SIGN_PITCH, -ROT_MAX, ROT_MAX), clamp(dYaw * YAW_GAIN * ROT_SIGN_YAW, -ROT_MAX, ROT_MAX), clamp(dRollDz * ROLL_GAIN * ROT_SIGN_ROLL, -ROT_MAX, ROT_MAX), "XYZ");
28092
+ this.tmpEuler.set(clamp(dPitch * PITCH_GAIN * ROT_SIGN_PITCH, -.9, ROT_MAX), clamp(dYaw * YAW_GAIN * ROT_SIGN_YAW, -.9, ROT_MAX), clamp(dRollDz * ROLL_GAIN * ROT_SIGN_ROLL, -.9, ROT_MAX), "XYZ");
28161
28093
  this.tmpQuat.setFromEuler(this.tmpEuler);
28162
28094
  if (this.seeded) this.smoothedHeadQuat.slerp(this.tmpQuat, dtAlpha(HEAD_SLERP_ALPHA, dtMs));
28163
28095
  else this.smoothedHeadQuat.copy(this.tmpQuat);
@@ -28166,9 +28098,9 @@ var Avatar3DProvider = class {
28166
28098
  const relX = deadzone(eyeMidX - this.nCx, DZ_POS);
28167
28099
  const relY = deadzone(eyeMidY - this.nCy, DZ_POS);
28168
28100
  const relZ = deadzone((eyeDist - this.nDist) / this.nDist, DZ_DEPTH);
28169
- const targetX = clamp(relX * LATERAL_GAIN * AXIS_SIGN_X, -LATERAL_MAX, LATERAL_MAX);
28170
- const targetY = clamp(relY * LATERAL_GAIN * AXIS_SIGN_Y, -LATERAL_MAX, LATERAL_MAX);
28171
- const targetZ = clamp(relZ * DEPTH_GAIN * AXIS_SIGN_Z, -DEPTH_MAX, DEPTH_MAX);
28101
+ const targetX = clamp(relX * LATERAL_GAIN * AXIS_SIGN_X, -.15, LATERAL_MAX);
28102
+ const targetY = clamp(relY * LATERAL_GAIN * AXIS_SIGN_Y, -.15, LATERAL_MAX);
28103
+ const targetZ = clamp(relZ * DEPTH_GAIN * AXIS_SIGN_Z, -.28, DEPTH_MAX);
28172
28104
  if (this.seeded) {
28173
28105
  const posAlphaXY = dtAlpha(POS_ALPHA_XY, dtMs);
28174
28106
  this.smoothedPos.x += (targetX - this.smoothedPos.x) * posAlphaXY;
@@ -28209,6 +28141,5 @@ var Avatar3DProvider = class {
28209
28141
  function createProvider() {
28210
28142
  return new Avatar3DProvider();
28211
28143
  }
28212
-
28213
28144
  //#endregion
28214
- export { createProvider };
28145
+ export { createProvider };