@tresjs/cientos 3.7.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/README.md +7 -6
- 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 +12 -6
- package/dist/core/controls/CameraControls.vue.d.ts +3251 -3161
- 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 +5188 -5116
- 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 +45 -4
- package/dist/core/loaders/useFBX/index.d.ts +2 -1
- package/dist/core/loaders/useGLTF/component.vue.d.ts +36 -6
- 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 +23 -0
- package/dist/core/materials/convolutionMaterial.d.ts +8 -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 -4
- 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 +75 -0
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +51 -0
- 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 -0
- 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 +8 -7
- package/dist/core/misc/html/utils.d.ts +3 -3
- package/dist/core/misc/index.d.ts +5 -2
- package/dist/core/misc/useGLTFExporter.d.ts +13 -0
- 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 +19 -19
- 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 +8570 -5962
- package/dist/trescientos.umd.cjs +480 -117
- package/dist/utils/Gradient.d.ts +3 -2
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/types.d.ts +4 -0
- package/package.json +32 -29
- package/dist/core/loaders/useGLTF/index.d.ts +0 -36
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { BoxGeometry } from 'three';
|
|
3
|
+
|
|
4
|
+
export interface BoxProps {
|
|
5
|
+
/**
|
|
6
|
+
* The width, height, depth, segments and radius.
|
|
7
|
+
* @default [1, 1, 1, 2, 0.1]
|
|
8
|
+
* @type {number[]}
|
|
9
|
+
* @memberof BoxProps
|
|
10
|
+
* @see https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/RoundedBoxGeometry.js
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
args?: ConstructorParameters<typeof BoxGeometry>;
|
|
14
|
+
/**
|
|
15
|
+
* The color of the box.
|
|
16
|
+
* @default 0xffffff
|
|
17
|
+
* @type {TresColor}
|
|
18
|
+
* @memberof BoxProps
|
|
19
|
+
* @see https://threejs.org/docs/#api/en/materials/MeshBasicMaterial
|
|
20
|
+
*/
|
|
21
|
+
color?: TresColor;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BoxProps>, {
|
|
24
|
+
args: () => number[];
|
|
25
|
+
color: string;
|
|
26
|
+
}>, {
|
|
27
|
+
value: import('vue').ShallowRef<any>;
|
|
28
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BoxProps>, {
|
|
29
|
+
args: () => number[];
|
|
30
|
+
color: string;
|
|
31
|
+
}>>>, {
|
|
32
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
33
|
+
args: [width?: number | undefined, height?: number | undefined, depth?: number | undefined, widthSegments?: number | undefined, heightSegments?: number | undefined, depthSegments?: number | undefined];
|
|
34
|
+
}, {}>, {
|
|
35
|
+
default?(_: {}): any;
|
|
36
|
+
}>;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
39
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
40
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
41
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
42
|
+
} : {
|
|
43
|
+
type: import('vue').PropType<T[K]>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
type __VLS_WithDefaults<P, D> = {
|
|
48
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
49
|
+
default: D[K];
|
|
50
|
+
}> : P[K];
|
|
51
|
+
};
|
|
52
|
+
type __VLS_Prettify<T> = {
|
|
53
|
+
[K in keyof T]: T[K];
|
|
54
|
+
} & {};
|
|
55
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { SphereGeometry } from 'three';
|
|
3
|
+
|
|
3
4
|
export interface SphereProps {
|
|
4
5
|
/**
|
|
5
6
|
* The radius, widthSegments, heightSegments, phiStart phiLength,
|
|
@@ -19,16 +20,16 @@ export interface SphereProps {
|
|
|
19
20
|
*/
|
|
20
21
|
color?: TresColor;
|
|
21
22
|
}
|
|
22
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SphereProps>, {
|
|
23
24
|
args: () => number[];
|
|
24
25
|
color: string;
|
|
25
26
|
}>, {
|
|
26
|
-
value: import(
|
|
27
|
-
}, unknown, {}, {}, import(
|
|
27
|
+
value: import('vue').ShallowRef<any>;
|
|
28
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SphereProps>, {
|
|
28
29
|
args: () => number[];
|
|
29
30
|
color: string;
|
|
30
31
|
}>>>, {
|
|
31
|
-
color: import(
|
|
32
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
32
33
|
args: [radius?: number | undefined, widthSegments?: number | undefined, heightSegments?: number | undefined, phiStart?: number | undefined, phiLength?: number | undefined, thetaStart?: number | undefined, thetaLength?: number | undefined];
|
|
33
34
|
}, {}>, {
|
|
34
35
|
default?(_: {}): any;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
|
|
2
3
|
export type Float3 = [number, number, number];
|
|
3
4
|
export interface SuperFormulaProps {
|
|
4
5
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
* Number of horizontal mesh segments
|
|
7
|
+
*/
|
|
7
8
|
widthSegments?: number;
|
|
8
9
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
* Number of vertical mesh segments
|
|
11
|
+
*/
|
|
11
12
|
heightSegments?: number;
|
|
12
13
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* The 3D Superformula is the spherical product of 2 2D superformula curves: here called curves "A" and "B".
|
|
15
|
+
* Number of radial arms/ripples of A, corresponding to "m" [in this article.](https://en.wikipedia.org/wiki/Superformula)
|
|
16
|
+
*/
|
|
16
17
|
numArmsA?: number;
|
|
17
18
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
* A's 3 exponents
|
|
20
|
+
*/
|
|
20
21
|
expA?: Float3;
|
|
21
22
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
* For B, number of radial arms/ripples
|
|
24
|
+
*/
|
|
24
25
|
numArmsB?: number;
|
|
25
26
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
* B's 3 exponents
|
|
28
|
+
*/
|
|
28
29
|
expB?: Float3;
|
|
29
30
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
* If no material is provided, a color for the default material
|
|
32
|
+
*/
|
|
32
33
|
color?: TresColor;
|
|
33
34
|
}
|
|
34
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SuperFormulaProps>, {
|
|
35
36
|
widthSegments: number;
|
|
36
37
|
heightSegments: number;
|
|
37
38
|
numArmsA: number;
|
|
@@ -40,8 +41,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
40
41
|
expB: () => number[];
|
|
41
42
|
color: string;
|
|
42
43
|
}>, {
|
|
43
|
-
value: import(
|
|
44
|
-
}, unknown, {}, {}, import(
|
|
44
|
+
value: import('vue').ShallowRef<any>;
|
|
45
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SuperFormulaProps>, {
|
|
45
46
|
widthSegments: number;
|
|
46
47
|
heightSegments: number;
|
|
47
48
|
numArmsA: number;
|
|
@@ -50,7 +51,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
50
51
|
expB: () => number[];
|
|
51
52
|
color: string;
|
|
52
53
|
}>>>, {
|
|
53
|
-
color: import(
|
|
54
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
54
55
|
widthSegments: number;
|
|
55
56
|
heightSegments: number;
|
|
56
57
|
numArmsA: number;
|
|
@@ -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;
|