@tresjs/cientos 3.5.1 → 3.7.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 (54) hide show
  1. package/dist/core/abstractions/Lensflare/component.vue.d.ts +77 -60
  2. package/dist/core/abstractions/Levioso.vue.d.ts +39 -38
  3. package/dist/core/abstractions/MouseParallax.vue.d.ts +26 -27
  4. package/dist/core/abstractions/Reflector.vue.d.ts +107 -0
  5. package/dist/core/abstractions/Text3D.vue.d.ts +42 -99
  6. package/dist/core/abstractions/index.d.ts +4 -1
  7. package/dist/core/abstractions/useFBO/component.vue.d.ts +26 -32
  8. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +21 -0
  9. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +614 -0
  10. package/dist/core/controls/CameraControls.vue.d.ts +853 -303
  11. package/dist/core/controls/KeyboardControls.vue.d.ts +38 -75
  12. package/dist/core/controls/MapControls.vue.d.ts +22 -23
  13. package/dist/core/controls/OrbitControls.vue.d.ts +741 -634
  14. package/dist/core/controls/PointerLockControls.vue.d.ts +25 -30
  15. package/dist/core/controls/ScrollControls.vue.d.ts +43 -44
  16. package/dist/core/controls/TransformControls.vue.d.ts +37 -94
  17. package/dist/core/loaders/SVG/component.vue.d.ts +117 -60
  18. package/dist/core/loaders/useFBX/component.vue.d.ts +14 -11
  19. package/dist/core/loaders/useGLTF/component.vue.d.ts +33 -28
  20. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +22 -0
  21. package/dist/core/materials/index.d.ts +2 -1
  22. package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +30 -19
  23. package/dist/core/misc/html/HTML.vue.d.ts +36 -103
  24. package/dist/core/shapes/Box.vue.d.ts +25 -20
  25. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +46 -103
  26. package/dist/core/shapes/Circle.vue.d.ts +25 -20
  27. package/dist/core/shapes/Cone.vue.d.ts +25 -20
  28. package/dist/core/shapes/Dodecahedron.vue.d.ts +25 -20
  29. package/dist/core/shapes/Icosahedron.vue.d.ts +25 -20
  30. package/dist/core/shapes/Line2.vue.d.ts +40 -91
  31. package/dist/core/shapes/Octahedron.vue.d.ts +25 -20
  32. package/dist/core/shapes/Plane.vue.d.ts +25 -20
  33. package/dist/core/shapes/Ring.vue.d.ts +25 -20
  34. package/dist/core/shapes/Sphere.vue.d.ts +25 -20
  35. package/dist/core/shapes/Superformula.vue.d.ts +85 -0
  36. package/dist/core/shapes/Tetrahedron.vue.d.ts +25 -20
  37. package/dist/core/shapes/Torus.vue.d.ts +25 -20
  38. package/dist/core/shapes/TorusKnot.vue.d.ts +25 -20
  39. package/dist/core/shapes/Tube.vue.d.ts +25 -20
  40. package/dist/core/shapes/index.d.ts +2 -1
  41. package/dist/core/staging/Backdrop.vue.d.ts +26 -27
  42. package/dist/core/staging/Precipitation.vue.d.ts +43 -104
  43. package/dist/core/staging/Sky.vue.d.ts +56 -59
  44. package/dist/core/staging/Smoke.vue.d.ts +37 -68
  45. package/dist/core/staging/Sparkles/ShaderData.d.ts +37 -0
  46. package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +43 -0
  47. package/dist/core/staging/Sparkles/component.vue.d.ts +245 -0
  48. package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +2 -0
  49. package/dist/core/staging/Stars.vue.d.ts +39 -70
  50. package/dist/core/staging/index.d.ts +4 -3
  51. package/dist/trescientos.js +8315 -5304
  52. package/dist/trescientos.umd.cjs +294 -20
  53. package/dist/utils/Gradient.d.ts +11 -0
  54. package/package.json +25 -23
