angular-three-soba 2.0.0-beta.253 → 2.0.0-beta.254

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 (45) hide show
  1. package/abstractions/README.md +108 -0
  2. package/abstractions/index.d.ts +6 -0
  3. package/abstractions/lib/catmull-rom-line.d.ts +648 -0
  4. package/abstractions/lib/cubic-bezier-line.d.ts +19 -0
  5. package/abstractions/lib/edges.d.ts +850 -0
  6. package/abstractions/lib/grid.d.ts +7 -7
  7. package/abstractions/lib/line.d.ts +41 -0
  8. package/abstractions/lib/prism-geometry.d.ts +30 -0
  9. package/abstractions/lib/quadratic-bezier-line.d.ts +21 -0
  10. package/abstractions/lib/text-3d.d.ts +13 -13
  11. package/esm2022/abstractions/index.mjs +7 -1
  12. package/esm2022/abstractions/lib/catmull-rom-line.mjs +76 -0
  13. package/esm2022/abstractions/lib/cubic-bezier-line.mjs +51 -0
  14. package/esm2022/abstractions/lib/edges.mjs +66 -0
  15. package/esm2022/abstractions/lib/line.mjs +123 -0
  16. package/esm2022/abstractions/lib/prism-geometry.mjs +55 -0
  17. package/esm2022/abstractions/lib/quadratic-bezier-line.mjs +73 -0
  18. package/esm2022/materials/index.mjs +2 -1
  19. package/esm2022/materials/lib/mesh-reflector-material.mjs +10 -2
  20. package/esm2022/materials/lib/mesh-refraction-material.mjs +114 -0
  21. package/esm2022/materials/lib/mesh-transmission-material.mjs +40 -43
  22. package/esm2022/shaders/index.mjs +2 -1
  23. package/esm2022/shaders/lib/mesh-refraction-material.mjs +163 -0
  24. package/esm2022/staging/index.mjs +2 -1
  25. package/esm2022/staging/lib/bounds.mjs +286 -0
  26. package/fesm2022/angular-three-soba-abstractions.mjs +415 -9
  27. package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
  28. package/fesm2022/angular-three-soba-materials.mjs +159 -44
  29. package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
  30. package/fesm2022/angular-three-soba-shaders.mjs +162 -1
  31. package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
  32. package/fesm2022/angular-three-soba-staging.mjs +285 -5
  33. package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
  34. package/materials/README.md +35 -0
  35. package/materials/index.d.ts +1 -0
  36. package/materials/lib/mesh-refraction-material.d.ts +42 -0
  37. package/materials/lib/mesh-transmission-material.d.ts +11 -12
  38. package/package.json +8 -7
  39. package/shaders/index.d.ts +1 -0
  40. package/shaders/lib/mesh-refraction-material.d.ts +20 -0
  41. package/staging/index.d.ts +1 -0
  42. package/staging/lib/accumulative-shadows.d.ts +1 -1
  43. package/staging/lib/bounds.d.ts +47 -0
  44. package/staging/lib/contact-shadows.d.ts +1 -1
  45. package/staging/lib/lightformer.d.ts +1 -1
@@ -111,3 +111,111 @@ This component renders 3D text using TextGeometry. It requires fonts in JSON for
111
111
  ```html
112
112
  <ngts-text-3d text="Hello, World!" [options]="{ font: 'path/to/font.json' }" />
113
113
  ```
