angular-three-soba 1.14.0 → 2.0.0-beta.3

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 (343) hide show
  1. package/README.md +2 -2
  2. package/abstractions/{lib/billboard → billboard}/billboard.d.ts +14 -4
  3. package/abstractions/catmull-rom-line/catmull-rom-line.d.ts +25 -0
  4. package/abstractions/cubic-bezier-line/cubic-bezier-line.d.ts +25 -0
  5. package/abstractions/{lib/edges → edges}/edges.d.ts +11 -7
  6. package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-helper.d.ts +16 -23
  7. package/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +22 -0
  8. package/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +30 -0
  9. package/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.d.ts +32 -0
  10. package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewcube/gizmo-viewcube.d.ts +2 -3
  11. package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewport/gizmo-viewport-axis.d.ts +28 -9
  12. package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewport/gizmo-viewport.d.ts +23 -4
  13. package/abstractions/index.d.ts +11 -11
  14. package/abstractions/line/line-input.d.ts +42 -0
  15. package/abstractions/line/line.d.ts +35 -0
  16. package/abstractions/{lib/quadratic-bezier-line → quadratic-bezier-line}/quadratic-bezier-line.d.ts +12 -8
  17. package/abstractions/text/text.d.ts +77 -0
  18. package/abstractions/text-3d/text-3d.d.ts +74 -0
  19. package/cameras/{lib/camera → camera}/camera-content.d.ts +1 -1
  20. package/cameras/{lib/camera → camera}/camera.d.ts +12 -8
  21. package/cameras/cube-camera/cube-camera.d.ts +42 -0
  22. package/cameras/index.d.ts +5 -4
  23. package/cameras/{lib/orthographic-camera → orthographic-camera}/orthographic-camera.d.ts +14 -5
  24. package/controls/index.d.ts +1 -1
  25. package/controls/{lib/orbit-controls → orbit-controls}/orbit-controls.d.ts +19 -11
  26. package/esm2022/abstractions/angular-three-soba-abstractions.mjs +1 -1
  27. package/esm2022/abstractions/billboard/billboard.mjs +71 -0
  28. package/esm2022/abstractions/catmull-rom-line/catmull-rom-line.mjs +131 -0
  29. package/esm2022/abstractions/cubic-bezier-line/cubic-bezier-line.mjs +113 -0
  30. package/esm2022/abstractions/edges/edges.mjs +93 -0
  31. package/esm2022/abstractions/gizmo-helper/gizmo-helper.mjs +210 -0
  32. package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/constants.mjs +31 -0
  33. package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +95 -0
  34. package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +155 -0
  35. package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.mjs +62 -0
  36. package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +80 -0
  37. package/esm2022/abstractions/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +206 -0
  38. package/esm2022/abstractions/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +273 -0
  39. package/esm2022/abstractions/index.mjs +12 -12
  40. package/esm2022/abstractions/line/line-input.mjs +113 -0
  41. package/esm2022/abstractions/line/line.mjs +165 -0
  42. package/esm2022/abstractions/quadratic-bezier-line/quadratic-bezier-line.mjs +128 -0
  43. package/esm2022/abstractions/text/text.mjs +275 -0
  44. package/esm2022/abstractions/text-3d/text-3d.mjs +167 -0
  45. package/esm2022/angular-three-soba.mjs +1 -1
  46. package/esm2022/cameras/angular-three-soba-cameras.mjs +1 -1
  47. package/esm2022/cameras/camera/camera-content.mjs +21 -0
  48. package/esm2022/cameras/camera/camera.mjs +71 -0
  49. package/esm2022/cameras/cube-camera/cube-camera.mjs +131 -0
  50. package/esm2022/cameras/index.mjs +6 -5
  51. package/esm2022/cameras/orthographic-camera/orthographic-camera.mjs +99 -0
  52. package/esm2022/cameras/perspective-camera/perspective-camera.mjs +47 -0
  53. package/esm2022/controls/angular-three-soba-controls.mjs +1 -1
  54. package/esm2022/controls/index.mjs +2 -2
  55. package/esm2022/controls/orbit-controls/orbit-controls.mjs +165 -0
  56. package/esm2022/index.mjs +1 -1
  57. package/esm2022/loaders/angular-three-soba-loaders.mjs +1 -1
  58. package/esm2022/loaders/gltf-loader/gltf-loader.mjs +33 -0
  59. package/esm2022/loaders/index.mjs +5 -6
  60. package/esm2022/loaders/loader/loader.mjs +133 -0
  61. package/esm2022/loaders/progress/progress.mjs +52 -0
  62. package/esm2022/loaders/texture-loader/texture-loader.mjs +28 -0
  63. package/esm2022/materials/angular-three-soba-materials.mjs +1 -1
  64. package/esm2022/materials/index.mjs +6 -6
  65. package/esm2022/materials/mesh-distort-material/mesh-distort-material.mjs +73 -0
  66. package/esm2022/materials/mesh-reflector-material/mesh-reflector-material.mjs +383 -0
  67. package/esm2022/materials/mesh-refraction-material/mesh-refraction-material.mjs +168 -0
  68. package/esm2022/materials/mesh-transmission-material/mesh-transmission-material.mjs +257 -0
  69. package/esm2022/materials/mesh-wobble-material/mesh-wobble-material.mjs +66 -0
  70. package/esm2022/misc/angular-three-soba-misc.mjs +1 -1
  71. package/esm2022/misc/animations/animations.mjs +55 -0
  72. package/esm2022/misc/bake-shadows/bake-shadows.mjs +24 -0
  73. package/esm2022/misc/depth-buffer/depth-buffer.mjs +46 -0
  74. package/esm2022/misc/fbo/fbo.mjs +47 -0
  75. package/esm2022/misc/index.mjs +5 -5
  76. package/esm2022/performance/adaptive/adaptive-dpr.mjs +46 -0
  77. package/esm2022/performance/adaptive/adaptive-events.mjs +31 -0
  78. package/esm2022/performance/angular-three-soba-performance.mjs +1 -1
  79. package/esm2022/performance/detailed/detailed.mjs +61 -0
  80. package/esm2022/performance/index.mjs +7 -5
  81. package/esm2022/performance/instances/instance.mjs +48 -0
  82. package/esm2022/performance/instances/instances.mjs +189 -0
  83. package/esm2022/performance/instances/position-mesh.mjs +52 -0
  84. package/esm2022/performance/stats/stats.mjs +79 -0
  85. package/esm2022/shaders/angular-three-soba-shaders.mjs +1 -1
  86. package/esm2022/shaders/blur-pass/blur-pass.mjs +61 -0
  87. package/esm2022/shaders/caustics-material/caustics-material.mjs +128 -0
  88. package/esm2022/shaders/caustics-material/caustics-projection-material.mjs +33 -0
  89. package/esm2022/shaders/convolution-material/convolution-material.mjs +94 -0
  90. package/esm2022/shaders/discard-material/discard-material.mjs +3 -0
  91. package/esm2022/shaders/index.mjs +15 -15
  92. package/esm2022/shaders/mesh-distort-material/mesh-distort-material.mjs +55 -0
  93. package/esm2022/shaders/mesh-reflector-material/mesh-reflector-material.mjs +223 -0
  94. package/esm2022/shaders/mesh-refraction-material/mesh-refraction-material.mjs +170 -0
  95. package/esm2022/shaders/mesh-transmission-material/mesh-transmission-material.mjs +268 -0
  96. package/esm2022/shaders/mesh-wobble-material/mesh-wobble-material.mjs +37 -0
  97. package/esm2022/shaders/shader-material/shader-material.mjs +34 -0
  98. package/esm2022/shaders/soft-shadow-material/soft-shadow-material.mjs +33 -0
  99. package/esm2022/shaders/sparkles-material/sparkles-material.mjs +47 -0
  100. package/esm2022/shaders/spot-light-material/spot-light-material.mjs +86 -0
  101. package/esm2022/shaders/star-field-material/star-field-material.mjs +32 -0
  102. package/esm2022/staging/accumulative-shadows/accumulative-shadows.mjs +283 -0
  103. package/esm2022/staging/accumulative-shadows/progressive-light-map.mjs +108 -0
  104. package/esm2022/staging/accumulative-shadows/randomized-lights.mjs +208 -0
  105. package/esm2022/staging/angular-three-soba-staging.mjs +1 -1
  106. package/esm2022/staging/bounds/bounds.mjs +307 -0
  107. package/esm2022/staging/camera-shake/camera-shake.mjs +117 -0
  108. package/esm2022/staging/caustics/caustisc.mjs +384 -0
  109. package/esm2022/staging/center/center.mjs +148 -0
  110. package/esm2022/staging/cloud/cloud.mjs +164 -0
  111. package/esm2022/staging/contact-shadows/contact-shadows.mjs +249 -0
  112. package/esm2022/staging/environment/assets.mjs +13 -0
  113. package/esm2022/staging/environment/environment-cube.mjs +49 -0
  114. package/esm2022/staging/environment/environment-ground.mjs +43 -0
  115. package/esm2022/staging/environment/environment-input.mjs +106 -0
  116. package/esm2022/staging/environment/environment-map.mjs +53 -0
  117. package/esm2022/staging/environment/environment-portal.mjs +135 -0
  118. package/esm2022/staging/environment/environment.mjs +78 -0
  119. package/esm2022/staging/environment/utils.mjs +84 -0
  120. package/esm2022/staging/float/float.mjs +82 -0
  121. package/esm2022/staging/index.mjs +18 -18
  122. package/esm2022/staging/sky/sky.mjs +114 -0
  123. package/esm2022/staging/sparkles/sparkles.mjs +161 -0
  124. package/esm2022/staging/spot-light/spot-light-input.mjs +75 -0
  125. package/esm2022/staging/spot-light/spot-light-shadow-mesh-input.mjs +57 -0
  126. package/esm2022/staging/spot-light/spot-light-shadow-mesh.mjs +256 -0
  127. package/esm2022/staging/spot-light/spot-light.mjs +94 -0
  128. package/esm2022/staging/spot-light/volumetric-mesh.mjs +101 -0
  129. package/esm2022/staging/stage/stage.mjs +374 -0
  130. package/esm2022/staging/stars/stars.mjs +148 -0
  131. package/fesm2022/angular-three-soba-abstractions.mjs +1116 -890
  132. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  133. package/fesm2022/angular-three-soba-cameras.mjs +126 -122
  134. package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
  135. package/fesm2022/angular-three-soba-controls.mjs +72 -54
  136. package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
  137. package/fesm2022/angular-three-soba-loaders.mjs +147 -131
  138. package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
  139. package/fesm2022/angular-three-soba-materials.mjs +340 -258
  140. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  141. package/fesm2022/angular-three-soba-misc.mjs +140 -123
  142. package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
  143. package/fesm2022/angular-three-soba-performance.mjs +383 -106
  144. package/fesm2022/angular-three-soba-performance.mjs.map +1 -1
  145. package/fesm2022/angular-three-soba-shaders.mjs +57 -9
  146. package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
  147. package/fesm2022/angular-three-soba-staging.mjs +1609 -1561
  148. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  149. package/fesm2022/angular-three-soba.mjs.map +1 -1
  150. package/loaders/gltf-loader/gltf-loader.d.ts +9 -0
  151. package/loaders/index.d.ts +4 -5
  152. package/loaders/{lib/loader → loader}/loader.d.ts +20 -15
  153. package/loaders/progress/progress.d.ts +9 -0
  154. package/loaders/texture-loader/texture-loader.d.ts +7 -0
  155. package/materials/index.d.ts +5 -5
  156. package/materials/{lib/mesh-distort-material → mesh-distort-material}/mesh-distort-material.d.ts +11 -5
  157. package/materials/mesh-reflector-material/mesh-reflector-material.d.ts +81 -0
  158. package/materials/mesh-refraction-material/mesh-refraction-material.d.ts +50 -0
  159. package/materials/{lib/mesh-transmission-material → mesh-transmission-material}/mesh-transmission-material.d.ts +51 -6
  160. package/materials/{lib/mesh-wobble-material → mesh-wobble-material}/mesh-wobble-material.d.ts +9 -3
  161. package/misc/animations/animations.d.ts +13 -0
  162. package/misc/{lib/bake-shadows → bake-shadows}/bake-shadows.d.ts +2 -5
  163. package/misc/depth-buffer/depth-buffer.d.ts +9 -0
  164. package/misc/{lib/fbo → fbo}/fbo.d.ts +4 -2
  165. package/misc/index.d.ts +4 -4
  166. package/package.json +25 -23
  167. package/performance/{lib/adaptive → adaptive}/adaptive-dpr.d.ts +4 -7
  168. package/performance/{lib/adaptive → adaptive}/adaptive-events.d.ts +2 -6
  169. package/performance/detailed/detailed.d.ts +20 -0
  170. package/performance/index.d.ts +6 -4
  171. package/performance/instances/instance.d.ts +9 -0
  172. package/performance/instances/instances.d.ts +35 -0
  173. package/performance/instances/position-mesh.d.ts +10 -0
  174. package/performance/{lib/stats → stats}/stats.d.ts +10 -7
  175. package/plugin/package.json +1 -1
  176. package/plugin/src/generators/init/compat.js.map +1 -1
  177. package/plugin/src/generators/init/init.d.ts +1 -1
  178. package/plugin/src/generators/init/init.js +1 -1
  179. package/plugin/src/generators/init/init.js.map +1 -1
  180. package/plugin/src/index.js.map +1 -1
  181. package/shaders/{lib/blur-pass → blur-pass}/blur-pass.d.ts +2 -2
  182. package/shaders/index.d.ts +14 -14
  183. package/shaders/{lib/mesh-distort-material → mesh-distort-material}/mesh-distort-material.d.ts +1 -1
  184. package/shaders/{lib/mesh-wobble-material → mesh-wobble-material}/mesh-wobble-material.d.ts +1 -0
  185. package/shaders/{lib/soft-shadow-material → soft-shadow-material}/soft-shadow-material.d.ts +2 -2
  186. package/shaders/sparkles-material/sparkles-material.d.ts +3 -0
  187. package/staging/{lib/accumulative-shadows → accumulative-shadows}/accumulative-shadows.d.ts +55 -17
  188. package/staging/{lib/accumulative-shadows → accumulative-shadows}/progressive-light-map.d.ts +2 -2
  189. package/staging/{lib/accumulative-shadows → accumulative-shadows}/randomized-lights.d.ts +45 -10
  190. package/staging/{lib/bounds → bounds}/bounds.d.ts +32 -22
  191. package/staging/{lib/camera-shake → camera-shake}/camera-shake.d.ts +15 -11
  192. package/staging/{lib/caustics/caustics.d.ts → caustics/caustisc.d.ts} +36 -13
  193. package/staging/{lib/center → center}/center.d.ts +30 -8
  194. package/staging/cloud/cloud.d.ts +48 -0
  195. package/staging/{lib/contact-shadows → contact-shadows}/contact-shadows.d.ts +38 -10
  196. package/staging/environment/environment-cube.d.ts +11 -0
  197. package/staging/environment/environment-ground.d.ts +13 -0
  198. package/staging/environment/environment-input.d.ts +68 -0
  199. package/staging/environment/environment-map.d.ts +11 -0
  200. package/staging/{lib/environment → environment}/environment-portal.d.ts +5 -7
  201. package/staging/{lib/environment → environment}/environment.d.ts +2 -2
  202. package/staging/environment/utils.d.ts +7 -0
  203. package/staging/float/float.d.ts +27 -0
  204. package/staging/index.d.ts +17 -17
  205. package/staging/{lib/sky → sky}/sky.d.ts +26 -5
  206. package/staging/{lib/sparkles → sparkles}/sparkles.d.ts +30 -10
  207. package/staging/{lib/spot-light → spot-light}/spot-light-input.d.ts +24 -2
  208. package/staging/{lib/spot-light/shadow-mesh-input.d.ts → spot-light/spot-light-shadow-mesh-input.d.ts} +18 -3
  209. package/staging/spot-light/spot-light-shadow-mesh.d.ts +38 -0
  210. package/staging/{lib/spot-light → spot-light}/spot-light.d.ts +11 -5
  211. package/staging/{lib/spot-light → spot-light}/volumetric-mesh.d.ts +8 -5
  212. package/staging/{lib/stage → stage}/stage.d.ts +33 -14
  213. package/staging/{lib/stars → stars}/stars.d.ts +21 -7
  214. package/abstractions/lib/catmull-rom-line/catmull-rom-line.d.ts +0 -15
  215. package/abstractions/lib/cubic-bezier-line/cubic-bezier-line.d.ts +0 -15
  216. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +0 -16
  217. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +0 -24
  218. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.d.ts +0 -14
  219. package/abstractions/lib/line/line-input.d.ts +0 -19
  220. package/abstractions/lib/line/line.d.ts +0 -21
  221. package/abstractions/lib/text/text.d.ts +0 -21
  222. package/abstractions/lib/text-3d/text-3d.d.ts +0 -39
  223. package/assets/default-spot-light-shadow.glsl +0 -10
  224. package/cameras/lib/cube-camera/cube-camera.d.ts +0 -27
  225. package/esm2022/abstractions/lib/billboard/billboard.mjs +0 -74
  226. package/esm2022/abstractions/lib/catmull-rom-line/catmull-rom-line.mjs +0 -120
  227. package/esm2022/abstractions/lib/cubic-bezier-line/cubic-bezier-line.mjs +0 -99
  228. package/esm2022/abstractions/lib/edges/edges.mjs +0 -96
  229. package/esm2022/abstractions/lib/gizmo-helper/gizmo-helper.mjs +0 -213
  230. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/constants.mjs +0 -31
  231. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +0 -92
  232. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +0 -184
  233. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.mjs +0 -46
  234. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +0 -134
  235. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +0 -195
  236. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +0 -267
  237. package/esm2022/abstractions/lib/line/line-input.mjs +0 -76
  238. package/esm2022/abstractions/lib/line/line.mjs +0 -133
  239. package/esm2022/abstractions/lib/quadratic-bezier-line/quadratic-bezier-line.mjs +0 -128
  240. package/esm2022/abstractions/lib/text/text.mjs +0 -115
  241. package/esm2022/abstractions/lib/text-3d/text-3d.mjs +0 -145
  242. package/esm2022/cameras/lib/camera/camera-content.mjs +0 -21
  243. package/esm2022/cameras/lib/camera/camera.mjs +0 -75
  244. package/esm2022/cameras/lib/cube-camera/cube-camera.mjs +0 -131
  245. package/esm2022/cameras/lib/orthographic-camera/orthographic-camera.mjs +0 -93
  246. package/esm2022/cameras/lib/perspective-camera/perspective-camera.mjs +0 -47
  247. package/esm2022/controls/lib/orbit-controls/orbit-controls.mjs +0 -147
  248. package/esm2022/loaders/lib/cube-texture-loader/cube-texture-loader.mjs +0 -10
  249. package/esm2022/loaders/lib/gltf-loader/gltf-loader.mjs +0 -32
  250. package/esm2022/loaders/lib/loader/loader.mjs +0 -134
  251. package/esm2022/loaders/lib/progress/progress.mjs +0 -39
  252. package/esm2022/loaders/lib/texture-loader/texture-loader.mjs +0 -19
  253. package/esm2022/materials/lib/mesh-distort-material/mesh-distort-material.mjs +0 -75
  254. package/esm2022/materials/lib/mesh-reflector-material/mesh-reflector-material.mjs +0 -328
  255. package/esm2022/materials/lib/mesh-refraction-material/mesh-refraction-material.mjs +0 -158
  256. package/esm2022/materials/lib/mesh-transmission-material/mesh-transmission-material.mjs +0 -238
  257. package/esm2022/materials/lib/mesh-wobble-material/mesh-wobble-material.mjs +0 -68
  258. package/esm2022/misc/lib/animations/animations.mjs +0 -52
  259. package/esm2022/misc/lib/bake-shadows/bake-shadows.mjs +0 -26
  260. package/esm2022/misc/lib/depth-buffer/depth-buffer.mjs +0 -39
  261. package/esm2022/misc/lib/fbo/fbo.mjs +0 -39
  262. package/esm2022/performance/lib/adaptive/adaptive-dpr.mjs +0 -47
  263. package/esm2022/performance/lib/adaptive/adaptive-events.mjs +0 -37
  264. package/esm2022/performance/lib/detailed/detailed.mjs +0 -54
  265. package/esm2022/performance/lib/stats/stats.mjs +0 -80
  266. package/esm2022/shaders/lib/blur-pass/blur-pass.mjs +0 -61
  267. package/esm2022/shaders/lib/caustics-material/caustics-material.mjs +0 -128
  268. package/esm2022/shaders/lib/caustics-projection-material/caustics-projection-material.mjs +0 -33
  269. package/esm2022/shaders/lib/convolution-material/convolution-material.mjs +0 -94
  270. package/esm2022/shaders/lib/discard-material/discard-material.mjs +0 -3
  271. package/esm2022/shaders/lib/mesh-distort-material/mesh-distort-material.mjs +0 -55
  272. package/esm2022/shaders/lib/mesh-reflector-material/mesh-reflector-material.mjs +0 -223
  273. package/esm2022/shaders/lib/mesh-refraction-material/mesh-refraction-material.mjs +0 -169
  274. package/esm2022/shaders/lib/mesh-transmission-material/mesh-transmission-material.mjs +0 -268
  275. package/esm2022/shaders/lib/mesh-wobble-material/mesh-wobble-material.mjs +0 -37
  276. package/esm2022/shaders/lib/shader-material/shader-material.mjs +0 -34
  277. package/esm2022/shaders/lib/soft-shadow-material/soft-shadow-material.mjs +0 -33
  278. package/esm2022/shaders/lib/spot-light-material/spot-light-material.mjs +0 -86
  279. package/esm2022/shaders/lib/star-field-material/star-field-material.mjs +0 -32
  280. package/esm2022/staging/lib/accumulative-shadows/accumulative-shadows.mjs +0 -249
  281. package/esm2022/staging/lib/accumulative-shadows/progressive-light-map.mjs +0 -108
  282. package/esm2022/staging/lib/accumulative-shadows/randomized-lights.mjs +0 -201
  283. package/esm2022/staging/lib/bounds/bounds.mjs +0 -284
  284. package/esm2022/staging/lib/camera-shake/camera-shake.mjs +0 -122
  285. package/esm2022/staging/lib/caustics/caustics.mjs +0 -364
  286. package/esm2022/staging/lib/center/center.mjs +0 -143
  287. package/esm2022/staging/lib/cloud/cloud.mjs +0 -160
  288. package/esm2022/staging/lib/contact-shadows/contact-shadows.mjs +0 -228
  289. package/esm2022/staging/lib/environment/assets.mjs +0 -13
  290. package/esm2022/staging/lib/environment/environment-cube.mjs +0 -41
  291. package/esm2022/staging/lib/environment/environment-ground.mjs +0 -67
  292. package/esm2022/staging/lib/environment/environment-inputs.mjs +0 -87
  293. package/esm2022/staging/lib/environment/environment-map.mjs +0 -39
  294. package/esm2022/staging/lib/environment/environment-portal.mjs +0 -111
  295. package/esm2022/staging/lib/environment/environment.mjs +0 -165
  296. package/esm2022/staging/lib/environment/utils.mjs +0 -70
  297. package/esm2022/staging/lib/float/float.mjs +0 -77
  298. package/esm2022/staging/lib/sky/sky.mjs +0 -109
  299. package/esm2022/staging/lib/sparkles/sparkles.mjs +0 -210
  300. package/esm2022/staging/lib/spot-light/common.mjs +0 -42
  301. package/esm2022/staging/lib/spot-light/shadow-mesh-input.mjs +0 -51
  302. package/esm2022/staging/lib/spot-light/spot-light-input.mjs +0 -62
  303. package/esm2022/staging/lib/spot-light/spot-light-shadow-no-shader.mjs +0 -74
  304. package/esm2022/staging/lib/spot-light/spot-light-shadow-shader.mjs +0 -126
  305. package/esm2022/staging/lib/spot-light/spot-light-shadow.mjs +0 -63
  306. package/esm2022/staging/lib/spot-light/spot-light.mjs +0 -117
  307. package/esm2022/staging/lib/spot-light/volumetric-mesh.mjs +0 -86
  308. package/esm2022/staging/lib/stage/stage.mjs +0 -368
  309. package/esm2022/staging/lib/stars/stars.mjs +0 -140
  310. package/loaders/lib/cube-texture-loader/cube-texture-loader.d.ts +0 -3
  311. package/loaders/lib/gltf-loader/gltf-loader.d.ts +0 -8
  312. package/loaders/lib/progress/progress.d.ts +0 -16
  313. package/loaders/lib/texture-loader/texture-loader.d.ts +0 -5
  314. package/materials/lib/mesh-reflector-material/mesh-reflector-material.d.ts +0 -41
  315. package/materials/lib/mesh-refraction-material/mesh-refraction-material.d.ts +0 -28
  316. package/misc/lib/animations/animations.d.ts +0 -13
  317. package/misc/lib/depth-buffer/depth-buffer.d.ts +0 -7
  318. package/performance/lib/detailed/detailed.d.ts +0 -13
  319. package/staging/lib/cloud/cloud.d.ts +0 -23
  320. package/staging/lib/environment/environment-cube.d.ts +0 -11
  321. package/staging/lib/environment/environment-ground.d.ts +0 -9
  322. package/staging/lib/environment/environment-inputs.d.ts +0 -28
  323. package/staging/lib/environment/environment-map.d.ts +0 -10
  324. package/staging/lib/environment/utils.d.ts +0 -8
  325. package/staging/lib/float/float.d.ts +0 -16
  326. package/staging/lib/spot-light/common.d.ts +0 -3
  327. package/staging/lib/spot-light/spot-light-shadow-no-shader.d.ts +0 -14
  328. package/staging/lib/spot-light/spot-light-shadow-shader.d.ts +0 -25
  329. package/staging/lib/spot-light/spot-light-shadow.d.ts +0 -6
  330. /package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewcube/constants.d.ts +0 -0
  331. /package/cameras/{lib/perspective-camera → perspective-camera}/perspective-camera.d.ts +0 -0
  332. /package/plugin/{README.md → libs/plugin/README.md} +0 -0
  333. /package/shaders/{lib/caustics-material → caustics-material}/caustics-material.d.ts +0 -0
  334. /package/shaders/{lib/caustics-projection-material → caustics-material}/caustics-projection-material.d.ts +0 -0
  335. /package/shaders/{lib/convolution-material → convolution-material}/convolution-material.d.ts +0 -0
  336. /package/shaders/{lib/discard-material → discard-material}/discard-material.d.ts +0 -0
  337. /package/shaders/{lib/mesh-reflector-material → mesh-reflector-material}/mesh-reflector-material.d.ts +0 -0
  338. /package/shaders/{lib/mesh-refraction-material → mesh-refraction-material}/mesh-refraction-material.d.ts +0 -0
  339. /package/shaders/{lib/mesh-transmission-material → mesh-transmission-material}/mesh-transmission-material.d.ts +0 -0
  340. /package/shaders/{lib/shader-material → shader-material}/shader-material.d.ts +0 -0
  341. /package/shaders/{lib/spot-light-material → spot-light-material}/spot-light-material.d.ts +0 -0
  342. /package/shaders/{lib/star-field-material → star-field-material}/star-field-material.d.ts +0 -0
  343. /package/staging/{lib/environment → environment}/assets.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"angular-three-soba-materials.mjs","sources":["../../../../libs/angular-three-soba/materials/src/lib/mesh-distort-material/mesh-distort-material.ts","../../../../libs/angular-three-soba/materials/src/lib/mesh-reflector-material/mesh-reflector-material.ts","../../../../libs/angular-three-soba/materials/src/lib/mesh-refraction-material/mesh-refraction-material.ts","../../../../libs/angular-three-soba/materials/src/lib/mesh-transmission-material/mesh-transmission-material.ts","../../../../libs/angular-three-soba/materials/src/lib/mesh-wobble-material/mesh-wobble-material.ts","../../../../libs/angular-three-soba/materials/src/angular-three-soba-materials.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, Input } from '@angular/core';\nimport { injectBeforeRender, injectNgtRef, NgtArgs, NgtRxStore } from 'angular-three';\nimport { MeshDistortMaterial, NGTS_DISTORT_MATERIAL_SHADER } from 'angular-three-soba/shaders';\n\n@Component({\n selector: 'ngts-mesh-distort-material',\n standalone: true,\n template: `\n <ngt-primitive\n *args=\"[material]\"\n [ref]=\"materialRef\"\n [time]=\"get('time')\"\n [distort]=\"get('distort')\"\n [radius]=\"get('radius')\"\n ngtCompound\n attach=\"material\"\n />\n `,\n imports: [NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshDistortMaterial extends NgtRxStore {\n readonly MeshDistortMaterial = inject(NGTS_DISTORT_MATERIAL_SHADER);\n\n readonly material = new this.MeshDistortMaterial();\n\n @Input() materialRef = injectNgtRef<InstanceType<MeshDistortMaterial>>();\n\n @Input() set time(time: number) {\n this.set({ time });\n }\n\n @Input() set distort(distort: number) {\n this.set({ distort });\n }\n\n @Input() set radius(radius: number) {\n this.set({ radius });\n }\n\n @Input() set speed(speed: number) {\n this.set({ speed });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({ speed: 1, time: 0, distort: 0.4, radius: 1 });\n }\n\n constructor() {\n super();\n injectBeforeRender(({ clock }) => {\n this.material.time = clock.getElapsedTime() * this.get('speed');\n });\n }\n}\n","import { NgIf } from '@angular/common';\nimport { Component, CUSTOM_ELEMENTS_SCHEMA, inject, Input } from '@angular/core';\nimport {\n extend,\n getLocalState,\n injectBeforeRender,\n injectNgtRef,\n NgtArgs,\n NgtPush,\n NgtRenderState,\n NgtRxStore,\n NgtStore,\n startWithUndefined,\n} from 'angular-three';\nimport { BlurPass, MeshReflectorMaterial } from 'angular-three-soba/shaders';\nimport { combineLatest, debounceTime, map } from 'rxjs';\nimport * as THREE from 'three';\n\nextend({ MeshReflectorMaterial });\n\n@Component({\n selector: 'ngts-mesh-reflector-material',\n standalone: true,\n template: `\n <ngt-mesh-reflector-material\n ngtCompound\n attach=\"material\"\n *ngIf=\"defines$ | ngtPush as defines\"\n [ref]=\"materialRef\"\n [defines]=\"defines\"\n [mirror]=\"reflectorProps.mirror\"\n [textureMatrix]=\"reflectorProps.textureMatrix\"\n [mixBlur]=\"reflectorProps.mixBlur\"\n [tDiffuse]=\"reflectorProps.tDiffuse\"\n [tDepth]=\"reflectorProps.tDepth\"\n [tDiffuseBlur]=\"reflectorProps.tDiffuseBlur\"\n [hasBlur]=\"reflectorProps.hasBlur\"\n [mixStrength]=\"reflectorProps.mixStrength\"\n [minDepthThreshold]=\"reflectorProps.minDepthThreshold\"\n [maxDepthThreshold]=\"reflectorProps.maxDepthThreshold\"\n [depthScale]=\"reflectorProps.depthScale\"\n [depthToBlurRatioBias]=\"reflectorProps.depthToBlurRatioBias\"\n [distortion]=\"reflectorProps.distortion\"\n [distortionMap]=\"reflectorProps.distortionMap\"\n [mixContrast]=\"reflectorProps.mixContrast\"\n >\n <ng-content />\n </ngt-mesh-reflector-material>\n `,\n imports: [NgtArgs, NgtPush, NgIf],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshReflectorMaterial extends NgtRxStore {\n @Input() materialRef = injectNgtRef<MeshReflectorMaterial>();\n\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n\n @Input() set mixBlur(mixBlur: number) {\n this.set({ mixBlur });\n }\n\n @Input() set mixStrength(mixStrength: number) {\n this.set({ mixStrength });\n }\n\n @Input() set blur(blur: [number, number] | number) {\n this.set({ blur });\n }\n\n @Input() set mirror(mirror: number) {\n this.set({ mirror });\n }\n\n @Input() set minDepthThreshold(minDepthThreshold: number) {\n this.set({ minDepthThreshold });\n }\n\n @Input() set maxDepthThreshold(maxDepthThreshold: number) {\n this.set({ maxDepthThreshold });\n }\n\n @Input() set depthScale(depthScale: number) {\n this.set({ depthScale });\n }\n\n @Input() set depthToBlurRatioBias(depthToBlurRatioBias: number) {\n this.set({ depthToBlurRatioBias });\n }\n\n @Input() set distortionMap(distortionMap: THREE.Texture) {\n this.set({ distortionMap });\n }\n\n @Input() set distortion(distortion: number) {\n this.set({ distortion });\n }\n\n @Input() set mixContrast(mixContrast: number) {\n this.set({ mixContrast });\n }\n\n @Input() set reflectorOffset(reflectorOffset: number) {\n this.set({ reflectorOffset });\n }\n\n readonly defines$ = this.select('reflectorEntities', 'reflectorProps', 'defines').pipe(debounceTime(0));\n\n get reflectorProps() {\n return this.get('reflectorEntities', 'reflectorProps');\n }\n\n private readonly store = inject(NgtStore);\n\n private readonly reflectorPlane = new THREE.Plane();\n private readonly normal = new THREE.Vector3();\n private readonly reflectorWorldPosition = new THREE.Vector3();\n private readonly cameraWorldPosition = new THREE.Vector3();\n private readonly rotationMatrix = new THREE.Matrix4();\n private readonly lookAtPosition = new THREE.Vector3(0, 0, -1);\n private readonly clipPlane = new THREE.Vector4();\n private readonly view = new THREE.Vector3();\n private readonly target = new THREE.Vector3();\n private readonly q = new THREE.Vector4();\n private readonly textureMatrix = new THREE.Matrix4();\n private readonly virtualCamera = new THREE.PerspectiveCamera();\n\n override initialize(): void {\n super.initialize();\n this.set({\n mixBlur: 0,\n mixStrength: 1,\n resolution: 256,\n blur: [0, 0],\n minDepthThreshold: 0.9,\n maxDepthThreshold: 1,\n depthScale: 0,\n depthToBlurRatioBias: 0.25,\n mirror: 0,\n distortion: 1,\n mixContrast: 1,\n reflectorOffset: 0,\n });\n }\n\n constructor() {\n super();\n\n this.connect(\n 'normalizedBlur',\n this.select('blur').pipe(map((blur) => (Array.isArray(blur) ? blur : [blur, blur])))\n );\n this.connect('hasBlur', this.select('normalizedBlur').pipe(map(([x, y]) => x + y > 0)));\n this.connect(\n 'reflectorEntities',\n combineLatest([\n this.store.select('gl'),\n this.select('normalizedBlur'),\n this.select('resolution'),\n this.select('mirror'),\n this.select('hasBlur'),\n this.select('mixBlur'),\n this.select('mixStrength'),\n this.select('minDepthThreshold'),\n this.select('maxDepthThreshold'),\n this.select('depthScale'),\n this.select('depthToBlurRatioBias'),\n this.select('distortion'),\n this.select('distortionMap').pipe(startWithUndefined()),\n this.select('mixContrast'),\n ]).pipe(\n map(\n ([\n gl,\n blur,\n resolution,\n mirror,\n hasBlur,\n mixBlur,\n mixStrength,\n minDepthThreshold,\n maxDepthThreshold,\n depthScale,\n depthToBlurRatioBias,\n distortion,\n distortionMap,\n mixContrast,\n ]) => {\n const parameters = {\n minFilter: THREE.LinearFilter,\n magFilter: THREE.LinearFilter,\n encoding: gl.outputEncoding,\n type: THREE.HalfFloatType,\n };\n const fbo1 = new THREE.WebGLRenderTarget(resolution, resolution, parameters);\n fbo1.depthBuffer = true;\n fbo1.depthTexture = new THREE.DepthTexture(resolution, resolution);\n fbo1.depthTexture.format = THREE.DepthFormat;\n fbo1.depthTexture.type = THREE.UnsignedShortType;\n\n const fbo2 = new THREE.WebGLRenderTarget(resolution, resolution, parameters);\n const blurPass = new BlurPass({\n gl,\n resolution,\n width: blur[0],\n height: blur[1],\n minDepthThreshold,\n maxDepthThreshold,\n depthScale,\n depthToBlurRatioBias,\n });\n const reflectorProps = {\n mirror,\n textureMatrix: this.textureMatrix,\n mixBlur,\n tDiffuse: fbo1.texture,\n tDepth: fbo1.depthTexture,\n tDiffuseBlur: fbo2.texture,\n hasBlur,\n mixStrength,\n minDepthThreshold,\n maxDepthThreshold,\n depthScale,\n depthToBlurRatioBias,\n distortion,\n distortionMap,\n mixContrast,\n defines: {\n USE_BLUR: hasBlur ? '' : undefined,\n USE_DEPTH: depthScale > 0 ? '' : undefined,\n USE_DISTORTION: distortionMap ? '' : undefined,\n },\n };\n\n return { fbo1, fbo2, blurPass, reflectorProps };\n }\n )\n )\n );\n\n injectBeforeRender(this.onBeforeRender.bind(this));\n }\n\n private beforeRender(state: NgtRenderState) {\n const parent = getLocalState(this.materialRef.nativeElement).parent;\n if (!parent) return;\n\n const { camera } = state;\n\n this.reflectorWorldPosition.setFromMatrixPosition(parent.matrixWorld);\n this.cameraWorldPosition.setFromMatrixPosition(camera.matrixWorld);\n this.rotationMatrix.extractRotation(parent.matrixWorld);\n this.normal.set(0, 0, 1);\n this.normal.applyMatrix4(this.rotationMatrix);\n this.reflectorWorldPosition.addScaledVector(this.normal, this.get('reflectorOffset'));\n this.view.subVectors(this.reflectorWorldPosition, this.cameraWorldPosition);\n // Avoid rendering when reflector is facing away\n if (this.view.dot(this.normal) > 0) return;\n this.view.reflect(this.normal).negate();\n this.view.add(this.reflectorWorldPosition);\n this.rotationMatrix.extractRotation(camera.matrixWorld);\n this.lookAtPosition.set(0, 0, -1);\n this.lookAtPosition.applyMatrix4(this.rotationMatrix);\n this.lookAtPosition.add(this.cameraWorldPosition);\n this.target.subVectors(this.reflectorWorldPosition, this.lookAtPosition);\n this.target.reflect(this.normal).negate();\n this.target.add(this.reflectorWorldPosition);\n this.virtualCamera.position.copy(this.view);\n this.virtualCamera.up.set(0, 1, 0);\n this.virtualCamera.up.applyMatrix4(this.rotationMatrix);\n this.virtualCamera.up.reflect(this.normal);\n this.virtualCamera.lookAt(this.target);\n this.virtualCamera.far = camera.far; // Used in WebGLBackground\n this.virtualCamera.updateMatrixWorld();\n this.virtualCamera.projectionMatrix.copy(camera.projectionMatrix);\n // Update the texture matrix\n this.textureMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0);\n this.textureMatrix.multiply(this.virtualCamera.projectionMatrix);\n this.textureMatrix.multiply(this.virtualCamera.matrixWorldInverse);\n this.textureMatrix.multiply(parent.matrixWorld);\n // Now update projection matrix with new clip plane, implementing code from: http://www.terathon.com/code/oblique.html\n // Paper explaining this technique: http://www.terathon.com/lengyel/Lengyel-Oblique.pdf\n this.reflectorPlane.setFromNormalAndCoplanarPoint(this.normal, this.reflectorWorldPosition);\n this.reflectorPlane.applyMatrix4(this.virtualCamera.matrixWorldInverse);\n this.clipPlane.set(\n this.reflectorPlane.normal.x,\n this.reflectorPlane.normal.y,\n this.reflectorPlane.normal.z,\n this.reflectorPlane.constant\n );\n const projectionMatrix = this.virtualCamera.projectionMatrix;\n this.q.x = (Math.sign(this.clipPlane.x) + projectionMatrix.elements[8]) / projectionMatrix.elements[0];\n this.q.y = (Math.sign(this.clipPlane.y) + projectionMatrix.elements[9]) / projectionMatrix.elements[5];\n this.q.z = -1.0;\n this.q.w = (1.0 + projectionMatrix.elements[10]) / projectionMatrix.elements[14];\n // Calculate the scaled plane vector\n this.clipPlane.multiplyScalar(2.0 / this.clipPlane.dot(this.q));\n // Replacing the third row of the projection matrix\n projectionMatrix.elements[2] = this.clipPlane.x;\n projectionMatrix.elements[6] = this.clipPlane.y;\n projectionMatrix.elements[10] = this.clipPlane.z + 1.0;\n projectionMatrix.elements[14] = this.clipPlane.w;\n }\n\n private onBeforeRender(state: NgtRenderState) {\n if (!this.materialRef.nativeElement) return;\n const parent = getLocalState(this.materialRef.nativeElement).parent;\n if (!parent) return;\n\n const { gl, scene } = state;\n const { hasBlur } = this.get();\n const { fbo1, fbo2, blurPass } = this.get('reflectorEntities');\n\n if (fbo1 && fbo2 && blurPass) {\n parent.visible = false;\n const currentXrEnabled = gl.xr.enabled;\n const currentShadowAutoUpdate = gl.shadowMap.autoUpdate;\n this.beforeRender(state);\n gl.xr.enabled = false;\n gl.shadowMap.autoUpdate = false;\n gl.setRenderTarget(fbo1);\n gl.state.buffers.depth.setMask(true);\n if (!gl.autoClear) gl.clear();\n gl.render(scene, this.virtualCamera);\n if (hasBlur) blurPass.render(gl, fbo1, fbo2);\n gl.xr.enabled = currentXrEnabled;\n gl.shadowMap.autoUpdate = currentShadowAutoUpdate;\n parent.visible = true;\n gl.setRenderTarget(null);\n }\n }\n}\n","import { NgIf } from '@angular/common';\nimport { Component, CUSTOM_ELEMENTS_SCHEMA, inject, Input, OnInit } from '@angular/core';\nimport { extend, getLocalState, injectBeforeRender, injectNgtRef, NgtPush, NgtRxStore, NgtStore } from 'angular-three';\nimport { MeshRefractionMaterial } from 'angular-three-soba/shaders';\nimport { combineLatest, map } from 'rxjs';\nimport { MeshBVH, SAH } from 'three-mesh-bvh';\n\nextend({ MeshRefractionMaterial });\n\nconst isCubeTexture = (def: THREE.CubeTexture | THREE.Texture): def is THREE.CubeTexture =>\n def && (def as THREE.CubeTexture).isCubeTexture;\n\n@Component({\n selector: 'ngts-mesh-refraction-material',\n standalone: true,\n template: `\n <ngt-mesh-refraction-material\n *ngIf=\"defines$ | ngtPush as defines\"\n [ref]=\"materialRef\"\n [defines]=\"defines\"\n [resolution]=\"get('resolution')\"\n [aberrationStrength]=\"get('aberrationStrength')\"\n [envMap]=\"get('envMap')\"\n [bounces]=\"get('bounces')\"\n [ior]=\"get('ior')\"\n [fresnel]=\"get('fresnel')\"\n [color]=\"get('color')\"\n [fastChroma]=\"get('fastChroma')\"\n ngtCompound\n attach=\"material\"\n >\n <ng-content />\n </ngt-mesh-refraction-material>\n `,\n imports: [NgtPush, NgIf],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshRefractionMaterial extends NgtRxStore implements OnInit {\n @Input() materialRef = injectNgtRef<InstanceType<typeof MeshRefractionMaterial>>();\n /** Environment map */\n @Input() set envMap(envMap: THREE.CubeTexture | THREE.Texture) {\n this.set({ envMap });\n }\n /** Number of ray-cast bounces, it can be expensive to have too many, 2 */\n @Input() set bounces(bounces: number) {\n this.set({ bounces });\n }\n /** Refraction index, 2.4 */\n @Input() set ior(ior: number) {\n this.set({ ior });\n }\n /** Fresnel (strip light), 0 */\n @Input() set fresnel(fresnel: number) {\n this.set({ fresnel });\n }\n /** RGB shift intensity, can be expensive, 0 */\n @Input() set aberrationStrength(aberrationStrength: number) {\n this.set({ aberrationStrength });\n }\n /** Color, white */\n @Input() set color(color: THREE.ColorRepresentation) {\n this.set({ color });\n }\n /** If this is on it uses fewer ray casts for the RGB shift sacrificing physical accuracy, true */\n @Input() set fastChroma(fastChroma: boolean) {\n this.set({ fastChroma });\n }\n\n readonly defines$ = this.select('defines');\n\n private readonly store = inject(NgtStore);\n\n override initialize(): void {\n super.initialize();\n this.set({\n aberrationStrength: 0,\n fastChroma: true,\n });\n }\n\n constructor() {\n super();\n this.connect(\n 'defines',\n combineLatest([this.select('aberrationStrength'), this.select('fastChroma'), this.select('envMap')]).pipe(\n map(([aberrationStrength, fastChroma, envMap]) => {\n const temp = {} as { [key: string]: string };\n // Sampler2D and SamplerCube need different defines\n const isCubeMap = isCubeTexture(envMap);\n const w = (isCubeMap ? envMap.image[0]?.width : envMap.image.width) ?? 1024;\n const cubeSize = w / 4;\n const _lodMax = Math.floor(Math.log2(cubeSize));\n const _cubeSize = Math.pow(2, _lodMax);\n const width = 3 * Math.max(_cubeSize, 16 * 7);\n const height = 4 * _cubeSize;\n if (isCubeMap) temp['ENVMAP_TYPE_CUBEM'] = '';\n temp['CUBEUV_TEXEL_WIDTH'] = `${1.0 / width}`;\n temp['CUBEUV_TEXEL_HEIGHT'] = `${1.0 / height}`;\n temp['CUBEUV_MAX_MIP'] = `${_lodMax}.0`;\n // Add defines from chromatic aberration\n if (aberrationStrength > 0) temp['CHROMATIC_ABERRATIONS'] = '';\n if (fastChroma) temp['FAST_CHROMA'] = '';\n return temp;\n })\n )\n );\n this.connect('resolution', this.store.select('size').pipe(map((size) => [size.width, size.height])));\n\n injectBeforeRender(({ camera }) => {\n if (this.materialRef.nativeElement) {\n (this.materialRef.nativeElement as any)!.viewMatrixInverse = camera.matrixWorld;\n (this.materialRef.nativeElement as any)!.projectionMatrixInverse = camera.projectionMatrixInverse;\n }\n });\n }\n\n ngOnInit() {\n this.setupGeometry();\n }\n\n private setupGeometry() {\n this.hold(this.materialRef.$, (material) => {\n const geometry = getLocalState(material).parent?.geometry;\n if (geometry) {\n (material as any).bvh.updateFrom(\n new MeshBVH(geometry.toNonIndexed(), { lazyGeneration: false, strategy: SAH } as any)\n );\n }\n });\n }\n}\n","import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\nimport {\n extend,\n getLocalState,\n injectBeforeRender,\n injectNgtRef,\n NgtAnyRecord,\n NgtArgs,\n NgtRxStore,\n} from 'angular-three';\nimport { injectNgtsFBO } from 'angular-three-soba/misc';\nimport { DiscardMaterial, MeshTransmissionMaterial } from 'angular-three-soba/shaders';\nimport { combineLatest, map } from 'rxjs';\nimport * as THREE from 'three';\n\nextend({ MeshTransmissionMaterial });\n\n@Component({\n selector: 'ngts-mesh-transmission-material',\n standalone: true,\n template: `\n <ngt-mesh-transmission-material\n *args=\"[get('samples'), get('transmissionSampler')]\"\n ngtCompound\n [ref]=\"materialRef\"\n [buffer]=\"get('buffer') || fboMainRef.nativeElement?.texture\"\n [_transmission]=\"get('transmission')\"\n [transmission]=\"get('transmissionSampler') ? get('transmission') : 0\"\n [thickness]=\"get('thickness')\"\n [side]=\"get('side')\"\n [anisotropy]=\"get('anisotropy')\"\n [roughness]=\"get('roughness')\"\n [chromaticAberration]=\"get('chromaticAberration')\"\n [distortion]=\"get('distortion')\"\n [distortionScale]=\"get('distortionScale')\"\n [temporalDistortion]=\"get('temporalDistortion')\"\n [time]=\"get('time')\"\n />\n `,\n imports: [NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshTranmissionMaterial extends NgtRxStore {\n @Input() materialRef = injectNgtRef<\n MeshTransmissionMaterial & {\n time: number;\n buffer?: THREE.Texture;\n }\n >();\n /** transmissionSampler, you can use the threejs transmission sampler texture that is\n * generated once for all transmissive materials. The upside is that it can be faster if you\n * use multiple MeshPhysical and Transmission materials, the downside is that transmissive materials\n * using this can't see other transparent or transmissive objects, default: false */\n @Input() set transmissionSampler(transmissionSampler: boolean) {\n this.set({ transmissionSampler });\n }\n /** Render the backside of the material (more cost, better results), default: false */\n @Input() set backside(backside: boolean) {\n this.set({ backside });\n }\n /** Backside thickness (when backside is true), default: 0 */\n @Input() set backsideThickness(backsideThickness: number) {\n this.set({ backsideThickness });\n }\n /** Resolution of the local buffer, default: undefined (fullscreen) */\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n /** Resolution of the local buffer for backfaces, default: undefined (fullscreen) */\n @Input() set backsideResolution(backsideResolution: number) {\n this.set({ backsideResolution });\n }\n /** Refraction samples, default: 10 */\n @Input() set samples(samples: number) {\n this.set({ samples });\n }\n /** Buffer scene background (can be a texture, a cubetexture or a color), default: null */\n @Input() set background(background: THREE.Texture | THREE.Color) {\n this.set({ background });\n }\n /* Transmission, default: 1 */\n @Input() set transmission(transmission: number) {\n this.set({ transmission });\n }\n /* Thickness (refraction), default: 0 */\n @Input() set thickness(thickness: number) {\n this.set({ thickness });\n }\n /* Roughness (blur), default: 0 */\n @Input() set roughness(roughness: number) {\n this.set({ roughness });\n }\n /* Chromatic aberration, default: 0.03 */\n @Input() set chromaticAberration(chromaticAberration: number) {\n this.set({ chromaticAberration });\n }\n /* Anisotropy, default: 0.1 */\n @Input() set anisotropy(anisotropy: number) {\n this.set({ anisotropy });\n }\n /* Distortion, default: 0 */\n @Input() set distortion(distortion: number) {\n this.set({ distortion });\n }\n /* Distortion scale, default: 0.5 */\n @Input() set distortionScale(distortionScale: number) {\n this.set({ distortionScale });\n }\n /* Temporal distortion (speed of movement), default: 0.0 */\n @Input() set temporalDistortion(temporalDistortion: number) {\n this.set({ temporalDistortion });\n }\n /** The scene rendered into a texture (use it to share a texture between materials), default: null */\n @Input() set buffer(buffer: THREE.Texture) {\n this.set({ buffer });\n }\n /** Internals */\n @Input() set time(time: number) {\n this.set({ time });\n }\n\n readonly discardMaterial = new DiscardMaterial();\n readonly fboBackRef = injectNgtsFBO(() =>\n combineLatest([this.select('backsideResolution'), this.select('resolution')]).pipe(\n map(([backsideResolution, resolution]) => backsideResolution || resolution)\n )\n );\n readonly fboMainRef = injectNgtsFBO(() => this.select('resolution'));\n\n override initialize(): void {\n super.initialize();\n this.set({\n transmissionSampler: false,\n backside: false,\n side: THREE.FrontSide,\n transmission: 1,\n thickness: 0,\n backsideThickness: 0,\n samples: 10,\n roughness: 0,\n anisotropy: 0.1,\n chromaticAberration: 0.03,\n distortion: 0,\n distortionScale: 0.5,\n temporalDistortion: 0.0,\n buffer: null,\n });\n }\n\n constructor() {\n super();\n let oldBg: THREE.Scene['background'];\n let oldTone: THREE.WebGLRenderer['toneMapping'];\n let parent: THREE.Object3D;\n\n injectBeforeRender((state) => {\n const { transmissionSampler, background, backside, backsideThickness, thickness, side } = this.get();\n\n this.materialRef.nativeElement.time = state.clock.getElapsedTime();\n // Render only if the buffer matches the built-in and no transmission sampler is set\n if (\n this.materialRef.nativeElement.buffer === this.fboMainRef.nativeElement.texture &&\n !transmissionSampler\n ) {\n parent = getLocalState(this.materialRef.nativeElement).parent as THREE.Object3D;\n if (parent) {\n // Save defaults\n oldTone = state.gl.toneMapping;\n oldBg = state.scene.background;\n\n // Switch off tonemapping lest it double tone maps\n // Save the current background and set the HDR as the new BG\n // Use discardmaterial, the parent will be invisible, but it's shadows will still be cast\n state.gl.toneMapping = THREE.NoToneMapping;\n if (background) state.scene.background = background;\n (parent as NgtAnyRecord)['material'] = this.discardMaterial;\n\n if (backside) {\n // Render into the backside buffer\n state.gl.setRenderTarget(this.fboBackRef.nativeElement);\n state.gl.render(state.scene, state.camera);\n // And now prepare the material for the main render using the backside buffer\n (parent as NgtAnyRecord)['material'] = this.materialRef.nativeElement;\n (parent as NgtAnyRecord)['material'].buffer = this.fboBackRef.nativeElement.texture;\n (parent as NgtAnyRecord)['material'].thickness = backsideThickness;\n (parent as NgtAnyRecord)['material'].side = THREE.BackSide;\n }\n\n // Render into the main buffer\n state.gl.setRenderTarget(this.fboMainRef.nativeElement);\n state.gl.render(state.scene, state.camera);\n\n (parent as NgtAnyRecord)['material'].thickness = thickness;\n (parent as NgtAnyRecord)['material'].side = side;\n (parent as NgtAnyRecord)['material'].buffer = this.fboMainRef.nativeElement.texture;\n\n // Set old state back\n state.scene.background = oldBg;\n state.gl.setRenderTarget(null);\n (parent as NgtAnyRecord)['material'] = this.materialRef.nativeElement;\n state.gl.toneMapping = oldTone;\n }\n }\n });\n }\n}\n","import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\nimport { extend, injectBeforeRender, injectNgtRef, NgtArgs, NgtRxStore } from 'angular-three';\nimport { MeshWobbleMaterial } from 'angular-three-soba/shaders';\n\nextend({ MeshWobbleMaterial });\n\n@Component({\n selector: 'ngts-mesh-wobble-material',\n standalone: true,\n template: `\n <ngt-primitive\n *args=\"[material]\"\n [ref]=\"materialRef\"\n [time]=\"get('time')\"\n [factor]=\"get('factor')\"\n attach=\"material\"\n ngtCompound\n />\n `,\n imports: [NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshWobbleMaterial extends NgtRxStore {\n readonly material = new MeshWobbleMaterial();\n\n @Input() materialRef = injectNgtRef<MeshWobbleMaterial>();\n\n @Input() set time(time: number) {\n this.set({ time });\n }\n\n @Input() set factor(factor: number) {\n this.set({ factor });\n }\n\n @Input() set speed(speed: number) {\n this.set({ speed });\n }\n\n override initialize(): void {\n super.initialize();\n this.set({ speed: 1, time: 0, factor: 1 });\n }\n\n constructor() {\n super();\n injectBeforeRender(({ clock }) => {\n this.material.time = clock.getElapsedTime() * this.get('speed');\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAIA,MAiBa,uBAAwB,SAAQ,UAAU,CAAA;IAOnD,IAAa,IAAI,CAAC,IAAY,EAAA;AAC1B,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;KACtB;IAED,IAAa,OAAO,CAAC,OAAe,EAAA;AAChC,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACzB;IAED,IAAa,MAAM,CAAC,MAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;KACxB;IAED,IAAa,KAAK,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;KACvB;IAEQ,UAAU,GAAA;QACf,KAAK,CAAC,UAAU,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;KAC5D;AAED,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAC;AA5BH,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC;AAE3D,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAE1C,IAAW,CAAA,WAAA,GAAG,YAAY,EAAqC,CAAC;AAyBrE,QAAA,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,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,CAAA;oBACD,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACpC,iBAAA,CAAA;0EAIY,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAEO,IAAI,EAAA,CAAA;sBAAhB,KAAK;gBAIO,MAAM,EAAA,CAAA;sBAAlB,KAAK;gBAIO,KAAK,EAAA,CAAA;sBAAjB,KAAK;;;ACnCV;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-three-soba-materials.mjs","sources":["../../../../libs/soba/materials/src/mesh-distort-material/mesh-distort-material.ts","../../../../libs/soba/materials/src/mesh-reflector-material/mesh-reflector-material.ts","../../../../libs/soba/materials/src/mesh-refraction-material/mesh-refraction-material.ts","../../../../libs/soba/materials/src/mesh-transmission-material/mesh-transmission-material.ts","../../../../libs/soba/materials/src/mesh-wobble-material/mesh-wobble-material.ts","../../../../libs/soba/materials/src/angular-three-soba-materials.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, Input } from '@angular/core';\nimport { injectBeforeRender, injectNgtRef, NgtArgs, NgtSignalStore } from 'angular-three';\nimport { MeshDistortMaterial, NGTS_DISTORT_MATERIAL_SHADER } from 'angular-three-soba/shaders';\n\nexport interface NgtsMeshDistortMaterialState {\n time: number;\n distort: number;\n radius: number;\n speed: number;\n}\n\n@Component({\n selector: 'ngts-mesh-distort-material',\n standalone: true,\n template: `\n <ngt-primitive\n *args=\"[material]\"\n [ref]=\"materialRef\"\n [time]=\"distortTime()\"\n [distort]=\"distortDistort()\"\n [radius]=\"distortRadius()\"\n ngtCompound\n attach=\"material\"\n />\n `,\n imports: [NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshDistortMaterial extends NgtSignalStore<NgtsMeshDistortMaterialState> {\n readonly material = new (inject(NGTS_DISTORT_MATERIAL_SHADER))();\n\n @Input() materialRef = injectNgtRef<InstanceType<MeshDistortMaterial>>();\n\n @Input() set time(time: number) {\n this.set({ time });\n }\n\n @Input() set distort(distort: number) {\n this.set({ distort });\n }\n\n @Input() set radius(radius: number) {\n this.set({ radius });\n }\n\n @Input() set speed(speed: number) {\n this.set({ speed });\n }\n\n readonly distortTime = this.select('time');\n readonly distortDistort = this.select('distort');\n readonly distortRadius = this.select('radius');\n\n constructor() {\n super({ speed: 1, time: 0, distort: 0.4, radius: 1 });\n injectBeforeRender(({ clock }) => {\n this.material.time = clock.getElapsedTime() * this.get('speed');\n });\n }\n}\n","import { NgIf } from '@angular/common';\nimport { Component, computed, CUSTOM_ELEMENTS_SCHEMA, inject, Input } from '@angular/core';\nimport {\n extend,\n getLocalState,\n injectBeforeRender,\n injectNgtRef,\n NgtArgs,\n NgtRenderState,\n NgtSignalStore,\n NgtStore,\n} from 'angular-three';\nimport { BlurPass, MeshReflectorMaterial } from 'angular-three-soba/shaders';\nimport * as THREE from 'three';\n\nextend({ MeshReflectorMaterial });\n\nexport interface NgtsMeshReflectorMaterialState {\n resolution: number;\n mixBlur: number;\n mixStrength: number;\n blur: [number, number] | number;\n mirror: number;\n minDepthThreshold: number;\n maxDepthThreshold: number;\n depthScale: number;\n depthToBlurRatioBias: number;\n distortionMap?: THREE.Texture;\n distortion: number;\n mixContrast: number;\n reflectorOffset: number;\n}\n\n@Component({\n selector: 'ngts-mesh-reflector-material',\n standalone: true,\n template: `\n <ngt-mesh-reflector-material\n ngtCompound\n attach=\"material\"\n *ngIf=\"defines()\"\n [ref]=\"materialRef\"\n [defines]=\"defines()\"\n [mirror]=\"reflectorMirror()\"\n [textureMatrix]=\"reflectorTextureMatrix()\"\n [mixBlur]=\"reflectorMixBlur()\"\n [tDiffuse]=\"reflectorTDiffuse()\"\n [tDepth]=\"reflectorTDepth()\"\n [tDiffuseBlur]=\"reflectorTDiffuseBlur()\"\n [hasBlur]=\"reflectorHasBlur()\"\n [mixStrength]=\"reflectorMixStrength()\"\n [minDepthThreshold]=\"reflectorMinDepthThreshold()\"\n [maxDepthThreshold]=\"reflectorMaxDepthThreshold()\"\n [depthScale]=\"reflectorDepthScale()\"\n [depthToBlurRatioBias]=\"reflectorDepthToBlurRatioBias()\"\n [distortion]=\"reflectorDistortion()\"\n [distortionMap]=\"reflectorDistortionMap()\"\n [mixContrast]=\"reflectorMixContrast()\"\n >\n <ng-content />\n </ngt-mesh-reflector-material>\n `,\n imports: [NgtArgs, NgIf],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshReflectorMaterial extends NgtSignalStore<NgtsMeshReflectorMaterialState> {\n @Input() materialRef = injectNgtRef<MeshReflectorMaterial>();\n\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n\n @Input() set mixBlur(mixBlur: number) {\n this.set({ mixBlur });\n }\n\n @Input() set mixStrength(mixStrength: number) {\n this.set({ mixStrength });\n }\n\n @Input() set blur(blur: [number, number] | number) {\n this.set({ blur });\n }\n\n @Input() set mirror(mirror: number) {\n this.set({ mirror });\n }\n\n @Input() set minDepthThreshold(minDepthThreshold: number) {\n this.set({ minDepthThreshold });\n }\n\n @Input() set maxDepthThreshold(maxDepthThreshold: number) {\n this.set({ maxDepthThreshold });\n }\n\n @Input() set depthScale(depthScale: number) {\n this.set({ depthScale });\n }\n\n @Input() set depthToBlurRatioBias(depthToBlurRatioBias: number) {\n this.set({ depthToBlurRatioBias });\n }\n\n @Input() set distortionMap(distortionMap: THREE.Texture) {\n this.set({ distortionMap });\n }\n\n @Input() set distortion(distortion: number) {\n this.set({ distortion });\n }\n\n @Input() set mixContrast(mixContrast: number) {\n this.set({ mixContrast });\n }\n\n @Input() set reflectorOffset(reflectorOffset: number) {\n this.set({ reflectorOffset });\n }\n\n readonly reflectorProps = computed(() => this.#reflectorEntities().reflectorProps);\n readonly defines = computed(() => this.reflectorProps().defines);\n readonly reflectorMirror = computed(() => this.reflectorProps().mirror);\n readonly reflectorTextureMatrix = computed(() => this.reflectorProps().textureMatrix);\n readonly reflectorMixBlur = computed(() => this.reflectorProps().mixBlur);\n readonly reflectorTDiffuse = computed(() => this.reflectorProps().tDiffuse);\n readonly reflectorTDepth = computed(() => this.reflectorProps().tDepth);\n readonly reflectorTDiffuseBlur = computed(() => this.reflectorProps().tDiffuseBlur);\n readonly reflectorHasBlur = computed(() => this.reflectorProps().hasBlur);\n readonly reflectorMixStrength = computed(() => this.reflectorProps().mixStrength);\n readonly reflectorMinDepthThreshold = computed(() => this.reflectorProps().minDepthThreshold);\n readonly reflectorMaxDepthThreshold = computed(() => this.reflectorProps().maxDepthThreshold);\n readonly reflectorDepthScale = computed(() => this.reflectorProps().depthScale);\n readonly reflectorDepthToBlurRatioBias = computed(() => this.reflectorProps().depthToBlurRatioBias);\n readonly reflectorDistortion = computed(() => this.reflectorProps().distortion);\n readonly reflectorDistortionMap = computed(() => this.reflectorProps().distortionMap);\n readonly reflectorMixContrast = computed(() => this.reflectorProps().mixContrast);\n\n readonly #store = inject(NgtStore);\n readonly #gl = this.#store.select('gl');\n\n readonly #reflectorPlane = new THREE.Plane();\n readonly #normal = new THREE.Vector3();\n readonly #reflectorWorldPosition = new THREE.Vector3();\n readonly #cameraWorldPosition = new THREE.Vector3();\n readonly #rotationMatrix = new THREE.Matrix4();\n readonly #lookAtPosition = new THREE.Vector3(0, 0, -1);\n readonly #clipPlane = new THREE.Vector4();\n readonly #view = new THREE.Vector3();\n readonly #target = new THREE.Vector3();\n readonly #q = new THREE.Vector4();\n readonly #textureMatrix = new THREE.Matrix4();\n readonly #virtualCamera = new THREE.PerspectiveCamera();\n\n readonly #blur = this.select('blur');\n readonly #resolution = this.select('resolution');\n readonly #mirror = this.select('mirror');\n readonly #mixBlur = this.select('mixBlur');\n readonly #mixStrength = this.select('mixStrength');\n readonly #minDepthThreshold = this.select('minDepthThreshold');\n readonly #maxDepthThreshold = this.select('maxDepthThreshold');\n readonly #depthScale = this.select('depthScale');\n readonly #depthToBlurRatioBias = this.select('depthToBlurRatioBias');\n readonly #distortion = this.select('distortion');\n readonly #distortionMap = this.select('distortionMap');\n readonly #mixContrast = this.select('mixContrast');\n\n readonly #normalizedBlur = computed(() => {\n const blur = this.#blur();\n return Array.isArray(blur) ? blur : [blur, blur];\n });\n\n readonly #hasBlur = computed(() => {\n const [x, y] = this.#normalizedBlur();\n return x + y > 0;\n });\n\n readonly #reflectorEntities = computed(() => {\n const gl = this.#gl();\n const resolution = this.#resolution();\n const blur = this.#normalizedBlur();\n const minDepthThreshold = this.#minDepthThreshold();\n const maxDepthThreshold = this.#maxDepthThreshold();\n const depthScale = this.#depthScale();\n const depthToBlurRatioBias = this.#depthToBlurRatioBias();\n const mirror = this.#mirror();\n const mixBlur = this.#mixBlur();\n const mixStrength = this.#mixStrength();\n const mixContrast = this.#mixContrast();\n const distortion = this.#distortion();\n const distortionMap = this.#distortionMap();\n const hasBlur = this.#hasBlur();\n\n const parameters = {\n minFilter: THREE.LinearFilter,\n magFilter: THREE.LinearFilter,\n encoding: gl.outputEncoding,\n type: THREE.HalfFloatType,\n };\n const fbo1 = new THREE.WebGLRenderTarget(resolution, resolution, parameters);\n fbo1.depthBuffer = true;\n fbo1.depthTexture = new THREE.DepthTexture(resolution, resolution);\n fbo1.depthTexture.format = THREE.DepthFormat;\n fbo1.depthTexture.type = THREE.UnsignedShortType;\n\n const fbo2 = new THREE.WebGLRenderTarget(resolution, resolution, parameters);\n const blurPass = new BlurPass({\n gl,\n resolution,\n width: blur[0],\n height: blur[1],\n minDepthThreshold,\n maxDepthThreshold,\n depthScale,\n depthToBlurRatioBias,\n });\n const reflectorProps = {\n mirror,\n textureMatrix: this.#textureMatrix,\n mixBlur,\n tDiffuse: fbo1.texture,\n tDepth: fbo1.depthTexture,\n tDiffuseBlur: fbo2.texture,\n hasBlur,\n mixStrength,\n minDepthThreshold,\n maxDepthThreshold,\n depthScale,\n depthToBlurRatioBias,\n distortion,\n distortionMap,\n mixContrast,\n defines: {\n USE_BLUR: hasBlur ? '' : undefined,\n USE_DEPTH: depthScale > 0 ? '' : undefined,\n USE_DISTORTION: distortionMap ? '' : undefined,\n },\n };\n\n return { fbo1, fbo2, blurPass, reflectorProps };\n });\n\n constructor() {\n super({\n mixBlur: 0,\n mixStrength: 1,\n resolution: 256,\n blur: [0, 0],\n minDepthThreshold: 0.9,\n maxDepthThreshold: 1,\n depthScale: 0,\n depthToBlurRatioBias: 0.25,\n mirror: 0,\n distortion: 1,\n mixContrast: 1,\n reflectorOffset: 0,\n });\n\n injectBeforeRender(this.#onBeforeRender.bind(this));\n }\n\n #onBeforeRender(state: NgtRenderState) {\n if (!this.materialRef.nativeElement) return;\n const parent = getLocalState(this.materialRef.nativeElement).parent();\n if (!parent) return;\n\n const { gl, scene } = state;\n const hasBlur = this.#hasBlur();\n const { fbo1, fbo2, blurPass } = this.#reflectorEntities();\n\n if (fbo1 && fbo2 && blurPass) {\n parent.visible = false;\n const currentXrEnabled = gl.xr.enabled;\n const currentShadowAutoUpdate = gl.shadowMap.autoUpdate;\n this.#beforeRender(state);\n gl.xr.enabled = false;\n gl.shadowMap.autoUpdate = false;\n gl.setRenderTarget(fbo1);\n gl.state.buffers.depth.setMask(true);\n if (!gl.autoClear) gl.clear();\n gl.render(scene, this.#virtualCamera);\n if (hasBlur) blurPass.render(gl, fbo1, fbo2);\n gl.xr.enabled = currentXrEnabled;\n gl.shadowMap.autoUpdate = currentShadowAutoUpdate;\n parent.visible = true;\n gl.setRenderTarget(null);\n }\n }\n\n #beforeRender(state: NgtRenderState) {\n const parent = getLocalState(this.materialRef.nativeElement).parent();\n if (!parent) return;\n\n const { camera } = state;\n\n this.#reflectorWorldPosition.setFromMatrixPosition(parent.matrixWorld);\n this.#cameraWorldPosition.setFromMatrixPosition(camera.matrixWorld);\n this.#rotationMatrix.extractRotation(parent.matrixWorld);\n this.#normal.set(0, 0, 1);\n this.#normal.applyMatrix4(this.#rotationMatrix);\n this.#reflectorWorldPosition.addScaledVector(this.#normal, this.get('reflectorOffset'));\n this.#view.subVectors(this.#reflectorWorldPosition, this.#cameraWorldPosition);\n // Avoid rendering when reflector is facing away\n if (this.#view.dot(this.#normal) > 0) return;\n this.#view.reflect(this.#normal).negate();\n this.#view.add(this.#reflectorWorldPosition);\n this.#rotationMatrix.extractRotation(camera.matrixWorld);\n this.#lookAtPosition.set(0, 0, -1);\n this.#lookAtPosition.applyMatrix4(this.#rotationMatrix);\n this.#lookAtPosition.add(this.#cameraWorldPosition);\n this.#target.subVectors(this.#reflectorWorldPosition, this.#lookAtPosition);\n this.#target.reflect(this.#normal).negate();\n this.#target.add(this.#reflectorWorldPosition);\n this.#virtualCamera.position.copy(this.#view);\n this.#virtualCamera.up.set(0, 1, 0);\n this.#virtualCamera.up.applyMatrix4(this.#rotationMatrix);\n this.#virtualCamera.up.reflect(this.#normal);\n this.#virtualCamera.lookAt(this.#target);\n this.#virtualCamera.far = camera.far; // Used in WebGLBackground\n this.#virtualCamera.updateMatrixWorld();\n this.#virtualCamera.projectionMatrix.copy(camera.projectionMatrix);\n // Update the texture matrix\n this.#textureMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0);\n this.#textureMatrix.multiply(this.#virtualCamera.projectionMatrix);\n this.#textureMatrix.multiply(this.#virtualCamera.matrixWorldInverse);\n this.#textureMatrix.multiply(parent.matrixWorld);\n // Now update projection matrix with new clip plane, implementing code from: http://www.terathon.com/code/oblique.html\n // Paper explaining this technique: http://www.terathon.com/lengyel/Lengyel-Oblique.pdf\n this.#reflectorPlane.setFromNormalAndCoplanarPoint(this.#normal, this.#reflectorWorldPosition);\n this.#reflectorPlane.applyMatrix4(this.#virtualCamera.matrixWorldInverse);\n this.#clipPlane.set(\n this.#reflectorPlane.normal.x,\n this.#reflectorPlane.normal.y,\n this.#reflectorPlane.normal.z,\n this.#reflectorPlane.constant\n );\n const projectionMatrix = this.#virtualCamera.projectionMatrix;\n this.#q.x = (Math.sign(this.#clipPlane.x) + projectionMatrix.elements[8]) / projectionMatrix.elements[0];\n this.#q.y = (Math.sign(this.#clipPlane.y) + projectionMatrix.elements[9]) / projectionMatrix.elements[5];\n this.#q.z = -1.0;\n this.#q.w = (1.0 + projectionMatrix.elements[10]) / projectionMatrix.elements[14];\n // Calculate the scaled plane vector\n this.#clipPlane.multiplyScalar(2.0 / this.#clipPlane.dot(this.#q));\n // Replacing the third row of the projection matrix\n projectionMatrix.elements[2] = this.#clipPlane.x;\n projectionMatrix.elements[6] = this.#clipPlane.y;\n projectionMatrix.elements[10] = this.#clipPlane.z + 1.0;\n projectionMatrix.elements[14] = this.#clipPlane.w;\n }\n}\n","import { NgIf } from '@angular/common';\nimport { Component, computed, CUSTOM_ELEMENTS_SCHEMA, effect, inject, Input } from '@angular/core';\nimport { extend, getLocalState, injectBeforeRender, injectNgtRef, NgtSignalStore, NgtStore } from 'angular-three';\nimport { MeshRefractionMaterial } from 'angular-three-soba/shaders';\nimport { MeshBVH, SAH } from 'three-mesh-bvh';\n\nextend({ MeshRefractionMaterial });\n\nexport interface NgtsMeshRefractionMaterialState {\n /** Environment map */\n envMap: THREE.CubeTexture | THREE.Texture;\n /** Number of ray-cast bounces, it can be expensive to have too many, 2 */\n bounces: number;\n /** Refraction index, 2.4 */\n ior: number;\n /** Fresnel (strip light), 0 */\n fresnel: number;\n /** RGB shift intensity, can be expensive, 0 */\n aberrationStrength: number;\n /** Color, white */\n color: THREE.ColorRepresentation;\n /** If this is on it uses fewer ray casts for the RGB shift sacrificing physical accuracy, true */\n fastChroma: boolean;\n}\n\nconst isCubeTexture = (def: THREE.CubeTexture | THREE.Texture): def is THREE.CubeTexture =>\n def && (def as THREE.CubeTexture).isCubeTexture;\n\n@Component({\n selector: 'ngts-mesh-refraction-material',\n standalone: true,\n template: `\n <ngt-mesh-refraction-material\n *ngIf=\"defines() as defines\"\n [ref]=\"materialRef\"\n [defines]=\"defines\"\n [resolution]=\"resolution()\"\n [aberrationStrength]=\"refractionAberrationStrength()\"\n [envMap]=\"refractionEnvMap()\"\n [bounces]=\"refractionBounces()\"\n [ior]=\"refractionIor()\"\n [fresnel]=\"refractionFresnel()\"\n [color]=\"refractionColor()\"\n [fastChroma]=\"refractionFastChroma()\"\n ngtCompound\n attach=\"material\"\n >\n <ng-content />\n </ngt-mesh-refraction-material>\n `,\n imports: [NgIf],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshRefractionMaterial extends NgtSignalStore<NgtsMeshRefractionMaterialState> {\n @Input() materialRef = injectNgtRef<InstanceType<typeof MeshRefractionMaterial>>();\n /** Environment map */\n @Input({ required: true }) set envMap(envMap: THREE.CubeTexture | THREE.Texture) {\n this.set({ envMap });\n }\n /** Number of ray-cast bounces, it can be expensive to have too many, 2 */\n @Input() set bounces(bounces: number) {\n this.set({ bounces });\n }\n /** Refraction index, 2.4 */\n @Input() set ior(ior: number) {\n this.set({ ior });\n }\n /** Fresnel (strip light), 0 */\n @Input() set fresnel(fresnel: number) {\n this.set({ fresnel });\n }\n /** RGB shift intensity, can be expensive, 0 */\n @Input() set aberrationStrength(aberrationStrength: number) {\n this.set({ aberrationStrength });\n }\n /** Color, white */\n @Input() set color(color: THREE.ColorRepresentation) {\n this.set({ color });\n }\n /** If this is on it uses fewer ray casts for the RGB shift sacrificing physical accuracy, true */\n @Input() set fastChroma(fastChroma: boolean) {\n this.set({ fastChroma });\n }\n\n readonly refractionEnvMap = this.select('envMap');\n readonly refractionBounces = this.select('bounces');\n readonly refractionIor = this.select('ior');\n readonly refractionFresnel = this.select('fresnel');\n readonly refractionAberrationStrength = this.select('aberrationStrength');\n readonly refractionColor = this.select('color');\n readonly refractionFastChroma = this.select('fastChroma');\n\n readonly #store = inject(NgtStore);\n readonly #size = this.#store.select('size');\n\n readonly #envMap = this.select('envMap');\n\n readonly defines = computed(() => {\n const envMap = this.#envMap();\n if (!envMap) return null;\n\n const aberrationStrength = this.refractionAberrationStrength();\n const fastChroma = this.refractionFastChroma();\n\n const temp = {} as { [key: string]: string };\n // Sampler2D and SamplerCube need different defines\n const isCubeMap = isCubeTexture(envMap);\n const w = (isCubeMap ? envMap.image[0]?.width : envMap.image.width) ?? 1024;\n const cubeSize = w / 4;\n const _lodMax = Math.floor(Math.log2(cubeSize));\n const _cubeSize = Math.pow(2, _lodMax);\n const width = 3 * Math.max(_cubeSize, 16 * 7);\n const height = 4 * _cubeSize;\n if (isCubeMap) temp['ENVMAP_TYPE_CUBEM'] = '';\n temp['CUBEUV_TEXEL_WIDTH'] = `${1.0 / width}`;\n temp['CUBEUV_TEXEL_HEIGHT'] = `${1.0 / height}`;\n temp['CUBEUV_MAX_MIP'] = `${_lodMax}.0`;\n // Add defines from chromatic aberration\n if (aberrationStrength > 0) temp['CHROMATIC_ABERRATIONS'] = '';\n if (fastChroma) temp['FAST_CHROMA'] = '';\n return temp;\n });\n readonly resolution = computed(() => [this.#size().width, this.#size().height]);\n\n constructor() {\n super({ aberrationStrength: 0, fastChroma: true });\n injectBeforeRender(({ camera }) => {\n if (this.materialRef.nativeElement) {\n (this.materialRef.nativeElement as any)!.viewMatrixInverse = camera.matrixWorld;\n (this.materialRef.nativeElement as any)!.projectionMatrixInverse = camera.projectionMatrixInverse;\n }\n });\n this.#setupGeometry();\n }\n\n #setupGeometry() {\n effect(() => {\n const material = this.materialRef.nativeElement;\n if (!material) return;\n const geometry = getLocalState(material).parent()?.geometry;\n if (geometry) {\n (material as any).bvh.updateFrom(\n new MeshBVH(geometry.toNonIndexed(), { lazyGeneration: false, strategy: SAH } as any)\n );\n }\n });\n }\n}\n","import { Component, computed, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\nimport {\n extend,\n getLocalState,\n injectBeforeRender,\n injectNgtRef,\n NgtAnyRecord,\n NgtArgs,\n NgtSignalStore,\n} from 'angular-three';\nimport { injectNgtsFBO } from 'angular-three-soba/misc';\nimport { DiscardMaterial, MeshTransmissionMaterial } from 'angular-three-soba/shaders';\nimport * as THREE from 'three';\n\nextend({ MeshTransmissionMaterial });\n\nexport interface NgtsMeshTranmissionMaterialState {\n /** transmissionSampler, you can use the threejs transmission sampler texture that is\n * generated once for all transmissive materials. The upside is that it can be faster if you\n * use multiple MeshPhysical and Transmission materials, the downside is that transmissive materials\n * using this can't see other transparent or transmissive objects, default: false */\n transmissionSampler: boolean;\n /** Render the backside of the material (more cost, better results), default: false */\n backside: boolean;\n /** Backside thickness (when backside is true), default: 0 */\n backsideThickness: number;\n /** Resolution of the local buffer, default: undefined (fullscreen) */\n resolution: number;\n /** Resolution of the local buffer for backfaces, default: undefined (fullscreen) */\n backsideResolution: number;\n /** Refraction samples, default: 10 */\n samples: number;\n /** Buffer scene background (can be a texture, a cubetexture or a color), default: null */\n background: THREE.Texture | THREE.Color;\n /* Transmission, default: 1 */\n transmission: number;\n /* Thickness (refraction), default: 0 */\n thickness: number;\n /* Roughness (blur), default: 0 */\n roughness: number;\n /* Chromatic aberration, default: 0.03 */\n chromaticAberration: number;\n /* Anisotropy, default: 0.1 */\n anisotropy: number;\n /* Distortion, default: 0 */\n distortion: number;\n /* Distortion scale, default: 0.5 */\n distortionScale: number;\n /* Temporal distortion (speed of movement), default: 0.0 */\n temporalDistortion: number;\n /** The scene rendered into a texture (use it to share a texture between materials), default: null */\n buffer: THREE.Texture | null;\n /** Internals */\n time: number;\n}\n\n@Component({\n selector: 'ngts-mesh-transmission-material',\n standalone: true,\n template: `\n <ngt-mesh-transmission-material\n ngtCompound\n *args=\"[transmissionSamples(), transmissionTransmissionSampler()]\"\n [ref]=\"materialRef\"\n [buffer]=\"transmissionBuffer() || fboMainRef()?.texture\"\n [_transmission]=\"transmissionTransmission()\"\n [transmission]=\"transmissionTransmissionSampler() ? transmissionTransmission() : 0\"\n [thickness]=\"transmissionThickness()\"\n [side]=\"side\"\n [anisotropy]=\"transmissionAnisotropy()\"\n [roughness]=\"transmissionRoughness()\"\n [chromaticAberration]=\"transmissionChromaticAberration()\"\n [distortion]=\"transmissionDistortion()\"\n [distortionScale]=\"transmissionDistortionScale()\"\n [temporalDistortion]=\"transmissionTemporalDistortion()\"\n [time]=\"transmissionTime()\"\n />\n `,\n imports: [NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshTranmissionMaterial extends NgtSignalStore<NgtsMeshTranmissionMaterialState> {\n @Input() materialRef = injectNgtRef<MeshTransmissionMaterial & { time: number; buffer?: THREE.Texture }>();\n /** transmissionSampler, you can use the threejs transmission sampler texture that is\n * generated once for all transmissive materials. The upside is that it can be faster if you\n * use multiple MeshPhysical and Transmission materials, the downside is that transmissive materials\n * using this can't see other transparent or transmissive objects, default: false */\n @Input() set transmissionSampler(transmissionSampler: boolean) {\n this.set({ transmissionSampler });\n }\n /** Render the backside of the material (more cost, better results), default: false */\n @Input() set backside(backside: boolean) {\n this.set({ backside });\n }\n /** Backside thickness (when backside is true), default: 0 */\n @Input() set backsideThickness(backsideThickness: number) {\n this.set({ backsideThickness });\n }\n /** Resolution of the local buffer, default: undefined (fullscreen) */\n @Input() set resolution(resolution: number) {\n this.set({ resolution });\n }\n /** Resolution of the local buffer for backfaces, default: undefined (fullscreen) */\n @Input() set backsideResolution(backsideResolution: number) {\n this.set({ backsideResolution });\n }\n /** Refraction samples, default: 10 */\n @Input() set samples(samples: number) {\n this.set({ samples });\n }\n /** Buffer scene background (can be a texture, a cubetexture or a color), default: null */\n @Input() set background(background: THREE.Texture | THREE.Color) {\n this.set({ background });\n }\n /* Transmission, default: 1 */\n @Input() set transmission(transmission: number) {\n this.set({ transmission });\n }\n /* Thickness (refraction), default: 0 */\n @Input() set thickness(thickness: number) {\n this.set({ thickness });\n }\n /* Roughness (blur), default: 0 */\n @Input() set roughness(roughness: number) {\n this.set({ roughness });\n }\n /* Chromatic aberration, default: 0.03 */\n @Input() set chromaticAberration(chromaticAberration: number) {\n this.set({ chromaticAberration });\n }\n /* Anisotropy, default: 0.1 */\n @Input() set anisotropy(anisotropy: number) {\n this.set({ anisotropy });\n }\n /* Distortion, default: 0 */\n @Input() set distortion(distortion: number) {\n this.set({ distortion });\n }\n /* Distortion scale, default: 0.5 */\n @Input() set distortionScale(distortionScale: number) {\n this.set({ distortionScale });\n }\n /* Temporal distortion (speed of movement), default: 0.0 */\n @Input() set temporalDistortion(temporalDistortion: number) {\n this.set({ temporalDistortion });\n }\n /** The scene rendered into a texture (use it to share a texture between materials), default: null */\n @Input() set buffer(buffer: THREE.Texture) {\n this.set({ buffer });\n }\n /** Internals */\n @Input() set time(time: number) {\n this.set({ time });\n }\n\n readonly transmissionTransmissionSampler = this.select('transmissionSampler');\n readonly transmissionBackside = this.select('backside');\n readonly transmissionTransmission = this.select('transmission');\n readonly transmissionThickness = this.select('thickness');\n readonly transmissionBacksideThickness = this.select('backsideThickness');\n readonly transmissionSamples = this.select('samples');\n readonly transmissionRoughness = this.select('roughness');\n readonly transmissionAnisotropy = this.select('anisotropy');\n readonly transmissionChromaticAberration = this.select('chromaticAberration');\n readonly transmissionDistortion = this.select('distortion');\n readonly transmissionDistortionScale = this.select('distortionScale');\n readonly transmissionTemporalDistortion = this.select('temporalDistortion');\n readonly transmissionBuffer = this.select('buffer');\n readonly transmissionTime = this.select('time');\n\n readonly #discardMaterial = new DiscardMaterial();\n\n readonly #backsideResolution = this.select('backsideResolution');\n readonly #resolution = this.select('resolution');\n\n readonly #fboBackSettings = computed(() => ({ width: this.#backsideResolution() || this.#resolution() }));\n readonly #fboMainSettings = computed(() => ({ width: this.#resolution() }));\n\n readonly fboBackRef = injectNgtsFBO(this.#fboBackSettings);\n readonly fboMainRef = injectNgtsFBO(this.#fboMainSettings);\n\n readonly side = THREE.FrontSide;\n\n constructor() {\n super({\n transmissionSampler: false,\n backside: false,\n transmission: 1,\n thickness: 0,\n backsideThickness: 0,\n samples: 10,\n roughness: 0,\n anisotropy: 0.1,\n chromaticAberration: 0.03,\n distortion: 0,\n distortionScale: 0.5,\n temporalDistortion: 0.0,\n buffer: null,\n });\n let oldBg: THREE.Scene['background'];\n let oldTone: THREE.WebGLRenderer['toneMapping'];\n let parent: THREE.Object3D;\n\n injectBeforeRender((state) => {\n if (!this.materialRef.nativeElement) return;\n\n const { transmissionSampler, background, backside, backsideThickness, thickness } = this.get();\n\n this.materialRef.nativeElement.time = state.clock.getElapsedTime();\n // Render only if the buffer matches the built-in and no transmission sampler is set\n if (this.materialRef.nativeElement.buffer === this.fboMainRef().texture && !transmissionSampler) {\n parent = getLocalState(this.materialRef.nativeElement).parent() as THREE.Object3D;\n if (parent) {\n // Save defaults\n oldTone = state.gl.toneMapping;\n oldBg = state.scene.background;\n\n // Switch off tonemapping lest it double tone maps\n // Save the current background and set the HDR as the new BG\n // Use discardmaterial, the parent will be invisible, but it's shadows will still be cast\n state.gl.toneMapping = THREE.NoToneMapping;\n if (background) state.scene.background = background;\n (parent as NgtAnyRecord)['material'] = this.#discardMaterial;\n\n if (backside) {\n // Render into the backside buffer\n state.gl.setRenderTarget(this.fboBackRef());\n state.gl.render(state.scene, state.camera);\n // And now prepare the material for the main render using the backside buffer\n (parent as NgtAnyRecord)['material'] = this.materialRef.nativeElement;\n (parent as NgtAnyRecord)['material'].buffer = this.fboBackRef().texture;\n (parent as NgtAnyRecord)['material'].thickness = backsideThickness;\n (parent as NgtAnyRecord)['material'].side = THREE.BackSide;\n }\n\n // Render into the main buffer\n state.gl.setRenderTarget(this.fboMainRef());\n state.gl.render(state.scene, state.camera);\n\n (parent as NgtAnyRecord)['material'].thickness = thickness;\n (parent as NgtAnyRecord)['material'].side = this.side;\n (parent as NgtAnyRecord)['material'].buffer = this.fboMainRef().texture;\n\n // Set old state back\n state.scene.background = oldBg;\n state.gl.setRenderTarget(null);\n (parent as NgtAnyRecord)['material'] = this.materialRef.nativeElement;\n state.gl.toneMapping = oldTone;\n }\n }\n });\n }\n}\n","import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\nimport { extend, injectBeforeRender, injectNgtRef, NgtArgs, NgtSignalStore } from 'angular-three';\nimport { MeshWobbleMaterial } from 'angular-three-soba/shaders';\n\nextend({ MeshWobbleMaterial });\n\nexport interface NgtsMeshWobbleMaterialState {\n time: number;\n factor: number;\n speed: number;\n}\n\n@Component({\n selector: 'ngts-mesh-wobble-material',\n standalone: true,\n template: `\n <ngt-primitive\n *args=\"[material]\"\n [ref]=\"materialRef\"\n [time]=\"wobbleTime()\"\n [factor]=\"wobbleFactor()\"\n attach=\"material\"\n ngtCompound\n />\n `,\n imports: [NgtArgs],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsMeshWobbleMaterial extends NgtSignalStore<NgtsMeshWobbleMaterialState> {\n readonly material = new MeshWobbleMaterial();\n\n @Input() materialRef = injectNgtRef<MeshWobbleMaterial>();\n\n @Input() set time(time: number) {\n this.set({ time });\n }\n\n @Input() set factor(factor: number) {\n this.set({ factor });\n }\n\n @Input() set speed(speed: number) {\n this.set({ speed });\n }\n\n readonly wobbleTime = this.select('time');\n readonly wobbleFactor = this.select('factor');\n\n constructor() {\n super({ speed: 1, time: 0, factor: 1 });\n injectBeforeRender(({ clock }) => {\n this.material.time = clock.getElapsedTime() * this.get('speed');\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAWA,MAiBa,uBAAwB,SAAQ,cAA4C,CAAA;IAKrF,IAAa,IAAI,CAAC,IAAY,EAAA;AAC1B,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;KACtB;IAED,IAAa,OAAO,CAAC,OAAe,EAAA;AAChC,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACzB;IAED,IAAa,MAAM,CAAC,MAAc,EAAA;AAC9B,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;KACxB;IAED,IAAa,KAAK,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;KACvB;AAMD,IAAA,WAAA,GAAA;AACI,Q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;;;"}
@@ -1,147 +1,164 @@
1
- import { injectNgtRef, injectNgtDestroy, injectBeforeRender, NgtRxStore, NgtStore, safeDetectChanges } from 'angular-three';
2
- import { takeUntil, switchMap, map, isObservable, of, combineLatest } from 'rxjs';
3
- import * as THREE from 'three';
4
1
  import * as i0 from '@angular/core';
5
- import { inject, Directive } from '@angular/core';
2
+ import { runInInjectionContext, inject, DestroyRef, effect, Directive, ChangeDetectorRef, signal, computed, untracked } from '@angular/core';
3
+ import { assertInjectionContext, injectNgtRef, injectBeforeRender, NgtStore, safeDetectChanges } from 'angular-three';
4
+ import * as THREE from 'three';
6
5
 
7
- function injectNgtsAnimations(animations$, ref) {
8
- let actualRef = injectNgtRef();
9
- if (ref) {
10
- if (ref instanceof THREE.Object3D) {
11
- actualRef.nativeElement = ref;
12
- }
13
- else {
14
- actualRef = ref;
15
- }
16
- }
17
- const mixer = new THREE.AnimationMixer(null);
18
- const actions = {};
19
- let cached = {};
20
- const clips = [];
21
- const names = [];
22
- const { destroy$ } = injectNgtDestroy(() => {
23
- // clear cached
24
- cached = {};
25
- // uncache actions
26
- Object.values(actions).forEach((action) => {
27
- if (actualRef.nativeElement) {
28
- mixer.uncacheAction(action, actualRef.nativeElement);
6
+ function injectNgtsAnimations(animationsFactory, { ref, injector }) {
7
+ injector = assertInjectionContext(injectNgtsAnimations, injector);
8
+ return runInInjectionContext(injector, () => {
9
+ let actualRef = injectNgtRef();
10
+ if (ref) {
11
+ if (ref instanceof THREE.Object3D) {
12
+ actualRef.nativeElement = ref;
29
13
  }
30
- });
31
- // stop all actions
32
- mixer.stopAllAction();
33
- });
34
- injectBeforeRender(({ delta }) => mixer.update(delta));
35
- actualRef.$.pipe(takeUntil(destroy$))
36
- .pipe(switchMap((object) => animations$.pipe(map((animations) => [object, animations]))))
37
- .subscribe(([object, animations]) => {
38
- for (let i = 0; i < animations.length; i++) {
39
- const clip = animations[i];
40
- names.push(clip.name);
41
- clips.push(clip);
42
- Object.defineProperty(actions, clip.name, {
43
- enumerable: true,
44
- get: () => {
45
- return cached[clip.name] || (cached[clip.name] = mixer.clipAction(clip, object));
46
- },
47
- });
48
- if (i === 0) {
49
- actions[clip.name].play();
14
+ else {
15
+ actualRef = ref;
50
16
  }
51
17
  }
18
+ const mixer = new THREE.AnimationMixer(null);
19
+ const actions = {};
20
+ let cached = {};
21
+ const clips = [];
22
+ const names = [];
23
+ inject(DestroyRef).onDestroy(() => {
24
+ // clear cached
25
+ cached = {};
26
+ // uncache actions
27
+ Object.values(actions).forEach((action) => {
28
+ mixer.uncacheAction(action, actualRef.untracked);
29
+ });
30
+ // stop all actions
31
+ mixer.stopAllAction();
32
+ });
33
+ injectBeforeRender(({ delta }) => mixer.update(delta));
34
+ requestAnimationFrame(() => {
35
+ effect(() => {
36
+ const actual = actualRef.nativeElement;
37
+ const animations = animationsFactory();
38
+ for (let i = 0; i < animations.length; i++) {
39
+ const clip = animations[i];
40
+ names.push(clip.name);
41
+ clips.push(clip);
42
+ Object.defineProperty(actions, clip.name, {
43
+ enumerable: true,
44
+ get: () => {
45
+ return cached[clip.name] || (cached[clip.name] = mixer.clipAction(clip, actual));
46
+ },
47
+ });
48
+ if (i === 0) {
49
+ actions[clip.name].play();
50
+ }
51
+ }
52
+ }, { injector });
53
+ });
54
+ return { ref: actualRef, actions, mixer, names, clips };
52
55
  });
53
- return { ref: actualRef, actions, mixer, names, clips };
54
56
  }
55
57
 
56
- class NgtsBakeShadows extends NgtRxStore {
58
+ class NgtsBakeShadows {
57
59
  constructor() {
58
- super(...arguments);
59
- this.store = inject(NgtStore);
60
- }
61
- ngOnInit() {
62
- this.effect(this.store.select('gl'), (gl) => {
63
- gl.shadowMap.autoUpdate = false;
64
- gl.shadowMap.needsUpdate = true;
65
- return () => {
66
- gl.shadowMap.autoUpdate = gl.shadowMap.needsUpdate = true;
67
- };
60
+ const store = inject(NgtStore);
61
+ const gl = store.select('gl');
62
+ effect((onCleanup) => {
63
+ gl().shadowMap.autoUpdate = false;
64
+ gl().shadowMap.needsUpdate = true;
65
+ onCleanup(() => {
66
+ gl().shadowMap.autoUpdate = gl().shadowMap.needsUpdate = true;
67
+ });
68
68
  });
69
69
  }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsBakeShadows, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
71
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: NgtsBakeShadows, isStandalone: true, selector: "ngts-bake-shadows", usesInheritance: true, ngImport: i0 }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsBakeShadows, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
71
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: NgtsBakeShadows, isStandalone: true, selector: "ngts-bake-shadows", ngImport: i0 }); }
72
72
  }
73
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsBakeShadows, decorators: [{
74
74
  type: Directive,
75
75
  args: [{ selector: 'ngts-bake-shadows', standalone: true }]
76
- }] });
76
+ }], ctorParameters: function () { return []; } });
77
77
 