@@ -0,0 +1,245 @@
1
+ import type { Texture, Blending, BufferGeometry } from 'three';
2
+ import { Object3D } from 'three';
3
+ import type { TresColor } from '@tresjs/core';
4
+ import type { VectorFlexibleParams } from '@tresjs/core/dist/utils/normalize';
5
+ import type { Gradient } from '../../../utils/Gradient';
6
+ interface SparkleProps {
7
+ /**
8
+ * Texture or image path for individual sparkles
9
+ */
10
+ map?: Texture | string;
11
+ /**
12
+ * Vertices of the geometry will be used to emit sparkles. Geometry normals are used for sparkles' traveling direction and for responding to the directional light prop.
13
+ *
14
+ * * If provided, the component will use the passed geometry.
15
+ * * If no geometry is provided, the component will try to make a copy of the parent object's geometry.
16
+ * * If no parent geometry exists, the component will create and use an IcosphereGeometry.
17
+ */
18
+ geometry?: Object3D | BufferGeometry;
19
+ /**
20
+ * Particles "light up" when their normal "faces" the light. If no `directionalLight` is provided, the default "up" vector will be used.
21
+ */
22
+ directionalLight?: Object3D;
23
+ /**
24
+ * Particle lifetime in seconds
25
+ */
26
+ lifetimeSec?: number;
27
+ /**
28
+ * Particle cooldown in seconds – time between lifetime end and respawn
29
+ */
30
+ cooldownSec?: number;
31
+ /**
32
+ * Number from 0-1 indicating how closely the particle needs to be faced towards the light to "light up". (Lower == more flexible)
33
+ */
34
+ normalThreshold?: number;
35
+ /**
36
+ * Scale of the noise period (lower == more slowly cycling noise)
37
+ */
38
+ noiseScale?: number;
39
+ /**
40
+ * Noise coefficient applied to particle scale
41
+ */
42
+ scaleNoise?: number;
43
+ /**
44
+ * Noise coefficient applied to particle offset
45
+ */
46
+ offsetNoise?: number;
47
+ /**
48
+ * Noise coefficient applied to particle lifetime
49
+ */
50
+ lifetimeNoise?: number;
51
+ /**
52
+ * Particle scale multiplier
53
+ */
54
+ size?: number;
55
+ /**
56
+ * Opacity multiplier
57
+ */
58
+ alpha?: number;
59
+ /**
60
+ * Offset multiplier
61
+ */
62
+ offset?: number;
63
+ /**
64
+ * Surface distance multiplier
65
+ */
66
+ surfaceDistance?: number;
67
+ /**
68
+ * '*Sequence' props: specify how a particle changes as it "progresses". See also "mix*" props.
69
+ *
70
+ * Color sequence as particles progress
71
+ */
72
+ sequenceColor?: Gradient<TresColor>;
73
+ /**
74
+ * Opacity sequence as particles progress
75
+ */
76
+ sequenceAlpha?: Gradient<number>;
77
+ /**
78
+ * Distance sequence as particles progress
79
+ */
80
+ sequenceOffset?: Gradient<VectorFlexibleParams>;
81
+ /**
82
+ * Noise sequence as particles progress
83
+ */
84
+ sequenceNoise?: Gradient<VectorFlexibleParams>;
85
+ /**
86
+ * Size sequence as particles progress
87
+ */
88
+ sequenceSize?: Gradient<number>;
89
+ /**
90
+ * Distance from surface (along normal) as particles progress
91
+ */
92
+ sequenceSurfaceDistance?: Gradient<number>;
93
+ /**
94
+ * 'mix*' props: A particle "progresses" with a mix of two factors:
95
+ *
96
+ * * its normal "facing" the directionalLight
97
+ * * its lifetime
98
+ *
99
+ * 'mix*' props specify the relationship between the two factors.
100
+ *
101
+ * How is a particle's progress for color calculated? (0: normal, 1: particle lifetime)
102
+ */
103
+ mixColor?: number;
104
+ /**
105
+ * How is a particle's progress for alpha calculated? (0: normal, 1: particle lifetime)
106
+ */
107
+ mixAlpha?: number;
108
+ /**
109
+ * How is a particle's progress for offset calculated? (0: normal, 1: particle lifetime)
110
+ */
111
+ mixOffset?: number;
112
+ /**
113
+ * How is a particle's progress for size calculated? (0: normal, 1: particle lifetime)
114
+ */
115
+ mixSize?: number;
116
+ /**
117
+ * How is a particle's progress for surface distance calculated? (0: normal, 1: particle lifetime)
118
+ */
119
+ mixSurfaceDistance?: number;
120
+ /**
121
+ * How is a particle's progress for lifetime calculated? (0: normal, 1: particle lifetime)
122
+ */
123
+ mixNoise?: number;
124
+ /**
125
+ * Material blending
126
+ */
127
+ blending?: Blending;
128
+ /**
129
+ * Material transparency
130
+ */
131
+ transparent?: boolean;
132
+ /**
133
+ * Material depth write
134
+ */
135
+ depthWrite?: boolean;
136
+ }
137
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
138
+ map: string;
139
+ geometry: undefined;
140
+ directionalLight: undefined;
141
+ lifetimeSec: number;
142
+ cooldownSec: number;
143
+ size: number;
144
+ alpha: number;
145
+ offset: number;
146
+ noiseScale: number;
147
+ surfaceDistance: number;
148
+ scaleNoise: number;
149
+ offsetNoise: number;
150
+ lifetimeNoise: number;
151
+ normalThreshold: number;
152
+ sequenceColor: () => (string | number)[][];
153
+ sequenceAlpha: () => number[][];
154
+ sequenceOffset: () => number[];
155
+ sequenceSurfaceDistance: () => number[];
156
+ sequenceSize: () => number[];
157
+ sequenceNoise: () => number[];
158
+ mixColor: number;
159
+ mixAlpha: number;
160
+ mixOffset: number;
161
+ mixSize: number;
162
+ mixSurfaceDistance: number;
163
+ mixNoise: number;
164
+ blending: 2;
165
+ transparent: boolean;
166
+ depthWrite: boolean;
167
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
168
+ map: string;
169
+ geometry: undefined;
170
+ directionalLight: undefined;
171
+ lifetimeSec: number;
172
+ cooldownSec: number;
173
+ size: number;
174
+ alpha: number;
175
+ offset: number;
176
+ noiseScale: number;
177
+ surfaceDistance: number;
178
+ scaleNoise: number;
179
+ offsetNoise: number;
180
+ lifetimeNoise: number;
181
+ normalThreshold: number;
182
+ sequenceColor: () => (string | number)[][];
183
+ sequenceAlpha: () => number[][];
184
+ sequenceOffset: () => number[];
185
+ sequenceSurfaceDistance: () => number[];
186
+ sequenceSize: () => number[];
187
+ sequenceNoise: () => number[];
188
+ mixColor: number;
189
+ mixAlpha: number;
190
+ mixOffset: number;
191
+ mixSize: number;
192
+ mixSurfaceDistance: number;
193
+ mixNoise: number;
194
+ blending: 2;
195
+ transparent: boolean;
196
+ depthWrite: boolean;
197
+ }>>>, {
198
+ map: string | Texture;
199
+ directionalLight: Object3D<import("three").Object3DEventMap>;
200
+ blending: Blending;
201
+ depthWrite: boolean;
202
+ transparent: boolean;
203
+ size: number;
204
+ geometry: Object3D<import("three").Object3DEventMap> | BufferGeometry<import("three").NormalBufferAttributes>;
205
+ offset: number;
206
+ lifetimeSec: number;
207
+ cooldownSec: number;
208
+ normalThreshold: number;
209
+ noiseScale: number;
210
+ scaleNoise: number;
211
+ offsetNoise: number;
212
+ lifetimeNoise: number;
213
+ alpha: number;
214
+ surfaceDistance: number;
215
+ sequenceColor: Gradient<import("three").ColorRepresentation | [r: number, g: number, b: number]>;
216
+ sequenceAlpha: Gradient<number>;
217
+ sequenceOffset: Gradient<VectorFlexibleParams>;
218
+ sequenceNoise: Gradient<VectorFlexibleParams>;
219
+ sequenceSize: Gradient<number>;
220
+ sequenceSurfaceDistance: Gradient<number>;
221
+ mixColor: number;
222
+ mixAlpha: number;
223
+ mixOffset: number;
224
+ mixSize: number;
225
+ mixSurfaceDistance: number;
226
+ mixNoise: number;
227
+ }, {}>;
228
+ export default _default;
229
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
230
+ type __VLS_TypePropsToRuntimeProps<T> = {
231
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
232
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
233
+ } : {
234
+ type: import('vue').PropType<T[K]>;
235
+ required: true;
236
+ };
237
+ };
238
+ type __VLS_WithDefaults<P, D> = {
239
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
240
+ default: D[K];
241
+ }> : P[K];
242
+ };
243
+ type __VLS_Prettify<T> = {
244
+ [K in keyof T]: T[K];
245
+ } & {};
@@ -0,0 +1,2 @@
1
+ import { DataTexture } from 'three';
2
+ export default function useEmptyDataTexture(): DataTexture;
@@ -64,82 +64,51 @@ export interface StarsProps {
64
64
  */
65
65
  alphaMap?: null;
66
66
  }