114
+
115
+ ## NgtsLine
116
+
117
+ Renders a `THREE.Line2` or `THREE.LineSegments2` (depending on the value of `segments`).
118
+
119
+ ### Object Inputs (NgtsLineOptions)
120
+
121
+ | Property | Description | Default Value |
122
+ | -------------- | ------------------------------------------------------------ | ------------- |
123
+ | `points` | (Required) Array of points. | |
124
+ | `color` | Line color. | `'black'` |
125
+ | `linewidth` | Line width. | `1` |
126
+ | `segments` | Whether to render as `THREE.Line2` or `THREE.LineSegments2`. | `false` |
127
+ | `dashed` | Whether the line is dashed. | `false` |
128
+ | `vertexColors` | Vertex colors. | undefined |
129
+
130
+ ```html
131
+ <ngts-line [points]="[[0, 0, 0], [1, 1, 1]]" />
132
+ ```
133
+
134
+ ## NgtsQuadraticBezierLine
135
+
136
+ Renders a `THREE.Line2` using `THREE.QuadraticBezierCurve3` for interpolation.
137
+
138
+ ### Object Inputs (NgtsQuadraticBezierLineOptions)
139
+
140
+ | Property | Description | Default Value |
141
+ | --------- | ----------------------- | ------------- |
142
+ | `start` | (Required) Start point. | |
143
+ | `end` | (Required) End point. | |
144
+ | `mid` | Mid point. | |
145
+ | `options` | Line options. | `{}` |
146
+
147
+ ```html
148
+ <ngts-quadratic-bezier-line [start]="[0, 0, 0]" [end]="[1, 1, 1]" />
149
+ ```
150
+
151
+ ## NgtsCubicBezierLine
152
+
153
+ Renders a `THREE.Line2` using `THREE.CubicBezierCurve3` for interpolation.
154
+
155
+ ### Object Inputs (NgtsCubicBezierLineOptions)
156
+
157
+ | Property | Description | Default Value |
158
+ | --------- | ----------------------- | ------------- |
159
+ | `start` | (Required) Start point. | |
160
+ | `end` | (Required) End point. | |
161
+ | `midA` | (Required) Mid point 1. | |
162
+ | `midB` | (Required) Mid point 2. | |
163
+ | `options` | Line options. | `{}` |
164
+
165
+ ```html
166
+ <ngts-cubic-bezier-line [start]="[0, 0, 0]" [end]="[1, 1, 1]" [midA]="[0.5, 0.5, 0.5]" [midB]="[0.5, 0.5, 0.5]" />
167
+ ```
168
+
169
+ ## NgtsCatmullRomLine
170
+
171
+ Renders a `THREE.Line2` using `THREE.CatmullRomCurve3` for interpolation.
172
+
173
+ ### Object Inputs (NgtsCatmullRomLineOptions)
174
+
175
+ | Property | Description | Default Value |
176
+ | ----------- | ---------------------------------------------------------------------- | --------------- |
177
+ | `points` | (Required) Array of points. | |
178
+ | `closed` | Whether the curve is closed. | `false` |
179
+ | `curveType` | Type of curve. Can be `'centripetal'`, `'chordal'`, or `'catmullrom'`. | `'centripetal'` |
180
+ | `tension` | Tension of the curve. | `0.5` |
181
+ | `options` | Line options. | `{}` |
182
+
183
+ ```html
184
+ <ngts-catmull-rom-line [points]="[[0, 0, 0], [1, 1, 1]]" />
185
+ ```
186
+
187
+ ## NgtsEdges
188
+
189
+ Abstracts [THREE.EdgesGeometry](https://threejs.org/docs/#api/en/geometries/EdgesGeometry). It pulls the geometry automatically from its parent, optionally you can ungroup it and give it a `geometry` prop. You can give it children, for instance a custom material. `NgtsEdges` is based on `NgtsLine` and supports all of its options.
190
+
191
+ ### Object Inputs (NgtsEdgesOptions)
192
+
193
+ | Property | Description | Default Value |
194
+ | ----------- | ----------------------------------------------------------------------- | ------------- |
195
+ | `geometry` | Geometry to use for the edges. | `undefined` |
196
+ | `threshold` | Display edges only when the angle between two faces exceeds this value. | `15` |
197
+
198
+ ```html
199
+ <ngt-mesh>
200
+ <ngt-box-geometry />
201
+ <ngt-mesh-basic-material />
202
+ <ngts-edges [options]="{ threshold: 15, scale: 1.1, color: 'white', linewidth: 4 }" />
203
+ </ngt-mesh>
204
+ ```
205
+
206
+ ## NgtsPrismGeometry
207
+
208
+ Abstracts [THREE.ExtrudeGeometry](https://threejs.org/docs/#api/en/geometries/ExtrudeGeometry) to create a prism geometry.
209
+
210
+ ### Object Inputs (NgtsPrismGeometryOptions)
211
+
212
+ | Property | Description | Default Value |
213
+ | ---------- | ---------------------------- | ------------- |
214
+ | `vertices` | (Required) Array of Vector2. | |
215
+
216
+ ```html
217
+ <ngt-mesh>
218
+ <ngts-prism-geometry [vertices]="[[0, 0], [1, 0], [1, 1], [0, 1]]" />
219
+ <ngt-mesh-basic-material />
220
+ </ngt-mesh>
221
+ ```
@@ -1,3 +1,9 @@
1
+ export * from './lib/catmull-rom-line';
2
+ export * from './lib/cubic-bezier-line';
3
+ export * from './lib/edges';
1
4
  export * from './lib/grid';
5
+ export * from './lib/line';
6
+ export * from './lib/prism-geometry';
7
+ export * from './lib/quadratic-bezier-line';
2
8
  export * from './lib/text';
3
9
  export * from './lib/text-3d';