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

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