67
- declare const _default: import("vue").DefineComponent<{
68
- alphaTest: {
69
- type: import("vue").PropType<number>;
70
- default: number;
71
- };
72
- transparent: {
73
- type: import("vue").PropType<boolean>;
74
- default: boolean;
75
- };
76
- size: {
77
- type: import("vue").PropType<number>;
78
- default: number;
79
- };
80
- depth: {
81
- type: import("vue").PropType<number>;
82
- default: number;
83
- };
84
- alphaMap: {
85
- type: import("vue").PropType<null>;
86
- default: null;
87
- };
88
- count: {
89
- type: import("vue").PropType<number>;
90
- default: number;
91
- };
92
- radius: {
93
- type: import("vue").PropType<number>;
94
- default: number;
95
- };
96
- sizeAttenuation: {
97
- type: import("vue").PropType<boolean>;
98
- default: boolean;
99
- };
100
- }, {
67
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StarsProps>, {
68
+ size: number;
69
+ sizeAttenuation: boolean;
70
+ transparent: boolean;
71
+ alphaTest: number;
72
+ alphaMap: null;
73
+ count: number;
74
+ depth: number;
75
+ radius: number;
76
+ }>, {
101
77
  value: import("vue").ShallowRef<any>;
102
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
103
- alphaTest: {
104
- type: import("vue").PropType<number>;
105
- default: number;
106
- };
107
- transparent: {
108
- type: import("vue").PropType<boolean>;
109
- default: boolean;
110
- };
111
- size: {
112
- type: import("vue").PropType<number>;
113
- default: number;
114
- };
115
- depth: {
116
- type: import("vue").PropType<number>;
117
- default: number;
118
- };
119
- alphaMap: {
120
- type: import("vue").PropType<null>;
121
- default: null;
122
- };
123
- count: {
124
- type: import("vue").PropType<number>;
125
- default: number;
126
- };
127
- radius: {
128
- type: import("vue").PropType<number>;
129
- default: number;
130
- };
131
- sizeAttenuation: {
132
- type: import("vue").PropType<boolean>;
133
- default: boolean;
134
- };
135
- }>>, {
78
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StarsProps>, {
79
+ size: number;
80
+ sizeAttenuation: boolean;
81
+ transparent: boolean;
82
+ alphaTest: number;
83
+ alphaMap: null;
84
+ count: number;
85
+ depth: number;
86
+ radius: number;
87
+ }>>>, {
136
88
  alphaTest: number;
137
89
  transparent: boolean;
90
+ count: number;
91
+ radius: number;
138
92
  size: number;
139
93
  depth: number;
140
94
  alphaMap: null;
141
- count: number;
142
- radius: number;
143
95
  sizeAttenuation: boolean;
144
96
  }, {}>;
145
97
  export default _default;
98
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
99
+ type __VLS_TypePropsToRuntimeProps<T> = {
100
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
101
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
102
+ } : {
103
+ type: import('vue').PropType<T[K]>;
104
+ required: true;
105
+ };
106
+ };
107
+ type __VLS_WithDefaults<P, D> = {
108
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
109
+ default: D[K];
110
+ }> : P[K];
111
+ };
112
+ type __VLS_Prettify<T> = {
113
+ [K in keyof T]: T[K];
114
+ } & {};
@@ -1,8 +1,9 @@
1
1
  import Environment from './useEnvironment/component.vue';
2
2
  import Backdrop from './Backdrop.vue';
3
3
  import ContactShadows from './ContactShadows.vue';
4
- import Stars from './Stars.vue';
5
4
  import Precipitation from './Precipitation.vue';
6
- import Smoke from './Smoke.vue';
7
5
  import Sky from './Sky.vue';
8
- export { Backdrop, ContactShadows, Stars, Precipitation, Smoke, Environment, Sky, };
6
+ import Smoke from './Smoke.vue';
7
+ import Sparkles from './Sparkles/component.vue';
8
+ import Stars from './Stars.vue';
9
+ export { Backdrop, ContactShadows, Environment, Precipitation, Sky, Smoke, Sparkles, Stars, };