78
- function injectNgtsFBO(paramsFactory) {
79
- const store = inject(NgtStore);
80
- const targetRef = injectNgtRef();
81
- const { destroy$, cdr } = injectNgtDestroy(() => {
82
- targetRef.nativeElement?.dispose();
83
- });
84
- const params = paramsFactory({});
85
- const params$ = isObservable(params) ? params : of(params);
86
- params$.pipe(takeUntil(destroy$)).subscribe(({ width, height, settings }) => {
87
- const { gl, size, viewport } = store.get();
88
- const _width = typeof width === 'number' ? width : size.width * viewport.dpr;
89
- const _height = typeof height === 'number' ? height : size.height * viewport.dpr;
90
- const _settings = (typeof width === 'number' ? settings : width) || {};
91
- const { samples = 0, depth, ...targetSettings } = _settings;
92
- if (!targetRef.nativeElement) {
93
- const target = new THREE.WebGLRenderTarget(_width, _height, {
94
- minFilter: THREE.LinearFilter,
95
- magFilter: THREE.LinearFilter,
96
- encoding: gl.outputEncoding,
97
- type: THREE.HalfFloatType,
98
- ...targetSettings,
78
+ function injectNgtsFBO(fboParams, { injector } = {}) {
79
+ injector = assertInjectionContext(injectNgtsFBO, injector);
80
+ return runInInjectionContext(injector, () => {
81
+ const store = inject(NgtStore);
82
+ const cdr = inject(ChangeDetectorRef);
83
+ const targetRef = signal(null);
84
+ inject(DestroyRef).onDestroy(() => targetRef().dispose());
85
+ requestAnimationFrame(() => {
86
+ const size = store.select('size');
87
+ const dpr = store.select('viewport', 'dpr');
88
+ const trigger = computed(() => {
89
+ const { width, height, settings } = fboParams();
90
+ const _width = typeof width === 'number' ? width : size().width * dpr();
91
+ const _height = typeof height === 'number' ? height : size().height * dpr();
92
+ const _settings = (typeof width === 'number' ? settings : width) || {};
93
+ return { width: _width, height: _height, settings: _settings };
99
94
  });
100
- if (depth)
101
- target.depthTexture = new THREE.DepthTexture(_width, _height, THREE.FloatType);
102
- target.samples = samples;
103
- targetRef.nativeElement = target;
104
- }
105
- targetRef.nativeElement.setSize(_width, _height);
106
- if (samples)
107
- targetRef.nativeElement.samples = samples;
108
- safeDetectChanges(cdr);
95
+ effect(() => {
96
+ const { width, height, settings } = trigger();
97
+ const { samples = 0, depth, ...targetSettings } = settings;
98
+ let untrackedTarget = untracked(targetRef);
99
+ if (!untrackedTarget) {
100
+ const target = new THREE.WebGLRenderTarget(width, height, {
101
+ minFilter: THREE.LinearFilter,
102
+ magFilter: THREE.LinearFilter,
103
+ type: THREE.HalfFloatType,
104
+ ...targetSettings,
105
+ });
106
+ if (depth)
107
+ target.depthTexture = new THREE.DepthTexture(width, height, THREE.FloatType);
108
+ target.samples = samples;
109
+ targetRef.set(target);
110
+ untrackedTarget = untracked(targetRef);
111
+ }
112
+ untrackedTarget.setSize(width, height);
113
+ if (samples)
114
+ untrackedTarget.samples = samples;
115
+ safeDetectChanges(cdr);
116
+ }, { allowSignalWrites: true, injector });
117
+ });
118
+ return targetRef.asReadonly();
109
119
  });
110
- return targetRef;
111
120
  }
112
121
 
113
- function injectNgtsDepthBuffer(paramsFactory = (params) => params) {
114
- const depthBufferRef = injectNgtRef();
115
- const store = inject(NgtStore);
116
- const { destroy$ } = injectNgtDestroy();
117
- const params = paramsFactory({ size: 256, frames: Infinity });
118
- const params$ = isObservable(params) ? params : of(params);
119
- let rawParams = { size: 256, frames: Infinity };
120
- const fbo = injectNgtsFBO(() => {
121
- return combineLatest([params$, store.select('size'), store.select('viewport', 'dpr')]).pipe(map(([params, size, dpr]) => {
122
- rawParams = params;
123
- const w = params.size || size.width * dpr;
124
- const h = params.size || size.height * dpr;
125
- const depthTexture = new THREE.DepthTexture(w, h);
126
- depthTexture.format = THREE.DepthFormat;
127
- depthTexture.type = THREE.UnsignedShortType;
128
- const depthConfig = { depthTexture };
129
- return { width: w, height: h, settings: depthConfig };
130
- }));
131
- });
132
- let count = 0;
133
- injectBeforeRender(({ gl, scene, camera }) => {
134
- if ((rawParams.frames === Infinity || count < rawParams.frames) && fbo.nativeElement) {
135
- gl.setRenderTarget(fbo.nativeElement);
136
- gl.render(scene, camera);
137
- gl.setRenderTarget(null);
138
- count++;
139
- }
140
- });
141
- fbo.$.pipe(takeUntil(destroy$)).subscribe((fbo) => {
142
- depthBufferRef.nativeElement = fbo.depthTexture;
122
+ function injectNgtsDepthBuffer(paramsFactory = () => ({}), { injector } = {}) {
123
+ injector = assertInjectionContext(injectNgtsDepthBuffer, injector);
124
+ return runInInjectionContext(injector, () => {
125
+ const depthBufferRef = signal(null);
126
+ const store = inject(NgtStore);
127
+ const cdr = inject(ChangeDetectorRef);
128
+ const size = store.select('size');
129
+ const dpr = store.select('viewport', 'dpr');
130
+ requestAnimationFrame(() => {
131
+ const fboParams = computed(() => {
132
+ const params = { size: 256, frames: Infinity, ...paramsFactory() };
133
+ const width = params.size || size().width * dpr();
134
+ const height = params.size || size().height * dpr();
135
+ const depthTexture = new THREE.DepthTexture(width, height);
136
+ depthTexture.format = THREE.DepthFormat;
137
+ depthTexture.type = THREE.UnsignedShortType;
138
+ return { width, height, settings: { depthTexture } };
139
+ });
140
+ const fboRef = injectNgtsFBO(fboParams, { injector });
141
+ effect(() => {
142
+ const fbo = fboRef();
143
+ if (fbo) {
144
+ depthBufferRef.set(fbo.depthTexture);
145
+ safeDetectChanges(cdr);
146
+ }
147
+ }, { allowSignalWrites: true, injector });
148
+ let count = 0;
149
+ injectBeforeRender(({ gl, scene, camera }) => {
150
+ const params = { size: 256, frames: Infinity, ...paramsFactory() };
151
+ const fbo = untracked(fboRef);
152
+ if ((params.frames === Infinity || count < params.frames) && fbo) {
153
+ gl.setRenderTarget(fbo);
154
+ gl.render(scene, camera);
155
+ gl.setRenderTarget(null);
156
+ count++;
157
+ }
158
+ }, { injector });
159
+ });
160
+ return depthBufferRef.asReadonly();
143
161
  });
144
- return depthBufferRef;
145
162
  }
146
163
 
147
164
  /**