angular-three-soba 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/abstractions/lib/catmull-rom-line.d.ts +148 -148
  2. package/abstractions/lib/edges.d.ts +166 -166
  3. package/abstractions/lib/grid.d.ts +30 -30
  4. package/abstractions/lib/line.d.ts +10 -9
  5. package/abstractions/lib/prism-geometry.d.ts +4 -4
  6. package/abstractions/lib/rounded-box.d.ts +3 -3
  7. package/abstractions/lib/text-3d.d.ts +38 -38
  8. package/abstractions/lib/text.d.ts +2 -3
  9. package/cameras/lib/cube-camera.d.ts +2 -2
  10. package/cameras/lib/orthographic-camera.d.ts +7 -8
  11. package/cameras/lib/perspective-camera.d.ts +2 -3
  12. package/controls/lib/camera-controls.d.ts +1 -1
  13. package/controls/lib/orbit-controls.d.ts +1 -1
  14. package/esm2022/abstractions/lib/billboard.mjs +3 -3
  15. package/esm2022/abstractions/lib/catmull-rom-line.mjs +3 -3
  16. package/esm2022/abstractions/lib/cubic-bezier-line.mjs +3 -3
  17. package/esm2022/abstractions/lib/edges.mjs +30 -34
  18. package/esm2022/abstractions/lib/gradient-texture.mjs +3 -3
  19. package/esm2022/abstractions/lib/grid.mjs +3 -3
  20. package/esm2022/abstractions/lib/helper.mjs +18 -20
  21. package/esm2022/abstractions/lib/line.mjs +25 -28
  22. package/esm2022/abstractions/lib/prism-geometry.mjs +3 -3
  23. package/esm2022/abstractions/lib/quadratic-bezier-line.mjs +3 -3
  24. package/esm2022/abstractions/lib/rounded-box.mjs +11 -17
  25. package/esm2022/abstractions/lib/text-3d.mjs +14 -17
  26. package/esm2022/abstractions/lib/text.mjs +11 -16
  27. package/esm2022/cameras/lib/camera-content.mjs +3 -3
  28. package/esm2022/cameras/lib/cube-camera.mjs +18 -27
  29. package/esm2022/cameras/lib/orthographic-camera.mjs +20 -20
  30. package/esm2022/cameras/lib/perspective-camera.mjs +21 -21
  31. package/esm2022/controls/lib/camera-controls.mjs +3 -3
  32. package/esm2022/controls/lib/orbit-controls.mjs +3 -3
  33. package/esm2022/controls/lib/scroll-controls.mjs +124 -130
  34. package/esm2022/gizmos/lib/gizmo-helper/gizmo-helper.mjs +6 -6
  35. package/esm2022/gizmos/lib/gizmo-helper/gizmo-viewcube.mjs +12 -12
  36. package/esm2022/gizmos/lib/gizmo-helper/gizmo-viewport.mjs +9 -9
  37. package/esm2022/gizmos/lib/pivot-controls/axis-arrow.mjs +6 -4
  38. package/esm2022/gizmos/lib/pivot-controls/axis-rotator.mjs +3 -3
  39. package/esm2022/gizmos/lib/pivot-controls/pivot-controls.mjs +44 -47
  40. package/esm2022/gizmos/lib/pivot-controls/plane-slider.mjs +3 -3
  41. package/esm2022/gizmos/lib/pivot-controls/scaling-sphere.mjs +3 -3
  42. package/esm2022/gizmos/lib/transform-controls.mjs +3 -3
  43. package/esm2022/loaders/lib/loader.mjs +3 -3
  44. package/esm2022/materials/lib/custom-shader-material.mjs +8 -12
  45. package/esm2022/materials/lib/mesh-distort-material.mjs +3 -3
  46. package/esm2022/materials/lib/mesh-reflector-material.mjs +11 -15
  47. package/esm2022/materials/lib/mesh-refraction-material.mjs +26 -30
  48. package/esm2022/materials/lib/mesh-transmission-material.mjs +3 -3
  49. package/esm2022/materials/lib/mesh-wobble-material.mjs +3 -3
  50. package/esm2022/materials/lib/point-material.mjs +3 -3
  51. package/esm2022/misc/lib/bake-shadows.mjs +8 -10
  52. package/esm2022/misc/lib/computed-attribute.mjs +15 -19
  53. package/esm2022/misc/lib/decal.mjs +56 -53
  54. package/esm2022/misc/lib/fbo.mjs +10 -10
  55. package/esm2022/misc/lib/html/html-content.mjs +62 -67
  56. package/esm2022/misc/lib/html/html.mjs +3 -3
  57. package/esm2022/misc/lib/intersect.mjs +6 -9
  58. package/esm2022/misc/lib/sampler.mjs +42 -42
  59. package/esm2022/performances/lib/adaptive-dpr.mjs +29 -35
  60. package/esm2022/performances/lib/adaptive-events.mjs +12 -16
  61. package/esm2022/performances/lib/detailed.mjs +14 -18
  62. package/esm2022/performances/lib/instances/instances.mjs +16 -22
  63. package/esm2022/performances/lib/points/points.mjs +19 -25
  64. package/esm2022/performances/lib/segments/segments.mjs +11 -14
  65. package/esm2022/shaders/lib/mesh-refraction-material.mjs +1 -1
  66. package/esm2022/staging/index.mjs +3 -2
  67. package/esm2022/staging/lib/accumulative-shadows.mjs +19 -21
  68. package/esm2022/staging/lib/backdrop.mjs +19 -23
  69. package/esm2022/staging/lib/bb-anchor.mjs +3 -3
  70. package/esm2022/staging/lib/bounds.mjs +39 -43
  71. package/esm2022/staging/lib/camera-shake.mjs +14 -18
  72. package/esm2022/staging/lib/caustics.mjs +24 -28
  73. package/esm2022/staging/lib/center.mjs +28 -32
  74. package/esm2022/staging/lib/contact-shadows.mjs +3 -3
  75. package/esm2022/staging/lib/environment/environment.mjs +338 -0
  76. package/esm2022/staging/lib/environment/inject-environment.mjs +184 -0
  77. package/esm2022/staging/lib/float.mjs +3 -3
  78. package/esm2022/staging/lib/lightformer.mjs +18 -22
  79. package/esm2022/staging/lib/mask.mjs +8 -12
  80. package/esm2022/staging/lib/matcap-texture.mjs +9 -11
  81. package/esm2022/staging/lib/normal-texture.mjs +9 -11
  82. package/esm2022/staging/lib/randomized-lights.mjs +9 -13
  83. package/esm2022/staging/lib/render-texture.mjs +19 -20
  84. package/esm2022/staging/lib/sky.mjs +3 -3
  85. package/esm2022/staging/lib/spot-light.mjs +32 -40
  86. package/esm2022/staging/lib/stage.mjs +13 -17
  87. package/esm2022/stats/lib/stats.mjs +21 -27
  88. package/fesm2022/angular-three-soba-abstractions.mjs +119 -138
  89. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  90. package/fesm2022/angular-three-soba-cameras.mjs +57 -64
  91. package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
  92. package/fesm2022/angular-three-soba-controls.mjs +129 -135
  93. package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
  94. package/fesm2022/angular-three-soba-gizmos.mjs +87 -88
  95. package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
  96. package/fesm2022/angular-three-soba-loaders.mjs +3 -3
  97. package/fesm2022/angular-three-soba-materials.mjs +52 -62
  98. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  99. package/fesm2022/angular-three-soba-misc.mjs +188 -195
  100. package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
  101. package/fesm2022/angular-three-soba-performances.mjs +90 -114
  102. package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
  103. package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
  104. package/fesm2022/angular-three-soba-staging.mjs +427 -430
  105. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  106. package/fesm2022/angular-three-soba-stats.mjs +20 -26
  107. package/fesm2022/angular-three-soba-stats.mjs.map +1 -1
  108. package/materials/lib/custom-shader-material.d.ts +3 -3
  109. package/materials/lib/mesh-refraction-material.d.ts +3 -3
  110. package/materials/lib/mesh-transmission-material.d.ts +1 -1
  111. package/misc/lib/computed-attribute.d.ts +5 -5
  112. package/misc/lib/decal.d.ts +5 -5
  113. package/misc/lib/html/html-content.d.ts +6 -6
  114. package/misc/lib/html/html.d.ts +1 -1
  115. package/misc/lib/sampler.d.ts +2 -4
  116. package/package.json +12 -12
  117. package/performances/lib/instances/instances.d.ts +11 -11
  118. package/performances/lib/points/points.d.ts +20 -20
  119. package/performances/lib/segments/segments.d.ts +4 -4
  120. package/shaders/lib/mesh-refraction-material.d.ts +2 -5
  121. package/staging/index.d.ts +2 -1
  122. package/staging/lib/camera-shake.d.ts +0 -1
  123. package/staging/lib/caustics.d.ts +1 -1
  124. package/staging/lib/center.d.ts +2 -2
  125. package/staging/lib/contact-shadows.d.ts +1 -1
  126. package/staging/lib/{environment.d.ts → environment/environment.d.ts} +20 -49
  127. package/staging/lib/environment/inject-environment.d.ts +33 -0
  128. package/staging/lib/lightformer.d.ts +1 -1
  129. package/staging/lib/mask.d.ts +1 -1
  130. package/staging/lib/matcap-texture.d.ts +0 -1
  131. package/staging/lib/normal-texture.d.ts +0 -1
  132. package/staging/lib/render-texture.d.ts +1 -1
  133. package/staging/lib/sky.d.ts +1 -1
  134. package/staging/lib/spot-light.d.ts +2 -2
  135. package/staging/lib/stage.d.ts +7 -6
  136. package/esm2022/staging/lib/environment.mjs +0 -481
