@tresjs/cientos 3.7.0 → 4.0.0-next.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 (66) hide show
  1. package/README.md +7 -6
  2. package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
  3. package/dist/core/abstractions/Lensflare/component.vue.d.ts +1 -1
  4. package/dist/core/abstractions/Levioso.vue.d.ts +1 -1
  5. package/dist/core/abstractions/MouseParallax.vue.d.ts +1 -1
  6. package/dist/core/abstractions/Reflector.vue.d.ts +1 -1
  7. package/dist/core/abstractions/Text3D.vue.d.ts +1 -1
  8. package/dist/core/abstractions/useFBO/component.vue.d.ts +1 -1
  9. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +1 -1
  10. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +6 -0
  11. package/dist/core/controls/CameraControls.vue.d.ts +957 -1032
  12. package/dist/core/controls/KeyboardControls.vue.d.ts +1 -1
  13. package/dist/core/controls/MapControls.vue.d.ts +1 -1
  14. package/dist/core/controls/OrbitControls.vue.d.ts +891 -961
  15. package/dist/core/controls/PointerLockControls.vue.d.ts +1 -1
  16. package/dist/core/controls/ScrollControls.vue.d.ts +1 -1
  17. package/dist/core/controls/TransformControls.vue.d.ts +1 -1
  18. package/dist/core/loaders/SVG/component.vue.d.ts +1 -1
  19. package/dist/core/loaders/useFBX/component.vue.d.ts +44 -3
  20. package/dist/core/loaders/useGLTF/component.vue.d.ts +31 -1
  21. package/dist/core/loaders/useGLTF/index.d.ts +1 -1
  22. package/dist/core/materials/blurPass.d.ts +22 -0
  23. package/dist/core/materials/convolutionMaterial.d.ts +7 -0
  24. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +2 -2
  25. package/dist/core/materials/index.d.ts +2 -1
  26. package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +1 -1
  27. package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +74 -0
  28. package/dist/core/materials/meshReflectionMaterial/material.d.ts +51 -0
  29. package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +1 -1
  30. package/dist/core/misc/BakeShadows.d.ts +1 -0
  31. package/dist/core/misc/Stats.d.ts +1 -1
  32. package/dist/core/misc/StatsGl.d.ts +1 -1
  33. package/dist/core/misc/html/HTML.vue.d.ts +2 -2
  34. package/dist/core/misc/index.d.ts +3 -1
  35. package/dist/core/misc/useGLTFExporter.d.ts +12 -0
  36. package/dist/core/shapes/Box.vue.d.ts +1 -1
  37. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +1 -1
  38. package/dist/core/shapes/Circle.vue.d.ts +1 -1
  39. package/dist/core/shapes/Cone.vue.d.ts +1 -1
  40. package/dist/core/shapes/Dodecahedron.vue.d.ts +1 -1
  41. package/dist/core/shapes/Icosahedron.vue.d.ts +1 -1
  42. package/dist/core/shapes/Line2.vue.d.ts +1 -1
  43. package/dist/core/shapes/Octahedron.vue.d.ts +1 -1
  44. package/dist/core/shapes/Plane.vue.d.ts +1 -1
  45. package/dist/core/shapes/Ring.vue.d.ts +1 -1
  46. package/dist/core/shapes/RoundedBox.vue.d.ts +58 -0
  47. package/dist/core/shapes/Sphere.vue.d.ts +1 -1
  48. package/dist/core/shapes/Superformula.vue.d.ts +1 -1
  49. package/dist/core/shapes/Tetrahedron.vue.d.ts +1 -1
  50. package/dist/core/shapes/Torus.vue.d.ts +1 -1
  51. package/dist/core/shapes/TorusKnot.vue.d.ts +1 -1
  52. package/dist/core/shapes/Tube.vue.d.ts +1 -1
  53. package/dist/core/shapes/index.d.ts +2 -1
  54. package/dist/core/staging/Backdrop.vue.d.ts +1 -1
  55. package/dist/core/staging/Ocean.vue.d.ts +163 -0
  56. package/dist/core/staging/Precipitation.vue.d.ts +1 -1
  57. package/dist/core/staging/Sky.vue.d.ts +6 -1
  58. package/dist/core/staging/Smoke.vue.d.ts +1 -1
  59. package/dist/core/staging/Sparkles/ShaderData.d.ts +1 -1
  60. package/dist/core/staging/Sparkles/component.vue.d.ts +4 -4
  61. package/dist/core/staging/Stars.vue.d.ts +1 -1
  62. package/dist/core/staging/index.d.ts +2 -1
  63. package/dist/trescientos.js +7825 -5764
  64. package/dist/trescientos.umd.cjs +355 -115
  65. package/dist/utils/constants.d.ts +1 -0
  66. package/package.json +23 -24
