@tresjs/cientos 3.8.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.
@@ -0,0 +1,58 @@
1
+ import type { TresColor } from '@tresjs/core';
2
+ import type { BoxGeometry } from 'three';
3
+ export interface BoxProps {
4
+ /**
5
+ * The width, height, depth, segments and radius.
6
+ * @default [1, 1, 1, 2, 0.1]
7
+ * @type {number[]}
8
+ * @memberof BoxProps
9
+ * @see https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/RoundedBoxGeometry.js
10
+ *
11
+ */
12
+ args?: ConstructorParameters<typeof BoxGeometry>;
13
+ /**
14
+ * The color of the box.
15
+ * @default 0xffffff
16
+ * @type {TresColor}
17
+ * @memberof BoxProps
18
+ * @see https://threejs.org/docs/#api/en/materials/MeshBasicMaterial
19
+ */
20
+ color?: TresColor;
21
+ }
22
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BoxProps>, {
23
+ args: () => number[];
24
+ color: string;
25
+ }>, {
26
+ value: import("vue").ShallowRef<any>;
27
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BoxProps>, {
28
+ args: () => number[];
29
+ color: string;
30
+ }>>>, {
31
+ color: import("three").ColorRepresentation | [r: number, g: number, b: number];
32
+ args: [width?: number | undefined, height?: number | undefined, depth?: number | undefined, widthSegments?: number | undefined, heightSegments?: number | undefined, depthSegments?: number | undefined];
33
+ }, {}>, {
34
+ default?(_: {}): any;
35
+ }>;
36
+ export default _default;
37
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
38
+ type __VLS_TypePropsToRuntimeProps<T> = {
39
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
40
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
41
+ } : {
42
+ type: import('vue').PropType<T[K]>;
43
+ required: true;
44
+ };
45
+ };
46
+ type __VLS_WithDefaults<P, D> = {
47
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
48
+ default: D[K];
49
+ }> : P[K];
50
+ };
51
+ type __VLS_Prettify<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
54
+ type __VLS_WithTemplateSlots<T, S> = T & {
55
+ new (): {
56
+ $slots: S;
57
+ };
58
+ };
@@ -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, };
@@ -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
+ };
@@ -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").PublicProps, 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;
@@ -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,7 +211,6 @@ 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>;
@@ -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, };