@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Camera } from 'three';
|
|
2
|
+
|
|
2
3
|
export interface PointerLockControlsProps {
|
|
3
4
|
/**
|
|
4
5
|
* Whether to make this the default controls.
|
|
@@ -35,16 +36,16 @@ export interface PointerLockControlsProps {
|
|
|
35
36
|
*/
|
|
36
37
|
selector?: string;
|
|
37
38
|
}
|
|
38
|
-
declare const _default: import(
|
|
39
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PointerLockControlsProps>, {
|
|
39
40
|
makeDefault: boolean;
|
|
40
41
|
}>, {
|
|
41
|
-
value: import(
|
|
42
|
+
value: import('vue').Ref<(import('three').EventDispatcher<{}> & {
|
|
42
43
|
enabled: boolean;
|
|
43
44
|
}) | null>;
|
|
44
|
-
}, unknown, {}, {}, import(
|
|
45
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
46
|
change: (...args: any[]) => void;
|
|
46
47
|
isLock: (...args: any[]) => void;
|
|
47
|
-
}, string, import(
|
|
48
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PointerLockControlsProps>, {
|
|
48
49
|
makeDefault: boolean;
|
|
49
50
|
}>>> & {
|
|
50
51
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2,7 +2,7 @@ export interface ScrollControlsProps {
|
|
|
2
2
|
/**
|
|
3
3
|
* The scroll size.
|
|
4
4
|
*
|
|
5
|
-
* @type {
|
|
5
|
+
* @type {number}
|
|
6
6
|
* @default 4
|
|
7
7
|
* @memberof ScrollControlsProps
|
|
8
8
|
*/
|
|
@@ -10,7 +10,7 @@ export interface ScrollControlsProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* The distance to move the camera.
|
|
12
12
|
*
|
|
13
|
-
* @type {
|
|
13
|
+
* @type {number}
|
|
14
14
|
* @default 4
|
|
15
15
|
* @memberof ScrollControlsProps
|
|
16
16
|
*/
|
|
@@ -18,7 +18,7 @@ export interface ScrollControlsProps {
|
|
|
18
18
|
/**
|
|
19
19
|
* The smooth factor of the scrolling.
|
|
20
20
|
*
|
|
21
|
-
* @type {
|
|
21
|
+
* @type {number}
|
|
22
22
|
* @default 0.5
|
|
23
23
|
* @memberof ScrollControlsProps
|
|
24
24
|
*/
|
|
@@ -26,7 +26,7 @@ export interface ScrollControlsProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Whether the scroll is horizontal or vertical.
|
|
28
28
|
*
|
|
29
|
-
* @type {
|
|
29
|
+
* @type {boolean}
|
|
30
30
|
* @default false
|
|
31
31
|
* @memberof ScrollControlsProps
|
|
32
32
|
*/
|
|
@@ -34,13 +34,13 @@ export interface ScrollControlsProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* Whether to use the HTML scroll.
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {boolean}
|
|
38
38
|
* @default false
|
|
39
39
|
* @memberof ScrollControlsProps
|
|
40
40
|
*/
|
|
41
41
|
htmlScroll?: boolean;
|
|
42
42
|
}
|
|
43
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
43
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
44
44
|
pages?: number | undefined;
|
|
45
45
|
distance?: number | undefined;
|
|
46
46
|
smoothScroll?: number | undefined;
|
|
@@ -52,9 +52,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
52
52
|
smoothScroll: number;
|
|
53
53
|
horizontal: boolean;
|
|
54
54
|
htmlScroll: boolean;
|
|
55
|
-
}>, {}, unknown, {}, {}, import(
|
|
55
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
56
56
|
"update:modelValue": (...args: any[]) => void;
|
|
57
|
-
}, string, import(
|
|
57
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
58
58
|
pages?: number | undefined;
|
|
59
59
|
distance?: number | undefined;
|
|
60
60
|
smoothScroll?: number | undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Camera, Object3D } from 'three';
|
|
2
|
+
|
|
2
3
|
export interface TransformControlsProps {
|
|
3
4
|
object: Object3D;
|
|
5
|
+
camera?: Camera;
|
|
4
6
|
mode?: string;
|
|
5
7
|
enabled?: boolean;
|
|
6
8
|
axis?: 'X' | 'Y' | 'Z' | 'XY' | 'YZ' | 'XZ' | 'XYZ';
|
|
@@ -13,7 +15,7 @@ export interface TransformControlsProps {
|
|
|
13
15
|
showY?: boolean;
|
|
14
16
|
showZ?: boolean;
|
|
15
17
|
}
|
|
16
|
-
declare const _default: import(
|
|
18
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TransformControlsProps>, {
|
|
17
19
|
mode: string;
|
|
18
20
|
enabled: boolean;
|
|
19
21
|
axis: string;
|
|
@@ -22,13 +24,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
22
24
|
showX: boolean;
|
|
23
25
|
showY: boolean;
|
|
24
26
|
showZ: boolean;
|
|
25
|
-
}>, {}, unknown, {}, {}, import(
|
|
27
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
28
|
change: (...args: any[]) => void;
|
|
27
29
|
dragging: (...args: any[]) => void;
|
|
28
30
|
mouseDown: (...args: any[]) => void;
|
|
29
31
|
mouseUp: (...args: any[]) => void;
|
|
30
32
|
objectChange: (...args: any[]) => void;
|
|
31
|
-
}, string, import(
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TransformControlsProps>, {
|
|
32
34
|
mode: string;
|
|
33
35
|
enabled: boolean;
|
|
34
36
|
axis: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import OrbitControls from './OrbitControls.vue';
|
|
2
|
-
import KeyboardControls from './KeyboardControls.vue';
|
|
3
|
-
import TransformControls from './TransformControls.vue';
|
|
4
|
-
import PointerLockControls from './PointerLockControls.vue';
|
|
5
|
-
import MapControls from './MapControls.vue';
|
|
6
|
-
import ScrollControls from './ScrollControls.vue';
|
|
7
|
-
import CameraControls from './CameraControls.vue';
|
|
8
|
-
|
|
1
|
+
import { default as OrbitControls } from './OrbitControls.vue';
|
|
2
|
+
import { default as KeyboardControls } from './KeyboardControls.vue';
|
|
3
|
+
import { default as TransformControls } from './TransformControls.vue';
|
|
4
|
+
import { default as PointerLockControls } from './PointerLockControls.vue';
|
|
5
|
+
import { default as MapControls } from './MapControls.vue';
|
|
6
|
+
import { default as ScrollControls } from './ScrollControls.vue';
|
|
7
|
+
import { default as CameraControls, BaseCameraControls } from './CameraControls.vue';
|
|
8
|
+
|
|
9
|
+
export { OrbitControls, TransformControls, PointerLockControls, MapControls, KeyboardControls, ScrollControls, CameraControls, BaseCameraControls, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TresOptions } from '@tresjs/core';
|
|
2
|
+
import { MeshBasicMaterialParameters } from 'three';
|
|
3
|
+
|
|
3
4
|
interface SVGProps {
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
@@ -9,7 +10,7 @@ interface SVGProps {
|
|
|
9
10
|
* @required
|
|
10
11
|
* @memberof SVGProps
|
|
11
12
|
*
|
|
12
|
-
|
|
13
|
+
*/
|
|
13
14
|
src: string;
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -19,7 +20,7 @@ interface SVGProps {
|
|
|
19
20
|
* @default false
|
|
20
21
|
* @memberof SVGProps
|
|
21
22
|
*
|
|
22
|
-
|
|
23
|
+
*/
|
|
23
24
|
skipStrokes?: boolean;
|
|
24
25
|
/**
|
|
25
26
|
*
|
|
@@ -29,7 +30,7 @@ interface SVGProps {
|
|
|
29
30
|
* @default false
|
|
30
31
|
* @memberof SVGProps
|
|
31
32
|
*
|
|
32
|
-
|
|
33
|
+
*/
|
|
33
34
|
skipFills?: boolean;
|
|
34
35
|
/**
|
|
35
36
|
*
|
|
@@ -39,7 +40,7 @@ interface SVGProps {
|
|
|
39
40
|
* @default undefined
|
|
40
41
|
* @memberof SVGProps
|
|
41
42
|
*
|
|
42
|
-
|
|
43
|
+
*/
|
|
43
44
|
fillMaterial?: MeshBasicMaterialParameters;
|
|
44
45
|
/**
|
|
45
46
|
*
|
|
@@ -49,7 +50,7 @@ interface SVGProps {
|
|
|
49
50
|
* @default undefined
|
|
50
51
|
* @memberof SVGProps
|
|
51
52
|
*
|
|
52
|
-
|
|
53
|
+
*/
|
|
53
54
|
strokeMaterial?: MeshBasicMaterialParameters;
|
|
54
55
|
/**
|
|
55
56
|
*
|
|
@@ -59,7 +60,7 @@ interface SVGProps {
|
|
|
59
60
|
* @default undefined
|
|
60
61
|
* @memberof SVGProps
|
|
61
62
|
*
|
|
62
|
-
|
|
63
|
+
*/
|
|
63
64
|
fillMeshProps?: TresOptions;
|
|
64
65
|
/**
|
|
65
66
|
*
|
|
@@ -69,7 +70,7 @@ interface SVGProps {
|
|
|
69
70
|
* @default undefined
|
|
70
71
|
* @memberof SVGProps
|
|
71
72
|
*
|
|
72
|
-
|
|
73
|
+
*/
|
|
73
74
|
strokeMeshProps?: TresOptions;
|
|
74
75
|
/**
|
|
75
76
|
*
|
|
@@ -90,13 +91,13 @@ interface SVGProps {
|
|
|
90
91
|
*/
|
|
91
92
|
depth?: 'renderOrder' | 'flat' | 'offsetZ' | number;
|
|
92
93
|
}
|
|
93
|
-
declare const _default: import(
|
|
94
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SVGProps>, {
|
|
94
95
|
skipStrokes: boolean;
|
|
95
96
|
skipFills: boolean;
|
|
96
97
|
depth: string;
|
|
97
98
|
}>, {
|
|
98
|
-
value: import(
|
|
99
|
-
}, unknown, {}, {}, import(
|
|
99
|
+
value: import('vue').ShallowRef<any>;
|
|
100
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SVGProps>, {
|
|
100
101
|
skipStrokes: boolean;
|
|
101
102
|
skipFills: boolean;
|
|
102
103
|
depth: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import GLTFModel from './useGLTF/component.vue';
|
|
2
|
-
import FBXModel from './useFBX/component.vue';
|
|
3
|
-
import SVG from './SVG/component.vue';
|
|
1
|
+
import { default as GLTFModel } from './useGLTF/component.vue';
|
|
2
|
+
import { default as FBXModel } from './useFBX/component.vue';
|
|
3
|
+
import { default as SVG } from './SVG/component.vue';
|
|
4
4
|
import { useProgress } from './useProgress';
|
|
5
5
|
import { useVideoTexture } from './useVideoTexture';
|
|
6
|
+
|
|
6
7
|
export * from './useGLTF';
|
|
7
8
|
export * from './useFBX';
|
|
8
9
|
export { FBXModel, GLTFModel, SVG, useProgress, useVideoTexture };
|
|
@@ -7,14 +7,47 @@ export interface FBXModelProps {
|
|
|
7
7
|
* @required
|
|
8
8
|
*/
|
|
9
9
|
path: string;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Whether to use cast-shadow to the model.
|
|
13
|
+
*
|
|
14
|
+
* @type {boolean}
|
|
15
|
+
* @default false
|
|
16
|
+
* @memberof FBXModelProps
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
castShadow?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* Whether to use receive-shadow to the model.
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @default false
|
|
26
|
+
* @memberof FBXModelProps
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
receiveShadow?: boolean;
|
|
10
30
|
}
|
|
11
|
-
declare const _default: import(
|
|
31
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
32
|
path: string;
|
|
33
|
+
castShadow?: boolean | undefined;
|
|
34
|
+
receiveShadow?: boolean | undefined;
|
|
13
35
|
}>, {
|
|
14
|
-
|
|
15
|
-
|
|
36
|
+
castShadow: boolean;
|
|
37
|
+
receiveShadow: boolean;
|
|
38
|
+
}>, {
|
|
39
|
+
value: import('vue').Ref<any>;
|
|
40
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
16
41
|
path: string;
|
|
17
|
-
|
|
42
|
+
castShadow?: boolean | undefined;
|
|
43
|
+
receiveShadow?: boolean | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
castShadow: boolean;
|
|
46
|
+
receiveShadow: boolean;
|
|
47
|
+
}>>>, {
|
|
48
|
+
castShadow: boolean;
|
|
49
|
+
receiveShadow: boolean;
|
|
50
|
+
}, {}>;
|
|
18
51
|
export default _default;
|
|
19
52
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
53
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -25,3 +58,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
25
58
|
required: true;
|
|
26
59
|
};
|
|
27
60
|
};
|
|
61
|
+
type __VLS_WithDefaults<P, D> = {
|
|
62
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
63
|
+
default: D[K];
|
|
64
|
+
}> : P[K];
|
|
65
|
+
};
|
|
66
|
+
type __VLS_Prettify<T> = {
|
|
67
|
+
[K in keyof T]: T[K];
|
|
68
|
+
} & {};
|
|
@@ -7,7 +7,7 @@ export interface GLTFModelProps {
|
|
|
7
7
|
* @required
|
|
8
8
|
* @memberof GLTFModelProps
|
|
9
9
|
*
|
|
10
|
-
|
|
10
|
+
*/
|
|
11
11
|
path: string;
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
@@ -17,8 +17,28 @@ export interface GLTFModelProps {
|
|
|
17
17
|
* @default false
|
|
18
18
|
* @memberof GLTFModelProps
|
|
19
19
|
*
|
|
20
|
-
|
|
20
|
+
*/
|
|
21
21
|
draco?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* Whether to use cast-shadow to the model.
|
|
25
|
+
*
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @default false
|
|
28
|
+
* @memberof GLTFModelProps
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
castShadow?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* Whether to use receive-shadow to the model.
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @default false
|
|
38
|
+
* @memberof GLTFModelProps
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
receiveShadow?: boolean;
|
|
22
42
|
/**
|
|
23
43
|
*
|
|
24
44
|
* The path to the Draco decoder.
|
|
@@ -27,26 +47,36 @@ export interface GLTFModelProps {
|
|
|
27
47
|
* @default 'https://www.gstatic.com/draco/versioned/decoders/1.4.1/'
|
|
28
48
|
* @memberof GLTFModelProps
|
|
29
49
|
*
|
|
30
|
-
|
|
50
|
+
*/
|
|
31
51
|
decoderPath?: string;
|
|
32
52
|
}
|
|
33
|
-
declare const _default: import(
|
|
53
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
34
54
|
path: string;
|
|
35
55
|
draco?: boolean | undefined;
|
|
36
56
|
decoderPath?: string | undefined;
|
|
57
|
+
castShadow?: boolean | undefined;
|
|
58
|
+
receiveShadow?: boolean | undefined;
|
|
37
59
|
}>, {
|
|
38
60
|
draco: boolean;
|
|
61
|
+
castShadow: boolean;
|
|
62
|
+
receiveShadow: boolean;
|
|
39
63
|
decoderPath: string;
|
|
40
64
|
}>, {
|
|
41
|
-
value: import(
|
|
42
|
-
}, unknown, {}, {}, import(
|
|
65
|
+
value: import('vue').Ref<any>;
|
|
66
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
43
67
|
path: string;
|
|
44
68
|
draco?: boolean | undefined;
|
|
45
69
|
decoderPath?: string | undefined;
|
|
70
|
+
castShadow?: boolean | undefined;
|
|
71
|
+
receiveShadow?: boolean | undefined;
|
|
46
72
|
}>, {
|
|
47
73
|
draco: boolean;
|
|
74
|
+
castShadow: boolean;
|
|
75
|
+
receiveShadow: boolean;
|
|
48
76
|
decoderPath: string;
|
|
49
77
|
}>>>, {
|
|
78
|
+
castShadow: boolean;
|
|
79
|
+
receiveShadow: boolean;
|
|
50
80
|
draco: boolean;
|
|
51
81
|
decoderPath: string;
|
|
52
82
|
}, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Camera, Mesh, Scene, WebGLRenderTarget } from 'three';
|
|
2
|
+
import { ConvolutionMaterial } from './convolutionMaterial';
|
|
3
|
+
|
|
4
|
+
export interface BlurPassProps {
|
|
5
|
+
resolution: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
minDepthThreshold?: number;
|
|
9
|
+
maxDepthThreshold?: number;
|
|
10
|
+
depthScale?: number;
|
|
11
|
+
depthToBlurRatioBias?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class BlurPass {
|
|
14
|
+
readonly renderTargetA: WebGLRenderTarget;
|
|
15
|
+
readonly renderTargetB: WebGLRenderTarget;
|
|
16
|
+
readonly convolutionMaterial: ConvolutionMaterial;
|
|
17
|
+
readonly scene: Scene;
|
|
18
|
+
readonly camera: Camera;
|
|
19
|
+
readonly screen: Mesh;
|
|
20
|
+
renderToScreen: boolean;
|
|
21
|
+
constructor({ resolution, width, height, minDepthThreshold, maxDepthThreshold, depthScale, depthToBlurRatioBias, }: BlurPassProps);
|
|
22
|
+
render(renderer: any, inputBuffer: any, outputBuffer: any): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ShaderMaterial, Vector2 } from 'three';
|
|
2
|
+
|
|
3
|
+
export declare class ConvolutionMaterial extends ShaderMaterial {
|
|
4
|
+
readonly kernel: Float32Array;
|
|
5
|
+
constructor(texelSize?: Vector2);
|
|
6
|
+
setTexelSize(x: number, y: number): void;
|
|
7
|
+
setResolution(resolution: Vector2): void;
|
|
8
|
+
}
|
|
@@ -7,9 +7,9 @@ interface CustomShaderMaterialProps {
|
|
|
7
7
|
[uniform: string]: any;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
declare const _default: import(
|
|
11
|
-
value: import(
|
|
12
|
-
}, unknown, {}, {}, import(
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<CustomShaderMaterialProps>, {
|
|
11
|
+
value: import('vue').ShallowRef<null>;
|
|
12
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<CustomShaderMaterialProps>>>, {}, {}>;
|
|
13
13
|
export default _default;
|
|
14
14
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
15
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Color, ShaderMaterial, Blending, Side } from 'three';
|
|
2
|
+
|
|
3
|
+
interface HolographicMaterialParameters {
|
|
4
|
+
time?: number;
|
|
5
|
+
fresnelOpacity?: number;
|
|
6
|
+
fresnelAmount?: number;
|
|
7
|
+
scanlineSize?: number;
|
|
8
|
+
hologramBrightness?: number;
|
|
9
|
+
signalSpeed?: number;
|
|
10
|
+
hologramColor?: Color;
|
|
11
|
+
enableBlinking?: boolean;
|
|
12
|
+
blinkFresnelOnly?: boolean;
|
|
13
|
+
hologramOpacity?: number;
|
|
14
|
+
blendMode?: Blending;
|
|
15
|
+
side?: Side;
|
|
16
|
+
depthTest?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare class HolographicMaterial extends ShaderMaterial {
|
|
19
|
+
/**
|
|
20
|
+
* Create a HolographicMaterial.
|
|
21
|
+
*
|
|
22
|
+
* @param {object} parameters - The parameters to configure the material.
|
|
23
|
+
* @param {number} [parameters.time] - The time uniform representing animation time.
|
|
24
|
+
* @param {number} [parameters.fresnelOpacity] - The opacity for the fresnel effect.
|
|
25
|
+
* @param {number} [parameters.fresnelAmount] - The strength of the fresnel effect.
|
|
26
|
+
* @param {number} [parameters.scanlineSize] - The size of the scanline effect.
|
|
27
|
+
* @param {number} [parameters.hologramBrightness] - The brightness of the hologram.
|
|
28
|
+
* @param {number} [parameters.signalSpeed] - The speed of the signal effect.
|
|
29
|
+
* @param {Color} [parameters.hologramColor] - The color of the hologram.
|
|
30
|
+
* @param {boolean} [parameters.enableBlinking] - Enable/disable blinking effect.
|
|
31
|
+
* @param {boolean} [parameters.blinkFresnelOnly] - Enable blinking only on the fresnel effect.
|
|
32
|
+
* @param {number} [parameters.hologramOpacity] - The opacity of the hologram.
|
|
33
|
+
* @param {number} [parameters.blendMode] - The blending mode. Use `THREE.NormalBlending` or `THREE.AdditiveBlending`.
|
|
34
|
+
* @param {number} [parameters.side] - The rendering side. Use `THREE.FrontSide`,
|
|
35
|
+
* `THREE.BackSide`, or `THREE.DoubleSide`.
|
|
36
|
+
* @param {boolean} [parameters.depthTest] - Enable or disable depthTest.
|
|
37
|
+
*/
|
|
38
|
+
constructor(parameters?: HolographicMaterialParameters);
|
|
39
|
+
update(): void;
|
|
40
|
+
}
|
|
41
|
+
export default HolographicMaterial;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { Side } from 'three';
|
|
3
|
+
import { default as HolographicMaterial } from './HolographicMaterialParameters';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
fresnelAmount?: number | undefined;
|
|
7
|
+
fresnelOpacity?: number | undefined;
|
|
8
|
+
blinkFresnelOnly?: boolean | undefined;
|
|
9
|
+
enableBlinking?: boolean | undefined;
|
|
10
|
+
enableAdditive?: boolean | undefined;
|
|
11
|
+
hologramBrightness?: number | undefined;
|
|
12
|
+
scanlineSize?: number | undefined;
|
|
13
|
+
signalSpeed?: number | undefined;
|
|
14
|
+
hologramOpacity?: number | undefined;
|
|
15
|
+
hologramColor?: import('three').ColorRepresentation | [r: number, g: number, b: number] | undefined;
|
|
16
|
+
side?: Side | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
fresnelAmount: number;
|
|
19
|
+
fresnelOpacity: number;
|
|
20
|
+
blinkFresnelOnly: boolean;
|
|
21
|
+
enableBlinking: boolean;
|
|
22
|
+
enableAdditive: boolean;
|
|
23
|
+
hologramBrightness: number;
|
|
24
|
+
scanlineSize: number;
|
|
25
|
+
signalSpeed: number;
|
|
26
|
+
hologramOpacity: number;
|
|
27
|
+
hologramColor: string;
|
|
28
|
+
side: 0;
|
|
29
|
+
}>, {
|
|
30
|
+
root: import('vue').ShallowRef<any>;
|
|
31
|
+
constructor: typeof HolographicMaterial;
|
|
32
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
33
|
+
fresnelAmount?: number | undefined;
|
|
34
|
+
fresnelOpacity?: number | undefined;
|
|
35
|
+
blinkFresnelOnly?: boolean | undefined;
|
|
36
|
+
enableBlinking?: boolean | undefined;
|
|
37
|
+
enableAdditive?: boolean | undefined;
|
|
38
|
+
hologramBrightness?: number | undefined;
|
|
39
|
+
scanlineSize?: number | undefined;
|
|
40
|
+
signalSpeed?: number | undefined;
|
|
41
|
+
hologramOpacity?: number | undefined;
|
|
42
|
+
hologramColor?: import('three').ColorRepresentation | [r: number, g: number, b: number] | undefined;
|
|
43
|
+
side?: Side | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
fresnelAmount: number;
|
|
46
|
+
fresnelOpacity: number;
|
|
47
|
+
blinkFresnelOnly: boolean;
|
|
48
|
+
enableBlinking: boolean;
|
|
49
|
+
enableAdditive: boolean;
|
|
50
|
+
hologramBrightness: number;
|
|
51
|
+
scanlineSize: number;
|
|
52
|
+
signalSpeed: number;
|
|
53
|
+
hologramOpacity: number;
|
|
54
|
+
hologramColor: string;
|
|
55
|
+
side: 0;
|
|
56
|
+
}>>>, {
|
|
57
|
+
side: Side;
|
|
58
|
+
fresnelOpacity: number;
|
|
59
|
+
fresnelAmount: number;
|
|
60
|
+
scanlineSize: number;
|
|
61
|
+
hologramBrightness: number;
|
|
62
|
+
signalSpeed: number;
|
|
63
|
+
hologramColor: TresColor;
|
|
64
|
+
enableBlinking: boolean;
|
|
65
|
+
blinkFresnelOnly: boolean;
|
|
66
|
+
hologramOpacity: number;
|
|
67
|
+
enableAdditive: boolean;
|
|
68
|
+
}, {}>;
|
|
69
|
+
export default _default;
|
|
70
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
71
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
72
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
73
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
74
|
+
} : {
|
|
75
|
+
type: import('vue').PropType<T[K]>;
|
|
76
|
+
required: true;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
type __VLS_WithDefaults<P, D> = {
|
|
80
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
81
|
+
default: D[K];
|
|
82
|
+
}> : P[K];
|
|
83
|
+
};
|
|
84
|
+
type __VLS_Prettify<T> = {
|
|
85
|
+
[K in keyof T]: T[K];
|
|
86
|
+
} & {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Holographic material by Anderson Mancini - Dec 2023.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
|
|
6
|
+
MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2023 Anderson Mancini
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
*/
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import MeshWobbleMaterial from './meshWobbleMaterial/index.vue';
|
|
2
|
-
import MeshGlassMaterial from './meshGlassMaterial/index.vue';
|
|
3
|
-
import CustomShaderMaterial from './customShaderMaterial/index.vue';
|
|
4
|
-
|
|
1
|
+
import { default as MeshWobbleMaterial } from './meshWobbleMaterial/index.vue';
|
|
2
|
+
import { default as MeshGlassMaterial } from './meshGlassMaterial/index.vue';
|
|
3
|
+
import { default as CustomShaderMaterial } from './customShaderMaterial/index.vue';
|
|
4
|
+
import { default as MeshReflectionMaterial } from './meshReflectionMaterial/index.vue';
|
|
5
|
+
import { default as HolographicMaterial } from './holographicMaterial/index.vue';
|
|
6
|
+
|
|
7
|
+
export { MeshWobbleMaterial, MeshGlassMaterial, CustomShaderMaterial, MeshReflectionMaterial, HolographicMaterial };
|