@tresjs/cientos 4.0.0-next.0 → 4.0.0-rc.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 (106) hide show
  1. package/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +38 -0
  2. package/dist/core/abstractions/AnimatedSprite/AtlasAnimationDefinitionParser.d.ts +10 -0
  3. package/dist/core/abstractions/AnimatedSprite/StringOps.d.ts +2 -0
  4. package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +130 -0
  5. package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
  6. package/dist/core/abstractions/Lensflare/RandUtils.d.ts +2 -2
  7. package/dist/core/abstractions/Lensflare/component.vue.d.ts +22 -21
  8. package/dist/core/abstractions/Lensflare/constants.d.ts +2 -1
  9. package/dist/core/abstractions/Lensflare/index.d.ts +5 -4
  10. package/dist/core/abstractions/Levioso.vue.d.ts +25 -23
  11. package/dist/core/abstractions/MouseParallax.vue.d.ts +31 -20
  12. package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
  13. package/dist/core/abstractions/Reflector.vue.d.ts +21 -18
  14. package/dist/core/abstractions/Text3D.vue.d.ts +138 -15
  15. package/dist/core/abstractions/index.d.ts +11 -8
  16. package/dist/core/abstractions/useAnimations.d.ts +4 -4
  17. package/dist/core/abstractions/useFBO/component.vue.d.ts +15 -14
  18. package/dist/core/abstractions/useFBO/index.d.ts +5 -5
  19. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +14 -11
  20. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +170 -142
  21. package/dist/core/controls/CameraControls.vue.d.ts +4147 -3862
  22. package/dist/core/controls/KeyboardControls.vue.d.ts +51 -97
  23. package/dist/core/controls/MapControls.vue.d.ts +9507 -13
  24. package/dist/core/controls/OrbitControls.vue.d.ts +5906 -5660
  25. package/dist/core/controls/PointerLockControls.vue.d.ts +15 -14
  26. package/dist/core/controls/ScrollControls.vue.d.ts +34 -30
  27. package/dist/core/controls/TransformControls.vue.d.ts +20 -14
  28. package/dist/core/controls/index.d.ts +9 -8
  29. package/dist/core/index.d.ts +0 -1
  30. package/dist/core/loaders/SVG/component.vue.d.ts +23 -22
  31. package/dist/core/loaders/index.d.ts +4 -3
  32. package/dist/core/loaders/useFBX/component.vue.d.ts +18 -18
  33. package/dist/core/loaders/useFBX/index.d.ts +2 -1
  34. package/dist/core/loaders/useGLTF/component.vue.d.ts +25 -25
  35. package/dist/core/loaders/useGLTF/index.d.ts +14 -9
  36. package/dist/core/loaders/useProgress.d.ts +2 -1
  37. package/dist/core/loaders/useVideoTexture.d.ts +1 -0
  38. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +7 -5
  39. package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +41 -0
  40. package/dist/core/materials/holographicMaterial/index.vue.d.ts +86 -0
  41. package/dist/core/materials/holographicMaterial/material.d.ts +27 -0
  42. package/dist/core/materials/index.d.ts +7 -5
  43. package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +3 -3
  44. package/dist/core/materials/meshGlassMaterial/material.d.ts +2 -2
  45. package/dist/core/materials/{blurPass.d.ts → meshReflectionMaterial/BlurPass.d.ts} +8 -6
  46. package/dist/core/materials/{convolutionMaterial.d.ts → meshReflectionMaterial/ConvolutionMaterial.d.ts} +1 -0
  47. package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +180 -49
  48. package/dist/core/materials/meshReflectionMaterial/material.d.ts +33 -36
  49. package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +17 -15
  50. package/dist/core/materials/meshWobbleMaterial/material.d.ts +2 -2
  51. package/dist/core/misc/BakeShadows.d.ts +1 -1
  52. package/dist/core/misc/Stats.d.ts +2 -2
  53. package/dist/core/misc/StatsGl.d.ts +1 -1
  54. package/dist/core/misc/html/HTML.vue.d.ts +22 -17
  55. package/dist/core/misc/html/utils.d.ts +3 -3
  56. package/dist/core/misc/index.d.ts +3 -3
  57. package/dist/core/misc/useGLTFExporter.d.ts +2 -1
  58. package/dist/core/shapes/Box.vue.d.ts +22 -19
  59. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +15 -12
  60. package/dist/core/shapes/Circle.vue.d.ts +22 -19
  61. package/dist/core/shapes/Cone.vue.d.ts +22 -19
  62. package/dist/core/shapes/Cylinder.vue.d.ts +60 -0
  63. package/dist/core/shapes/Dodecahedron.vue.d.ts +22 -19
  64. package/dist/core/shapes/Icosahedron.vue.d.ts +22 -19
  65. package/dist/core/shapes/Line2.vue.d.ts +16 -13
  66. package/dist/core/shapes/Octahedron.vue.d.ts +22 -19
  67. package/dist/core/shapes/Plane.vue.d.ts +22 -19
  68. package/dist/core/shapes/Ring.vue.d.ts +22 -19
  69. package/dist/core/shapes/RoundedBox.vue.d.ts +22 -19
  70. package/dist/core/shapes/Sphere.vue.d.ts +22 -19
  71. package/dist/core/shapes/Superformula.vue.d.ts +35 -32
  72. package/dist/core/shapes/Tetrahedron.vue.d.ts +22 -19
  73. package/dist/core/shapes/Torus.vue.d.ts +22 -19
  74. package/dist/core/shapes/TorusKnot.vue.d.ts +22 -19
  75. package/dist/core/shapes/Tube.vue.d.ts +22 -20
  76. package/dist/core/shapes/index.d.ts +20 -18
  77. package/dist/core/staging/Backdrop.vue.d.ts +18 -14
  78. package/dist/core/staging/ContactShadows.vue.d.ts +168 -0
  79. package/dist/core/staging/Fit.vue.d.ts +64 -0
  80. package/dist/core/staging/Ocean.vue.d.ts +26 -23
  81. package/dist/core/staging/Precipitation.vue.d.ts +21 -18
  82. package/dist/core/staging/Sky.vue.d.ts +14 -13
  83. package/dist/core/staging/Smoke.vue.d.ts +18 -17
  84. package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
  85. package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +7 -7
  86. package/dist/core/staging/Sparkles/component.vue.d.ts +33 -31
  87. package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
  88. package/dist/core/staging/Stars.vue.d.ts +16 -16
  89. package/dist/core/staging/index.d.ts +13 -10
  90. package/dist/core/staging/useEnvironment/component.vue.d.ts +64 -0
  91. package/dist/core/staging/useEnvironment/const.d.ts +28 -0
  92. package/dist/core/staging/useEnvironment/envSence.d.ts +9 -0
  93. package/dist/core/staging/useEnvironment/index.d.ts +5 -3
  94. package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +56 -0
  95. package/dist/trescientos.js +7318 -6360
  96. package/dist/trescientos.umd.cjs +566 -428
  97. package/dist/utils/Gradient.d.ts +3 -2
  98. package/dist/utils/index.d.ts +1 -0
  99. package/dist/utils/types.d.ts +4 -0
  100. package/package.json +29 -29
  101. package/dist/core/directives/index.d.ts +0 -5
  102. package/dist/core/directives/vAlwaysLookAt.d.ts +0 -4
  103. package/dist/core/directives/vDistanceTo.d.ts +0 -4
  104. package/dist/core/directives/vLightHelper.d.ts +0 -5
  105. package/dist/core/directives/vLog.d.ts +0 -3
  106. package/dist/core/misc/useTweakPane/index.d.ts +0 -10
