@tresjs/cientos 4.0.0-next.0 → 4.0.0-next.1
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/composables/useOnDemandInvalidation.d.ts +3 -0
- package/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +38 -0
- package/dist/core/abstractions/AnimatedSprite/AtlasAnimationDefinitionParser.d.ts +10 -0
- package/dist/core/abstractions/AnimatedSprite/StringOps.d.ts +2 -0
- package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +130 -0
- 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 +13 -12
- 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 +16 -14
- package/dist/core/abstractions/MouseParallax.vue.d.ts +22 -11
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
- package/dist/core/abstractions/Reflector.vue.d.ts +12 -9
- package/dist/core/abstractions/Text3D.vue.d.ts +8 -6
- package/dist/core/abstractions/index.d.ts +11 -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 +5 -5
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +8 -5
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +167 -139
- package/dist/core/controls/CameraControls.vue.d.ts +4135 -3850
- package/dist/core/controls/KeyboardControls.vue.d.ts +44 -90
- package/dist/core/controls/MapControls.vue.d.ts +9498 -4
- package/dist/core/controls/OrbitControls.vue.d.ts +5897 -5651
- package/dist/core/controls/PointerLockControls.vue.d.ts +6 -5
- package/dist/core/controls/ScrollControls.vue.d.ts +25 -21
- package/dist/core/controls/TransformControls.vue.d.ts +11 -5
- package/dist/core/controls/index.d.ts +9 -8
- package/dist/core/index.d.ts +0 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +14 -13
- package/dist/core/loaders/index.d.ts +4 -3
- package/dist/core/loaders/useFBX/component.vue.d.ts +9 -9
- package/dist/core/loaders/useFBX/index.d.ts +2 -1
- package/dist/core/loaders/useGLTF/component.vue.d.ts +16 -16
- package/dist/core/loaders/useGLTF/index.d.ts +14 -9
- package/dist/core/loaders/useProgress.d.ts +2 -1
- package/dist/core/loaders/useVideoTexture.d.ts +1 -0
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +6 -4
- 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/{blurPass.d.ts → meshReflectionMaterial/BlurPass.d.ts} +8 -6
- package/dist/core/materials/{convolutionMaterial.d.ts → meshReflectionMaterial/ConvolutionMaterial.d.ts} +1 -0
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +171 -40
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +33 -36
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +8 -6
- 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 +13 -8
- package/dist/core/misc/html/utils.d.ts +3 -3
- package/dist/core/misc/index.d.ts +3 -3
- package/dist/core/misc/useGLTFExporter.d.ts +2 -1
- package/dist/core/shapes/Box.vue.d.ts +13 -10
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +6 -3
- package/dist/core/shapes/Circle.vue.d.ts +13 -10
- package/dist/core/shapes/Cone.vue.d.ts +13 -10
- package/dist/core/shapes/Cylinder.vue.d.ts +60 -0
- package/dist/core/shapes/Dodecahedron.vue.d.ts +13 -10
- package/dist/core/shapes/Icosahedron.vue.d.ts +13 -10
- package/dist/core/shapes/Line2.vue.d.ts +7 -4
- package/dist/core/shapes/Octahedron.vue.d.ts +13 -10
- package/dist/core/shapes/Plane.vue.d.ts +13 -10
- package/dist/core/shapes/Ring.vue.d.ts +13 -10
- package/dist/core/shapes/RoundedBox.vue.d.ts +13 -10
- package/dist/core/shapes/Sphere.vue.d.ts +13 -10
- package/dist/core/shapes/Superformula.vue.d.ts +26 -23
- package/dist/core/shapes/Tetrahedron.vue.d.ts +13 -10
- package/dist/core/shapes/Torus.vue.d.ts +13 -10
- package/dist/core/shapes/TorusKnot.vue.d.ts +13 -10
- package/dist/core/shapes/Tube.vue.d.ts +13 -11
- package/dist/core/shapes/index.d.ts +20 -18
- package/dist/core/staging/Backdrop.vue.d.ts +9 -5
- package/dist/core/staging/ContactShadows.vue.d.ts +173 -0
- package/dist/core/staging/Fit.vue.d.ts +59 -0
- package/dist/core/staging/Ocean.vue.d.ts +15 -12
- package/dist/core/staging/Precipitation.vue.d.ts +10 -7
- package/dist/core/staging/Sky.vue.d.ts +5 -4
- package/dist/core/staging/Smoke.vue.d.ts +7 -6
- package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +7 -7
- package/dist/core/staging/Sparkles/component.vue.d.ts +21 -19
- package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
- package/dist/core/staging/Stars.vue.d.ts +7 -7
- package/dist/core/staging/index.d.ts +13 -10
- package/dist/core/staging/useEnvironment/component.vue.d.ts +64 -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 +7493 -6606
- package/dist/trescientos.umd.cjs +562 -424
- 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 +28 -28
- package/dist/core/directives/index.d.ts +0 -5
- package/dist/core/directives/vAlwaysLookAt.d.ts +0 -4
- package/dist/core/directives/vDistanceTo.d.ts +0 -4
- package/dist/core/directives/vLightHelper.d.ts +0 -5
- package/dist/core/directives/vLog.d.ts +0 -3
- package/dist/core/misc/useTweakPane/index.d.ts +0 -10
|
@@ -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
|
-
|
|
42
|
+
instance: 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,32 +34,37 @@ 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
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
declare function __VLS_template(): {
|
|
44
|
+
default?(_: {}): any;
|
|
45
|
+
};
|
|
46
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
47
|
+
pages?: number;
|
|
48
|
+
distance?: number;
|
|
49
|
+
smoothScroll?: number;
|
|
50
|
+
horizontal?: boolean;
|
|
51
|
+
htmlScroll?: boolean;
|
|
49
52
|
}>, {
|
|
50
53
|
pages: number;
|
|
51
54
|
distance: number;
|
|
52
55
|
smoothScroll: number;
|
|
53
56
|
horizontal: boolean;
|
|
54
57
|
htmlScroll: boolean;
|
|
55
|
-
}>, {
|
|
58
|
+
}>, {
|
|
59
|
+
instance: import('vue').ShallowRef<any>;
|
|
60
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
56
61
|
"update:modelValue": (...args: any[]) => void;
|
|
57
|
-
}, string, import(
|
|
58
|
-
pages?: number
|
|
59
|
-
distance?: number
|
|
60
|
-
smoothScroll?: number
|
|
61
|
-
horizontal?: boolean
|
|
62
|
-
htmlScroll?: boolean
|
|
62
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
63
|
+
pages?: number;
|
|
64
|
+
distance?: number;
|
|
65
|
+
smoothScroll?: number;
|
|
66
|
+
horizontal?: boolean;
|
|
67
|
+
htmlScroll?: boolean;
|
|
63
68
|
}>, {
|
|
64
69
|
pages: number;
|
|
65
70
|
distance: number;
|
|
@@ -74,9 +79,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
74
79
|
smoothScroll: number;
|
|
75
80
|
horizontal: boolean;
|
|
76
81
|
htmlScroll: boolean;
|
|
77
|
-
}, {}
|
|
78
|
-
|
|
79
|
-
}>;
|
|
82
|
+
}, {}>;
|
|
83
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
80
84
|
export default _default;
|
|
81
85
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
82
86
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
import { Camera, Object3D } from 'three';
|
|
3
|
+
import { TransformControls } from 'three-stdlib';
|
|
4
|
+
|
|
2
5
|
export interface TransformControlsProps {
|
|
3
6
|
object: Object3D;
|
|
7
|
+
camera?: Camera;
|
|
4
8
|
mode?: string;
|
|
5
9
|
enabled?: boolean;
|
|
6
10
|
axis?: 'X' | 'Y' | 'Z' | 'XY' | 'YZ' | 'XZ' | 'XYZ';
|
|
@@ -13,7 +17,7 @@ export interface TransformControlsProps {
|
|
|
13
17
|
showY?: boolean;
|
|
14
18
|
showZ?: boolean;
|
|
15
19
|
}
|
|
16
|
-
declare const _default: import(
|
|
20
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TransformControlsProps>, {
|
|
17
21
|
mode: string;
|
|
18
22
|
enabled: boolean;
|
|
19
23
|
axis: string;
|
|
@@ -22,13 +26,15 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
22
26
|
showX: boolean;
|
|
23
27
|
showY: boolean;
|
|
24
28
|
showZ: boolean;
|
|
25
|
-
}>, {
|
|
29
|
+
}>, {
|
|
30
|
+
instance: ShallowRef<TransformControls<Camera> | undefined>;
|
|
31
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
32
|
change: (...args: any[]) => void;
|
|
27
33
|
dragging: (...args: any[]) => void;
|
|
28
34
|
mouseDown: (...args: any[]) => void;
|
|
29
35
|
mouseUp: (...args: any[]) => void;
|
|
30
36
|
objectChange: (...args: any[]) => void;
|
|
31
|
-
}, string, import(
|
|
37
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TransformControlsProps>, {
|
|
32
38
|
mode: string;
|
|
33
39
|
enabled: boolean;
|
|
34
40
|
axis: string;
|
|
@@ -47,7 +53,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
47
53
|
size: number;
|
|
48
54
|
enabled: boolean;
|
|
49
55
|
mode: string;
|
|
50
|
-
axis: "
|
|
56
|
+
axis: "X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ";
|
|
51
57
|
space: "local" | "world";
|
|
52
58
|
showX: boolean;
|
|
53
59
|
showY: boolean;
|
|
@@ -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, };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -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,18 +91,18 @@ 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
|
-
|
|
99
|
-
}, unknown, {}, {}, import(
|
|
99
|
+
instance: 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;
|
|
103
104
|
}>>>, {
|
|
104
|
-
depth:
|
|
105
|
+
depth: "renderOrder" | "flat" | "offsetZ" | number;
|
|
105
106
|
skipStrokes: boolean;
|
|
106
107
|
skipFills: boolean;
|
|
107
108
|
}, {}>;
|
|
@@ -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 };
|
|
@@ -15,7 +15,7 @@ export interface FBXModelProps {
|
|
|
15
15
|
* @default false
|
|
16
16
|
* @memberof FBXModelProps
|
|
17
17
|
*
|
|
18
|
-
|
|
18
|
+
*/
|
|
19
19
|
castShadow?: boolean;
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
@@ -25,22 +25,22 @@ export interface FBXModelProps {
|
|
|
25
25
|
* @default false
|
|
26
26
|
* @memberof FBXModelProps
|
|
27
27
|
*
|
|
28
|
-
|
|
28
|
+
*/
|
|
29
29
|
receiveShadow?: boolean;
|
|
30
30
|
}
|
|
31
|
-
declare const _default: import(
|
|
31
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
32
32
|
path: string;
|
|
33
|
-
castShadow?: boolean
|
|
34
|
-
receiveShadow?: boolean
|
|
33
|
+
castShadow?: boolean;
|
|
34
|
+
receiveShadow?: boolean;
|
|
35
35
|
}>, {
|
|
36
36
|
castShadow: boolean;
|
|
37
37
|
receiveShadow: boolean;
|
|
38
38
|
}>, {
|
|
39
|
-
|
|
40
|
-
}, unknown, {}, {}, import(
|
|
39
|
+
instance: import('vue').Ref<any>;
|
|
40
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
41
41
|
path: string;
|
|
42
|
-
castShadow?: boolean
|
|
43
|
-
receiveShadow?: boolean
|
|
42
|
+
castShadow?: boolean;
|
|
43
|
+
receiveShadow?: boolean;
|
|
44
44
|
}>, {
|
|
45
45
|
castShadow: boolean;
|
|
46
46
|
receiveShadow: boolean;
|
|
@@ -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,7 +17,7 @@ export interface GLTFModelProps {
|
|
|
17
17
|
* @default false
|
|
18
18
|
* @memberof GLTFModelProps
|
|
19
19
|
*
|
|
20
|
-
|
|
20
|
+
*/
|
|
21
21
|
draco?: boolean;
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
@@ -27,7 +27,7 @@ export interface GLTFModelProps {
|
|
|
27
27
|
* @default false
|
|
28
28
|
* @memberof GLTFModelProps
|
|
29
29
|
*
|
|
30
|
-
|
|
30
|
+
*/
|
|
31
31
|
castShadow?: boolean;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
@@ -37,7 +37,7 @@ export interface GLTFModelProps {
|
|
|
37
37
|
* @default false
|
|
38
38
|
* @memberof GLTFModelProps
|
|
39
39
|
*
|
|
40
|
-
|
|
40
|
+
*/
|
|
41
41
|
receiveShadow?: boolean;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
@@ -47,28 +47,28 @@ export interface GLTFModelProps {
|
|
|
47
47
|
* @default 'https://www.gstatic.com/draco/versioned/decoders/1.4.1/'
|
|
48
48
|
* @memberof GLTFModelProps
|
|
49
49
|
*
|
|
50
|
-
|
|
50
|
+
*/
|
|
51
51
|
decoderPath?: string;
|
|
52
52
|
}
|
|
53
|
-
declare const _default: import(
|
|
53
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
54
54
|
path: string;
|
|
55
|
-
draco?: boolean
|
|
56
|
-
decoderPath?: string
|
|
57
|
-
castShadow?: boolean
|
|
58
|
-
receiveShadow?: boolean
|
|
55
|
+
draco?: boolean;
|
|
56
|
+
decoderPath?: string;
|
|
57
|
+
castShadow?: boolean;
|
|
58
|
+
receiveShadow?: boolean;
|
|
59
59
|
}>, {
|
|
60
60
|
draco: boolean;
|
|
61
61
|
castShadow: boolean;
|
|
62
62
|
receiveShadow: boolean;
|
|
63
63
|
decoderPath: string;
|
|
64
64
|
}>, {
|
|
65
|
-
|
|
66
|
-
}, unknown, {}, {}, import(
|
|
65
|
+
instance: import('vue').Ref<any>;
|
|
66
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
67
67
|
path: string;
|
|
68
|
-
draco?: boolean
|
|
69
|
-
decoderPath?: string
|
|
70
|
-
castShadow?: boolean
|
|
71
|
-
receiveShadow?: boolean
|
|
68
|
+
draco?: boolean;
|
|
69
|
+
decoderPath?: string;
|
|
70
|
+
castShadow?: boolean;
|
|
71
|
+
receiveShadow?: boolean;
|
|
72
72
|
}>, {
|
|
73
73
|
draco: boolean;
|
|
74
74
|
castShadow: boolean;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { TresLoader, TresObject3D } from '@tresjs/core';
|
|
2
|
+
import { AnimationClip, Material, Scene } from 'three';
|
|
3
|
+
import { DRACOLoader, GLTF } from 'three-stdlib';
|
|
4
|
+
|
|
3
5
|
export interface GLTFLoaderOptions {
|
|
4
6
|
/**
|
|
5
7
|
* Whether to use Draco compression.
|
|
@@ -17,20 +19,23 @@ export interface GLTFLoaderOptions {
|
|
|
17
19
|
decoderPath?: string;
|
|
18
20
|
}
|
|
19
21
|
export interface GLTFResult {
|
|
20
|
-
animations: Array<
|
|
22
|
+
animations: Array<AnimationClip>;
|
|
21
23
|
nodes: Record<string, TresObject3D>;
|
|
22
|
-
materials: Record<string,
|
|
23
|
-
scene:
|
|
24
|
+
materials: Record<string, Material>;
|
|
25
|
+
scene: Scene;
|
|
26
|
+
}
|
|
27
|
+
export interface TresGLTFLoader extends TresLoader<GLTF> {
|
|
28
|
+
setDRACOLoader?: (dracoLoader: DRACOLoader) => void;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
26
31
|
* Loads a GLTF file and returns a THREE.Object3D.
|
|
27
32
|
*
|
|
28
33
|
* @export
|
|
29
34
|
* @param {(string | string[])} path
|
|
30
|
-
* @param {GLTFLoaderOptions} [options
|
|
31
|
-
*
|
|
32
|
-
*
|
|
35
|
+
* @param {GLTFLoaderOptions} [options]
|
|
36
|
+
*
|
|
37
|
+
*
|
|
33
38
|
* @param {(loader: GLTFLoader) => void} [extendLoader]
|
|
34
39
|
* @return {*} {Promise<GLTFResult>}
|
|
35
40
|
*/
|
|
36
|
-
export declare function useGLTF<T extends string | string[]>(path: T, options?: GLTFLoaderOptions, extendLoader?: (loader:
|
|
41
|
+
export declare function useGLTF<T extends string | string[]>(path: T, options?: GLTFLoaderOptions, extendLoader?: (loader: TresGLTFLoader) => void): Promise<T extends string[] ? GLTFResult[] : GLTFResult>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Fn } from '@vueuse/core';
|
|
2
|
+
|
|
1
3
|
interface CustomShaderMaterialProps {
|
|
2
|
-
baseMaterial:
|
|
4
|
+
baseMaterial: Fn;
|
|
3
5
|
vertexShader?: string;
|
|
4
6
|
fragmentShader?: string;
|
|
5
7
|
silent?: boolean;
|
|
@@ -7,9 +9,9 @@ interface CustomShaderMaterialProps {
|
|
|
7
9
|
[uniform: string]: any;
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
|
-
declare const _default: import(
|
|
11
|
-
|
|
12
|
-
}, unknown, {}, {}, import(
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<CustomShaderMaterialProps>, {
|
|
13
|
+
instance: import('vue').ShallowRef<null>;
|
|
14
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<CustomShaderMaterialProps>>>, {}, {}>;
|
|
13
15
|
export default _default;
|
|
14
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
17
|
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;
|
|
7
|
+
fresnelOpacity?: number;
|
|
8
|
+
blinkFresnelOnly?: boolean;
|
|
9
|
+
enableBlinking?: boolean;
|
|
10
|
+
enableAdditive?: boolean;
|
|
11
|
+
hologramBrightness?: number;
|
|
12
|
+
scanlineSize?: number;
|
|
13
|
+
signalSpeed?: number;
|
|
14
|
+
hologramOpacity?: number;
|
|
15
|
+
hologramColor?: TresColor;
|
|
16
|
+
side?: Side;
|
|
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;
|
|
34
|
+
fresnelOpacity?: number;
|
|
35
|
+
blinkFresnelOnly?: boolean;
|
|
36
|
+
enableBlinking?: boolean;
|
|
37
|
+
enableAdditive?: boolean;
|
|
38
|
+
hologramBrightness?: number;
|
|
39
|
+
scanlineSize?: number;
|
|
40
|
+
signalSpeed?: number;
|
|
41
|
+
hologramOpacity?: number;
|
|
42
|
+
hologramColor?: TresColor;
|
|
43
|
+
side?: Side;
|
|
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
|
+
} & {};
|