angular-three-soba 2.0.0-beta.8 → 2.0.0

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 (423) hide show
  1. package/README.md +62 -4
  2. package/abstractions/README.md +279 -2
  3. package/abstractions/index.d.ts +13 -6
  4. package/abstractions/lib/billboard.d.ts +19 -0
  5. package/abstractions/lib/catmull-rom-line.d.ts +617 -0
  6. package/abstractions/lib/cubic-bezier-line.d.ts +19 -0
  7. package/abstractions/lib/edges.d.ts +800 -0
  8. package/abstractions/lib/gradient-texture.d.ts +24 -0
  9. package/abstractions/lib/grid.d.ts +315 -0
  10. package/abstractions/lib/helper.d.ts +25 -0
  11. package/abstractions/lib/line.d.ts +41 -0
  12. package/abstractions/lib/prism-geometry.d.ts +32 -0
  13. package/abstractions/lib/quadratic-bezier-line.d.ts +21 -0
  14. package/abstractions/lib/rounded-box.d.ts +41 -0
  15. package/abstractions/lib/text-3d.d.ts +314 -0
  16. package/abstractions/lib/text.d.ts +54 -0
  17. package/cameras/README.md +91 -2
  18. package/cameras/index.d.ts +4 -4
  19. package/cameras/lib/camera-content.d.ts +10 -0
  20. package/cameras/lib/cube-camera.d.ts +38 -0
  21. package/cameras/lib/orthographic-camera.d.ts +40 -0
  22. package/cameras/lib/perspective-camera.d.ts +36 -0
  23. package/controls/README.md +96 -2
  24. package/controls/index.d.ts +4 -1
  25. package/controls/lib/camera-controls.d.ts +31 -0
  26. package/controls/lib/orbit-controls.d.ts +38 -0
  27. package/controls/lib/pivot-controls/axis-arrow.d.ts +31 -0
  28. package/controls/lib/pivot-controls/axis-rotator.d.ts +30 -0
  29. package/controls/lib/pivot-controls/pivot-controls.d.ts +110 -0
  30. package/controls/lib/pivot-controls/plane-slider.d.ts +32 -0
  31. package/controls/lib/pivot-controls/scaling-sphere.d.ts +32 -0
  32. package/controls/lib/scroll-controls.d.ts +78 -0
  33. package/esm2022/abstractions/index.mjs +14 -7
  34. package/esm2022/abstractions/lib/billboard.mjs +69 -0
  35. package/esm2022/abstractions/lib/catmull-rom-line.mjs +76 -0
  36. package/esm2022/abstractions/lib/cubic-bezier-line.mjs +51 -0
  37. package/esm2022/abstractions/lib/edges.mjs +70 -0
  38. package/esm2022/abstractions/lib/gradient-texture.mjs +91 -0
  39. package/esm2022/abstractions/lib/grid.mjs +103 -0
  40. package/esm2022/abstractions/lib/helper.mjs +76 -0
  41. package/esm2022/abstractions/lib/line.mjs +126 -0
  42. package/esm2022/abstractions/lib/prism-geometry.mjs +46 -0
  43. package/esm2022/abstractions/lib/quadratic-bezier-line.mjs +73 -0
  44. package/esm2022/abstractions/lib/rounded-box.mjs +111 -0
  45. package/esm2022/abstractions/lib/text-3d.mjs +98 -0
  46. package/esm2022/abstractions/lib/text.mjs +91 -0
  47. package/esm2022/cameras/index.mjs +5 -5
  48. package/esm2022/cameras/lib/camera-content.mjs +14 -0
  49. package/esm2022/cameras/lib/cube-camera.mjs +111 -0
  50. package/esm2022/cameras/lib/orthographic-camera.mjs +131 -0
  51. package/esm2022/cameras/lib/perspective-camera.mjs +104 -0
  52. package/esm2022/controls/index.mjs +5 -2
  53. package/esm2022/controls/lib/camera-controls.mjs +127 -0
  54. package/esm2022/controls/lib/orbit-controls.mjs +132 -0
  55. package/esm2022/controls/lib/pivot-controls/axis-arrow.mjs +263 -0
  56. package/esm2022/controls/lib/pivot-controls/axis-rotator.mjs +264 -0
  57. package/esm2022/controls/lib/pivot-controls/pivot-controls.mjs +340 -0
  58. package/esm2022/controls/lib/pivot-controls/plane-slider.mjs +266 -0
  59. package/esm2022/controls/lib/pivot-controls/scaling-sphere.mjs +232 -0
  60. package/esm2022/controls/lib/scroll-controls.mjs +268 -0
  61. package/esm2022/loaders/index.mjs +6 -5
  62. package/esm2022/loaders/lib/font-loader.mjs +49 -0
  63. package/esm2022/loaders/lib/gltf-loader.mjs +51 -0
  64. package/esm2022/loaders/lib/loader.mjs +109 -0
  65. package/esm2022/loaders/lib/progress.mjs +51 -0
  66. package/esm2022/loaders/lib/texture-loader.mjs +32 -0
  67. package/esm2022/materials/index.mjs +8 -7
  68. package/esm2022/materials/lib/custom-shader-material.mjs +71 -0
  69. package/esm2022/materials/lib/mesh-distort-material.mjs +42 -0
  70. package/esm2022/materials/lib/mesh-reflector-material.mjs +278 -0
  71. package/esm2022/materials/lib/mesh-refraction-material.mjs +144 -0
  72. package/esm2022/materials/lib/mesh-transmission-material.mjs +188 -0
  73. package/esm2022/materials/lib/mesh-wobble-material.mjs +42 -0
  74. package/esm2022/materials/lib/point-material.mjs +33 -0
  75. package/esm2022/misc/index.mjs +14 -14
  76. package/esm2022/misc/lib/animations.mjs +71 -0
  77. package/esm2022/misc/lib/bake-shadows.mjs +26 -0
  78. package/esm2022/misc/lib/computed-attribute.mjs +55 -0
  79. package/esm2022/misc/lib/constants.mjs +5 -0
  80. package/esm2022/misc/lib/decal.mjs +139 -0
  81. package/esm2022/misc/lib/deprecated.mjs +15 -0
  82. package/esm2022/misc/lib/depth-buffer.mjs +39 -0
  83. package/esm2022/misc/lib/fbo.mjs +86 -0
  84. package/esm2022/misc/lib/html/html-content.mjs +327 -0
  85. package/esm2022/misc/lib/html/html.mjs +129 -0
  86. package/esm2022/misc/lib/html/utils.mjs +74 -0
  87. package/esm2022/misc/lib/intersect.mjs +52 -0
  88. package/esm2022/misc/lib/sampler.mjs +122 -0
  89. package/esm2022/misc/lib/scale-factor.mjs +29 -0
  90. package/esm2022/performances/index.mjs +7 -6
  91. package/esm2022/performances/lib/adaptive-dpr.mjs +52 -0
  92. package/esm2022/performances/lib/adaptive-events.mjs +28 -0
  93. package/esm2022/performances/lib/detailed.mjs +57 -0
  94. package/esm2022/performances/lib/instances/instances.mjs +183 -0
  95. package/esm2022/performances/lib/instances/position-mesh.mjs +51 -0
  96. package/esm2022/performances/lib/points/points.mjs +278 -0
  97. package/esm2022/performances/lib/points/position-point.mjs +53 -0
  98. package/esm2022/performances/lib/segments/segment-object.mjs +9 -0
  99. package/esm2022/performances/lib/segments/segments.mjs +129 -0
  100. package/esm2022/shaders/index.mjs +4 -18
  101. package/esm2022/shaders/lib/grid-material.mjs +81 -0
  102. package/esm2022/shaders/lib/mesh-refraction-material.mjs +163 -0
  103. package/esm2022/shaders/lib/point-material.mjs +24 -0
  104. package/esm2022/staging/index.mjs +19 -22
  105. package/esm2022/staging/lib/accumulative-shadows.mjs +182 -0
  106. package/esm2022/staging/lib/backdrop.mjs +73 -0
  107. package/esm2022/staging/lib/bb-anchor.mjs +58 -0
  108. package/esm2022/staging/lib/bounds.mjs +286 -0
  109. package/esm2022/staging/lib/camera-shake.mjs +69 -0
  110. package/esm2022/staging/lib/caustics.mjs +188 -0
  111. package/esm2022/staging/lib/center.mjs +118 -0
  112. package/esm2022/staging/lib/contact-shadows.mjs +214 -0
  113. package/esm2022/staging/lib/environment.mjs +481 -0
  114. package/esm2022/staging/lib/float.mjs +70 -0
  115. package/esm2022/staging/lib/lightformer.mjs +107 -0
  116. package/esm2022/staging/lib/matcap-texture.mjs +81 -0
  117. package/esm2022/staging/lib/normal-texture.mjs +81 -0
  118. package/esm2022/staging/lib/randomized-lights.mjs +104 -0
  119. package/esm2022/staging/lib/render-texture.mjs +203 -0
  120. package/esm2022/staging/lib/sky.mjs +86 -0
  121. package/esm2022/staging/lib/spot-light.mjs +453 -0
  122. package/esm2022/staging/lib/stage.mjs +236 -0
  123. package/esm2022/{utils/angular-three-soba-utils.mjs → stats/angular-three-soba-stats.mjs} +1 -1
  124. package/esm2022/stats/index.mjs +2 -0
  125. package/esm2022/stats/lib/stats.mjs +63 -0
  126. package/esm2022/vanilla-exports/angular-three-soba-vanilla-exports.mjs +5 -0
  127. package/esm2022/vanilla-exports/index.mjs +3 -0
  128. package/fesm2022/angular-three-soba-abstractions.mjs +884 -697
  129. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  130. package/fesm2022/angular-three-soba-cameras.mjs +261 -308
  131. package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
  132. package/fesm2022/angular-three-soba-controls.mjs +1776 -109
  133. package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
  134. package/fesm2022/angular-three-soba-loaders.mjs +191 -145
  135. package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
  136. package/fesm2022/angular-three-soba-materials.mjs +527 -748
  137. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  138. package/fesm2022/angular-three-soba-misc.mjs +783 -1935
  139. package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
  140. package/fesm2022/angular-three-soba-performances.mjs +591 -475
  141. package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
  142. package/fesm2022/angular-three-soba-shaders.mjs +51 -1369
  143. package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
  144. package/fesm2022/angular-three-soba-staging.mjs +2350 -3521
  145. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  146. package/fesm2022/angular-three-soba-stats.mjs +70 -0
  147. package/fesm2022/angular-three-soba-stats.mjs.map +1 -0
  148. package/fesm2022/angular-three-soba-vanilla-exports.mjs +6 -0
  149. package/fesm2022/angular-three-soba-vanilla-exports.mjs.map +1 -0
  150. package/loaders/README.md +130 -2
  151. package/loaders/index.d.ts +5 -4
  152. package/loaders/lib/font-loader.d.ts +27 -0
  153. package/loaders/lib/gltf-loader.d.ts +24 -0
  154. package/loaders/lib/loader.d.ts +29 -0
  155. package/loaders/lib/progress.d.ts +9 -0
  156. package/loaders/lib/texture-loader.d.ts +13 -0
  157. package/materials/README.md +160 -2
  158. package/materials/index.d.ts +7 -6
  159. package/materials/lib/custom-shader-material.d.ts +20 -0
  160. package/materials/lib/mesh-distort-material.d.ts +17 -0
  161. package/materials/lib/mesh-reflector-material.d.ts +51 -0
  162. package/materials/lib/mesh-refraction-material.d.ts +42 -0
  163. package/materials/lib/mesh-transmission-material.d.ts +77 -0
  164. package/materials/lib/mesh-wobble-material.d.ts +15 -0
  165. package/materials/lib/point-material.d.ts +11 -0
  166. package/metadata.json +1 -1
  167. package/misc/README.md +217 -2
  168. package/misc/index.d.ts +13 -13
  169. package/misc/lib/animations.d.ts +17 -0
  170. package/misc/lib/computed-attribute.d.ts +64 -0
  171. package/misc/lib/constants.d.ts +1 -0
  172. package/misc/lib/decal.d.ts +27 -0
  173. package/misc/lib/deprecated.d.ts +14 -0
  174. package/misc/lib/depth-buffer.d.ts +8 -0
  175. package/misc/lib/fbo.d.ts +46 -0
  176. package/misc/lib/html/html-content.d.ts +47 -0
  177. package/misc/lib/html/html.d.ts +30 -0
  178. package/misc/lib/html/utils.d.ts +14 -0
  179. package/misc/lib/intersect.d.ts +13 -0
  180. package/misc/lib/sampler.d.ts +73 -0
  181. package/misc/lib/scale-factor.d.ts +3 -0
  182. package/package.json +89 -48
  183. package/performances/index.d.ts +6 -5
  184. package/performances/lib/adaptive-dpr.d.ts +7 -0
  185. package/performances/{adaptive-events → lib}/adaptive-events.d.ts +0 -3
  186. package/performances/lib/detailed.d.ts +17 -0
  187. package/performances/lib/instances/instances.d.ts +122 -0
  188. package/performances/lib/instances/position-mesh.d.ts +20 -0
  189. package/performances/lib/points/points.d.ts +224 -0
  190. package/performances/lib/points/position-point.d.ts +21 -0
  191. package/performances/lib/segments/segment-object.d.ts +17 -0
  192. package/performances/lib/segments/segments.d.ts +97 -0
  193. package/shaders/index.d.ts +3 -17
  194. package/shaders/lib/grid-material.d.ts +69 -0
  195. package/shaders/lib/mesh-refraction-material.d.ts +11 -0
  196. package/shaders/lib/point-material.d.ts +14 -0
  197. package/staging/README.md +473 -2
  198. package/staging/index.d.ts +18 -21
  199. package/staging/lib/accumulative-shadows.d.ts +75 -0
  200. package/staging/lib/backdrop.d.ts +22 -0
  201. package/staging/lib/bb-anchor.d.ts +17 -0
  202. package/staging/lib/bounds.d.ts +47 -0
  203. package/staging/lib/camera-shake.d.ts +29 -0
  204. package/staging/lib/caustics.d.ts +53 -0
  205. package/staging/lib/center.d.ts +390 -0
  206. package/staging/lib/contact-shadows.d.ts +55 -0
  207. package/staging/lib/environment.d.ts +132 -0
  208. package/staging/lib/float.d.ts +20 -0
  209. package/staging/lib/lightformer.d.ts +310 -0
  210. package/staging/lib/matcap-texture.d.ts +32 -0
  211. package/staging/lib/normal-texture.d.ts +37 -0
  212. package/staging/lib/randomized-lights.d.ts +54 -0
  213. package/staging/lib/render-texture.d.ts +64 -0
  214. package/staging/lib/sky.d.ts +32 -0
  215. package/staging/lib/spot-light.d.ts +119 -0
  216. package/staging/lib/stage.d.ts +352 -0
  217. package/stats/README.md +3 -0
  218. package/stats/index.d.ts +1 -0
  219. package/stats/lib/stats.d.ts +14 -0
  220. package/vanilla-exports/README.md +3 -0
  221. package/vanilla-exports/index.d.ts +27 -0
  222. package/web-types.json +1 -1
  223. package/abstractions/billboard/billboard.d.ts +0 -28
  224. package/abstractions/detailed/detailed.d.ts +0 -26
  225. package/abstractions/edges/edges.d.ts +0 -34
  226. package/abstractions/grid/grid.d.ts +0 -50
  227. package/abstractions/text/text.d.ts +0 -82
  228. package/abstractions/text-3d/text-3d.d.ts +0 -81
  229. package/assets/distort.vert.glsl +0 -1
  230. package/cameras/camera/camera-content.d.ts +0 -13
  231. package/cameras/camera/camera.d.ts +0 -26
  232. package/cameras/cube-camera/cube-camera.d.ts +0 -69
  233. package/cameras/orthographic-camera/orthographic-camera.d.ts +0 -37
  234. package/cameras/perspective-camera/perspective-camera.d.ts +0 -18
  235. package/controls/orbit-controls/orbit-controls.d.ts +0 -54
  236. package/esm2022/abstractions/billboard/billboard.mjs +0 -74
  237. package/esm2022/abstractions/detailed/detailed.mjs +0 -64
  238. package/esm2022/abstractions/edges/edges.mjs +0 -88
  239. package/esm2022/abstractions/grid/grid.mjs +0 -180
  240. package/esm2022/abstractions/text/text.mjs +0 -274
  241. package/esm2022/abstractions/text-3d/text-3d.mjs +0 -165
  242. package/esm2022/cameras/camera/camera-content.mjs +0 -20
  243. package/esm2022/cameras/camera/camera.mjs +0 -77
  244. package/esm2022/cameras/cube-camera/cube-camera.mjs +0 -161
  245. package/esm2022/cameras/orthographic-camera/orthographic-camera.mjs +0 -102
  246. package/esm2022/cameras/perspective-camera/perspective-camera.mjs +0 -46
  247. package/esm2022/controls/orbit-controls/orbit-controls.mjs +0 -181
  248. package/esm2022/loaders/gltf-loader/gltf-loader.mjs +0 -30
  249. package/esm2022/loaders/loader/loader.mjs +0 -138
  250. package/esm2022/loaders/progress/progress.mjs +0 -45
  251. package/esm2022/loaders/texture-loader/texture-loader.mjs +0 -28
  252. package/esm2022/materials/mesh-distort-material/mesh-distort-material.mjs +0 -82
  253. package/esm2022/materials/mesh-reflector-material/mesh-reflector-material.mjs +0 -367
  254. package/esm2022/materials/mesh-refraction-material/mesh-refraction-material.mjs +0 -171
  255. package/esm2022/materials/mesh-transmission-material/mesh-transmission-material.mjs +0 -278
  256. package/esm2022/materials/mesh-wobble-material/mesh-wobble-material.mjs +0 -68
  257. package/esm2022/materials/point-material/point-material.mjs +0 -46
  258. package/esm2022/misc/animations/animations.mjs +0 -59
  259. package/esm2022/misc/bake-shadows/bake-shadows.mjs +0 -24
  260. package/esm2022/misc/caustics/caustics.mjs +0 -387
  261. package/esm2022/misc/decal/decal.mjs +0 -187
  262. package/esm2022/misc/depth-buffer/depth-buffer.mjs +0 -44
  263. package/esm2022/misc/example/example.mjs +0 -160
  264. package/esm2022/misc/fbo/fbo.mjs +0 -47
  265. package/esm2022/misc/html/html-wrapper.mjs +0 -478
  266. package/esm2022/misc/html/html.mjs +0 -304
  267. package/esm2022/misc/sampler/sampler.mjs +0 -142
  268. package/esm2022/misc/shadow/shadow.mjs +0 -111
  269. package/esm2022/misc/stats-gl/stats-gl.mjs +0 -61
  270. package/esm2022/misc/trail/trail.mjs +0 -209
  271. package/esm2022/misc/trail-texture/inject-trail-texture.mjs +0 -17
  272. package/esm2022/misc/trail-texture/trail-texture.mjs +0 -106
  273. package/esm2022/modifiers/angular-three-soba-modifiers.mjs +0 -5
  274. package/esm2022/modifiers/curve-modifier/curve-modifier.mjs +0 -64
  275. package/esm2022/modifiers/index.mjs +0 -2
  276. package/esm2022/performances/adaptive-dpr/adaptive-dpr.mjs +0 -44
  277. package/esm2022/performances/adaptive-events/adaptive-events.mjs +0 -27
  278. package/esm2022/performances/points/points-input.mjs +0 -64
  279. package/esm2022/performances/points/points.mjs +0 -329
  280. package/esm2022/performances/points/position-point.mjs +0 -54
  281. package/esm2022/performances/segments/segment-object.mjs +0 -9
  282. package/esm2022/performances/segments/segments.mjs +0 -182
  283. package/esm2022/shaders/blur-pass/blur-pass.mjs +0 -61
  284. package/esm2022/shaders/caustics/caustics-material.mjs +0 -130
  285. package/esm2022/shaders/caustics/caustics-projection-material.mjs +0 -31
  286. package/esm2022/shaders/convolution-material/convolution-material.mjs +0 -94
  287. package/esm2022/shaders/discard-material/discard-material.mjs +0 -3
  288. package/esm2022/shaders/grid-material/grid-material.mjs +0 -77
  289. package/esm2022/shaders/mesh-distort-material/mesh-distort-material.mjs +0 -56
  290. package/esm2022/shaders/mesh-reflector-material/mesh-reflector-material.mjs +0 -223
  291. package/esm2022/shaders/mesh-refraction-material/mesh-refraction-material.mjs +0 -170
  292. package/esm2022/shaders/mesh-transmission-material/mesh-transmission-material.mjs +0 -268
  293. package/esm2022/shaders/mesh-wobble-material/mesh-wobble-material.mjs +0 -37
  294. package/esm2022/shaders/shader-material/shader-material.mjs +0 -34
  295. package/esm2022/shaders/soft-shadow-material/soft-shadow-material.mjs +0 -25
  296. package/esm2022/shaders/sparkles-material/sparkles-material.mjs +0 -33
  297. package/esm2022/shaders/spot-light-material/spot-light-material.mjs +0 -86
  298. package/esm2022/shaders/star-field-material/star-field-material.mjs +0 -33
  299. package/esm2022/shaders/wireframe-material/wireframe-material.mjs +0 -247
  300. package/esm2022/staging/accumulative-shadows/accumulative-shadows.mjs +0 -267
  301. package/esm2022/staging/accumulative-shadows/progressive-light-map.mjs +0 -108
  302. package/esm2022/staging/accumulative-shadows/randomized-lights.mjs +0 -206
  303. package/esm2022/staging/backdrop/backdrop.mjs +0 -77
  304. package/esm2022/staging/bb-anchor/bb-anchor.mjs +0 -70
  305. package/esm2022/staging/bounds/bounds.mjs +0 -308
  306. package/esm2022/staging/camera-shake/camera-shake.mjs +0 -123
  307. package/esm2022/staging/center/center.mjs +0 -163
  308. package/esm2022/staging/cloud/cloud.mjs +0 -158
  309. package/esm2022/staging/contact-shadows/contact-shadows.mjs +0 -246
  310. package/esm2022/staging/environment/assets.mjs +0 -13
  311. package/esm2022/staging/environment/environment-cube.mjs +0 -47
  312. package/esm2022/staging/environment/environment-ground.mjs +0 -41
  313. package/esm2022/staging/environment/environment-input.mjs +0 -119
  314. package/esm2022/staging/environment/environment-map.mjs +0 -53
  315. package/esm2022/staging/environment/environment-portal.mjs +0 -113
  316. package/esm2022/staging/environment/environment.mjs +0 -61
  317. package/esm2022/staging/environment/utils.mjs +0 -105
  318. package/esm2022/staging/float/float.mjs +0 -94
  319. package/esm2022/staging/matcap-texture/matcap-texture.mjs +0 -64
  320. package/esm2022/staging/normal-texture/normal-texture.mjs +0 -53
  321. package/esm2022/staging/sky/sky.mjs +0 -119
  322. package/esm2022/staging/sparkles/sparkles.mjs +0 -164
  323. package/esm2022/staging/spot-light/shadow-mesh-input.mjs +0 -63
  324. package/esm2022/staging/spot-light/shadow-mesh.mjs +0 -266
  325. package/esm2022/staging/spot-light/spot-light-input.mjs +0 -84
  326. package/esm2022/staging/spot-light/spot-light.mjs +0 -81
  327. package/esm2022/staging/spot-light/volumetric-mesh.mjs +0 -98
  328. package/esm2022/staging/stage/stage.mjs +0 -388
  329. package/esm2022/staging/stars/stars.mjs +0 -147
  330. package/esm2022/staging/wireframe/wireframe-input.mjs +0 -191
  331. package/esm2022/staging/wireframe/wireframe.mjs +0 -224
  332. package/esm2022/utils/content/content.mjs +0 -15
  333. package/esm2022/utils/index.mjs +0 -2
  334. package/fesm2022/angular-three-soba-modifiers.mjs +0 -71
  335. package/fesm2022/angular-three-soba-modifiers.mjs.map +0 -1
  336. package/fesm2022/angular-three-soba-utils.mjs +0 -22
  337. package/fesm2022/angular-three-soba-utils.mjs.map +0 -1
  338. package/loaders/gltf-loader/gltf-loader.d.ts +0 -10
  339. package/loaders/loader/loader.d.ts +0 -33
  340. package/loaders/progress/progress.d.ts +0 -9
  341. package/loaders/texture-loader/texture-loader.d.ts +0 -7
  342. package/materials/mesh-distort-material/mesh-distort-material.d.ts +0 -40
  343. package/materials/mesh-reflector-material/mesh-reflector-material.d.ts +0 -99
  344. package/materials/mesh-refraction-material/mesh-refraction-material.d.ts +0 -62
  345. package/materials/mesh-transmission-material/mesh-transmission-material.d.ts +0 -107
  346. package/materials/mesh-wobble-material/mesh-wobble-material.d.ts +0 -29
  347. package/materials/point-material/point-material.d.ts +0 -24
  348. package/misc/animations/animations.d.ts +0 -15
  349. package/misc/caustics/caustics.d.ts +0 -87
  350. package/misc/decal/decal.d.ts +0 -49
  351. package/misc/depth-buffer/depth-buffer.d.ts +0 -9
  352. package/misc/example/example.d.ts +0 -81
  353. package/misc/fbo/fbo.d.ts +0 -17
  354. package/misc/html/html-wrapper.d.ts +0 -559
  355. package/misc/html/html.d.ts +0 -214
  356. package/misc/sampler/sampler.d.ts +0 -67
  357. package/misc/shadow/shadow.d.ts +0 -37
  358. package/misc/stats-gl/stats-gl.d.ts +0 -24
  359. package/misc/trail/trail.d.ts +0 -57
  360. package/misc/trail-texture/inject-trail-texture.d.ts +0 -9
  361. package/misc/trail-texture/trail-texture.d.ts +0 -50
  362. package/modifiers/README.md +0 -3
  363. package/modifiers/curve-modifier/curve-modifier.d.ts +0 -23
  364. package/modifiers/index.d.ts +0 -1
  365. package/performances/adaptive-dpr/adaptive-dpr.d.ts +0 -14
  366. package/performances/points/points-input.d.ts +0 -32
  367. package/performances/points/points.d.ts +0 -92
  368. package/performances/points/position-point.d.ts +0 -11
  369. package/performances/segments/segment-object.d.ts +0 -7
  370. package/performances/segments/segments.d.ts +0 -124
  371. package/shaders/blur-pass/blur-pass.d.ts +0 -23
  372. package/shaders/caustics/caustics-material.d.ts +0 -4
  373. package/shaders/caustics/caustics-projection-material.d.ts +0 -4
  374. package/shaders/convolution-material/convolution-material.d.ts +0 -7
  375. package/shaders/discard-material/discard-material.d.ts +0 -3
  376. package/shaders/grid-material/grid-material.d.ts +0 -37
  377. package/shaders/mesh-distort-material/mesh-distort-material.d.ts +0 -295
  378. package/shaders/mesh-reflector-material/mesh-reflector-material.d.ts +0 -50
  379. package/shaders/mesh-refraction-material/mesh-refraction-material.d.ts +0 -4
  380. package/shaders/mesh-transmission-material/mesh-transmission-material.d.ts +0 -25
  381. package/shaders/mesh-wobble-material/mesh-wobble-material.d.ts +0 -16
  382. package/shaders/shader-material/shader-material.d.ts +0 -6
  383. package/shaders/soft-shadow-material/soft-shadow-material.d.ts +0 -19
  384. package/shaders/sparkles-material/sparkles-material.d.ts +0 -17
  385. package/shaders/spot-light-material/spot-light-material.d.ts +0 -13
  386. package/shaders/star-field-material/star-field-material.d.ts +0 -13
  387. package/shaders/wireframe-material/wireframe-material.d.ts +0 -58
  388. package/staging/accumulative-shadows/accumulative-shadows.d.ts +0 -146
  389. package/staging/accumulative-shadows/progressive-light-map.d.ts +0 -34
  390. package/staging/accumulative-shadows/randomized-lights.d.ts +0 -90
  391. package/staging/backdrop/backdrop.d.ts +0 -30
  392. package/staging/bb-anchor/bb-anchor.d.ts +0 -27
  393. package/staging/bounds/bounds.d.ts +0 -134
  394. package/staging/camera-shake/camera-shake.d.ts +0 -43
  395. package/staging/center/center.d.ts +0 -70
  396. package/staging/cloud/cloud.d.ts +0 -51
  397. package/staging/contact-shadows/contact-shadows.d.ts +0 -70
  398. package/staging/environment/assets.d.ts +0 -13
  399. package/staging/environment/environment-cube.d.ts +0 -15
  400. package/staging/environment/environment-ground.d.ts +0 -13
  401. package/staging/environment/environment-input.d.ts +0 -68
  402. package/staging/environment/environment-map.d.ts +0 -16
  403. package/staging/environment/environment-portal.d.ts +0 -18
  404. package/staging/environment/environment.d.ts +0 -8
  405. package/staging/environment/utils.d.ts +0 -7
  406. package/staging/float/float.d.ts +0 -31
  407. package/staging/matcap-texture/matcap-texture.d.ts +0 -13
  408. package/staging/normal-texture/normal-texture.d.ts +0 -16
  409. package/staging/sky/sky.d.ts +0 -48
  410. package/staging/sparkles/sparkles.d.ts +0 -63
  411. package/staging/spot-light/shadow-mesh-input.d.ts +0 -29
  412. package/staging/spot-light/shadow-mesh.d.ts +0 -37
  413. package/staging/spot-light/spot-light-input.d.ts +0 -38
  414. package/staging/spot-light/spot-light.d.ts +0 -39
  415. package/staging/spot-light/volumetric-mesh.d.ts +0 -24
  416. package/staging/stage/stage.d.ts +0 -130
  417. package/staging/stars/stars.d.ts +0 -45
  418. package/staging/wireframe/wireframe-input.d.ts +0 -65
  419. package/staging/wireframe/wireframe.d.ts +0 -28
  420. package/utils/README.md +0 -3
  421. package/utils/content/content.d.ts +0 -8
  422. package/utils/index.d.ts +0 -1
  423. /package/misc/{bake-shadows → lib}/bake-shadows.d.ts +0 -0