@@ -1,9 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, viewChild, Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, computed, afterNextRender, untracked, inject, signal, effect, output, DestroyRef } from '@angular/core';
2
+ import { input, viewChild, Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, computed, effect, untracked, inject, output, DestroyRef } from '@angular/core';
3
3
  import { omit, extend, injectBeforeRender, injectStore, pick, checkNeedsUpdate, NgtArgs, getLocalState, resolveRef } from 'angular-three';
4
4
  import { mergeInputs } from 'ngxtension/inject-inputs';
5
5
  import { Group, Quaternion, Vector3, Vector4, Vector2, Color, CatmullRomCurve3, CubicBezierCurve3, EdgesGeometry, CanvasTexture, BackSide, Plane, Mesh, PlaneGeometry, Object3D, Shape, ExtrudeGeometry, QuadraticBezierCurve3 } from 'three';
6
- import { injectAutoEffect } from 'ngxtension/auto-effect';
7
6
  import { LineSegments2, Line2, LineMaterial, LineSegmentsGeometry, LineGeometry, toCreasedNormals, TextGeometry, mergeVertices } from 'three-stdlib';
8
7
  import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
9
8
  import { GridMaterial } from 'angular-three-soba/shaders';
@@ -49,8 +48,8 @@ class NgtsBillboard {
49
48
  group.rotation.z = prevRotation.z;
50
49
  });
