@tresjs/cientos 3.8.0 → 3.9.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.
- package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
- package/dist/core/abstractions/Lensflare/RandUtils.d.ts +2 -2
- package/dist/core/abstractions/Lensflare/component.vue.d.ts +11 -10
- package/dist/core/abstractions/Lensflare/constants.d.ts +2 -1
- package/dist/core/abstractions/Lensflare/index.d.ts +5 -4
- package/dist/core/abstractions/Levioso.vue.d.ts +5 -5
- package/dist/core/abstractions/MouseParallax.vue.d.ts +16 -5
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
- package/dist/core/abstractions/Reflector.vue.d.ts +6 -5
- package/dist/core/abstractions/Text3D.vue.d.ts +3 -3
- package/dist/core/abstractions/index.d.ts +10 -8
- package/dist/core/abstractions/useAnimations.d.ts +4 -4
- package/dist/core/abstractions/useFBO/component.vue.d.ts +6 -5
- package/dist/core/abstractions/useFBO/index.d.ts +4 -4
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +5 -4
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +6 -6
- package/dist/core/controls/CameraControls.vue.d.ts +3214 -3049
- package/dist/core/controls/KeyboardControls.vue.d.ts +13 -13
- package/dist/core/controls/MapControls.vue.d.ts +4 -3
- package/dist/core/controls/OrbitControls.vue.d.ts +5158 -5016
- package/dist/core/controls/PointerLockControls.vue.d.ts +6 -5
- package/dist/core/controls/ScrollControls.vue.d.ts +8 -8
- package/dist/core/controls/TransformControls.vue.d.ts +6 -4
- package/dist/core/controls/index.d.ts +9 -8
- package/dist/core/directives/index.d.ts +1 -0
- package/dist/core/directives/vAlwaysLookAt.d.ts +2 -1
- package/dist/core/directives/vLightHelper.d.ts +3 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +13 -12
- package/dist/core/loaders/index.d.ts +4 -3
- package/dist/core/loaders/useFBX/component.vue.d.ts +5 -5
- package/dist/core/loaders/useFBX/index.d.ts +2 -1
- package/dist/core/loaders/useGLTF/component.vue.d.ts +8 -8
- package/dist/core/loaders/useProgress.d.ts +2 -1
- package/dist/core/loaders/useVideoTexture.d.ts +1 -0
- package/dist/core/materials/blurPass.d.ts +2 -1
- package/dist/core/materials/convolutionMaterial.d.ts +1 -0
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +3 -3
- package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +41 -0
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +86 -0
- package/dist/core/materials/holographicMaterial/material.d.ts +27 -0
- package/dist/core/materials/index.d.ts +7 -5
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +3 -3
- package/dist/core/materials/meshGlassMaterial/material.d.ts +2 -2
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +4 -3
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +2 -2
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +2 -2
- package/dist/core/materials/meshWobbleMaterial/material.d.ts +2 -2
- package/dist/core/misc/BakeShadows.d.ts +1 -1
- package/dist/core/misc/Stats.d.ts +2 -2
- package/dist/core/misc/StatsGl.d.ts +1 -1
- package/dist/core/misc/html/HTML.vue.d.ts +7 -6
- package/dist/core/misc/html/utils.d.ts +3 -3
- package/dist/core/misc/index.d.ts +2 -1
- package/dist/core/misc/useGLTFExporter.d.ts +2 -1
- package/dist/core/misc/useTweakPane/index.d.ts +3 -2
- package/dist/core/shapes/Box.vue.d.ts +7 -6
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +4 -3
- package/dist/core/shapes/Circle.vue.d.ts +7 -6
- package/dist/core/shapes/Cone.vue.d.ts +7 -6
- package/dist/core/shapes/Dodecahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Icosahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Line2.vue.d.ts +5 -4
- package/dist/core/shapes/Octahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Plane.vue.d.ts +7 -6
- package/dist/core/shapes/Ring.vue.d.ts +7 -6
- package/dist/core/shapes/RoundedBox.vue.d.ts +59 -0
- package/dist/core/shapes/Sphere.vue.d.ts +7 -6
- package/dist/core/shapes/Superformula.vue.d.ts +21 -20
- package/dist/core/shapes/Tetrahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Torus.vue.d.ts +7 -6
- package/dist/core/shapes/TorusKnot.vue.d.ts +7 -6
- package/dist/core/shapes/Tube.vue.d.ts +8 -8
- package/dist/core/shapes/index.d.ts +19 -17
- package/dist/core/staging/Backdrop.vue.d.ts +2 -2
- package/dist/core/staging/Fit.vue.d.ts +56 -0
- package/dist/core/staging/Ocean.vue.d.ts +164 -0
- package/dist/core/staging/Precipitation.vue.d.ts +6 -5
- package/dist/core/staging/Sky.vue.d.ts +8 -2
- package/dist/core/staging/Smoke.vue.d.ts +6 -5
- package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +4 -4
- package/dist/core/staging/Sparkles/component.vue.d.ts +17 -17
- package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
- package/dist/core/staging/Stars.vue.d.ts +4 -4
- package/dist/core/staging/index.d.ts +13 -9
- package/dist/core/staging/useEnvironment/component.vue.d.ts +62 -0
- package/dist/core/staging/useEnvironment/const.d.ts +28 -0
- package/dist/core/staging/useEnvironment/envSence.d.ts +9 -0
- package/dist/core/staging/useEnvironment/index.d.ts +5 -3
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +56 -0
- package/dist/trescientos.js +5946 -5098
- package/dist/trescientos.umd.cjs +301 -82
- package/dist/utils/Gradient.d.ts +3 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/types.d.ts +4 -0
- package/package.json +29 -26
- package/dist/core/loaders/useGLTF/index.d.ts +0 -36
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { TetrahedronGeometry } from 'three';
|
|
3
|
+
|
|
3
4
|
export interface TetrahedronProps {
|
|
4
5
|
/**
|
|
5
6
|
* The radius and detail of the tetrahedron.
|
|
@@ -18,16 +19,16 @@ export interface TetrahedronProps {
|
|
|
18
19
|
*/
|
|
19
20
|
color?: TresColor;
|
|
20
21
|
}
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TetrahedronProps>, {
|
|
22
23
|
args: () => number[];
|
|
23
24
|
color: string;
|
|
24
25
|
}>, {
|
|
25
|
-
value: import(
|
|
26
|
-
}, unknown, {}, {}, import(
|
|
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<TetrahedronProps>, {
|
|
27
28
|
args: () => number[];
|
|
28
29
|
color: string;
|
|
29
30
|
}>>>, {
|
|
30
|
-
color: import(
|
|
31
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
31
32
|
args: [radius?: number | undefined, detail?: number | undefined];
|
|
32
33
|
}, {}>, {
|
|
33
34
|
default?(_: {}): any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { TorusGeometry } from 'three';
|
|
3
|
+
|
|
3
4
|
export interface TorusProps {
|
|
4
5
|
/**
|
|
5
6
|
* The radius, tube, radialSegments, tubularSegments, arc of the torus.
|
|
@@ -18,16 +19,16 @@ export interface TorusProps {
|
|
|
18
19
|
*/
|
|
19
20
|
color?: TresColor;
|
|
20
21
|
}
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TorusProps>, {
|
|
22
23
|
args: () => number[];
|
|
23
24
|
color: string;
|
|
24
25
|
}>, {
|
|
25
|
-
value: import(
|
|
26
|
-
}, unknown, {}, {}, import(
|
|
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<TorusProps>, {
|
|
27
28
|
args: () => number[];
|
|
28
29
|
color: string;
|
|
29
30
|
}>>>, {
|
|
30
|
-
color: import(
|
|
31
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
31
32
|
args: [radius?: number | undefined, tube?: number | undefined, radialSegments?: number | undefined, tubularSegments?: number | undefined, arc?: number | undefined];
|
|
32
33
|
}, {}>, {
|
|
33
34
|
default?(_: {}): any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { TorusKnotGeometry } from 'three';
|
|
3
|
+
|
|
3
4
|
export interface TorusKnotProps {
|
|
4
5
|
/**
|
|
5
6
|
* The radius, tube, radialSegments, tubularSegments and p, q of the torus knot.
|
|
@@ -18,16 +19,16 @@ export interface TorusKnotProps {
|
|
|
18
19
|
*/
|
|
19
20
|
color?: TresColor;
|
|
20
21
|
}
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TorusKnotProps>, {
|
|
22
23
|
args: () => number[];
|
|
23
24
|
color: string;
|
|
24
25
|
}>, {
|
|
25
|
-
value: import(
|
|
26
|
-
}, unknown, {}, {}, import(
|
|
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<TorusKnotProps>, {
|
|
27
28
|
args: () => number[];
|
|
28
29
|
color: string;
|
|
29
30
|
}>>>, {
|
|
30
|
-
color: import(
|
|
31
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
31
32
|
args: [radius?: number | undefined, tube?: number | undefined, tubularSegments?: number | undefined, radialSegments?: number | undefined, p?: number | undefined, q?: number | undefined];
|
|
32
33
|
}, {}>, {
|
|
33
34
|
default?(_: {}): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { TubeGeometry, QuadraticBezierCurve3, Vector3 } from 'three';
|
|
3
|
+
|
|
4
4
|
export interface TubeProps {
|
|
5
5
|
/**
|
|
6
6
|
* The curve, segments, radius, radialSegments, closed.
|
|
@@ -19,17 +19,17 @@ export interface TubeProps {
|
|
|
19
19
|
*/
|
|
20
20
|
color?: TresColor;
|
|
21
21
|
}
|
|
22
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TubeProps>, {
|
|
23
23
|
args: () => (number | boolean | QuadraticBezierCurve3)[];
|
|
24
24
|
color: string;
|
|
25
25
|
}>, {
|
|
26
|
-
value: import(
|
|
27
|
-
}, unknown, {}, {}, import(
|
|
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<TubeProps>, {
|
|
28
28
|
args: () => (number | boolean | QuadraticBezierCurve3)[];
|
|
29
29
|
color: string;
|
|
30
30
|
}>>>, {
|
|
31
|
-
color: import(
|
|
32
|
-
args: [path?: import(
|
|
31
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
32
|
+
args: [path?: import('three').Curve<Vector3> | undefined, tubularSegments?: number | undefined, radius?: number | undefined, radialSegments?: number | undefined, closed?: boolean | undefined];
|
|
33
33
|
}, {}>, {
|
|
34
34
|
default?(_: {}): any;
|
|
35
35
|
}>;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import Box from './Box.vue';
|
|
2
|
-
import CatmullRomCurve3 from './CatmullRomCurve3.vue';
|
|
3
|
-
import Circle from './Circle.vue';
|
|
4
|
-
import Cone from './Cone.vue';
|
|
5
|
-
import Dodecahedron from './Dodecahedron.vue';
|
|
6
|
-
import Icosahedron from './Icosahedron.vue';
|
|
7
|
-
import Line2 from './Line2.vue';
|
|
8
|
-
import Octahedron from './Octahedron.vue';
|
|
9
|
-
import Plane from './Plane.vue';
|
|
10
|
-
import Ring from './Ring.vue';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
1
|
+
import { default as Box } from './Box.vue';
|
|
2
|
+
import { default as CatmullRomCurve3 } from './CatmullRomCurve3.vue';
|
|
3
|
+
import { default as Circle } from './Circle.vue';
|
|
4
|
+
import { default as Cone } from './Cone.vue';
|
|
5
|
+
import { default as Dodecahedron } from './Dodecahedron.vue';
|
|
6
|
+
import { default as Icosahedron } from './Icosahedron.vue';
|
|
7
|
+
import { default as Line2 } from './Line2.vue';
|
|
8
|
+
import { default as Octahedron } from './Octahedron.vue';
|
|
9
|
+
import { default as Plane } from './Plane.vue';
|
|
10
|
+
import { default as Ring } from './Ring.vue';
|
|
11
|
+
import { default as RoundedBox } from './RoundedBox.vue';
|
|
12
|
+
import { default as Sphere } from './Sphere.vue';
|
|
13
|
+
import { default as Superformula } from './Superformula.vue';
|
|
14
|
+
import { default as Tetrahedron } from './Tetrahedron.vue';
|
|
15
|
+
import { default as Torus } from './Torus.vue';
|
|
16
|
+
import { default as TorusKnot } from './TorusKnot.vue';
|
|
17
|
+
import { default as Tube } from './Tube.vue';
|
|
18
|
+
|
|
19
|
+
export { Box, CatmullRomCurve3, Circle, Cone, Dodecahedron, Icosahedron, Line2, Octahedron, Plane, Ring, RoundedBox, Sphere, Superformula, Tetrahedron, Torus, TorusKnot, Tube, };
|
|
@@ -3,11 +3,11 @@ export interface BackdropProps {
|
|
|
3
3
|
segments?: number;
|
|
4
4
|
receiveShadow?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
6
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BackdropProps>, {
|
|
7
7
|
floor: number;
|
|
8
8
|
segments: number;
|
|
9
9
|
receiveShadow: boolean;
|
|
10
|
-
}>, {}, unknown, {}, {}, import(
|
|
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,56 @@
|
|
|
1
|
+
import { Object3D, Box3, Vector3 } from 'three';
|
|
2
|
+
|
|
3
|
+
export interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* If `into` is:
|
|
6
|
+
* - omitted or explicitly `undefined`: position/scale children to fit into a 1 × 1 × 1 `Box3` at world origin.
|
|
7
|
+
* - `null`: turn off `<Fit />`; reset scale/position of children.
|
|
8
|
+
* - `number`: convert argument to `Vector3(number, number, number)`.
|
|
9
|
+
* - `[number, number, number]`: convert argument to `Vector3`.
|
|
10
|
+
* - `Vector3`: position/scale children to fit inside a `Box3` of size `Vector3` at target objects' cumulative center.
|
|
11
|
+
* - `Box3`: position/scale children to fit inside `Box3`.
|
|
12
|
+
* - `Object3D`: position/scale children to fit inside calculated `Box3`. [See `THREE.Box3.setFromObject`](https://threejs.org/docs/#api/en/math/Box3.setFromObject). `<Fit />` must not contain the `Object3D` and vice-versa.
|
|
13
|
+
*/
|
|
14
|
+
into?: number | [number, number, number] | Vector3 | Box3 | Object3D | null;
|
|
15
|
+
/** [See `precise` argument in `THREE.Box3.setFromObject`](https://threejs.org/docs/index.html?q=box3#api/en/math/Box3.setFromObject) */
|
|
16
|
+
precise?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
19
|
+
into: () => Box3;
|
|
20
|
+
precise: boolean;
|
|
21
|
+
}>, {
|
|
22
|
+
instance: import('vue').ShallowRef<any>;
|
|
23
|
+
fit: (into?: number | Box3 | Vector3 | Object3D<import('three').Object3DEventMap> | [number, number, number] | null | undefined, precise?: boolean) => void;
|
|
24
|
+
update: () => void;
|
|
25
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
26
|
+
into: () => Box3;
|
|
27
|
+
precise: boolean;
|
|
28
|
+
}>>>, {
|
|
29
|
+
into: number | Box3 | Vector3 | Object3D<import('three').Object3DEventMap> | [number, number, number] | null;
|
|
30
|
+
precise: boolean;
|
|
31
|
+
}, {}>, {
|
|
32
|
+
default?(_: {}): any;
|
|
33
|
+
}>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithDefaults<P, D> = {
|
|
45
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
46
|
+
default: D[K];
|
|
47
|
+
}> : P[K];
|
|
48
|
+
};
|
|
49
|
+
type __VLS_Prettify<T> = {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} & {};
|
|
52
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
53
|
+
new (): {
|
|
54
|
+
$slots: S;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { TresColor, TresVector3 } from '@tresjs/core';
|
|
2
|
+
import { Vector3 } from 'three';
|
|
3
|
+
|
|
4
|
+
export interface OceanProps {
|
|
5
|
+
/**
|
|
6
|
+
* The textureWidth of the internal WebGLRenderTarget.
|
|
7
|
+
*
|
|
8
|
+
* @default 512
|
|
9
|
+
* @type {number}
|
|
10
|
+
* @memberof OceanProps
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
textureWidth?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The textureHeight of the internal WebGLRenderTarget.
|
|
16
|
+
*
|
|
17
|
+
* @default 512
|
|
18
|
+
* @type {number}
|
|
19
|
+
* @memberof OceanProps
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
textureHeight?: number;
|
|
23
|
+
/**
|
|
24
|
+
* The normal texture of the ocean.
|
|
25
|
+
* @default 'https://raw.githubusercontent.com/mrdoob/three.js/master/examples/textures/water/Water_1_M_Normal.jpg'
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof OceanProps
|
|
28
|
+
* @see https://threejs.org/docs/#api/en/materials/MeshStandardMaterial
|
|
29
|
+
*/
|
|
30
|
+
waterNormals?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The sun direction
|
|
33
|
+
* @default '[0,0,0]'
|
|
34
|
+
* @type {TresVector3}
|
|
35
|
+
* @memberof OceanProps
|
|
36
|
+
*/
|
|
37
|
+
sunDirection?: TresVector3;
|
|
38
|
+
/**
|
|
39
|
+
* The sun color.
|
|
40
|
+
*
|
|
41
|
+
* @default '#fff'
|
|
42
|
+
* @type {TresColor}
|
|
43
|
+
* @memberof OceanProps
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
sunColor?: TresColor;
|
|
47
|
+
/**
|
|
48
|
+
* The water color.
|
|
49
|
+
*
|
|
50
|
+
* @default '#001e0f'
|
|
51
|
+
* @type {TresColor}
|
|
52
|
+
* @memberof OceanProps
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
waterColor?: TresColor;
|
|
56
|
+
/**
|
|
57
|
+
* The distortion scale of the reflections.
|
|
58
|
+
* @default 3.7
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @memberof OceanProps
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
distortionScale?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The size of the normal texture.
|
|
66
|
+
*
|
|
67
|
+
* @default 1
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof OceanProps
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
size?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The ClipBias.
|
|
75
|
+
*
|
|
76
|
+
* @default 0.0
|
|
77
|
+
* @type {number}
|
|
78
|
+
* @memberof OceanProps
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
clipBias?: number;
|
|
82
|
+
/**
|
|
83
|
+
* The alpha factor.
|
|
84
|
+
*
|
|
85
|
+
* @default 1.0
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof OceanProps
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
alpha?: number;
|
|
91
|
+
/**
|
|
92
|
+
* ThreeJs side material property.
|
|
93
|
+
*
|
|
94
|
+
* @default FrontSide
|
|
95
|
+
* @type {TresVector3}
|
|
96
|
+
* @memberof OceanProps
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
side?: TresVector3;
|
|
100
|
+
}
|
|
101
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OceanProps>, {
|
|
102
|
+
textureWidth: number;
|
|
103
|
+
textureHeight: number;
|
|
104
|
+
waterNormals: string;
|
|
105
|
+
sunDirection: () => Vector3;
|
|
106
|
+
sunColor: number;
|
|
107
|
+
waterColor: number;
|
|
108
|
+
distortionScale: number;
|
|
109
|
+
size: number;
|
|
110
|
+
clipBias: number;
|
|
111
|
+
alpha: number;
|
|
112
|
+
side: 0;
|
|
113
|
+
}>, {
|
|
114
|
+
root: import('vue').ShallowRef<any>;
|
|
115
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OceanProps>, {
|
|
116
|
+
textureWidth: number;
|
|
117
|
+
textureHeight: number;
|
|
118
|
+
waterNormals: string;
|
|
119
|
+
sunDirection: () => Vector3;
|
|
120
|
+
sunColor: number;
|
|
121
|
+
waterColor: number;
|
|
122
|
+
distortionScale: number;
|
|
123
|
+
size: number;
|
|
124
|
+
clipBias: number;
|
|
125
|
+
alpha: number;
|
|
126
|
+
side: 0;
|
|
127
|
+
}>>>, {
|
|
128
|
+
side: Vector3 | [x: number, y: number, z: number];
|
|
129
|
+
textureWidth: number;
|
|
130
|
+
textureHeight: number;
|
|
131
|
+
clipBias: number;
|
|
132
|
+
size: number;
|
|
133
|
+
waterNormals: string;
|
|
134
|
+
sunDirection: Vector3 | [x: number, y: number, z: number];
|
|
135
|
+
sunColor: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
136
|
+
waterColor: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
137
|
+
distortionScale: number;
|
|
138
|
+
alpha: number;
|
|
139
|
+
}, {}>, {
|
|
140
|
+
default?(_: {}): any;
|
|
141
|
+
}>;
|
|
142
|
+
export default _default;
|
|
143
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
144
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
145
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
146
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
147
|
+
} : {
|
|
148
|
+
type: import('vue').PropType<T[K]>;
|
|
149
|
+
required: true;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
type __VLS_WithDefaults<P, D> = {
|
|
153
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
154
|
+
default: D[K];
|
|
155
|
+
}> : P[K];
|
|
156
|
+
};
|
|
157
|
+
type __VLS_Prettify<T> = {
|
|
158
|
+
[K in keyof T]: T[K];
|
|
159
|
+
} & {};
|
|
160
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
161
|
+
new (): {
|
|
162
|
+
$slots: S;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
|
|
2
3
|
export interface PrecipitationProps {
|
|
3
4
|
/**
|
|
4
5
|
* The size of the drops.
|
|
@@ -108,7 +109,7 @@ export interface PrecipitationProps {
|
|
|
108
109
|
*/
|
|
109
110
|
sizeAttenuation?: boolean;
|
|
110
111
|
}
|
|
111
|
-
declare const _default: import(
|
|
112
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PrecipitationProps>, {
|
|
112
113
|
size: number;
|
|
113
114
|
area: () => number[];
|
|
114
115
|
color: number;
|
|
@@ -120,7 +121,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
120
121
|
depthWrite: boolean;
|
|
121
122
|
transparent: boolean;
|
|
122
123
|
sizeAttenuation: boolean;
|
|
123
|
-
}>, {}, unknown, {}, {}, import(
|
|
124
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PrecipitationProps>, {
|
|
124
125
|
size: number;
|
|
125
126
|
area: () => number[];
|
|
126
127
|
color: number;
|
|
@@ -134,11 +135,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
134
135
|
sizeAttenuation: boolean;
|
|
135
136
|
}>>>, {
|
|
136
137
|
speed: number;
|
|
137
|
-
color: import(
|
|
138
|
-
alphaTest: number;
|
|
138
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
139
139
|
depthWrite: boolean;
|
|
140
140
|
opacity: number;
|
|
141
141
|
transparent: boolean;
|
|
142
|
+
alphaTest: number;
|
|
142
143
|
count: number;
|
|
143
144
|
size: number;
|
|
144
145
|
area: [number, number, number];
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
import { Sky as SkyImpl } from 'three/examples/jsm/objects/Sky';
|
|
3
|
+
|
|
1
4
|
export interface SkyProps {
|
|
2
5
|
/**
|
|
3
6
|
* Haziness
|
|
@@ -29,7 +32,7 @@ export interface SkyProps {
|
|
|
29
32
|
*/
|
|
30
33
|
distance?: number;
|
|
31
34
|
}
|
|
32
|
-
declare const _default: import(
|
|
35
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SkyProps>, {
|
|
33
36
|
turbidity: number;
|
|
34
37
|
rayleigh: number;
|
|
35
38
|
mieCoefficient: number;
|
|
@@ -37,7 +40,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
37
40
|
elevation: number;
|
|
38
41
|
azimuth: number;
|
|
39
42
|
distance: number;
|
|
40
|
-
}>, {
|
|
43
|
+
}>, {
|
|
44
|
+
root: import('vue').ShallowRef<SkyImpl | undefined>;
|
|
45
|
+
sunPosition: Vector3;
|
|
46
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SkyProps>, {
|
|
41
47
|
turbidity: number;
|
|
42
48
|
rayleigh: number;
|
|
43
49
|
mieCoefficient: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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(
|
|
69
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<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(
|
|
79
|
-
}, unknown, {}, {}, import(
|
|
79
|
+
value: import('vue').ShallowRef<any>;
|
|
80
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SmokeProps>, {
|
|
80
81
|
opacity: number;
|
|
81
82
|
speed: number;
|
|
82
83
|
width: number;
|
|
@@ -87,7 +88,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
87
88
|
depthTest: boolean;
|
|
88
89
|
}>>>, {
|
|
89
90
|
speed: number;
|
|
90
|
-
color: import(
|
|
91
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
91
92
|
texture: string;
|
|
92
93
|
depthTest: boolean;
|
|
93
94
|
opacity: number;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DataTexture } from 'three';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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(
|
|
11
|
+
texture: import('vue').ShallowRef<DataTexture>;
|
|
11
12
|
dispose: () => void;
|
|
12
13
|
yFor: Record<string, number>;
|
|
13
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { MaybeRef } from 'vue';
|
|
2
|
+
import { GradientScalar, GradientTresColor, GradientVectorFlexibleParams } from './../../../utils/Gradient';
|
|
3
|
+
import { CanvasGradientRenderer, ShaderDataEntry, ShaderData } from './ShaderData';
|
|
4
|
+
|
|
5
5
|
declare const rgbaSuffixes: readonly ["r", "rg", "rgb", "rgba"];
|
|
6
6
|
declare const xyzwSuffixes: readonly ["x", "xy", "xyz", "xyzw"];
|
|
7
7
|
type ShaderSuffix = (typeof rgbaSuffixes)[number] | (typeof xyzwSuffixes)[number];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { Blending, BufferGeometry, Texture, Object3D } 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
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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
|
-
*
|
|
97
|
-
*
|
|
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(
|
|
137
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SparkleProps>, {
|
|
138
138
|
map: string;
|
|
139
139
|
geometry: undefined;
|
|
140
140
|
directionalLight: undefined;
|
|
@@ -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(
|
|
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;
|
|
@@ -196,13 +196,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
196
196
|
depthWrite: boolean;
|
|
197
197
|
}>>>, {
|
|
198
198
|
map: string | Texture;
|
|
199
|
-
directionalLight: Object3D<import(
|
|
199
|
+
directionalLight: Object3D<import('three').Object3DEventMap>;
|
|
200
200
|
blending: Blending;
|
|
201
201
|
depthWrite: boolean;
|
|
202
202
|
transparent: boolean;
|
|
203
|
-
size: number;
|
|
204
|
-
geometry: Object3D<import("three").Object3DEventMap> | BufferGeometry<import("three").NormalBufferAttributes>;
|
|
205
203
|
offset: number;
|
|
204
|
+
size: number;
|
|
205
|
+
geometry: Object3D<import('three').Object3DEventMap> | BufferGeometry<import('three').NormalBufferAttributes>;
|
|
206
|
+
alpha: number;
|
|
206
207
|
lifetimeSec: number;
|
|
207
208
|
cooldownSec: number;
|
|
208
209
|
normalThreshold: number;
|
|
@@ -210,9 +211,8 @@ 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
|
-
sequenceColor: Gradient<import(
|
|
215
|
+
sequenceColor: Gradient<import('three').ColorRepresentation | [r: number, g: number, b: number]>;
|
|
216
216
|
sequenceAlpha: Gradient<number>;
|
|
217
217
|
sequenceOffset: any;
|
|
218
218
|
sequenceNoise: any;
|