@@ -1,4 +1,5 @@
1
- import type { TresColor } from '@tresjs/core';
1
+ import { TresColor } from '@tresjs/core';
2
+
2
3
  export interface SmokeProps {
3
4
  /**
4
5
  * The color of the smoke.
@@ -65,7 +66,7 @@ export interface SmokeProps {
65
66
  */
66
67
  depthTest?: boolean;
67
68
  }
68
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SmokeProps>, {
69
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SmokeProps>, {
69
70
  opacity: number;
70
71
  speed: number;
71
72
  width: number;
@@ -75,8 +76,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
75
76
  color: string;
76
77
  depthTest: boolean;
77
78
  }>, {
78
- value: import("vue").ShallowRef<any>;
79
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SmokeProps>, {
79
+ instance: import('vue').ShallowRef<any>;
80
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SmokeProps>, {
80
81
  opacity: number;
81
82
  speed: number;
82
83
  width: number;
@@ -86,25 +87,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
86
87
  color: string;
87
88
  depthTest: boolean;
88
89
  }>>>, {
89
- speed: number;
90
- color: import("three").ColorRepresentation | [r: number, g: number, b: number];
90
+ color: TresColor;
91
91
  texture: string;
92
- depthTest: boolean;
93
- opacity: number;
92
+ speed: number;
94
93
  width: number;
95
94
  depth: number;
95
+ depthTest: boolean;
96
+ opacity: number;
96
97
  segments: number;
97
98
  }, {}>;
98
99
  export default _default;
99
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
100
- type __VLS_TypePropsToRuntimeProps<T> = {
101
- [K in keyof T]-?: {} extends Pick<T, K> ? {
102
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
103
- } : {
104
- type: import('vue').PropType<T[K]>;
105
- required: true;
106
- };
107
- };
108
100
  type __VLS_WithDefaults<P, D> = {
109
101
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
110
102
  default: D[K];
@@ -113,3 +105,12 @@ type __VLS_WithDefaults<P, D> = {
113
105
  type __VLS_Prettify<T> = {
114
106
  [K in keyof T]: T[K];
115
107
  } & {};
108
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
109
+ type __VLS_TypePropsToOption<T> = {
110
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
111
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
112
+ } : {
113
+ type: import('vue').PropType<T[K]>;
114
+ required: true;
115
+ };
116
+ };
@@ -1,13 +1,14 @@
1
1
  import { DataTexture } from 'three';
2
- import type { Ref, MaybeRef } from 'vue';
3
- import type { GradientTresColor, GradientScalar, GradientVectorFlexibleParams } from './../../../utils/Gradient';
2
+ import { MaybeRef, Ref } from 'vue';
3
+ import { GradientScalar, GradientTresColor, GradientVectorFlexibleParams } from './../../../utils/Gradient';
4
+
4
5
  export type CanvasGradientRenderer<T> = (g: CanvasGradient, entry: ShaderDataEntry<T>) => void;
5
6
  export declare class ShaderData {
6
7
  private entries;
7
8
  private resolution;
8
9
  constructor(entries: ShaderDataEntry<any>[], resolution: number);
9
10
  useTexture(): {
10
- texture: import("vue").ShallowRef<DataTexture>;
11
+ texture: import('vue').ShallowRef<DataTexture>;
11
12
  dispose: () => void;
12
13
  yFor: Record<string, number>;
13
14
  };
@@ -1,10 +1,10 @@
1
- import type { MaybeRef } from 'vue';
2
- import type { GradientTresColor, GradientScalar, GradientVectorFlexibleParams } from './../../../utils/Gradient';
3
- import type { ShaderDataEntry, CanvasGradientRenderer } from './ShaderData';
4
- import { ShaderData } from './ShaderData';
5
- declare const rgbaSuffixes: readonly ["r", "rg", "rgb", "rgba"];
6
- declare const xyzwSuffixes: readonly ["x", "xy", "xyz", "xyzw"];
7
- type ShaderSuffix = (typeof rgbaSuffixes)[number] | (typeof xyzwSuffixes)[number];
1
+ import { MaybeRef } from 'vue';
2
+ import { GradientScalar, GradientTresColor, GradientVectorFlexibleParams } from './../../../utils/Gradient';
3
+ import { CanvasGradientRenderer, ShaderDataEntry, ShaderData } from './ShaderData';
4
+
5
+ type rgbaSuffixes = ['r', 'rg', 'rgb', 'rgba'];
6
+ type xyzwSuffixes = ['x', 'xy', 'xyz', 'xyzw'];
7
+ type ShaderSuffix = (rgbaSuffixes)[number] | (xyzwSuffixes)[number];
8
8
  export default class ShaderDataBuilder {
9
9
  private entries;
10
10
  private resolution;
@@ -1,8 +1,8 @@
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';
1
+ import { Blending, BufferGeometry, Texture, Object3D, Points, ShaderMaterial } from 'three';
2
+ import { TresColor } from '@tresjs/core';
3
+ import { VectorFlexibleParams } from '@tresjs/core/dist/utils/normalize';
4
+ import { Gradient } from '../../../utils/Gradient';
5
+
6
6
  interface SparkleProps {
7
7
  /**
8
8
  * Texture or image path for individual sparkles
@@ -11,9 +11,9 @@ interface SparkleProps {
11
11
  /**
12
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
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.
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
17
  */
18
18
  geometry?: Object3D | BufferGeometry;
19
19
  /**
@@ -93,8 +93,8 @@ interface SparkleProps {
93
93
  /**
94
94
  * 'mix*' props: A particle "progresses" with a mix of two factors:
95
95
  *
96
- * * its normal "facing" the directionalLight
97
- * * its lifetime
96
+ * its normal "facing" the directionalLight
97
+ * its lifetime
98
98
  *
99
99
  * 'mix*' props specify the relationship between the two factors.
100
100
  *
@@ -134,7 +134,7 @@ interface SparkleProps {
134
134
  */
135
135
  depthWrite?: boolean;
136
136
  }
137
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
137
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SparkleProps>, {
138
138
  map: string;
139
139
  geometry: undefined;
140
140
  directionalLight: undefined;
@@ -164,7 +164,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
164
164
  blending: 2;
165
165
  transparent: boolean;
166
166
  depthWrite: boolean;
167
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
167
+ }>, {
168
+ instance: Points<BufferGeometry<import('three').NormalOrGLBufferAttributes>, ShaderMaterial, import('three').Object3DEventMap>;
169
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SparkleProps>, {
168
170
  map: string;
169
171
  geometry: undefined;
170
172
  directionalLight: undefined;
@@ -195,15 +197,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
195
197
  transparent: boolean;
196
198
  depthWrite: boolean;
197
199
  }>>>, {
198
- map: string | Texture;
199
- directionalLight: Object3D<import("three").Object3DEventMap>;
200
- blending: Blending;
201
- depthWrite: boolean;
202
- transparent: boolean;
203
200
  size: number;
204
- geometry: Object3D<import("three").Object3DEventMap> | BufferGeometry<import("three").NormalBufferAttributes>;
201
+ map: Texture | string;
202
+ directionalLight: Object3D;
203
+ geometry: Object3D | BufferGeometry;
205
204
  offset: number;
206
- alpha: number;
205
+ depthWrite: boolean;
206
+ transparent: boolean;
207
+ blending: Blending;
207
208
  lifetimeSec: number;
208
209
  cooldownSec: number;
209
210
  normalThreshold: number;
@@ -211,11 +212,12 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
211
212
  scaleNoise: number;
212
213
  offsetNoise: number;
213
214
  lifetimeNoise: number;
215
+ alpha: number;
214
216
  surfaceDistance: number;
215
- sequenceColor: Gradient<import("three").ColorRepresentation | [r: number, g: number, b: number]>;
217
+ sequenceColor: Gradient<TresColor>;
216
218
  sequenceAlpha: Gradient<number>;
217
- sequenceOffset: any;
218
- sequenceNoise: any;
219
+ sequenceOffset: Gradient<VectorFlexibleParams>;
220
+ sequenceNoise: Gradient<VectorFlexibleParams>;
219
221
  sequenceSize: Gradient<number>;
220
222
  sequenceSurfaceDistance: Gradient<number>;
221
223
  mixColor: number;
@@ -226,15 +228,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
226
228
  mixNoise: number;
227
229
  }, {}>;
228
230
  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
231
  type __VLS_WithDefaults<P, D> = {
239
232
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
240
233
  default: D[K];
@@ -243,3 +236,12 @@ type __VLS_WithDefaults<P, D> = {
243
236
  type __VLS_Prettify<T> = {
244
237
  [K in keyof T]: T[K];
245
238
  } & {};
239
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
240
+ type __VLS_TypePropsToOption<T> = {
241
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
242
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
243
+ } : {
244
+ type: import('vue').PropType<T[K]>;
245
+ required: true;
246
+ };
247
+ };
@@ -1,2 +1,3 @@
1
1
  import { DataTexture } from 'three';
2
+
2
3
  export default function useEmptyDataTexture(): DataTexture;
@@ -64,7 +64,7 @@ export interface StarsProps {
64
64
  */
65
65
  alphaMap?: null;
66
66
  }
67
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StarsProps>, {
67
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<StarsProps>, {
68
68
  size: number;
69
69
  sizeAttenuation: boolean;
70
70
  transparent: boolean;
@@ -74,8 +74,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
74
74
  depth: number;
75
75
  radius: number;
76
76
  }>, {
77
- value: import("vue").ShallowRef<any>;
78
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StarsProps>, {
77
+ instance: import('vue').ShallowRef<any>;
78
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<StarsProps>, {
79
79
  size: number;
80
80
  sizeAttenuation: boolean;
81
81
  transparent: boolean;
@@ -85,25 +85,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
85
85
  depth: number;
86
86
  radius: number;
87
87
  }>>>, {
88
- alphaTest: number;
89
- transparent: boolean;
90
- count: number;
91
- radius: number;
92
88
  size: number;
93
89
  depth: number;
90
+ count: number;
91
+ alphaTest: number;
94
92
  alphaMap: null;
95
93
  sizeAttenuation: boolean;
94
+ transparent: boolean;
95
+ radius: number;
96
96
  }, {}>;
97
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
98
  type __VLS_WithDefaults<P, D> = {
108
99
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
109
100
  default: D[K];
@@ -112,3 +103,12 @@ type __VLS_WithDefaults<P, D> = {
112
103
  type __VLS_Prettify<T> = {
113
104
  [K in keyof T]: T[K];
114
105
  } & {};
106
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
107
+ type __VLS_TypePropsToOption<T> = {
108
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
109
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
110
+ } : {
111
+ type: import('vue').PropType<T[K]>;
112
+ required: true;
113
+ };
114
+ };
@@ -1,10 +1,13 @@
1
- import Environment from './useEnvironment/component.vue';
2
- import Backdrop from './Backdrop.vue';
3
- import ContactShadows from './ContactShadows.vue';
4
- import Precipitation from './Precipitation.vue';
5
- import Sky from './Sky.vue';
6
- import Smoke from './Smoke.vue';
7
- import Sparkles from './Sparkles/component.vue';
8
- import Stars from './Stars.vue';
9
- import Ocean from './Ocean.vue';
10
- export { Backdrop, ContactShadows, Environment, Precipitation, Sky, Smoke, Sparkles, Stars, Ocean, };
1
+ import { default as Environment } from './useEnvironment/component.vue';
2
+ import { default as Lightformer } from './useEnvironment/lightformer/index.vue';
3
+ import { default as Backdrop } from './Backdrop.vue';
4
+ import { default as ContactShadows } from './ContactShadows.vue';
5
+ import { default as Fit } from './Fit.vue';
6
+ import { default as Precipitation } from './Precipitation.vue';
7
+ import { default as Sky } from './Sky.vue';
8
+ import { default as Smoke } from './Smoke.vue';
9
+ import { default as Sparkles } from './Sparkles/component.vue';
10
+ import { default as Stars } from './Stars.vue';
11
+ import { default as Ocean } from './Ocean.vue';
12
+
13
+ export { Backdrop, ContactShadows, Environment, Fit, Precipitation, Sky, Smoke, Sparkles, Stars, Ocean, Lightformer, };
@@ -0,0 +1,64 @@
1
+ import { Ref } from 'vue';
2
+ import { CubeTexture, Texture } from 'three';
3
+ import { EnvironmentOptions } from './const';
4
+
5
+ declare function __VLS_template(): {
6
+ default?(_: {}): any;
7
+ };
8
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<EnvironmentOptions>, {
9
+ background: boolean;
10
+ blur: number;
11
+ files: never[];
12
+ path: string;
13
+ preset: undefined;
14
+ resolution: number;
15
+ near: number;
16
+ far: number;
17
+ frames: number;
18
+ }>, {
19
+ texture: Ref<Texture | CubeTexture | null>;
20
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<EnvironmentOptions>, {
21
+ background: boolean;
22
+ blur: number;
23
+ files: never[];
24
+ path: string;
25
+ preset: undefined;
26
+ resolution: number;
27
+ near: number;
28
+ far: number;
29
+ frames: number;
30
+ }>>>, {
31
+ path: string;
32
+ background: boolean | string;
33
+ blur: number;
34
+ preset: import('./const').EnvironmentPresetsType;
35
+ files: string | string[];
36
+ resolution: number;
37
+ near: number;
38
+ far: number;
39
+ frames: number;
40
+ }, {}>;
41
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
42
+ export default _default;
43
+ type __VLS_WithDefaults<P, D> = {
44
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
45
+ default: D[K];
46
+ }> : P[K];
47
+ };
48
+ type __VLS_Prettify<T> = {
49
+ [K in keyof T]: T[K];
50
+ } & {};
51
+ type __VLS_WithTemplateSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
56
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
57
+ type __VLS_TypePropsToOption<T> = {
58
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
59
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
60
+ } : {
61
+ type: import('vue').PropType<T[K]>;
62
+ required: true;
63
+ };
64
+ };
@@ -33,6 +33,34 @@ export interface EnvironmentOptions {
33
33
  * @type {EnvironmentPresetsType}
34
34
  */
35
35
  preset?: EnvironmentPresetsType;
36
+ /**
37
+ * The resolution of the WebGLCubeRenderTarget.
38
+ *
39
+ * @type {number}
40
+ * @default 256
41
+ */
42
+ resolution?: number;
43
+ /**
44
+ * The near of the CubeCamera.
45
+ *
46
+ * @type {number}
47
+ * @default 1
48
+ */
49
+ near?: number;
50
+ /**
51
+ * The far of the CubeCamera.
52
+ *
53
+ * @type {number}
54
+ * @default 1000
55
+ */
56
+ far?: number;
57
+ /**
58
+ * The frames of the cubeCamera.update.
59
+ *
60
+ * @type {number}
61
+ * @default Infinity
62
+ */
63
+ frames?: number;
36
64
  }
37
65
  export declare const environmentPresets: {
38
66
  sunset: string;
@@ -0,0 +1,9 @@
1
+ import { Object3D, Scene } from 'three';
2
+
3
+ declare class EnvSence extends Object3D {
4
+ virtualScene: Scene;
5
+ constructor();
6
+ add(...object: Object3D[]): this;
7
+ destructor(): void;
8
+ }
9
+ export default EnvSence;
@@ -1,3 +1,5 @@
1
- import type { CubeTexture, Texture } from 'three';
2
- import type { EnvironmentOptions } from './const';
3
- export declare function useEnvironment(options: Partial<EnvironmentOptions>): Promise<Texture | CubeTexture>;
1
+ import { CubeTexture, Texture, WebGLCubeRenderTarget } from 'three';
2
+ import { Ref } from 'vue';
3
+ import { EnvironmentOptions } from './const';
4
+
5
+ export declare function useEnvironment(options: Partial<EnvironmentOptions>, fbo: Ref<WebGLCubeRenderTarget | undefined>): Promise<Texture | CubeTexture>;
@@ -0,0 +1,56 @@
1
+ import { Texture, Color } from 'three';
2
+
3
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
4
+ args?: any[];
5
+ from?: "circle" | "ring" | "rect" | any;
6
+ toneMapped?: boolean;
7
+ map?: Texture;
8
+ intensity?: number;
9
+ color?: any;
10
+ }>, {
11
+ args: any;
12
+ from: string;
13
+ toneMapped: boolean;
14
+ map: any;
15
+ intensity: number;
16
+ color: Color;
17
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
18
+ args?: any[];
19
+ from?: "circle" | "ring" | "rect" | any;
20
+ toneMapped?: boolean;
21
+ map?: Texture;
22
+ intensity?: number;
23
+ color?: any;
24
+ }>, {
25
+ args: any;
26
+ from: string;
27
+ toneMapped: boolean;
28
+ map: any;
29
+ intensity: number;
30
+ color: Color;
31
+ }>>>, {
32
+ map: Texture;
33
+ color: any;
34
+ args: any[];
35
+ toneMapped: boolean;
36
+ from: "circle" | "ring" | "rect" | any;
37
+ intensity: number;
38
+ }, {}>;
39
+ export default _default;
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
42
+ default: D[K];
43
+ }> : P[K];
44
+ };
45
+ type __VLS_Prettify<T> = {
46
+ [K in keyof T]: T[K];
47
+ } & {};
48
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
49
+ type __VLS_TypePropsToOption<T> = {
50
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
51
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
52
+ } : {
53
+ type: import('vue').PropType<T[K]>;
54
+ required: true;
55
+ };
56
+ };