51
50
  }
52
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsBillboard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
53
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsBillboard, isStandalone: true, selector: "ngts-billboard", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "innerRef", first: true, predicate: ["inner"], descendants: true, isSignal: true }], ngImport: i0, template: `
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsBillboard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
52
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsBillboard, isStandalone: true, selector: "ngts-billboard", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "innerRef", first: true, predicate: ["inner"], descendants: true, isSignal: true }], ngImport: i0, template: `
54
53
  <ngt-group #group [parameters]="parameters()">
55
54
  <ngt-group #inner>
56
55
  <ng-content />
@@ -58,7 +57,7 @@ class NgtsBillboard {
58
57
  </ngt-group>
59
58
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
59
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsBillboard, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsBillboard, decorators: [{
62
61
  type: Component,
63
62
  args: [{
64
63
  selector: 'ngts-billboard',
@@ -96,12 +95,13 @@ class NgtsLine {
96
95
  this.vertexColors = pick(this.options, 'vertexColors');
97
96
  this.dashed = pick(this.options, 'dashed');
98
97
  this.color = pick(this.options, 'color');
99
- this.lineWidth = pick(this.options, 'lineWidth');
100
- this.linewidth = pick(this.options, 'linewidth');
101
98
  this.vertex = computed(() => Boolean(this.vertexColors()));
102
99
  this.resolution = computed(() => [this.size().width, this.size().height]);
100
+ this.lineWidth = pick(this.options, 'lineWidth');
101
+ this.linewidth = pick(this.options, 'linewidth');
103
102
  this.line2 = computed(() => (this.segments() ? new LineSegments2() : new Line2()));
104
103
  this.lineMaterial = new LineMaterial();
104
+ this.actualLineWidth = computed(() => this.linewidth() ?? this.lineWidth() ?? 1);
105
105
  this.itemSize = computed(() => (this.vertexColors()?.[0]?.length === 4 ? 4 : 3));
106
106
  this.lineGeometry = computed(() => {
107
107
  const geom = this.segments() ? new LineSegmentsGeometry() : new LineGeometry();
@@ -126,29 +126,26 @@ class NgtsLine {
126
126
  }
127
127
  return geom;
128
128
  });
129
- const autoEffect = injectAutoEffect();
130
- afterNextRender(() => {
131
- autoEffect(() => {
132
- const [lineMaterial, dashed] = [this.lineMaterial, this.dashed()];
133
- if (dashed) {
134
- lineMaterial.defines['USE_DASH'] = '';
135
- }
136
- else {
137
- delete lineMaterial.defines['USE_DASH'];
138
- }
139
- checkNeedsUpdate(lineMaterial);
140
- });
141
- autoEffect(() => {
142
- const [lineGeometry, lineMaterial] = [this.lineGeometry(), this.lineMaterial];
143
- return () => {
144
- lineGeometry.dispose();
145
- lineMaterial.dispose();
146
- };
129
+ effect(() => {
130
+ const [lineMaterial, dashed] = [this.lineMaterial, this.dashed()];
131
+ if (dashed) {
132
+ lineMaterial.defines['USE_DASH'] = '';
133
+ }
134
+ else {
135
+ delete lineMaterial.defines['USE_DASH'];
136
+ }
137
+ checkNeedsUpdate(lineMaterial);
138
+ });
139
+ effect((onCleanup) => {
140
+ const [lineGeometry, lineMaterial] = [this.lineGeometry(), this.lineMaterial];
141
+ onCleanup(() => {
142
+ lineGeometry.dispose();
143
+ lineMaterial.dispose();
147
144
  });
148
145
  });
149
146
  }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
151
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsLine, isStandalone: true, selector: "ngts-line", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "lineRef", first: true, predicate: ["line"], descendants: true, isSignal: true }], ngImport: i0, template: `
147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsLine, isStandalone: true, selector: "ngts-line", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "lineRef", first: true, predicate: ["line"], descendants: true, isSignal: true }], ngImport: i0, template: `
152
149
  <ngt-primitive *args="[line2()]" #line [parameters]="parameters()">
153
150
  <ngt-primitive *args="[lineGeometry()]" attach="geometry" (attached)="onGeometryAttached($any($event))" />
154
151
  <ngt-primitive
@@ -157,7 +154,7 @@ class NgtsLine {
157
154
  [color]="color()"
158
155
  [vertexColors]="vertex()"
159
156
  [resolution]="resolution()"
160
- [linewidth]="linewidth() ?? lineWidth() ?? 1"
157
+ [linewidth]="actualLineWidth()"
161
158
  [dashed]="dashed()"
162
159
  [transparent]="itemSize() === 4"
163
160
  [parameters]="parameters()"
@@ -166,7 +163,7 @@ class NgtsLine {
166
163
  </ngt-primitive>
167
164
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
168
165
  }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsLine, decorators: [{
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsLine, decorators: [{
170
167
  type: Component,
171
168
  args: [{
172
169
  selector: 'ngts-line',
@@ -180,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
180
177
  [color]="color()"
181
178
  [vertexColors]="vertex()"
182
179
  [resolution]="resolution()"
183
- [linewidth]="linewidth() ?? lineWidth() ?? 1"
180
+ [linewidth]="actualLineWidth()"
184
181
  [dashed]="dashed()"
185
182
  [transparent]="itemSize() === 4"
186
183
  [parameters]="parameters()"
@@ -242,14 +239,14 @@ class NgtsCatmullRomLine {
242
239
  });
243
240
  this.lineOptions = computed(() => ({ ...this.parameters(), vertexColors: this.interpolatedVertexColors() }));
244
241
  }
245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsCatmullRomLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
246
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsCatmullRomLine, isStandalone: true, selector: "ngts-catmull-rom-line", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsCatmullRomLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
243
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsCatmullRomLine, isStandalone: true, selector: "ngts-catmull-rom-line", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
247
244
  <ngts-line [points]="segmentedPoints()" [options]="lineOptions()">
248
245
  <ng-content />
249
246
  </ngts-line>
250
247
  `, isInline: true, dependencies: [{ kind: "component", type: NgtsLine, selector: "ngts-line", inputs: ["points", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
251
248
  }
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsCatmullRomLine, decorators: [{
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsCatmullRomLine, decorators: [{
253
250
  type: Component,
254
251
  args: [{
255
252
  selector: 'ngts-catmull-rom-line',
@@ -287,14 +284,14 @@ class NgtsCubicBezierLine {
287
284
  return new CubicBezierCurve3(startV, midAV, midBV, endV).getPoints(segments);
288
285
  });
289
286
  }
290
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsCubicBezierLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
291
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsCubicBezierLine, isStandalone: true, selector: "ngts-cubic-bezier-line", inputs: { start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: true, transformFunction: null }, end: { classPropertyName: "end", publicName: "end", isSignal: true, isRequired: true, transformFunction: null }, midA: { classPropertyName: "midA", publicName: "midA", isSignal: true, isRequired: true, transformFunction: null }, midB: { classPropertyName: "midB", publicName: "midB", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
287
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsCubicBezierLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
288
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsCubicBezierLine, isStandalone: true, selector: "ngts-cubic-bezier-line", inputs: { start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: true, transformFunction: null }, end: { classPropertyName: "end", publicName: "end", isSignal: true, isRequired: true, transformFunction: null }, midA: { classPropertyName: "midA", publicName: "midA", isSignal: true, isRequired: true, transformFunction: null }, midB: { classPropertyName: "midB", publicName: "midB", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
292
289
  <ngts-line [points]="points()" [options]="parameters()">
293
290
  <ng-content />
294
291
  </ngts-line>
295
292
  `, isInline: true, dependencies: [{ kind: "component", type: NgtsLine, selector: "ngts-line", inputs: ["points", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
296
293
  }
297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsCubicBezierLine, decorators: [{
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsCubicBezierLine, decorators: [{
298
295
  type: Component,
299
296
  args: [{
300
297
  selector: 'ngts-cubic-bezier-line',
@@ -320,44 +317,41 @@ class NgtsEdges {
320
317
  this.lineOptions = computed(() => ({ ...this.parameters(), raycast: () => null }));
321
318
  this.tmpPoints = [0, 0, 0, 1, 0, 0];
322
319
  this.line = viewChild.required(NgtsLine);
323
- const autoEffect = injectAutoEffect();
324
- afterNextRender(() => {
325
- autoEffect(() => {
326
- const line = this.line().lineRef()?.nativeElement;
327
- if (!line)
328
- return;
329
- const lS = getLocalState(line);
330
- if (!lS)
331
- return;
332
- const parent = lS.parent();
333
- if (!parent)
334
- return;
335
- const { geometry: explicitGeometry, threshold } = this.options();
336
- const geometry = explicitGeometry ?? parent.geometry;
337
- if (!geometry)
338
- return;
339
- const cached = this.memoizedGeometry === geometry && this.memoizedThreshold === threshold;
340
- if (cached)
341
- return;
342
- this.memoizedGeometry = geometry;
343
- this.memoizedThreshold = threshold;
344
- const points = new EdgesGeometry(geometry, threshold).attributes['position']
345
- .array;
346
- line.geometry.setPositions(points);
347
- checkNeedsUpdate(line.geometry.attributes['instanceStart']);
348
- checkNeedsUpdate(line.geometry.attributes['instanceEnd']);
349
- line.computeLineDistances();
350
- });
320
+ effect(() => {
321
+ const line = this.line().lineRef()?.nativeElement;
322
+ if (!line)
323
+ return;
324
+ const lS = getLocalState(line);
325
+ if (!lS)
326
+ return;
327
+ const parent = lS.parent();
328
+ if (!parent)
329
+ return;
330
+ const { geometry: explicitGeometry, threshold } = this.options();
331
+ const geometry = explicitGeometry ?? parent.geometry;
332
+ if (!geometry)
333
+ return;
334
+ const cached = this.memoizedGeometry === geometry && this.memoizedThreshold === threshold;
335
+ if (cached)
336
+ return;
337
+ this.memoizedGeometry = geometry;
338
+ this.memoizedThreshold = threshold;
339
+ const points = new EdgesGeometry(geometry, threshold).attributes['position']
340
+ .array;
341
+ line.geometry.setPositions(points);
342
+ checkNeedsUpdate(line.geometry.attributes['instanceStart']);
343
+ checkNeedsUpdate(line.geometry.attributes['instanceEnd']);
344
+ line.computeLineDistances();
351
345
  });
352
346
  }
353
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsEdges, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
354
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsEdges, isStandalone: true, selector: "ngts-edges", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsEdges, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
348
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsEdges, isStandalone: true, selector: "ngts-edges", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
355
349
  <ngts-line [points]="tmpPoints" [options]="lineOptions()">
356
350
  <ng-content />
357
351
  </ngts-line>
358
352
  `, isInline: true, dependencies: [{ kind: "component", type: NgtsLine, selector: "ngts-line", inputs: ["points", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
359
353
  }
360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsEdges, decorators: [{
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsEdges, decorators: [{
361
355
  type: Component,
362
356
  args: [{
363
357
  selector: 'ngts-edges',
@@ -424,8 +418,8 @@ class NgtsGradientTexture {
424
418
  });
425
419
  extend({ CanvasTexture });
426
420
  }
427
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsGradientTexture, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
428
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: NgtsGradientTexture, isStandalone: true, selector: "ngts-gradient-texture", inputs: { attach: { classPropertyName: "attach", publicName: "attach", isSignal: true, isRequired: false, transformFunction: null }, stops: { classPropertyName: "stops", publicName: "stops", isSignal: true, isRequired: true, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
421
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsGradientTexture, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
422
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.4", type: NgtsGradientTexture, isStandalone: true, selector: "ngts-gradient-texture", inputs: { attach: { classPropertyName: "attach", publicName: "attach", isSignal: true, isRequired: false, transformFunction: null }, stops: { classPropertyName: "stops", publicName: "stops", isSignal: true, isRequired: true, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
429
423
  <ngt-canvas-texture
430
424
  *args="[canvas()]"
431
425
  [attach]="attach()"
@@ -436,7 +430,7 @@ class NgtsGradientTexture {
436
430
  </ngt-canvas-texture>
437
431
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
438
432
  }
439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsGradientTexture, decorators: [{
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsGradientTexture, decorators: [{
440
434
  type: Component,
441
435
  args: [{
442
436
  selector: 'ngts-gradient-texture',
@@ -523,8 +517,8 @@ class NgtsGrid {
523
517
  worldPlanePosition.value.set(0, 0, 0).applyMatrix4(mesh.matrixWorld);
524
518
  });
525
519
  }
526
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
527
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsGrid, isStandalone: true, selector: "ngts-grid", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
520
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
521
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsGrid, isStandalone: true, selector: "ngts-grid", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
528
522
  <ngt-mesh #mesh [frustumCulled]="false" [parameters]="parameters()">
529
523
  <ngt-plane-geometry *args="planeArgs()" />
530
524
  <ngt-grid-material [transparent]="true" [side]="side()" [parameters]="uniforms()">
@@ -534,7 +528,7 @@ class NgtsGrid {
534
528
  </ngt-mesh>
535
529
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
536
530
  }
537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsGrid, decorators: [{
531
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsGrid, decorators: [{
538
532
  type: Component,
539
533
  args: [{
540
534
  selector: 'ngts-grid',
@@ -558,27 +552,25 @@ function injectHelper(object, helperConstructor, { injector, args = () => [], }
558
552
  return assertInjector(injectHelper, injector, () => {
559
553
  const store = injectStore();
560
554
  const scene = store.select('scene');
561
- const helper = signal(null);
562
- effect((onCleanup) => {
563
- let currentHelper = undefined;
555
+ const helper = computed(() => {
564
556
  const maybeObject3D = object();
565
557
  if (!maybeObject3D)
566
- return;
558
+ return null;
567
559
  const object3D = resolveRef(maybeObject3D);
568
560
  if (!object3D)
569
- return;
570
- currentHelper = new (helperConstructor())(object3D, ...args());
561
+ return null;
562
+ const currentHelper = new (helperConstructor())(object3D, ...args());
563
+ currentHelper.traverse((child) => (child.raycast = () => null));
564
+ return currentHelper;
565
+ });
566
+ effect((onCleanup) => {
567
+ const currentHelper = helper();
571
568
  if (!currentHelper)
572
569
  return;
573
- untracked(() => {
574
- helper.set(currentHelper);
575
- });
576
- // Prevent the helpers from blocking rays
577
- currentHelper.traverse((child) => (child.raycast = () => null));
578
- scene().add(currentHelper);
570
+ const _scene = scene();
571
+ _scene.add(currentHelper);
579
572
  onCleanup(() => {
580
- helper.set(null);
581
- scene().remove(currentHelper);
573
+ _scene.remove(currentHelper);
582
574
  currentHelper.dispose?.();
583
575
  });
584
576
  });
@@ -587,7 +579,7 @@ function injectHelper(object, helperConstructor, { injector, args = () => [], }
587
579
  if (currentHelper)
588
580
  currentHelper.update();
589
581
  });
590
- return helper.asReadonly();
582
+ return helper;
591
583
  });
592
584
  }
593
585
  class NgtsHelper {
@@ -607,12 +599,12 @@ class NgtsHelper {
607
599
  this.helper = injectHelper(this.parent, this.type, { args: this.options });
608
600
  extend({ Object3D });
609
601
  }
610
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsHelper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
611
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsHelper, isStandalone: true, selector: "ngts-helper", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "helperRef", first: true, predicate: ["helper"], descendants: true, isSignal: true }], ngImport: i0, template: `
602
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsHelper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
603
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsHelper, isStandalone: true, selector: "ngts-helper", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "helperRef", first: true, predicate: ["helper"], descendants: true, isSignal: true }], ngImport: i0, template: `
612
604
  <ngt-object3D #helper />
613
605
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
614
606
  }
615
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsHelper, decorators: [{
607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsHelper, decorators: [{
616
608
  type: Component,
617
609
  args: [{
618
610
  standalone: true,
@@ -643,14 +635,14 @@ class NgtsPrismGeometry {
643
635
  this.geometryRef = viewChild('geometry');
644
636
  extend({ ExtrudeGeometry });
645
637
  }
646
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsPrismGeometry, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
647
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsPrismGeometry, isStandalone: true, selector: "ngts-prism-geometry", inputs: { attach: { classPropertyName: "attach", publicName: "attach", isSignal: true, isRequired: false, transformFunction: null }, vertices: { classPropertyName: "vertices", publicName: "vertices", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "geometryRef", first: true, predicate: ["geometry"], descendants: true, isSignal: true }], ngImport: i0, template: `
638
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPrismGeometry, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
639
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsPrismGeometry, isStandalone: true, selector: "ngts-prism-geometry", inputs: { attach: { classPropertyName: "attach", publicName: "attach", isSignal: true, isRequired: false, transformFunction: null }, vertices: { classPropertyName: "vertices", publicName: "vertices", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "geometryRef", first: true, predicate: ["geometry"], descendants: true, isSignal: true }], ngImport: i0, template: `
648
640
  <ngt-extrude-geometry #geometry *args="[shape(), parameters()]" [attach]="attach()">
649
641
  <ng-content />
650
642
  </ngt-extrude-geometry>
651
643
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
652
644
  }
653
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsPrismGeometry, decorators: [{
645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsPrismGeometry, decorators: [{
654
646
  type: Component,
655
647
  args: [{
656
648
  selector: 'ngts-prism-geometry',
@@ -711,14 +703,14 @@ class NgtsQuadraticBezierLine {
711
703
  }
712
704
  return this.curve.getPoints(segments);
713
705
  }
714
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsQuadraticBezierLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
715
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsQuadraticBezierLine, isStandalone: true, selector: "ngts-quadratic-bezier-line", inputs: { start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: false, transformFunction: null }, end: { classPropertyName: "end", publicName: "end", isSignal: true, isRequired: false, transformFunction: null }, mid: { classPropertyName: "mid", publicName: "mid", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
706
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsQuadraticBezierLine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
707
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsQuadraticBezierLine, isStandalone: true, selector: "ngts-quadratic-bezier-line", inputs: { start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: false, transformFunction: null }, end: { classPropertyName: "end", publicName: "end", isSignal: true, isRequired: false, transformFunction: null }, mid: { classPropertyName: "mid", publicName: "mid", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "line", first: true, predicate: NgtsLine, descendants: true, isSignal: true }], ngImport: i0, template: `
716
708
  <ngts-line [points]="points()" [options]="parameters()">
717
709
  <ng-content />
718
710
  </ngts-line>
719
711
  `, isInline: true, dependencies: [{ kind: "component", type: NgtsLine, selector: "ngts-line", inputs: ["points", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
720
712
  }
721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsQuadraticBezierLine, decorators: [{
713
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsQuadraticBezierLine, decorators: [{
722
714
  type: Component,
723
715
  args: [{
724
716
  selector: 'ngts-quadratic-bezier-line',
@@ -799,28 +791,23 @@ class NgtsRoundedBox {
799
791
  };
800
792
  });
801
793
  extend({ ExtrudeGeometry, Mesh });
802
- const autoEffect = injectAutoEffect();
803
- afterNextRender(() => {
804
- autoEffect(() => {
805
- const geometry = this.geometryRef()?.nativeElement;
806
- if (!geometry)
807
- return;
808
- this.shape();
809
- this.params();
810
- geometry.center();
811
- toCreasedNormals(geometry, untracked(this.creaseAngle));
812
- });
794
+ effect(() => {
795
+ const geometry = this.geometryRef()?.nativeElement;
796
+ if (!geometry)
797
+ return;
798
+ geometry.center();
799
+ toCreasedNormals(geometry, untracked(this.creaseAngle));
813
800
  });
814
801
  }
815
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsRoundedBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
816
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsRoundedBox, isStandalone: true, selector: "ngts-rounded-box", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }, { propertyName: "geometryRef", first: true, predicate: ["geometry"], descendants: true, isSignal: true }], ngImport: i0, template: `
802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsRoundedBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
803
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsRoundedBox, isStandalone: true, selector: "ngts-rounded-box", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }, { propertyName: "geometryRef", first: true, predicate: ["geometry"], descendants: true, isSignal: true }], ngImport: i0, template: `
817
804
  <ngt-mesh #mesh [parameters]="parameters()">
818
805
  <ngt-extrude-geometry #geometry *args="[shape(), params()]" />
819
806
  <ng-content />
820
807
  </ngt-mesh>
821
808
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
822
809
  }
823
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsRoundedBox, decorators: [{
810
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsRoundedBox, decorators: [{
824
811
  type: Component,
825
812
  args: [{
826
813
  selector: 'ngts-rounded-box',
@@ -849,7 +836,6 @@ class NgtsText {
849
836
  this.options = input(defaultOptions$1, { transform: mergeInputs(defaultOptions$1) });
850
837
  this.parameters = omit(this.options, ['font', 'fontSize', 'sdfGlyphSize', 'anchorX', 'anchorY', 'characters']);
851
838
  this.synced = output();
852
- this.autoEffect = injectAutoEffect();
853
839
  this.store = injectStore();
854
840
  this.invalidate = this.store.select('invalidate');
855
841
  this.characters = pick(this.options, 'characters');
@@ -862,25 +848,22 @@ class NgtsText {
862
848
  inject(DestroyRef).onDestroy(() => {
863
849
  this.troikaMesh.dispose();
864
850
  });
865
- // NOTE: this could be just effect but autoEffect is used for consistency
866
- this.autoEffect(() => {
851
+ effect(() => {
867
852
  const [font, characters, invalidate] = [this.font(), this.characters(), this.invalidate()];
868
853
  if (font) {
869
854
  preloadFont({ font, characters }, () => invalidate());
870
855
  }
871
856
  });
872
- afterNextRender(() => {
873
- this.autoEffect(() => {
874
- const [invalidate] = [this.invalidate(), this.text(), this.options()];
875
- this.troikaMesh.sync(() => {
876
- invalidate();
877
- this.synced.emit(this.troikaMesh);
878
- });
857
+ effect(() => {
858
+ const [invalidate] = [this.invalidate(), this.text(), this.options()];
859
+ this.troikaMesh.sync(() => {
860
+ invalidate();
861
+ this.synced.emit(this.troikaMesh);
879
862
  });
880
863
  });
881
864
  }
882
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsText, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
883
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: NgtsText, isStandalone: true, selector: "ngts-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { synced: "synced" }, ngImport: i0, template: `
865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsText, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
866
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.4", type: NgtsText, isStandalone: true, selector: "ngts-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { synced: "synced" }, ngImport: i0, template: `
884
867
  <ngt-primitive
885
868
  *args="[troikaMesh]"
886
869
  [text]="text()"
@@ -895,7 +878,7 @@ class NgtsText {
895
878
  </ngt-primitive>
896
879
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
897
880
  }
898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsText, decorators: [{
881
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsText, decorators: [{
899
882
  type: Component,
900
883
  args: [{
901
884
  selector: 'ngts-text',
@@ -972,28 +955,26 @@ class NgtsText3D {
972
955
  return [text, { font, ...textOptions }];
973
956
  });
974
957
  extend({ Mesh, TextGeometry });
975
- const autoEffect = injectAutoEffect();
976
- afterNextRender(() => {
977
- autoEffect(() => {
978
- const [mesh, smooth, textArgs] = [this.meshRef()?.nativeElement, this.smooth(), this.textArgs()];
979
- if (!textArgs || !mesh)
980
- return;
981
- if (smooth) {
982
- mesh.geometry = mergeVertices(mesh.geometry, smooth);
983
- mesh.geometry.computeVertexNormals();
984
- }
985
- });
958
+ effect(() => {
959
+ const [mesh, textArgs] = [this.meshRef()?.nativeElement, this.textArgs()];
960
+ if (!textArgs || !mesh)
961
+ return;
962
+ const smooth = this.smooth();
963
+ if (smooth) {
964
+ mesh.geometry = mergeVertices(mesh.geometry, smooth);
965
+ mesh.geometry.computeVertexNormals();
966
+ }
986
967
  });
987
968
  }
988
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsText3D, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
989
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.0", type: NgtsText3D, isStandalone: true, selector: "ngts-text-3d", inputs: { font: { classPropertyName: "font", publicName: "font", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
969
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsText3D, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
970
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.4", type: NgtsText3D, isStandalone: true, selector: "ngts-text-3d", inputs: { font: { classPropertyName: "font", publicName: "font", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "meshRef", first: true, predicate: ["mesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
990
971
  <ngt-mesh #mesh [parameters]="parameters()">
991
972
  <ngt-text-geometry *args="textArgs()" />
992
973
  <ng-content />
993
974
  </ngt-mesh>
994
975
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
995
976
  }
996
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgtsText3D, decorators: [{
977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtsText3D, decorators: [{
997
978
  type: Component,
998
979
  args: [{
999
980
  selector: 'ngts-text-3d',