@@ -23,7 +23,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
23
23
  color: string;
24
24
  }>, {
25
25
  value: import("vue").ShallowRef<any>;
26
- }, 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<TorusProps>, {
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TorusProps>, {
27
27
  args: () => number[];
28
28
  color: string;
29
29
  }>>>, {
@@ -23,7 +23,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
23
23
  color: string;
24
24
  }>, {
25
25
  value: import("vue").ShallowRef<any>;
26
- }, 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<TorusKnotProps>, {
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TorusKnotProps>, {
27
27
  args: () => number[];
28
28
  color: string;
29
29
  }>>>, {
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
24
24
  color: string;
25
25
  }>, {
26
26
  value: import("vue").ShallowRef<any>;
27
- }, 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<TubeProps>, {
27
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TubeProps>, {
28
28
  args: () => (number | boolean | QuadraticBezierCurve3)[];
29
29
  color: string;
30
30
  }>>>, {
@@ -8,10 +8,11 @@ import Line2 from './Line2.vue';
8
8
  import Octahedron from './Octahedron.vue';
9
9
  import Plane from './Plane.vue';
10
10
  import Ring from './Ring.vue';
11
+ import RoundedBox from './RoundedBox.vue';
11
12
  import Sphere from './Sphere.vue';
12
13
  import Superformula from './Superformula.vue';
13
14
  import Tetrahedron from './Tetrahedron.vue';
14
15
  import Torus from './Torus.vue';
15
16
  import TorusKnot from './TorusKnot.vue';
16
17
  import Tube from './Tube.vue';
17
- export { Box, CatmullRomCurve3, Circle, Cone, Dodecahedron, Icosahedron, Line2, Octahedron, Plane, Ring, Sphere, Superformula, Tetrahedron, Torus, TorusKnot, Tube, };
18
+ export { Box, CatmullRomCurve3, Circle, Cone, Dodecahedron, Icosahedron, Line2, Octahedron, Plane, Ring, RoundedBox, Sphere, Superformula, Tetrahedron, Torus, TorusKnot, Tube, };
@@ -7,7 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
7
7
  floor: number;
8
8
  segments: number;
9
9
  receiveShadow: boolean;
10
- }>, {}, 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<BackdropProps>, {
10
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BackdropProps>, {
11
11
  floor: number;
12
12
  segments: number;
13
13
  receiveShadow: boolean;
@@ -0,0 +1,163 @@
1
+ import type { TresColor, TresVector3 } from '@tresjs/core';
2
+ import { Vector3 } from 'three';
3
+ export interface OceanProps {
4
+ /**
5
+ * The textureWidth of the internal WebGLRenderTarget.
6
+ *
7
+ * @default 512
8
+ * @type {number}
9
+ * @memberof OceanProps
10
+ *
11
+ */
12
+ textureWidth?: number;
13
+ /**
14
+ * The textureHeight of the internal WebGLRenderTarget.
15
+ *
16
+ * @default 512
17
+ * @type {number}
18
+ * @memberof OceanProps
19
+ *
20
+ */
21
+ textureHeight?: number;
22
+ /**
23
+ * The normal texture of the ocean.
24
+ * @default 'https://raw.githubusercontent.com/mrdoob/three.js/master/examples/textures/water/Water_1_M_Normal.jpg'
25
+ * @type {string}
26
+ * @memberof OceanProps
27
+ * @see https://threejs.org/docs/#api/en/materials/MeshStandardMaterial
28
+ */
29
+ waterNormals?: string;
30
+ /**
31
+ * The sun direction
32
+ * @default '[0,0,0]'
33
+ * @type {TresVector3}
34
+ * @memberof OceanProps
35
+ */
36
+ sunDirection?: TresVector3;
37
+ /**
38
+ * The sun color.
39
+ *
40
+ * @default '#fff'
41
+ * @type {TresColor}
42
+ * @memberof OceanProps
43
+ *
44
+ */
45
+ sunColor?: TresColor;
46
+ /**
47
+ * The water color.
48
+ *
49
+ * @default '#001e0f'
50
+ * @type {TresColor}
51
+ * @memberof OceanProps
52
+ *
53
+ */
54
+ waterColor?: TresColor;
55
+ /**
56
+ * The distortion scale of the reflections.
57
+ * @default 3.7
58
+ * @type {number}
59
+ * @memberof OceanProps
60
+ *
61
+ */
62
+ distortionScale?: number;
63
+ /**
64
+ * The size of the normal texture.
65
+ *
66
+ * @default 1
67
+ * @type {number}
68
+ * @memberof OceanProps
69
+ *
70
+ */
71
+ size?: number;
72
+ /**
73
+ * The ClipBias.
74
+ *
75
+ * @default 0.0
76
+ * @type {number}
77
+ * @memberof OceanProps
78
+ *
79
+ */
80
+ clipBias?: number;
81
+ /**
82
+ * The alpha factor.
83
+ *
84
+ * @default 1.0
85
+ * @type {number}
86
+ * @memberof OceanProps
87
+ *
88
+ */
89
+ alpha?: number;
90
+ /**
91
+ * ThreeJs side material property.
92
+ *
93
+ * @default FrontSide
94
+ * @type {TresVector3}
95
+ * @memberof OceanProps
96
+ *
97
+ */
98
+ side?: TresVector3;
99
+ }
100
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OceanProps>, {
101
+ textureWidth: number;
102
+ textureHeight: number;
103
+ waterNormals: string;
104
+ sunDirection: () => Vector3;
105
+ sunColor: number;
106
+ waterColor: number;
107
+ distortionScale: number;
108
+ size: number;
109
+ clipBias: number;
110
+ alpha: number;
111
+ side: 0;
112
+ }>, {
113
+ root: import("vue").ShallowRef<any>;
114
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OceanProps>, {
115
+ textureWidth: number;
116
+ textureHeight: number;
117
+ waterNormals: string;
118
+ sunDirection: () => Vector3;
119
+ sunColor: number;
120
+ waterColor: number;
121
+ distortionScale: number;
122
+ size: number;
123
+ clipBias: number;
124
+ alpha: number;
125
+ side: 0;
126
+ }>>>, {
127
+ side: number | Vector3 | import("@tresjs/core").VectorCoordinates | [x: number, y: number, z: number];
128
+ textureWidth: number;
129
+ textureHeight: number;
130
+ clipBias: number;
131
+ size: number;
132
+ waterNormals: string;
133
+ sunDirection: number | Vector3 | import("@tresjs/core").VectorCoordinates | [x: number, y: number, z: number];
134
+ sunColor: import("three").ColorRepresentation | [r: number, g: number, b: number];
135
+ waterColor: import("three").ColorRepresentation | [r: number, g: number, b: number];
136
+ distortionScale: number;
137
+ alpha: number;
138
+ }, {}>, {
139
+ default?(_: {}): any;
140
+ }>;
141
+ export default _default;
142
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
143
+ type __VLS_TypePropsToRuntimeProps<T> = {
144
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
145
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
146
+ } : {
147
+ type: import('vue').PropType<T[K]>;
148
+ required: true;
149
+ };
150
+ };
151
+ type __VLS_WithDefaults<P, D> = {
152
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
153
+ default: D[K];
154
+ }> : P[K];
155
+ };
156
+ type __VLS_Prettify<T> = {
157
+ [K in keyof T]: T[K];
158
+ } & {};
159
+ type __VLS_WithTemplateSlots<T, S> = T & {
160
+ new (): {
161
+ $slots: S;
162
+ };
163
+ };
@@ -120,7 +120,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
120
120
  depthWrite: boolean;
121
121
  transparent: boolean;
122
122
  sizeAttenuation: boolean;
123
- }>, {}, 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<PrecipitationProps>, {
123
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PrecipitationProps>, {
124
124
  size: number;
125
125
  area: () => number[];
126
126
  color: number;
@@ -1,3 +1,5 @@
1
+ import { Vector3 } from 'three';
2
+ import { Sky as SkyImpl } from 'three/examples/jsm/objects/Sky';
1
3
  export interface SkyProps {
2
4
  /**
3
5
  * Haziness
@@ -37,7 +39,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
37
39
  elevation: number;
38
40
  azimuth: number;
39
41
  distance: number;
40
- }>, {}, 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<SkyProps>, {
42
+ }>, {
43
+ root: import("vue").ShallowRef<SkyImpl | undefined>;
44
+ sunPosition: Vector3;
45
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SkyProps>, {
41
46
  turbidity: number;
42
47
  rayleigh: number;
43
48
  mieCoefficient: number;
@@ -76,7 +76,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
76
76
  depthTest: boolean;
77
77
  }>, {
78
78
  value: import("vue").ShallowRef<any>;
79
- }, 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<SmokeProps>, {
79
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SmokeProps>, {
80
80
  opacity: number;
81
81
  speed: number;
82
82
  width: number;
@@ -7,7 +7,7 @@ export declare class ShaderData {
7
7
  private resolution;
8
8
  constructor(entries: ShaderDataEntry<any>[], resolution: number);
9
9
  useTexture(): {
10
- texture: Ref<DataTexture> | import("vue").ShallowRef<DataTexture>;
10
+ texture: import("vue").ShallowRef<DataTexture>;
11
11
  dispose: () => void;
12
12
  yFor: Record<string, number>;
13
13
  };
@@ -164,7 +164,7 @@ 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").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
167
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
168
168
  map: string;
169
169
  geometry: undefined;
170
170
  directionalLight: undefined;
@@ -203,6 +203,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
203
203
  size: number;
204
204
  geometry: Object3D<import("three").Object3DEventMap> | BufferGeometry<import("three").NormalBufferAttributes>;
205
205
  offset: number;
206
+ alpha: number;
206
207
  lifetimeSec: number;
207
208
  cooldownSec: number;
208
209
  normalThreshold: number;
@@ -210,12 +211,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
210
211
  scaleNoise: number;
211
212
  offsetNoise: number;
212
213
  lifetimeNoise: number;
213
- alpha: number;
214
214
  surfaceDistance: number;
215
215
  sequenceColor: Gradient<import("three").ColorRepresentation | [r: number, g: number, b: number]>;
216
216
  sequenceAlpha: Gradient<number>;
217
- sequenceOffset: Gradient<VectorFlexibleParams>;
218
- sequenceNoise: Gradient<VectorFlexibleParams>;
217
+ sequenceOffset: any;
218
+ sequenceNoise: any;
219
219
  sequenceSize: Gradient<number>;
220
220
  sequenceSurfaceDistance: Gradient<number>;
221
221
  mixColor: number;
@@ -75,7 +75,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
75
75
  radius: number;
76
76
  }>, {
77
77
  value: import("vue").ShallowRef<any>;
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>, {
78
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StarsProps>, {
79
79
  size: number;
80
80
  sizeAttenuation: boolean;
81
81
  transparent: boolean;
@@ -6,4 +6,5 @@ import Sky from './Sky.vue';
6
6
  import Smoke from './Smoke.vue';
7
7
  import Sparkles from './Sparkles/component.vue';
8
8
  import Stars from './Stars.vue';
9
- export { Backdrop, ContactShadows, Environment, Precipitation, Sky, Smoke, Sparkles, Stars, };
9
+ import Ocean from './Ocean.vue';
10
+ export { Backdrop, ContactShadows, Environment, Precipitation, Sky, Smoke, Sparkles, Stars, Ocean, };