angular-three-soba 1.14.1 → 2.0.0-beta.10

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 (426) hide show
  1. package/README.md +2 -2
  2. package/abstractions/billboard/billboard.d.ts +28 -0
  3. package/abstractions/detailed/detailed.d.ts +26 -0
  4. package/abstractions/edges/edges.d.ts +34 -0
  5. package/abstractions/grid/grid.d.ts +50 -0
  6. package/abstractions/index.d.ts +6 -11
  7. package/abstractions/text/text.d.ts +82 -0
  8. package/abstractions/text-3d/text-3d.d.ts +81 -0
  9. package/cameras/{lib/camera → camera}/camera-content.d.ts +2 -2
  10. package/cameras/camera/camera.d.ts +26 -0
  11. package/cameras/cube-camera/cube-camera.d.ts +69 -0
  12. package/cameras/index.d.ts +4 -4
  13. package/cameras/orthographic-camera/orthographic-camera.d.ts +37 -0
  14. package/cameras/{lib/perspective-camera → perspective-camera}/perspective-camera.d.ts +10 -1
  15. package/controls/index.d.ts +1 -1
  16. package/controls/orbit-controls/orbit-controls.d.ts +54 -0
  17. package/esm2022/abstractions/angular-three-soba-abstractions.mjs +1 -1
  18. package/esm2022/abstractions/billboard/billboard.mjs +74 -0
  19. package/esm2022/abstractions/detailed/detailed.mjs +64 -0
  20. package/esm2022/abstractions/edges/edges.mjs +88 -0
  21. package/esm2022/abstractions/grid/grid.mjs +180 -0
  22. package/esm2022/abstractions/index.mjs +7 -12
  23. package/esm2022/abstractions/text/text.mjs +274 -0
  24. package/esm2022/abstractions/text-3d/text-3d.mjs +165 -0
  25. package/esm2022/angular-three-soba.mjs +1 -1
  26. package/esm2022/cameras/angular-three-soba-cameras.mjs +1 -1
  27. package/esm2022/cameras/camera/camera-content.mjs +20 -0
  28. package/esm2022/cameras/camera/camera.mjs +77 -0
  29. package/esm2022/cameras/cube-camera/cube-camera.mjs +161 -0
  30. package/esm2022/cameras/index.mjs +5 -5
  31. package/esm2022/cameras/orthographic-camera/orthographic-camera.mjs +102 -0
  32. package/esm2022/cameras/perspective-camera/perspective-camera.mjs +46 -0
  33. package/esm2022/controls/angular-three-soba-controls.mjs +1 -1
  34. package/esm2022/controls/index.mjs +2 -2
  35. package/esm2022/controls/orbit-controls/orbit-controls.mjs +181 -0
  36. package/esm2022/index.mjs +1 -1
  37. package/esm2022/loaders/angular-three-soba-loaders.mjs +1 -1
  38. package/esm2022/loaders/gltf-loader/gltf-loader.mjs +30 -0
  39. package/esm2022/loaders/index.mjs +5 -6
  40. package/esm2022/loaders/loader/loader.mjs +138 -0
  41. package/esm2022/loaders/progress/progress.mjs +45 -0
  42. package/esm2022/loaders/texture-loader/texture-loader.mjs +28 -0
  43. package/esm2022/materials/angular-three-soba-materials.mjs +1 -1
  44. package/esm2022/materials/index.mjs +7 -6
  45. package/esm2022/materials/mesh-distort-material/mesh-distort-material.mjs +82 -0
  46. package/esm2022/materials/mesh-reflector-material/mesh-reflector-material.mjs +367 -0
  47. package/esm2022/materials/mesh-refraction-material/mesh-refraction-material.mjs +171 -0
  48. package/esm2022/materials/mesh-transmission-material/mesh-transmission-material.mjs +278 -0
  49. package/esm2022/materials/mesh-wobble-material/mesh-wobble-material.mjs +68 -0
  50. package/esm2022/materials/point-material/point-material.mjs +46 -0
  51. package/esm2022/misc/angular-three-soba-misc.mjs +1 -1
  52. package/esm2022/misc/animations/animations.mjs +59 -0
  53. package/esm2022/misc/bake-shadows/bake-shadows.mjs +24 -0
  54. package/esm2022/misc/caustics/caustics.mjs +387 -0
  55. package/esm2022/misc/decal/decal.mjs +187 -0
  56. package/esm2022/misc/depth-buffer/depth-buffer.mjs +44 -0
  57. package/esm2022/misc/example/example.mjs +160 -0
  58. package/esm2022/misc/fbo/fbo.mjs +47 -0
  59. package/esm2022/misc/html/html-wrapper.mjs +478 -0
  60. package/esm2022/misc/html/html.mjs +304 -0
  61. package/esm2022/misc/index.mjs +14 -5
  62. package/esm2022/misc/sampler/sampler.mjs +142 -0
  63. package/esm2022/misc/shadow/shadow.mjs +111 -0
  64. package/esm2022/misc/stats-gl/stats-gl.mjs +61 -0
  65. package/esm2022/misc/trail/trail.mjs +209 -0
  66. package/esm2022/misc/trail-texture/inject-trail-texture.mjs +17 -0
  67. package/esm2022/misc/trail-texture/trail-texture.mjs +106 -0
  68. package/esm2022/modifiers/angular-three-soba-modifiers.mjs +5 -0
  69. package/esm2022/modifiers/curve-modifier/curve-modifier.mjs +64 -0
  70. package/esm2022/modifiers/index.mjs +2 -0
  71. package/esm2022/performances/adaptive-dpr/adaptive-dpr.mjs +44 -0
  72. package/esm2022/performances/adaptive-events/adaptive-events.mjs +27 -0
  73. package/esm2022/performances/angular-three-soba-performances.mjs +5 -0
  74. package/esm2022/performances/index.mjs +6 -0
  75. package/esm2022/performances/points/points-input.mjs +64 -0
  76. package/esm2022/performances/points/points.mjs +329 -0
  77. package/esm2022/performances/points/position-point.mjs +54 -0
  78. package/esm2022/performances/segments/segment-object.mjs +9 -0
  79. package/esm2022/performances/segments/segments.mjs +182 -0
  80. package/esm2022/shaders/angular-three-soba-shaders.mjs +1 -1
  81. package/esm2022/shaders/blur-pass/blur-pass.mjs +61 -0
  82. package/esm2022/shaders/caustics/caustics-material.mjs +130 -0
  83. package/esm2022/shaders/caustics/caustics-projection-material.mjs +31 -0
  84. package/esm2022/shaders/convolution-material/convolution-material.mjs +94 -0
  85. package/esm2022/shaders/discard-material/discard-material.mjs +3 -0
  86. package/esm2022/shaders/grid-material/grid-material.mjs +77 -0
  87. package/esm2022/shaders/index.mjs +18 -15
  88. package/esm2022/shaders/mesh-distort-material/mesh-distort-material.mjs +56 -0
  89. package/esm2022/shaders/mesh-reflector-material/mesh-reflector-material.mjs +223 -0
  90. package/esm2022/shaders/mesh-refraction-material/mesh-refraction-material.mjs +170 -0
  91. package/esm2022/shaders/mesh-transmission-material/mesh-transmission-material.mjs +268 -0
  92. package/esm2022/shaders/mesh-wobble-material/mesh-wobble-material.mjs +37 -0
  93. package/esm2022/shaders/shader-material/shader-material.mjs +34 -0
  94. package/esm2022/shaders/soft-shadow-material/soft-shadow-material.mjs +25 -0
  95. package/esm2022/shaders/sparkles-material/sparkles-material.mjs +33 -0
  96. package/esm2022/shaders/spot-light-material/spot-light-material.mjs +86 -0
  97. package/esm2022/shaders/star-field-material/star-field-material.mjs +33 -0
  98. package/esm2022/shaders/wireframe-material/wireframe-material.mjs +247 -0
  99. package/esm2022/staging/accumulative-shadows/accumulative-shadows.mjs +267 -0
  100. package/esm2022/staging/accumulative-shadows/progressive-light-map.mjs +108 -0
  101. package/esm2022/staging/accumulative-shadows/randomized-lights.mjs +206 -0
  102. package/esm2022/staging/angular-three-soba-staging.mjs +1 -1
  103. package/esm2022/staging/backdrop/backdrop.mjs +77 -0
  104. package/esm2022/staging/bb-anchor/bb-anchor.mjs +70 -0
  105. package/esm2022/staging/bounds/bounds.mjs +308 -0
  106. package/esm2022/staging/camera-shake/camera-shake.mjs +123 -0
  107. package/esm2022/staging/center/center.mjs +163 -0
  108. package/esm2022/staging/cloud/cloud.mjs +158 -0
  109. package/esm2022/staging/contact-shadows/contact-shadows.mjs +246 -0
  110. package/esm2022/staging/environment/assets.mjs +13 -0
  111. package/esm2022/staging/environment/environment-cube.mjs +47 -0
  112. package/esm2022/staging/environment/environment-ground.mjs +41 -0
  113. package/esm2022/staging/environment/environment-input.mjs +119 -0
  114. package/esm2022/staging/environment/environment-map.mjs +53 -0
  115. package/esm2022/staging/environment/environment-portal.mjs +113 -0
  116. package/esm2022/staging/environment/environment.mjs +61 -0
  117. package/esm2022/staging/environment/utils.mjs +105 -0
  118. package/esm2022/staging/float/float.mjs +94 -0
  119. package/esm2022/staging/index.mjs +22 -18
  120. package/esm2022/staging/matcap-texture/matcap-texture.mjs +64 -0
  121. package/esm2022/staging/normal-texture/normal-texture.mjs +53 -0
  122. package/esm2022/staging/sky/sky.mjs +119 -0
  123. package/esm2022/staging/sparkles/sparkles.mjs +164 -0
  124. package/esm2022/staging/spot-light/shadow-mesh-input.mjs +63 -0
  125. package/esm2022/staging/spot-light/shadow-mesh.mjs +266 -0
  126. package/esm2022/staging/spot-light/spot-light-input.mjs +84 -0
  127. package/esm2022/staging/spot-light/spot-light.mjs +81 -0
  128. package/esm2022/staging/spot-light/volumetric-mesh.mjs +98 -0
  129. package/esm2022/staging/stage/stage.mjs +388 -0
  130. package/esm2022/staging/stars/stars.mjs +147 -0
  131. package/esm2022/staging/wireframe/wireframe-input.mjs +191 -0
  132. package/esm2022/staging/wireframe/wireframe.mjs +224 -0
  133. package/esm2022/utils/angular-three-soba-utils.mjs +5 -0
  134. package/esm2022/utils/content/content.mjs +15 -0
  135. package/esm2022/utils/index.mjs +2 -0
  136. package/fesm2022/angular-three-soba-abstractions.mjs +668 -1882
  137. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  138. package/fesm2022/angular-three-soba-cameras.mjs +279 -232
  139. package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
  140. package/fesm2022/angular-three-soba-controls.mjs +104 -69
  141. package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
  142. package/fesm2022/angular-three-soba-loaders.mjs +177 -164
  143. package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
  144. package/fesm2022/angular-three-soba-materials.mjs +630 -482
  145. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  146. package/fesm2022/angular-three-soba-misc.mjs +2248 -122
  147. package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
  148. package/fesm2022/angular-three-soba-modifiers.mjs +71 -0
  149. package/fesm2022/angular-three-soba-modifiers.mjs.map +1 -0
  150. package/fesm2022/angular-three-soba-performances.mjs +697 -0
  151. package/fesm2022/angular-three-soba-performances.mjs.map +1 -0
  152. package/fesm2022/angular-three-soba-shaders.mjs +554 -209
  153. package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
  154. package/fesm2022/angular-three-soba-staging.mjs +3231 -2852
  155. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  156. package/fesm2022/angular-three-soba-utils.mjs +22 -0
  157. package/fesm2022/angular-three-soba-utils.mjs.map +1 -0
  158. package/fesm2022/angular-three-soba.mjs.map +1 -1
  159. package/loaders/gltf-loader/gltf-loader.d.ts +10 -0
  160. package/loaders/index.d.ts +4 -5
  161. package/loaders/loader/loader.d.ts +33 -0
  162. package/loaders/progress/progress.d.ts +9 -0
  163. package/loaders/texture-loader/texture-loader.d.ts +7 -0
  164. package/materials/index.d.ts +6 -5
  165. package/materials/mesh-distort-material/mesh-distort-material.d.ts +40 -0
  166. package/materials/mesh-reflector-material/mesh-reflector-material.d.ts +99 -0
  167. package/materials/mesh-refraction-material/mesh-refraction-material.d.ts +62 -0
  168. package/materials/mesh-transmission-material/mesh-transmission-material.d.ts +107 -0
  169. package/materials/mesh-wobble-material/mesh-wobble-material.d.ts +29 -0
  170. package/materials/point-material/point-material.d.ts +24 -0
  171. package/metadata.json +1 -0
  172. package/misc/animations/animations.d.ts +15 -0
  173. package/misc/{lib/bake-shadows → bake-shadows}/bake-shadows.d.ts +2 -5
  174. package/misc/caustics/caustics.d.ts +87 -0
  175. package/misc/decal/decal.d.ts +49 -0
  176. package/misc/depth-buffer/depth-buffer.d.ts +9 -0
  177. package/misc/example/example.d.ts +81 -0
  178. package/misc/{lib/fbo → fbo}/fbo.d.ts +4 -2
  179. package/misc/html/html-wrapper.d.ts +559 -0
  180. package/misc/html/html.d.ts +214 -0
  181. package/misc/index.d.ts +13 -4
  182. package/misc/sampler/sampler.d.ts +67 -0
  183. package/misc/shadow/shadow.d.ts +37 -0
  184. package/misc/stats-gl/stats-gl.d.ts +24 -0
  185. package/misc/trail/trail.d.ts +57 -0
  186. package/misc/trail-texture/inject-trail-texture.d.ts +9 -0
  187. package/misc/trail-texture/trail-texture.d.ts +50 -0
  188. package/modifiers/README.md +3 -0
  189. package/modifiers/curve-modifier/curve-modifier.d.ts +23 -0
  190. package/modifiers/index.d.ts +1 -0
  191. package/package.json +43 -32
  192. package/performances/README.md +3 -0
  193. package/performances/adaptive-dpr/adaptive-dpr.d.ts +14 -0
  194. package/{performance/lib/adaptive → performances/adaptive-events}/adaptive-events.d.ts +5 -6
  195. package/performances/index.d.ts +5 -0
  196. package/performances/points/points-input.d.ts +32 -0
  197. package/performances/points/points.d.ts +92 -0
  198. package/performances/points/position-point.d.ts +11 -0
  199. package/performances/segments/segment-object.d.ts +7 -0
  200. package/performances/segments/segments.d.ts +124 -0
  201. package/shaders/{lib/blur-pass → blur-pass}/blur-pass.d.ts +2 -2
  202. package/shaders/grid-material/grid-material.d.ts +37 -0
  203. package/shaders/index.d.ts +17 -14
  204. package/shaders/{lib/mesh-distort-material → mesh-distort-material}/mesh-distort-material.d.ts +147 -2
  205. package/shaders/{lib/mesh-transmission-material → mesh-transmission-material}/mesh-transmission-material.d.ts +1 -1
  206. package/shaders/{lib/mesh-wobble-material → mesh-wobble-material}/mesh-wobble-material.d.ts +1 -0
  207. package/shaders/{lib/shader-material → shader-material}/shader-material.d.ts +2 -2
  208. package/shaders/soft-shadow-material/soft-shadow-material.d.ts +19 -0
  209. package/shaders/sparkles-material/sparkles-material.d.ts +17 -0
  210. package/shaders/spot-light-material/spot-light-material.d.ts +13 -0
  211. package/shaders/star-field-material/star-field-material.d.ts +13 -0
  212. package/shaders/wireframe-material/wireframe-material.d.ts +58 -0
  213. package/staging/accumulative-shadows/accumulative-shadows.d.ts +146 -0
  214. package/staging/{lib/accumulative-shadows → accumulative-shadows}/progressive-light-map.d.ts +2 -2
  215. package/staging/accumulative-shadows/randomized-lights.d.ts +90 -0
  216. package/staging/backdrop/backdrop.d.ts +30 -0
  217. package/staging/bb-anchor/bb-anchor.d.ts +27 -0
  218. package/staging/bounds/bounds.d.ts +134 -0
  219. package/staging/camera-shake/camera-shake.d.ts +43 -0
  220. package/staging/center/center.d.ts +70 -0
  221. package/staging/cloud/cloud.d.ts +51 -0
  222. package/staging/contact-shadows/contact-shadows.d.ts +70 -0
  223. package/staging/{lib/environment → environment}/assets.d.ts +9 -9
  224. package/staging/environment/environment-cube.d.ts +15 -0
  225. package/staging/environment/environment-ground.d.ts +13 -0
  226. package/staging/environment/environment-input.d.ts +68 -0
  227. package/staging/environment/environment-map.d.ts +16 -0
  228. package/staging/environment/environment-portal.d.ts +18 -0
  229. package/staging/{lib/environment → environment}/environment.d.ts +2 -6
  230. package/staging/environment/utils.d.ts +7 -0
  231. package/staging/float/float.d.ts +31 -0
  232. package/staging/index.d.ts +21 -17
  233. package/staging/matcap-texture/matcap-texture.d.ts +13 -0
  234. package/staging/normal-texture/normal-texture.d.ts +16 -0
  235. package/staging/sky/sky.d.ts +48 -0
  236. package/staging/sparkles/sparkles.d.ts +63 -0
  237. package/staging/spot-light/shadow-mesh-input.d.ts +29 -0
  238. package/staging/spot-light/shadow-mesh.d.ts +37 -0
  239. package/staging/spot-light/spot-light-input.d.ts +38 -0
  240. package/staging/spot-light/spot-light.d.ts +39 -0
  241. package/staging/spot-light/volumetric-mesh.d.ts +24 -0
  242. package/staging/stage/stage.d.ts +130 -0
  243. package/staging/stars/stars.d.ts +45 -0
  244. package/staging/wireframe/wireframe-input.d.ts +65 -0
  245. package/staging/wireframe/wireframe.d.ts +28 -0
  246. package/utils/README.md +3 -0
  247. package/utils/content/content.d.ts +8 -0
  248. package/utils/index.d.ts +1 -0
  249. package/web-types.json +1 -0
  250. package/abstractions/lib/billboard/billboard.d.ts +0 -14
  251. package/abstractions/lib/catmull-rom-line/catmull-rom-line.d.ts +0 -15
  252. package/abstractions/lib/cubic-bezier-line/cubic-bezier-line.d.ts +0 -15
  253. package/abstractions/lib/edges/edges.d.ts +0 -18
  254. package/abstractions/lib/gizmo-helper/gizmo-helper.d.ts +0 -41
  255. package/abstractions/lib/gizmo-helper/gizmo-viewcube/constants.d.ts +0 -12
  256. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +0 -16
  257. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +0 -24
  258. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.d.ts +0 -14
  259. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube.d.ts +0 -15
  260. package/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.d.ts +0 -28
  261. package/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport.d.ts +0 -21
  262. package/abstractions/lib/line/line-input.d.ts +0 -19
  263. package/abstractions/lib/line/line.d.ts +0 -21
  264. package/abstractions/lib/quadratic-bezier-line/quadratic-bezier-line.d.ts +0 -19
  265. package/abstractions/lib/text/text.d.ts +0 -21
  266. package/abstractions/lib/text-3d/text-3d.d.ts +0 -39
  267. package/assets/default-spot-light-shadow.glsl +0 -10
  268. package/cameras/lib/camera/camera.d.ts +0 -19
  269. package/cameras/lib/cube-camera/cube-camera.d.ts +0 -27
  270. package/cameras/lib/orthographic-camera/orthographic-camera.d.ts +0 -17
  271. package/controls/lib/orbit-controls/orbit-controls.d.ts +0 -27
  272. package/esm2022/abstractions/lib/billboard/billboard.mjs +0 -74
  273. package/esm2022/abstractions/lib/catmull-rom-line/catmull-rom-line.mjs +0 -120
  274. package/esm2022/abstractions/lib/cubic-bezier-line/cubic-bezier-line.mjs +0 -99
  275. package/esm2022/abstractions/lib/edges/edges.mjs +0 -96
  276. package/esm2022/abstractions/lib/gizmo-helper/gizmo-helper.mjs +0 -213
  277. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/constants.mjs +0 -31
  278. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +0 -92
  279. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +0 -184
  280. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.mjs +0 -46
  281. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +0 -134
  282. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +0 -195
  283. package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +0 -267
  284. package/esm2022/abstractions/lib/line/line-input.mjs +0 -76
  285. package/esm2022/abstractions/lib/line/line.mjs +0 -133
  286. package/esm2022/abstractions/lib/quadratic-bezier-line/quadratic-bezier-line.mjs +0 -128
  287. package/esm2022/abstractions/lib/text/text.mjs +0 -115
  288. package/esm2022/abstractions/lib/text-3d/text-3d.mjs +0 -145
  289. package/esm2022/cameras/lib/camera/camera-content.mjs +0 -21
  290. package/esm2022/cameras/lib/camera/camera.mjs +0 -75
  291. package/esm2022/cameras/lib/cube-camera/cube-camera.mjs +0 -131
  292. package/esm2022/cameras/lib/orthographic-camera/orthographic-camera.mjs +0 -93
  293. package/esm2022/cameras/lib/perspective-camera/perspective-camera.mjs +0 -47
  294. package/esm2022/controls/lib/orbit-controls/orbit-controls.mjs +0 -147
  295. package/esm2022/loaders/lib/cube-texture-loader/cube-texture-loader.mjs +0 -10
  296. package/esm2022/loaders/lib/gltf-loader/gltf-loader.mjs +0 -32
  297. package/esm2022/loaders/lib/loader/loader.mjs +0 -134
  298. package/esm2022/loaders/lib/progress/progress.mjs +0 -39
  299. package/esm2022/loaders/lib/texture-loader/texture-loader.mjs +0 -19
  300. package/esm2022/materials/lib/mesh-distort-material/mesh-distort-material.mjs +0 -75
  301. package/esm2022/materials/lib/mesh-reflector-material/mesh-reflector-material.mjs +0 -328
  302. package/esm2022/materials/lib/mesh-refraction-material/mesh-refraction-material.mjs +0 -158
  303. package/esm2022/materials/lib/mesh-transmission-material/mesh-transmission-material.mjs +0 -238
  304. package/esm2022/materials/lib/mesh-wobble-material/mesh-wobble-material.mjs +0 -68
  305. package/esm2022/misc/lib/animations/animations.mjs +0 -52
  306. package/esm2022/misc/lib/bake-shadows/bake-shadows.mjs +0 -26
  307. package/esm2022/misc/lib/depth-buffer/depth-buffer.mjs +0 -39
  308. package/esm2022/misc/lib/fbo/fbo.mjs +0 -39
  309. package/esm2022/performance/angular-three-soba-performance.mjs +0 -5
  310. package/esm2022/performance/index.mjs +0 -5
  311. package/esm2022/performance/lib/adaptive/adaptive-dpr.mjs +0 -47
  312. package/esm2022/performance/lib/adaptive/adaptive-events.mjs +0 -37
  313. package/esm2022/performance/lib/detailed/detailed.mjs +0 -54
  314. package/esm2022/performance/lib/stats/stats.mjs +0 -80
  315. package/esm2022/shaders/lib/blur-pass/blur-pass.mjs +0 -61
  316. package/esm2022/shaders/lib/caustics-material/caustics-material.mjs +0 -128
  317. package/esm2022/shaders/lib/caustics-projection-material/caustics-projection-material.mjs +0 -33
  318. package/esm2022/shaders/lib/convolution-material/convolution-material.mjs +0 -94
  319. package/esm2022/shaders/lib/discard-material/discard-material.mjs +0 -3
  320. package/esm2022/shaders/lib/mesh-distort-material/mesh-distort-material.mjs +0 -55
  321. package/esm2022/shaders/lib/mesh-reflector-material/mesh-reflector-material.mjs +0 -223
  322. package/esm2022/shaders/lib/mesh-refraction-material/mesh-refraction-material.mjs +0 -169
  323. package/esm2022/shaders/lib/mesh-transmission-material/mesh-transmission-material.mjs +0 -268
  324. package/esm2022/shaders/lib/mesh-wobble-material/mesh-wobble-material.mjs +0 -37
  325. package/esm2022/shaders/lib/shader-material/shader-material.mjs +0 -34
  326. package/esm2022/shaders/lib/soft-shadow-material/soft-shadow-material.mjs +0 -33
  327. package/esm2022/shaders/lib/spot-light-material/spot-light-material.mjs +0 -86
  328. package/esm2022/shaders/lib/star-field-material/star-field-material.mjs +0 -32
  329. package/esm2022/staging/lib/accumulative-shadows/accumulative-shadows.mjs +0 -249
  330. package/esm2022/staging/lib/accumulative-shadows/progressive-light-map.mjs +0 -108
  331. package/esm2022/staging/lib/accumulative-shadows/randomized-lights.mjs +0 -201
  332. package/esm2022/staging/lib/bounds/bounds.mjs +0 -284
  333. package/esm2022/staging/lib/camera-shake/camera-shake.mjs +0 -122
  334. package/esm2022/staging/lib/caustics/caustics.mjs +0 -364
  335. package/esm2022/staging/lib/center/center.mjs +0 -143
  336. package/esm2022/staging/lib/cloud/cloud.mjs +0 -160
  337. package/esm2022/staging/lib/contact-shadows/contact-shadows.mjs +0 -228
  338. package/esm2022/staging/lib/environment/assets.mjs +0 -13
  339. package/esm2022/staging/lib/environment/environment-cube.mjs +0 -41
  340. package/esm2022/staging/lib/environment/environment-ground.mjs +0 -67
  341. package/esm2022/staging/lib/environment/environment-inputs.mjs +0 -87
  342. package/esm2022/staging/lib/environment/environment-map.mjs +0 -39
  343. package/esm2022/staging/lib/environment/environment-portal.mjs +0 -111
  344. package/esm2022/staging/lib/environment/environment.mjs +0 -165
  345. package/esm2022/staging/lib/environment/utils.mjs +0 -70
  346. package/esm2022/staging/lib/float/float.mjs +0 -77
  347. package/esm2022/staging/lib/sky/sky.mjs +0 -109
  348. package/esm2022/staging/lib/sparkles/sparkles.mjs +0 -210
  349. package/esm2022/staging/lib/spot-light/common.mjs +0 -42
  350. package/esm2022/staging/lib/spot-light/shadow-mesh-input.mjs +0 -51
  351. package/esm2022/staging/lib/spot-light/spot-light-input.mjs +0 -62
  352. package/esm2022/staging/lib/spot-light/spot-light-shadow-no-shader.mjs +0 -74
  353. package/esm2022/staging/lib/spot-light/spot-light-shadow-shader.mjs +0 -126
  354. package/esm2022/staging/lib/spot-light/spot-light-shadow.mjs +0 -63
  355. package/esm2022/staging/lib/spot-light/spot-light.mjs +0 -117
  356. package/esm2022/staging/lib/spot-light/volumetric-mesh.mjs +0 -86
  357. package/esm2022/staging/lib/stage/stage.mjs +0 -368
  358. package/esm2022/staging/lib/stars/stars.mjs +0 -140
  359. package/fesm2022/angular-three-soba-performance.mjs +0 -210
  360. package/fesm2022/angular-three-soba-performance.mjs.map +0 -1
  361. package/loaders/lib/cube-texture-loader/cube-texture-loader.d.ts +0 -3
  362. package/loaders/lib/gltf-loader/gltf-loader.d.ts +0 -8
  363. package/loaders/lib/loader/loader.d.ts +0 -26
  364. package/loaders/lib/progress/progress.d.ts +0 -16
  365. package/loaders/lib/texture-loader/texture-loader.d.ts +0 -5
  366. package/materials/lib/mesh-distort-material/mesh-distort-material.d.ts +0 -24
  367. package/materials/lib/mesh-reflector-material/mesh-reflector-material.d.ts +0 -41
  368. package/materials/lib/mesh-refraction-material/mesh-refraction-material.d.ts +0 -28
  369. package/materials/lib/mesh-transmission-material/mesh-transmission-material.d.ts +0 -46
  370. package/materials/lib/mesh-wobble-material/mesh-wobble-material.d.ts +0 -14
  371. package/misc/lib/animations/animations.d.ts +0 -13
  372. package/misc/lib/depth-buffer/depth-buffer.d.ts +0 -7
  373. package/performance/README.md +0 -3
  374. package/performance/index.d.ts +0 -4
  375. package/performance/lib/adaptive/adaptive-dpr.d.ts +0 -11
  376. package/performance/lib/detailed/detailed.d.ts +0 -13
  377. package/performance/lib/stats/stats.d.ts +0 -15
  378. package/plugin/README.md +0 -11
  379. package/plugin/generators.json +0 -19
  380. package/plugin/package.json +0 -9
  381. package/plugin/src/generators/init/compat.d.ts +0 -2
  382. package/plugin/src/generators/init/compat.js +0 -6
  383. package/plugin/src/generators/init/compat.js.map +0 -1
  384. package/plugin/src/generators/init/init.d.ts +0 -4
  385. package/plugin/src/generators/init/init.js +0 -22
  386. package/plugin/src/generators/init/init.js.map +0 -1
  387. package/plugin/src/generators/init/schema.json +0 -6
  388. package/plugin/src/index.d.ts +0 -1
  389. package/plugin/src/index.js +0 -6
  390. package/plugin/src/index.js.map +0 -1
  391. package/shaders/lib/soft-shadow-material/soft-shadow-material.d.ts +0 -10
  392. package/shaders/lib/spot-light-material/spot-light-material.d.ts +0 -4
  393. package/shaders/lib/star-field-material/star-field-material.d.ts +0 -3
  394. package/staging/lib/accumulative-shadows/accumulative-shadows.d.ts +0 -58
  395. package/staging/lib/accumulative-shadows/randomized-lights.d.ts +0 -42
  396. package/staging/lib/bounds/bounds.d.ts +0 -48
  397. package/staging/lib/camera-shake/camera-shake.d.ts +0 -28
  398. package/staging/lib/caustics/caustics.d.ts +0 -47
  399. package/staging/lib/center/center.d.ts +0 -40
  400. package/staging/lib/cloud/cloud.d.ts +0 -23
  401. package/staging/lib/contact-shadows/contact-shadows.d.ts +0 -29
  402. package/staging/lib/environment/environment-cube.d.ts +0 -11
  403. package/staging/lib/environment/environment-ground.d.ts +0 -9
  404. package/staging/lib/environment/environment-inputs.d.ts +0 -28
  405. package/staging/lib/environment/environment-map.d.ts +0 -10
  406. package/staging/lib/environment/environment-portal.d.ts +0 -15
  407. package/staging/lib/environment/utils.d.ts +0 -8
  408. package/staging/lib/float/float.d.ts +0 -16
  409. package/staging/lib/sky/sky.d.ts +0 -20
  410. package/staging/lib/sparkles/sparkles.d.ts +0 -29
  411. package/staging/lib/spot-light/common.d.ts +0 -3
  412. package/staging/lib/spot-light/shadow-mesh-input.d.ts +0 -14
  413. package/staging/lib/spot-light/spot-light-input.d.ts +0 -16
  414. package/staging/lib/spot-light/spot-light-shadow-no-shader.d.ts +0 -14
  415. package/staging/lib/spot-light/spot-light-shadow-shader.d.ts +0 -25
  416. package/staging/lib/spot-light/spot-light-shadow.d.ts +0 -6
  417. package/staging/lib/spot-light/spot-light.d.ts +0 -17
  418. package/staging/lib/spot-light/volumetric-mesh.d.ts +0 -15
  419. package/staging/lib/stage/stage.d.ts +0 -87
  420. package/staging/lib/stars/stars.d.ts +0 -20
  421. /package/shaders/{lib/caustics-material → caustics}/caustics-material.d.ts +0 -0
  422. /package/shaders/{lib/caustics-projection-material → caustics}/caustics-projection-material.d.ts +0 -0
  423. /package/shaders/{lib/convolution-material → convolution-material}/convolution-material.d.ts +0 -0
  424. /package/shaders/{lib/discard-material → discard-material}/discard-material.d.ts +0 -0
  425. /package/shaders/{lib/mesh-reflector-material → mesh-reflector-material}/mesh-reflector-material.d.ts +0 -0
  426. /package/shaders/{lib/mesh-refraction-material → mesh-refraction-material}/mesh-refraction-material.d.ts +0 -0