package/misc/README.md CHANGED
@@ -1,3 +1,218 @@
1
- # angular-three-soba/misc
1
+ # `angular-three-soba/misc`
2
2
 
3
- Secondary entry point of `angular-three-soba`. It can be used by importing from `angular-three-soba/misc`.
3
+ This secondary entry point includes miscellaneous utilities and components for animations, shadows, and frame buffer objects (FBOs).
4
+
5
+ ## TOC
6
+
7
+ - [injectAnimations](#injectanimations)
8
+ - [injectFBO](#injectfbo)
9
+ - [NgtsFBO](#ngtsfbo)
10
+ - [NgtsBakeShadows](#ngtsbakeshadows)
11
+ - [injectDepthBuffer](#injectdepthbuffer)
12
+ - [NgtsSampler](#ngtssampler)
13
+ - [NgtsComputedAttribute](#ngtscomputedattribute)
14
+ - [NgtsDecal](#ngtsdecal)
15
+
16
+ ## `injectAnimations`
17
+
18
+ ```ts
19
+ function injectAnimations<TAnimation extends AnimationClip>(
20
+ animations: () => NgtsAnimation<TAnimation> | undefined | null,
21
+ object: ElementRef<Object3D> | Object3D | (() => ElementRef<Object3D> | Object3D | undefined | null),
22
+ { injector }: { injector?: Injector } = {},
23
+ ): Signal<NgtsAnimationApi<TAnimation> | null>;
24
+ ```
25
+
26
+ Provides a way to inject and manage animations in your Angular component. It takes a function animations that returns an array of animation clips or an object containing an array of animation clips, a reference to the object to be animated, and an optional injector. It returns a signal that holds an object containing the animation clips, mixer, names, actions, and a signal indicating if the animations are ready.
27
+
28
+ This function is commonly used together with `injectGLTF` since GLTF files often contain animation data for 3D models. It provides an abstraction around `AnimationMixer`, which simplifies the process of playing and controlling animations.
29
+
30
+ The `NgtsAnimationApi` object contains the following properties:
31
+
32
+ - `clips`: An array of `AnimationClip` objects representing the available animations.
33
+ - `mixer`: An instance of `AnimationMixer` used to control the playback of animations.
34
+ - `names`: An array of strings representing the names of the available animations.
35
+ - `actions`: An object where keys are animation names and values are `AnimationAction` objects, which control the playback of individual animations.
36
+ - `ready`: A signal indicating if the animations are ready.
37
+
38
+ ## `injectFBO`
39
+
40
+ ```ts
41
+ function injectFBO(params: () => NgtsFBOParams, { injector }: { injector?: Injector } = {}): Signal<WebGLRenderTarget>;
42
+ ```
43
+
44
+ Injects a `WebGLRenderTarget` (FBO) into your Angular component. It takes a function params that returns the parameters for the FBO and an optional injector. It returns a signal that holds the `WebGLRenderTarget` object.
45
+
46
+ The `params` object includes the following properties:
47
+
48
+ - `width`: The width of the FBO in pixels. Or it can also be the `settings` object.
49
+ - `height`: The height of the FBO in pixels.
50
+ - `settings`: An object containing the settings for the FBO.
51
+ - `samples`: The number of samples for multisample anti-aliasing (MSAA). Set to 0 to disable MSAA.
52
+ - `depth`: If set, the scene depth will be rendered into buffer.depthTexture. (Default: false)
53
+ - `wrapS`: The wrapping mode for the s-coordinate of the FBO texture.
54
+ - `wrapT`: The wrapping mode for the t-coordinate of the FBO texture.
55
+ - `magFilter`: The magnification filter for the FBO texture.
56
+ - `minFilter`: The minification filter for the FBO texture.
57
+ - `format`: The internal format of the color buffer.
58
+ - `type`: The data type of the color buffer.
59
+ - `anisotropy`: The level of anisotropic filtering for the FBO texture.
60
+ - `depthBuffer`: Whether to include a depth buffer. (Default: true)
61
+ - `stencilBuffer`: Whether to include a stencil buffer. (Default: false)
62
+ - `generateMipmaps`: Whether to generate mipmaps for the FBO texture. (Default: true)
63
+ - `depthTexture`: A DepthTexture instance to use for the depth buffer.
64
+ - `encoding`: The encoding of the FBO texture.
65
+ - `colorSpace`: The color space of the FBO texture.
66
+
67
+ ### NgtsFBO
68
+
69
+ A directive that allows you to render a part of your scene into an FBO using an `ng-template`. It takes an input fbo that defines the parameters for the FBO, using the same `NgtsFBOParams` type as `injectFBO`.
70
+
71
+ ```html
72
+ <ng-template [fbo]="options()" let-target>
73
+ <ngts-perspective-camera [options]="{ position: [0, 0, 3] }" />
74
+
75
+ <ngt-portal [container]="scene()">
76
+ <ngt-mesh *portalContent></ngt-mesh>
77
+ </ngt-portal>
78
+
79
+ <ngt-mesh>
80
+ <ngt-box-geometry *args="[3, 3, 3]" />
81
+ <ngt-mesh-standard-material [map]="target().texture" />
82
+ </ngt-mesh>
83
+ </ng-template>
84
+ ```
85
+
86
+ ## NgtsBakeShadows
87
+
88
+ A directive that bakes shadows in your scene. It sets `gl.shadowMap.autoUpdate` to false and requests a single `gl.shadowMap.needsUpdate = true`. This can improve performance by making shadows static.
89
+
90
+ ```html
91
+ <ngts-bake-shadows />
92
+ ```
93
+
94
+ ## injectDepthBuffer
95
+
96
+ Renders the scene into a depth-buffer. Often effects depend on it and this allows you to render a single buffer and share it, which minimizes the performance impact. It returns the buffer's `depthTexture`.
97
+
98
+ Since this is a rather expensive effect you can limit the amount of frames it renders when your objects are static. For instance making it render only once by setting `frames: 1`.
99
+
100
+ ```ts
101
+ export class MyCmp {
102
+ depthBuffer = injectDepthBuffer(() => ({
103
+ size: 256, // The size of the depth buffer
104
+ frames: Infinity, // The amount of frames to render
105
+ }));
106
+ }
107
+ ```
108
+
109
+ ## NgtsSampler
110
+
111
+ A component that samples points from a mesh and transforms an `InstancedMesh`'s matrix to distribute instances on the points. It takes a `Mesh` and an `InstancedMesh` as children.
112
+
113
+ ### Object Inputs (NgtsSamplerOptions)
114
+
115
+ | Property | Description | Default value |
116
+ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
117
+ | `weight` | The name of the attribute to use as the sampling weight. | `undefined` |
118
+ | `transform` | A function that transforms each instance given a sample. It receives a dummy `Object3D` with all the sampled data and should mutate `transformPayload.dummy`. | `undefined` |
119
+ | `count` | The number of samples to take. | `16` |
120
+
121
+ #### Passing `InstancedMesh` and `Mesh` as content children
122
+
123
+ ```html
124
+ <ngts-sampler [options]="{ weight: 'normal', transform: transformPoint, count: 16 }">
125
+ <ngt-mesh>
126
+ <ngt-sphere-geometry *args="[2]" />
127
+ </ngt-mesh>
128
+
129
+ <ngt-instanced-mesh *args="[undefined, undefined, 1_000]">
130
+ <ngt-sphere-geometry *args="[0.1]" />
131
+ </ngt-instanced-mesh>
132
+ </ngts-sampler>
133
+ ```
134
+
135
+ or use references when you can't compose declaratively:
136
+
137
+ ```ts
138
+ @Component({
139
+ template: `
140
+ <ngts-sampler [instances]="instancedRef()" [mesh]="mesh()" />
141
+
142
+ <ngt-instanced-mesh #instanced *args="[undefined, undefined, 1_000]">
143
+ <!-- content -->
144
+ </ngt-instanced-mesh>
145
+ `,
146
+ })
147
+ class MyCmp {
148
+ instancedRef = viewChild<ElementRef<InstancedMesh>>('instanced');
149
+
150
+ gltf = injectGLTF(() => 'my/mesh/url');
151
+ mesh = computed(() => this.gltf()?.scene || null);
152
+ }
153
+ ```
154
+
155
+ ## NgtsComputedAttribute
156
+
157
+ A component that allows you to compute and attach an attribute to a geometry declaratively.
158
+
159
+ It accepts the following inputs:
160
+
161
+ - `compute`: A function that computes the attribute. It receives the geometry as an argument and should return a `BufferAttribute`.
162
+ - `name`: The name of the attribute to attach to the geometry.
163
+ - `options`: pass-through options for `BufferAttribute`
164
+
165
+ ```html
166
+ <ngt-sphere-geometry>
167
+ <ngts-computed-attribute
168
+ name="my-attribute-name"
169
+ [compute]="computeAttributeFn"
170
+ [options]="{ usage: StaticReadUsage }"
171
+ />
172
+ </ngt-sphere-geometry>
173
+ ```
174
+
175
+ ## NgtsDecal
176
+
177
+ Abstraction around Three's `DecalGeometry`. It will use the its parent `mesh` as the decal surface by default.
178
+
179
+ The decal box has to intersect the surface, otherwise it will not be visible. if you do not specify a rotation it will look at the parents center point. You can also pass a single number as the rotation which allows you to spin it.
180
+
181
+ ### Object Inputs (NgtsDecalOptions)
182
+
183
+ | Property | Description | Default value |
184
+ | --------------------- | ----------------------------------------------------- | ------------- |
185
+ | `map` | The texture to use for the decal. | `undefined` |
186
+ | `debug` | Makes the "bounding box" of the decal visible. | `false` |
187
+ | `depthTest` | Whether to enable depth testing. | `false` |
188
+ | `polygonOffsetFactor` | The factor by which the polygon offset is multiplied. | `-10` |
189
+
190
+ It also accepts a `mesh` input that allows you to specify the surface the decal must attach to.
191
+
192
+ ```html
193
+ <mesh>
194
+ <sphereGeometry />
195
+ <meshBasicMaterial />
196
+ <ngts-decal [options]="{ position: [0, 0, 0], rotation: [0, 0, 0], scale: 1, debug: true }">
197
+ <ngt-mesh-basic-material [map]="texture()" [polygonOffset]="true" [polygonOffsetFactor]="-1" />
198
+ </ngts-decal>
199
+ </mesh>
200
+ ```
201
+
202
+ If you do not specify a material it will create a transparent `ngt-mesh-basic-material` with a `polygonOffsetFactor` of -10.
203
+
204
+ ```html
205
+ <ngt-mesh>
206
+ <ngt-mesh-sphere-geometry />
207
+ <ngt-mesh-basic-material />
208
+ <ngts-decal [options]="{ map: texture() }" />
209
+ </ngt-mesh>
210
+ ```
211
+
212
+ If declarative composition is not possible, use the `mesh` input to define the surface the decal must attach to.
213
+
214
+ ```html
215
+ <ngts-decal [mesh]="meshRef()">
216
+ <ngt-mesh-basic-material [map]="texture()" [polygonOffset]="true" [polygonOffsetFactor]="-1" />
217
+ </ngts-decal>
218
+ ```
package/misc/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export * from './animations/animations';
2
- export * from './bake-shadows/bake-shadows';
3
- export * from './caustics/caustics';
4
- export * from './decal/decal';
5
- export * from './depth-buffer/depth-buffer';
6
- export * from './example/example';
7
- export * from './fbo/fbo';
8
- export * from './html/html';
9
- export * from './sampler/sampler';
10
- export * from './shadow/shadow';
11
- export * from './stats-gl/stats-gl';
12
- export * from './trail-texture/inject-trail-texture';
13
- export * from './trail/trail';
1
+ export * from './lib/animations';
2
+ export * from './lib/bake-shadows';
3
+ export * from './lib/computed-attribute';
4
+ export * from './lib/constants';
5
+ export * from './lib/decal';
6
+ export * from './lib/deprecated';
7
+ export * from './lib/depth-buffer';
8
+ export * from './lib/fbo';
9
+ export * from './lib/html/html';
10
+ export * from './lib/html/html-content';
11
+ export * from './lib/intersect';
12
+ export * from './lib/sampler';
13
+ export * from './lib/scale-factor';
@@ -0,0 +1,17 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { AnimationAction, AnimationClip, AnimationMixer, Object3D } from 'three';
3
+ export type NgtsAnimation<TAnimation extends AnimationClip = AnimationClip> = TAnimation[] | {
4
+ animations: TAnimation[];
5
+ };
6
+ /**
7
+ * Use afterNextRender
8
+ */
9
+ export declare function injectAnimations<TAnimation extends AnimationClip>(animations: () => NgtsAnimation<TAnimation> | undefined | null, object: ElementRef<Object3D> | Object3D | (() => ElementRef<Object3D> | Object3D | undefined | null), { injector }?: {
10
+ injector?: Injector;
11
+ }): {
12
+ clips: AnimationClip[];
13
+ mixer: AnimationMixer;
14
+ actions: { [key in TAnimation["name"]]: AnimationAction | null; };
15
+ names: TAnimation["name"][];
16
+ ready: import("@angular/core").WritableSignal<boolean>;
17
+ };
@@ -0,0 +1,64 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { BufferAttribute, BufferGeometry } from 'three';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NgtsComputedAttribute {
5
+ compute: import("@angular/core").InputSignal<(geometry: BufferGeometry) => BufferAttribute>;
6
+ name: import("@angular/core").InputSignal<string>;
7
+ options: import("@angular/core").InputSignal<Partial<{
8
+ name?: string | undefined;
9
+ clone?: (() => BufferAttribute) | undefined;
10
+ toJSON?: (() => import("three").BufferAttributeJSON) | undefined;
11
+ array?: import("three").TypedArray | undefined;
12
+ itemSize?: number | undefined;
13
+ usage?: import("three").Usage | undefined;
14
+ gpuType?: import("three").AttributeGPUType | undefined;
15
+ updateRange?: {
16
+ offset: number;
17
+ count: number;
18
+ } | undefined;
19
+ updateRanges?: {
20
+ start: number;
21
+ count: number;
22
+ }[] | undefined;
23
+ version?: number | undefined;
24
+ normalized?: boolean | undefined;
25
+ readonly count?: number | undefined;
26
+ needsUpdate?: boolean | undefined;
27
+ readonly isBufferAttribute?: true | undefined;
28
+ onUploadCallback?: (() => void) | undefined;
29
+ onUpload?: ((callback: () => void) => BufferAttribute) | undefined;
30
+ setUsage?: ((usage: import("three").Usage) => BufferAttribute) | undefined;
31
+ addUpdateRange?: ((start: number, count: number) => void) | undefined;
32
+ clearUpdateRanges?: (() => void) | undefined;
33
+ copy?: ((source: BufferAttribute) => BufferAttribute) | undefined;
34
+ copyAt?: ((index1: number, attribute: BufferAttribute, index2: number) => BufferAttribute) | undefined;
35
+ copyArray?: ((array: ArrayLike<number>) => BufferAttribute) | undefined;
36
+ applyMatrix3?: ((m: import("three").Matrix3) => BufferAttribute) | undefined;
37
+ applyMatrix4?: ((m: import("three").Matrix4) => BufferAttribute) | undefined;
38
+ applyNormalMatrix?: ((m: import("three").Matrix3) => BufferAttribute) | undefined;
39
+ transformDirection?: ((m: import("three").Matrix4) => BufferAttribute) | undefined;
40
+ set?: ((value: ArrayLike<number> | ArrayBufferView, offset?: number) => BufferAttribute) | undefined;
41
+ getComponent?: ((index: number, component: number) => number) | undefined;
42
+ setComponent?: ((index: number, component: number, value: number) => void) | undefined;
43
+ getX?: ((index: number) => number) | undefined;
44
+ setX?: ((index: number, x: number) => BufferAttribute) | undefined;
45
+ getY?: ((index: number) => number) | undefined;
46
+ setY?: ((index: number, y: number) => BufferAttribute) | undefined;
47
+ getZ?: ((index: number) => number) | undefined;
48
+ setZ?: ((index: number, z: number) => BufferAttribute) | undefined;
49
+ getW?: ((index: number) => number) | undefined;
50
+ setW?: ((index: number, z: number) => BufferAttribute) | undefined;
51
+ setXY?: ((index: number, x: number, y: number) => BufferAttribute) | undefined;
52
+ setXYZ?: ((index: number, x: number, y: number, z: number) => BufferAttribute) | undefined;
53
+ setXYZW?: ((index: number, x: number, y: number, z: number, w: number) => BufferAttribute) | undefined;
54
+ attach: string | string[] | import("angular-three").NgtAttachFunction;
55
+ addEventListener: <TEventKey extends keyof import("angular-three").NgtNodeEventMap<BufferAttribute>>(type: TEventKey, listener: (this: import("angular-three").NgtNodeElement<BufferAttribute, typeof BufferAttribute>, ev: import("angular-three").NgtNodeEventMap<BufferAttribute>[TEventKey]) => any) => void;
56
+ removeEventListener: <TEventKey extends keyof import("angular-three").NgtNodeEventMap<BufferAttribute>>(type: TEventKey, listener: (this: import("angular-three").NgtNodeElement<BufferAttribute, typeof BufferAttribute>, ev: import("angular-three").NgtNodeEventMap<BufferAttribute>[TEventKey]) => any) => void;
57
+ __ngt_args__: [array: import("three").TypedArray, itemSize: number, normalized?: boolean | undefined];
58
+ }>>;
59
+ bufferAttribute: BufferAttribute;
60
+ attributeRef: import("@angular/core").Signal<ElementRef<BufferAttribute> | undefined>;
61
+ constructor();
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsComputedAttribute, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsComputedAttribute, "ngts-computed-attribute", never, { "compute": { "alias": "compute"; "required": true; "isSignal": true; }; "name": { "alias": "name"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
64
+ }
@@ -0,0 +1 @@
1
+ export declare function getVersion(): number;
@@ -0,0 +1,27 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { NgtMesh } from 'angular-three';
3
+ import { Mesh, Texture } from 'three';
4
+ import * as i0 from "@angular/core";
5
+ export interface NgtsDecalOptions extends Partial<NgtMesh> {
6
+ polygonOffsetFactor: number;
7
+ depthTest: boolean;
8
+ debug: boolean;
9
+ map?: Texture | null;
10
+ }
11
+ export declare class NgtsDecal {
12
+ mesh: import("@angular/core").InputSignal<Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap> | ElementRef<Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>> | null | undefined>;
13
+ options: import("@angular/core").InputSignalWithTransform<NgtsDecalOptions, "" | Partial<NgtsDecalOptions>>;
14
+ parameters: import("@angular/core").Signal<Omit<NgtsDecalOptions, "position" | "scale" | "rotation" | "polygonOffsetFactor" | "depthTest" | "debug" | "map">>;
15
+ meshRef: import("@angular/core").Signal<ElementRef<Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>>>;
16
+ helperRef: import("@angular/core").Signal<ElementRef<Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>> | undefined>;
17
+ map: import("@angular/core").Signal<Texture | null | undefined>;
18
+ depthTest: import("@angular/core").Signal<boolean>;
19
+ polygonOffsetFactor: import("@angular/core").Signal<number>;
20
+ debug: import("@angular/core").Signal<boolean>;
21
+ private position;
22
+ private rotation;
23
+ private scale;
24
+ constructor();
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsDecal, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsDecal, "ngts-decal", never, { "mesh": { "alias": "mesh"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
27
+ }
@@ -0,0 +1,14 @@
1
+ import { BufferAttribute } from 'three';
2
+ /**
3
+ * NOTE: Sets `BufferAttribute.updateRange` since r159.
4
+ */
5
+ export declare const setUpdateRange: (attribute: BufferAttribute, updateRange: {
6
+ offset: number;
7
+ count: number;
8
+ }) => void;
9
+ export declare const LinearEncoding = 3000;
10
+ export declare const sRGBEncoding = 3001;
11
+ /**
12
+ * NOTE: TextureEncoding was deprecated in r152, and removed in r162.
13
+ */
14
+ export type TextureEncoding = typeof LinearEncoding | typeof sRGBEncoding;
@@ -0,0 +1,8 @@
1
+ import { Injector } from '@angular/core';
2
+ import { DepthTexture } from 'three';
3
+ export declare function injectDepthBuffer(params?: () => {
4
+ size?: number;
5
+ frames?: number;
6
+ }, { injector }?: {
7
+ injector?: Injector;
8
+ }): import("@angular/core").Signal<DepthTexture | null>;
@@ -0,0 +1,46 @@
1
+ import { Injector } from '@angular/core';
2
+ import { ColorSpace, DepthTexture, MagnificationTextureFilter, MinificationTextureFilter, TextureDataType, WebGLRenderTarget, Wrapping } from 'three';
3
+ import { TextureEncoding } from './deprecated';
4
+ import * as i0 from "@angular/core";
5
+ interface FBOSettings {
6
+ /** Defines the count of MSAA samples. Can only be used with WebGL 2. Default: 0 */
7
+ samples?: number;
8
+ /** If set, the scene depth will be rendered into buffer.depthTexture. Default: false */
9
+ depth?: boolean;
10
+ wrapS?: Wrapping | undefined;
11
+ wrapT?: Wrapping | undefined;
12
+ magFilter?: MagnificationTextureFilter | undefined;
13
+ minFilter?: MinificationTextureFilter | undefined;
14
+ format?: number | undefined;
15
+ type?: TextureDataType | undefined;
16
+ anisotropy?: number | undefined;
17
+ depthBuffer?: boolean | undefined;
18
+ stencilBuffer?: boolean | undefined;
19
+ generateMipmaps?: boolean | undefined;
20
+ depthTexture?: DepthTexture | undefined;
21
+ encoding?: TextureEncoding | undefined;
22
+ colorSpace?: ColorSpace | undefined;
23
+ }
24
+ export interface NgtsFBOParams {
25
+ width?: number | FBOSettings;
26
+ height?: number;
27
+ settings?: FBOSettings;
28
+ }
29
+ export declare function injectFBO(params: () => NgtsFBOParams, { injector }?: {
30
+ injector?: Injector;
31
+ }): import("@angular/core").Signal<WebGLRenderTarget<import("three").Texture>>;
32
+ export declare class NgtsFBO {
33
+ fbo: import("@angular/core").InputSignal<{
34
+ width: NgtsFBOParams["width"];
35
+ height: NgtsFBOParams["height"];
36
+ } & FBOSettings>;
37
+ private template;
38
+ private viewContainerRef;
39
+ constructor();
40
+ static ngTemplateContextGuard(_: NgtsFBO, ctx: unknown): ctx is {
41
+ $implicit: ReturnType<typeof injectFBO>;
42
+ };
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsFBO, never>;
44
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsFBO, "ng-template[fbo]", never, { "fbo": { "alias": "fbo"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
45
+ }
46
+ export {};
@@ -0,0 +1,47 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { NgtHTML } from 'angular-three';
3
+ import { NgtsHTML } from './html';
4
+ import { CalculatePosition } from './utils';
5
+ import * as i0 from "@angular/core";
6
+ type PointerEventsProperties = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit';
7
+ export interface NgtsHTMLContentOptions {
8
+ eps: number;
9
+ zIndexRange: [number, number];
10
+ center: boolean;
11
+ prepend: boolean;
12
+ fullscreen: boolean;
13
+ containerClass: string;
14
+ containerStyle: Partial<CSSStyleDeclaration>;
15
+ pointerEvents: PointerEventsProperties;
16
+ calculatePosition: CalculatePosition;
17
+ sprite: boolean;
18
+ distanceFactor?: number;
19
+ parent?: HTMLElement | ElementRef<HTMLElement>;
20
+ }
21
+ export declare class NgtsHTMLContent extends NgtHTML {
22
+ options: import("@angular/core").InputSignalWithTransform<NgtsHTMLContentOptions, "" | Partial<NgtsHTMLContentOptions>>;
23
+ occluded: import("@angular/core").OutputEmitterRef<boolean>;
24
+ html: NgtsHTML;
25
+ transformOuterRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
26
+ transformInnerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
27
+ containerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
28
+ private gl;
29
+ private events;
30
+ private camera;
31
+ private scene;
32
+ size: import("@angular/core").Signal<import("angular-three").NgtSize>;
33
+ private parent;
34
+ private zIndexRange;
35
+ private calculatePosition;
36
+ private prepend;
37
+ center: import("@angular/core").Signal<boolean>;
38
+ fullscreen: import("@angular/core").Signal<boolean>;
39
+ pointerEvents: import("@angular/core").Signal<PointerEventsProperties>;
40
+ containerClass: import("@angular/core").Signal<string>;
41
+ containerStyle: import("@angular/core").Signal<Partial<CSSStyleDeclaration>>;
42
+ private target;
43
+ constructor();
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsHTMLContent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsHTMLContent, "[ngtsHTMLContent]", never, { "options": { "alias": "ngtsHTMLContent"; "required": false; "isSignal": true; }; }, { "occluded": "occluded"; }, never, ["*"], true, never>;
46
+ }
47
+ export {};
@@ -0,0 +1,30 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { NgtGroup } from 'angular-three';
3
+ import { Group, Mesh, Object3D, PlaneGeometry } from 'three';
4
+ import * as i0 from "@angular/core";
5
+ export interface NgtsHTMLOptions extends Partial<NgtGroup> {
6
+ occlude: ElementRef<Object3D>[] | Object3D[] | boolean | 'raycast' | 'blending';
7
+ transform: boolean;
8
+ castShadow: boolean;
9
+ receiveShadow: boolean;
10
+ }
11
+ export declare class NgtsHTML {
12
+ options: import("@angular/core").InputSignalWithTransform<NgtsHTMLOptions, "" | Partial<NgtsHTMLOptions>>;
13
+ parameters: import("@angular/core").Signal<Omit<NgtsHTMLOptions, "castShadow" | "receiveShadow" | "transform" | "occlude">>;
14
+ groupRef: import("@angular/core").Signal<ElementRef<Group<import("three").Object3DEventMap>>>;
15
+ occlusionMeshRef: import("@angular/core").Signal<ElementRef<Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>> | undefined>;
16
+ occlusionGeometryRef: import("@angular/core").Signal<ElementRef<PlaneGeometry> | undefined>;
17
+ occlude: import("@angular/core").Signal<boolean | "raycast" | Object3D<import("three").Object3DEventMap>[] | ElementRef<Object3D<import("three").Object3DEventMap>>[] | "blending">;
18
+ transform: import("@angular/core").Signal<boolean>;
19
+ castShadow: import("@angular/core").Signal<boolean>;
20
+ receiveShadow: import("@angular/core").Signal<boolean>;
21
+ scale: import("@angular/core").Signal<import("angular-three").NgtVector3 | undefined>;
22
+ isRaycastOcclusion: import("@angular/core").Signal<boolean | 0>;
23
+ private shaders;
24
+ vertexShader: import("@angular/core").Signal<string | undefined>;
25
+ fragmentShader: import("@angular/core").Signal<string>;
26
+ constructor();
27
+ protected readonly DoubleSide: 2;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsHTML, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsHTML, "ngts-html", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["[data-occlusion-geometry]", "[data-occlusion-material]", "*"], true, never>;
30
+ }
@@ -0,0 +1,14 @@
1
+ import { Camera, Matrix4, Object3D, Raycaster } from 'three';
2
+ export declare function defaultCalculatePosition(el: Object3D, camera: Camera, size: {
3
+ width: number;
4
+ height: number;
5
+ }): number[];
6
+ export type CalculatePosition = typeof defaultCalculatePosition;
7
+ export declare function isObjectBehindCamera(el: Object3D, camera: Camera): boolean;
8
+ export declare function isObjectVisible(el: Object3D, camera: Camera, raycaster: Raycaster, occlude: Object3D[]): boolean;
9
+ export declare function objectScale(el: Object3D, camera: Camera): number;
10
+ export declare function objectZIndex(el: Object3D, camera: Camera, zIndexRange: Array<number>): number | undefined;
11
+ export declare function epsilon(value: number): number;
12
+ export declare function getCSSMatrix(matrix: Matrix4, multipliers: number[], prepend?: string): string;
13
+ export declare const getCameraCSSMatrix: (matrix: Matrix4) => string;
14
+ export declare const getObjectCSSMatrix: (matrix: Matrix4, factor: number) => string;
@@ -0,0 +1,13 @@
1
+ import { ElementRef, Injector, WritableSignal } from '@angular/core';
2
+ import { Object3D } from 'three';
3
+ import * as i0 from "@angular/core";
4
+ export declare function injectIntersect<TObject extends Object3D>(object: () => ElementRef<TObject> | TObject | undefined | null, { injector, source }?: {
5
+ injector?: Injector;
6
+ source?: WritableSignal<boolean>;
7
+ }): import("@angular/core").Signal<boolean>;
8
+ export declare class NgtsIntersect {
9
+ intersect: import("@angular/core").ModelSignal<boolean>;
10
+ constructor();
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsIntersect, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsIntersect, "[intersect]", never, { "intersect": { "alias": "intersect"; "required": false; "isSignal": true; }; }, { "intersect": "intersectChange"; }, never, never, true, never>;
13
+ }
@@ -0,0 +1,73 @@
1
+ import { ElementRef, Injector } from '@angular/core';
2
+ import { NgtGroup } from 'angular-three';
3
+ import { BufferGeometry, Color, Group, InstancedBufferAttribute, InstancedMesh, Mesh, Object3D, Vector3 } from 'three';
4
+ import * as i0 from "@angular/core";
5
+ interface SamplePayload {
6
+ /**
7
+ * The position of the sample.
8
+ */
9
+ position: Vector3;
10
+ /**
11
+ * The normal of the mesh at the sampled position.
12
+ */
13
+ normal: Vector3;
14
+ /**
15
+ * The vertex color of the mesh at the sampled position.
16
+ */
17
+ color: Color;
18
+ }
19
+ export type TransformFn = (payload: TransformPayload, i: number) => void;
20
+ interface TransformPayload extends SamplePayload {
21
+ /**
22
+ * The dummy object used to transform each instance.
23
+ * This object's matrix will be updated after transforming & it will be used
24
+ * to set the instance's matrix.
25
+ */
26
+ dummy: Object3D;
27
+ /**
28
+ * The mesh that's initially passed to the sampler.
29
+ * Use this if you need to apply transforms from your mesh to your instances
30
+ * or if you need to grab attributes from the geometry.
31
+ */
32
+ sampledMesh: Mesh;
33
+ }
34
+ export declare function injectSurfaceSampler(mesh: () => ElementRef<Mesh> | Mesh | null | undefined, options?: () => {
35
+ count?: number;
36
+ transform?: TransformFn;
37
+ weight?: string;
38
+ instanceMesh?: ElementRef<InstancedMesh> | InstancedMesh | null;
39
+ }, { injector }?: {
40
+ injector?: Injector;
41
+ }): import("@angular/core").Signal<InstancedBufferAttribute>;
42
+ export interface NgtsSamplerOptions extends Partial<NgtGroup> {
43
+ /**
44
+ * The NAME of the weight attribute to use when sampling.
45
+ *
46
+ * @see https://threejs.org/docs/#examples/en/math/MeshSurfaceSampler.setWeightAttribute
47
+ */
48
+ weight?: string;
49
+ /**
50
+ * Transformation to be applied to each instance.
51
+ * Receives a dummy object3D with all the sampled data ( @see TransformPayload ).
52
+ * It should mutate `transformPayload.dummy`.
53
+ *
54
+ * @see ( @todo add link to example )
55
+ *
56
+ * There is no need to update the dummy's matrix
57
+ */
58
+ transform?: TransformFn;
59
+ count: number;
60
+ }
61
+ export declare class NgtsSampler {
62
+ mesh: import("@angular/core").InputSignal<Mesh<BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap> | ElementRef<Mesh<BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>> | null>;
63
+ instances: import("@angular/core").InputSignal<InstancedMesh<BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").InstancedMeshEventMap> | ElementRef<InstancedMesh<BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").InstancedMeshEventMap>> | null>;
64
+ options: import("@angular/core").InputSignalWithTransform<NgtsSamplerOptions, "" | Partial<NgtsSamplerOptions>>;
65
+ parameters: import("@angular/core").Signal<Omit<NgtsSamplerOptions, "count" | "transform" | "weight">>;
66
+ groupRef: import("@angular/core").Signal<ElementRef<Group<import("three").Object3DEventMap>>>;
67
+ private meshToSample;
68
+ private instancedToSample;
69
+ constructor();
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgtsSampler, never>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgtsSampler, "ngts-sampler", never, { "mesh": { "alias": "mesh"; "required": false; "isSignal": true; }; "instances": { "alias": "instances"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
72
+ }
73
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NgtSize } from 'angular-three';
2
+ import { Camera, Vector3 } from 'three';
3
+ export declare function calculateScaleFactor(point3: Vector3, radiusPx: number, camera: Camera, size: NgtSize): number;