@@ -1,10 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, TemplateRef, Directive, Input, Component, CUSTOM_ELEMENTS_SCHEMA, ViewChild, ContentChild } from '@angular/core';
3
- import { NgIf, NgTemplateOutlet } from '@angular/common';
4
- import { extend, NgtRxStore, injectNgtRef, NgtStore, injectBeforeRender, NgtArgs, NgtPush } from 'angular-three';
5
- import { map, combineLatest } from 'rxjs';
2
+ import { inject, TemplateRef, Directive, Input, runInInjectionContext, computed, effect, untracked, DestroyRef, ViewContainerRef, Component, CUSTOM_ELEMENTS_SCHEMA, ContentChild, ViewChild } from '@angular/core';
3
+ import { NgTemplateOutlet, NgIf } from '@angular/common';
4
+ import { assertInjectionContext, injectNgtStore, extend, signalStore, injectNgtRef, injectBeforeRender, NgtArgs } from 'angular-three';
6
5
  import * as THREE from 'three';
7
- import { Group, CubeCamera, OrthographicCamera, PerspectiveCamera } from 'three';
6
+ import { Group, OrthographicCamera, PerspectiveCamera } from 'three';
8
7
  import { injectNgtsFBO } from 'angular-three-soba/misc';
9
8
 
10
9
  class NgtsCameraContent {
@@ -15,203 +14,240 @@ class NgtsCameraContent {
15
14
  static ngTemplateContextGuard(_, ctx) {
16
15
  return true;
17
16
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCameraContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
19
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: NgtsCameraContent, isStandalone: true, selector: "ng-template[ngtsCameraContent]", inputs: { ngtsCameraContent: "ngtsCameraContent" }, ngImport: i0 }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCameraContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: NgtsCameraContent, isStandalone: true, selector: "ng-template[ngtsCameraContent]", inputs: { ngtsCameraContent: "ngtsCameraContent" }, ngImport: i0 }); }
20
19
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCameraContent, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCameraContent, decorators: [{
22
21
  type: Directive,
23
22
  args: [{ selector: 'ng-template[ngtsCameraContent]', standalone: true }]
24
23
  }], propDecorators: { ngtsCameraContent: [{
25
24
  type: Input
26
25
  }] } });
27
26
 
28
- extend({ Group, CubeCamera });
29
- class NgtsCubeCamera extends NgtRxStore {
30
- /** Number of frames to render, Infinity */
31
- set frames(frames) {
32
- this.set({ frames });
27
+ const defaultCubeCameraState = {
28
+ resolution: 256,
29
+ near: 0.1,
30
+ far: 1000,
31
+ };
32
+ function injectNgtsCubeCamera(cubeCameraState, { injector } = {}) {
33
+ injector = assertInjectionContext(injectNgtsCubeCamera, injector);
34
+ return runInInjectionContext(injector, () => {
35
+ const state = computed(() => ({ ...defaultCubeCameraState, ...cubeCameraState() }));
36
+ const resolution = computed(() => state().resolution);
37
+ const near = computed(() => state().near);
38
+ const far = computed(() => state().far);
39
+ const store = injectNgtStore();
40
+ const _gl = store.select('gl');
41
+ const _scene = store.select('scene');
42
+ const _fbo = computed(() => {
43
+ const renderTarget = new THREE.WebGLCubeRenderTarget(resolution());
44
+ renderTarget.texture.type = THREE.HalfFloatType;
45
+ return renderTarget;
46
+ });
47
+ effect((onCleanup) => {
48
+ const fbo = _fbo();
49
+ onCleanup(() => fbo.dispose());
50
+ });
51
+ const _camera = computed(() => new THREE.CubeCamera(near(), far(), _fbo()));
52
+ let originalFog;
53
+ let originalBackground;
54
+ const update = computed(() => {
55
+ const [scene, gl, camera, { envMap, fog }] = [_scene(), _gl(), _camera(), untracked(state)];
56
+ return () => {
57
+ originalFog = scene.fog;
58
+ originalBackground = scene.background;
59
+ scene.background = envMap || originalBackground;
60
+ scene.fog = fog || originalFog;
61
+ camera.update(gl, scene);
62
+ scene.fog = originalFog;
63
+ scene.background = originalBackground;
64
+ };
65
+ });
66
+ return { fbo: _fbo, camera: _camera, update };
67
+ });
68
+ }
69
+ extend({ Group });
70
+ class NgtsCubeCameraContent {
71
+ static ngTemplateContextGuard(_, ctx) {
72
+ return true;
33
73
  }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCubeCameraContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: NgtsCubeCameraContent, isStandalone: true, selector: "ng-template[ngtsCubeCameraContent]", ngImport: i0 }); }
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCubeCameraContent, decorators: [{
78
+ type: Directive,
79
+ args: [{ selector: 'ng-template[ngtsCubeCameraContent]', standalone: true }]
80
+ }] });
81
+ class NgtsCubeCamera {
34
82
  /** Resolution of the FBO, 256 */
35
- set resolution(resolution) {
36
- this.set({ resolution });
83
+ set _resolution(resolution) {
84
+ this.inputs.set({ resolution });
37
85
  }
38
86
  /** Camera near, 0.1 */
39
- set near(near) {
40
- this.set({ near });
87
+ set _near(near) {
88
+ this.inputs.set({ near });
41
89
  }
42
90
  /** Camera far, 1000 */
43
- set far(far) {
44
- this.set({ far });
91
+ set _far(far) {
92
+ this.inputs.set({ far });
45
93
  }
46
94
  /** Custom environment map that is temporarily set as the scenes background */
47
- set envMap(envMap) {
48
- this.set({ envMap });
95
+ set _envMap(envMap) {
96
+ this.inputs.set({ envMap });
49
97
  }
50
98
  /** Custom fog that is temporarily set as the scenes fog */
51
- set fog(fog) {
52
- this.set({ fog });
53
- }
54
- initialize() {
55
- super.initialize();
56
- this.set({
57
- frames: Infinity,
58
- resolution: 256,
59
- near: 0.1,
60
- far: 1000,
61
- });
99
+ set _fog(fog) {
100
+ this.inputs.set({ fog });
62
101
  }
63
102
  constructor() {
64
- super();
103
+ this.inputs = signalStore({ frames: Infinity });
65
104
  this.cameraRef = injectNgtRef();
66
- this.store = inject(NgtStore);
67
- this.connect('fbo', this.select('resolution').pipe(map((resolution) => {
68
- const fbo = new THREE.WebGLCubeRenderTarget(resolution);
69
- fbo.texture.encoding = this.store.get('gl').outputEncoding;
70
- fbo.texture.type = THREE.HalfFloatType;
71
- return fbo;
72
- })));
73
- this.connect('cameraArgs', combineLatest([this.select('near'), this.select('far'), this.select('fbo')]));
105
+ this.cubeCamera = injectNgtsCubeCamera(this.inputs.state);
106
+ this.texture = computed(() => this.cubeCamera.fbo().texture);
107
+ this.beforeRender();
108
+ inject(DestroyRef).onDestroy(() => {
109
+ this.contentRef?.destroy();
110
+ });
111
+ }
112
+ ngOnInit() {
113
+ this.contentRef = this.anchor.createEmbeddedView(this.cameraContent, { texture: this.texture });
114
+ }
115
+ beforeRender() {
74
116
  let count = 0;
75
- let originalFog;
76
- let originalBackground;
77
- injectBeforeRender(({ scene, gl }) => {
78
- const { frames, envMap, fog } = this.get();
79
- if (envMap &&
80
- this.cameraRef.nativeElement &&
81
- this.groupRef.nativeElement &&
82
- (frames === Infinity || count < frames)) {
83
- this.groupRef.nativeElement.visible = false;
84
- originalFog = scene.fog;
85
- originalBackground = scene.background;
86
- scene.background = envMap || originalBackground;
87
- scene.fog = fog || originalFog;
88
- this.cameraRef.nativeElement.update(gl, scene);
89
- scene.fog = originalFog;
90
- scene.background = originalBackground;
91
- this.groupRef.nativeElement.visible = true;
117
+ injectBeforeRender(() => {
118
+ const camera = this.cameraRef.nativeElement;
119
+ if (!camera)
120
+ return;
121
+ const update = this.cubeCamera.update();
122
+ const frames = this.inputs.get('frames');
123
+ if (frames === Infinity || count < frames) {
124
+ camera.visible = false;
125
+ update();
126
+ camera.visible = true;
92
127
  count++;
93
128
  }
94
129
  });
95
130
  }
96
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCubeCamera, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
97
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtsCubeCamera, isStandalone: true, selector: "ngts-cube-camera", inputs: { frames: "frames", resolution: "resolution", near: "near", far: "far", envMap: "envMap", fog: "fog" }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
98
- <ngt-group ngtCompound>
99
- <ngt-cube-camera [ref]="cameraRef" *args="get('cameraArgs')" />
100
- <ngt-group #group>
101
- <ng-container
102
- *ngIf="cameraContent && cameraContent.ngtsCameraContent && get('fbo')"
103
- [ngTemplateOutlet]="cameraContent.template"
104
- [ngTemplateOutletContext]="{ fbo: get('fbo').texture, group }"
105
- />
106
- </ngt-group>
107
- </ngt-group>
108
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
131
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCubeCamera, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtsCubeCamera, isStandalone: true, selector: "ngts-cube-camera", inputs: { cameraRef: "cameraRef", _resolution: ["resolution", "_resolution"], _near: ["near", "_near"], _far: ["far", "_far"], _envMap: ["envMap", "_envMap"], _fog: ["fog", "_fog"] }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCubeCameraContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
133
+ <ngt-group ngtCompound>
134
+ <ngt-primitive *args="[cubeCamera.camera()]" />
135
+ <ngt-group [ref]="cameraRef">
136
+ <ng-container #anchor />
137
+ </ngt-group>
138
+ </ngt-group>
139
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
109
140
  }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCubeCamera, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCubeCamera, decorators: [{
111
142
  type: Component,
112
143
  args: [{
113
144
  selector: 'ngts-cube-camera',
114
145
  standalone: true,
115
146
  template: `
116
- <ngt-group ngtCompound>
117
- <ngt-cube-camera [ref]="cameraRef" *args="get('cameraArgs')" />
118
- <ngt-group #group>
119
- <ng-container
120
- *ngIf="cameraContent && cameraContent.ngtsCameraContent && get('fbo')"
121
- [ngTemplateOutlet]="cameraContent.template"
122
- [ngTemplateOutletContext]="{ fbo: get('fbo').texture, group }"
123
- />
124
- </ngt-group>
125
- </ngt-group>
126
- `,
127
- imports: [NgIf, NgTemplateOutlet, NgtArgs],
147
+ <ngt-group ngtCompound>
148
+ <ngt-primitive *args="[cubeCamera.camera()]" />
149
+ <ngt-group [ref]="cameraRef">
150
+ <ng-container #anchor />
151
+ </ngt-group>
152
+ </ngt-group>
153
+ `,
154
+ imports: [NgtArgs, NgTemplateOutlet],
128
155
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
129
156
  }]
130
- }], ctorParameters: function () { return []; }, propDecorators: { groupRef: [{
131
- type: ViewChild,
132
- args: ['group', { static: true }]
157
+ }], ctorParameters: function () { return []; }, propDecorators: { cameraRef: [{
158
+ type: Input
133
159
  }], cameraContent: [{
134
160
  type: ContentChild,
135
- args: [NgtsCameraContent]
136
- }], frames: [{
137
- type: Input
138
- }], resolution: [{
139
- type: Input
140
- }], near: [{
141
- type: Input
142
- }], far: [{
143
- type: Input
144
- }], envMap: [{
145
- type: Input
146
- }], fog: [{
147
- type: Input
161
+ args: [NgtsCubeCameraContent, { static: true, read: TemplateRef }]
162
+ }], anchor: [{
163
+ type: ViewChild,
164
+ args: ['anchor', { static: true, read: ViewContainerRef }]
165
+ }], _resolution: [{
166
+ type: Input,
167
+ args: [{ alias: 'resolution' }]
168
+ }], _near: [{
169
+ type: Input,
170
+ args: [{ alias: 'near' }]
171
+ }], _far: [{
172
+ type: Input,
173
+ args: [{ alias: 'far' }]
174
+ }], _envMap: [{
175
+ type: Input,
176
+ args: [{ alias: 'envMap' }]
177
+ }], _fog: [{
178
+ type: Input,
179
+ args: [{ alias: 'fog' }]
148
180
  }] } });
149
181
 
150
- class NgtsCamera extends NgtRxStore {
151
- constructor() {
152
- super(...arguments);
153
- this.cameraRef = injectNgtRef();
154
- this.store = inject(NgtStore);
155
- this.fboRef = injectNgtsFBO(() => this.select('resolution').pipe(map((resolution) => ({ width: resolution }))));
156
- }
157
- set makeDefault(makeDefault) {
158
- this.set({ makeDefault });
182
+ class NgtsCamera {
183
+ set _makeDefault(makeDefault) {
184
+ this.inputs.set({ makeDefault });
159
185
  }
160
- set manual(manual) {
161
- this.set({ manual });
186
+ set _manual(manual) {
187
+ this.inputs.set({ manual });
162
188
  }
163
- set frames(frames) {
164
- this.set({ frames });
189
+ set _frames(frames) {
190
+ this.inputs.set({ frames });
165
191
  }
166
- set resolution(resolution) {
167
- this.set({ resolution });
192
+ set _resolution(resolution) {
193
+ this.inputs.set({ resolution });
168
194
  }
169
- set envMap(envMap) {
170
- this.set({ envMap });
195
+ set _envMap(envMap) {
196
+ this.inputs.set({ envMap });
171
197
  }
172
- initialize() {
173
- super.initialize();
174
- this.set({ resolution: 256, frames: Infinity, makeDefault: false, manual: false });
175
- }
176
- ngOnInit() {
177
- this.hold(this.cameraRef.$, (camera) => {
178
- camera.updateProjectionMatrix();
179
- this.setDefaultCamera();
180
- this.updateProjectionMatrix();
198
+ constructor() {
199
+ this.inputs = signalStore({
200
+ resolution: 256,
201
+ frames: Infinity,
202
+ makeDefault: false,
203
+ manual: false,
181
204
  });
205
+ this.cameraRef = injectNgtRef();
206
+ this.cameraResolution = this.inputs.select('resolution');
207
+ this.store = injectNgtStore();
208
+ this.fboRef = injectNgtsFBO(() => ({ width: this.cameraResolution() }));
209
+ this.setDefaultCamera();
210
+ this.updateProjectionMatrix();
182
211
  }
183
212
  setDefaultCamera() {
184
- this.effect(combineLatest([this.cameraRef.$, this.select('makeDefault')]), ([camera, makeDefault]) => {
185
- if (makeDefault) {
213
+ const makeDefault = this.inputs.select('makeDefault');
214
+ effect((onCleanup) => {
215
+ const camera = this.cameraRef.nativeElement;
216
+ if (camera && makeDefault()) {
186
217
  const { camera: oldCamera } = this.store.get();
187
218
  this.store.set({ camera });
188
- return () => {
189
- this.store.set({ camera: oldCamera });
190
- };
219
+ onCleanup(() => this.store.set({ camera: oldCamera }));
191
220
  }
192
221
  });
193
222
  }
194
223
  updateProjectionMatrix() {
195
- this.effect(combineLatest([this.cameraRef.$, this.select('manual')]), ([camera, manual]) => {
196
- if (!manual && camera)
224
+ const manual = this.inputs.select('manual');
225
+ effect(() => {
226
+ const camera = this.cameraRef.nativeElement;
227
+ if (!manual() && camera)
197
228
  camera.updateProjectionMatrix();
198
229
  });
199
230
  }
200
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCamera, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
201
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: NgtsCamera, inputs: { makeDefault: "makeDefault", manual: "manual", frames: "frames", resolution: "resolution", envMap: "envMap", cameraRef: "cameraRef" }, usesInheritance: true, ngImport: i0 }); }
231
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCamera, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
232
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: NgtsCamera, inputs: { _makeDefault: ["makeDefault", "_makeDefault"], _manual: ["manual", "_manual"], _frames: ["frames", "_frames"], _resolution: ["resolution", "_resolution"], _envMap: ["envMap", "_envMap"], cameraRef: "cameraRef" }, ngImport: i0 }); }
202
233
  }
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCamera, decorators: [{
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsCamera, decorators: [{
204
235
  type: Directive
205
- }], propDecorators: { makeDefault: [{
206
- type: Input
207
- }], manual: [{
208
- type: Input
209
- }], frames: [{
210
- type: Input
211
- }], resolution: [{
212
- type: Input
213
- }], envMap: [{
214
- type: Input
236
+ }], ctorParameters: function () { return []; }, propDecorators: { _makeDefault: [{
237
+ type: Input,
238
+ args: [{ alias: 'makeDefault' }]
239
+ }], _manual: [{
240
+ type: Input,
241
+ args: [{ alias: 'manual' }]
242
+ }], _frames: [{
243
+ type: Input,
244
+ args: [{ alias: 'frames' }]
245
+ }], _resolution: [{
246
+ type: Input,
247
+ args: [{ alias: 'resolution' }]
248
+ }], _envMap: [{
249
+ type: Input,
250
+ args: [{ alias: 'envMap' }]
215
251
  }], cameraRef: [{
216
252
  type: Input
217
253
  }] } });
@@ -220,117 +256,128 @@ extend({ OrthographicCamera, Group });
220
256
  class NgtsOrthographicCamera extends NgtsCamera {
221
257
  constructor() {
222
258
  super(...arguments);
223
- this.left$ = combineLatest([this.select('left'), this.store.select('size')]).pipe(map(([left, size]) => left || size.width / -2));
224
- this.right$ = combineLatest([this.select('right'), this.store.select('size')]).pipe(map(([right, size]) => right || size.width / 2));
225
- this.top$ = combineLatest([this.select('top'), this.store.select('size')]).pipe(map(([top, size]) => top || size.height / 2));
226
- this.bottom$ = combineLatest([this.select('bottom'), this.store.select('size')]).pipe(map(([bottom, size]) => bottom || size.height / -2));
227
- }
228
- set left(left) {
229
- this.set({ left });
259
+ this.orthographicInputs = signalStore({
260
+ left: 0,
261
+ right: 0,
262
+ top: 0,
263
+ bottom: 0,
264
+ });
265
+ this.left = this.orthographicInputs.select('left');
266
+ this.right = this.orthographicInputs.select('right');
267
+ this.top = this.orthographicInputs.select('top');
268
+ this.bottom = this.orthographicInputs.select('bottom');
269
+ this.size = this.store.select('size');
270
+ this.cameraLeft = computed(() => this.left() || this.size().width / -2);
271
+ this.cameraRight = computed(() => this.right() || this.size().width / 2);
272
+ this.cameraTop = computed(() => this.top() || this.size().height / 2);
273
+ this.cameraBottom = computed(() => this.bottom() || this.size().height / -2);
230
274
  }
231
- set right(right) {
232
- this.set({ right });
275
+ set _left(left) {
276
+ this.orthographicInputs.set({ left });
233
277
  }
234
- set top(top) {
235
- this.set({ top });
278
+ set _right(right) {
279
+ this.orthographicInputs.set({ right });
236
280
  }
237
- set bottom(bottom) {
238
- this.set({ bottom });
281
+ set _top(top) {
282
+ this.orthographicInputs.set({ top });
239
283
  }
240
- initialize() {
241
- super.initialize();
242
- this.set({ left: 0, right: 0, top: 0, bottom: 0 });
284
+ set _bottom(bottom) {
285
+ this.orthographicInputs.set({ bottom });
243
286
  }
244
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsOrthographicCamera, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
245
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtsOrthographicCamera, isStandalone: true, selector: "ngts-orthographic-camera", inputs: { left: "left", right: "right", top: "top", bottom: "bottom" }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
246
- <ngt-orthographic-camera
247
- ngtCompound
248
- [ref]="cameraRef"
249
- [left]="left$ | ngtPush"
250
- [right]="right$ | ngtPush"
251
- [top]="top$ | ngtPush"
252
- [bottom]="bottom$ | ngtPush"
253
- >
254
- <ng-container
255
- *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
256
- [ngTemplateOutlet]="cameraContent.template"
257
- />
258
- </ngt-orthographic-camera>
259
- <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
260
- <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
261
- </ngt-group>
262
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: NgtPush, name: "ngtPush" }] }); }
287
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsOrthographicCamera, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
288
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtsOrthographicCamera, isStandalone: true, selector: "ngts-orthographic-camera", inputs: { _left: ["left", "_left"], _right: ["right", "_right"], _top: ["top", "_top"], _bottom: ["bottom", "_bottom"] }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
289
+ <ngt-orthographic-camera
290
+ ngtCompound
291
+ [ref]="cameraRef"
292
+ [left]="cameraLeft()"
293
+ [right]="cameraRight()"
294
+ [top]="cameraTop()"
295
+ [bottom]="cameraBottom()"
296
+ >
297
+ <ng-container
298
+ *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
299
+ [ngTemplateOutlet]="cameraContent.template"
300
+ />
301
+ </ngt-orthographic-camera>
302
+ <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
303
+ <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
304
+ </ngt-group>
305
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
263
306
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsOrthographicCamera, decorators: [{
307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsOrthographicCamera, decorators: [{
265
308
  type: Component,
266
309
  args: [{
267
310
  selector: 'ngts-orthographic-camera',
268
311
  standalone: true,
269
312
  template: `
270
- <ngt-orthographic-camera
271
- ngtCompound
272
- [ref]="cameraRef"
273
- [left]="left$ | ngtPush"
274
- [right]="right$ | ngtPush"
275
- [top]="top$ | ngtPush"
276
- [bottom]="bottom$ | ngtPush"
277
- >
278
- <ng-container
279
- *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
280
- [ngTemplateOutlet]="cameraContent.template"
281
- />
282
- </ngt-orthographic-camera>
283
- <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
284
- <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
285
- </ngt-group>
286
- `,
287
- imports: [NgIf, NgTemplateOutlet, NgtPush],
313
+ <ngt-orthographic-camera
314
+ ngtCompound
315
+ [ref]="cameraRef"
316
+ [left]="cameraLeft()"
317
+ [right]="cameraRight()"
318
+ [top]="cameraTop()"
319
+ [bottom]="cameraBottom()"
320
+ >
321
+ <ng-container
322
+ *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
323
+ [ngTemplateOutlet]="cameraContent.template"
324
+ />
325
+ </ngt-orthographic-camera>
326
+ <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
327
+ <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
328
+ </ngt-group>
329
+ `,
330
+ imports: [NgIf, NgTemplateOutlet],
288
331
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
289
332
  }]
290
333
  }], propDecorators: { cameraContent: [{
291
334
  type: ContentChild,
292
335
  args: [NgtsCameraContent]
293
- }], left: [{
294
- type: Input
295
- }], right: [{
296
- type: Input
297
- }], top: [{
298
- type: Input
299
- }], bottom: [{
300
- type: Input
336
+ }], _left: [{
337
+ type: Input,
338
+ args: [{ alias: 'left' }]
339
+ }], _right: [{
340
+ type: Input,
341
+ args: [{ alias: 'right' }]
342
+ }], _top: [{
343
+ type: Input,
344
+ args: [{ alias: 'top' }]
345
+ }], _bottom: [{
346
+ type: Input,
347
+ args: [{ alias: 'bottom' }]
301
348
  }] } });
302
349
 
303
350
  extend({ PerspectiveCamera, Group });
304
351
  class NgtsPerspectiveCamera extends NgtsCamera {
305
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsPerspectiveCamera, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
306
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtsPerspectiveCamera, isStandalone: true, selector: "ngts-perspective-camera", queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
307
- <ngt-perspective-camera [ref]="cameraRef" ngtCompound>
308
- <ng-container
309
- *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
310
- [ngTemplateOutlet]="cameraContent.template"
311
- />
312
- </ngt-perspective-camera>
313
- <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
314
- <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
315
- </ngt-group>
316
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsPerspectiveCamera, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
353
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtsPerspectiveCamera, isStandalone: true, selector: "ngts-perspective-camera", queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
354
+ <ngt-perspective-camera [ref]="cameraRef" ngtCompound>
355
+ <ng-container
356
+ *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
357
+ [ngTemplateOutlet]="cameraContent.template"
358
+ />
359
+ </ngt-perspective-camera>
360
+ <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
361
+ <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
362
+ </ngt-group>
363
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
317
364
  }
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsPerspectiveCamera, decorators: [{
365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtsPerspectiveCamera, decorators: [{
319
366
  type: Component,
320
367
  args: [{
321
368
  selector: 'ngts-perspective-camera',
322
369
  standalone: true,
323
370
  template: `
324
- <ngt-perspective-camera [ref]="cameraRef" ngtCompound>
325
- <ng-container
326
- *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
327
- [ngTemplateOutlet]="cameraContent.template"
328
- />
329
- </ngt-perspective-camera>
330
- <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
331
- <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
332
- </ngt-group>
333
- `,
371
+ <ngt-perspective-camera [ref]="cameraRef" ngtCompound>
372
+ <ng-container
373
+ *ngIf="cameraContent && !cameraContent.ngtsCameraContent"
374
+ [ngTemplateOutlet]="cameraContent.template"
375
+ />
376
+ </ngt-perspective-camera>
377
+ <ngt-group #group *ngIf="cameraContent && cameraContent.ngtsCameraContent">
378
+ <ng-container *ngTemplateOutlet="cameraContent.template; context: { fbo: fboRef.nativeElement, group }" />
379
+ </ngt-group>
380
+ `,
334
381
  imports: [NgIf, NgTemplateOutlet],
335
382
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
336
383
  }]
@@ -343,5 +390,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
343
390
  * Generated bundle index. Do not edit.
344
391
  */
345
392
 
346
- export { NgtsCameraContent, NgtsCubeCamera, NgtsOrthographicCamera, NgtsPerspectiveCamera };
393
+ export { NgtsCameraContent, NgtsCubeCamera, NgtsCubeCameraContent, NgtsOrthographicCamera, NgtsPerspectiveCamera, injectNgtsCubeCamera };
347
394
  //# sourceMappingURL=angular-three-soba-cameras.mjs.map