@tresjs/cientos 3.9.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/Lensflare/component.vue.d.ts +4 -4
- package/dist/core/abstractions/Levioso.vue.d.ts +15 -13
- package/dist/core/abstractions/MouseParallax.vue.d.ts +6 -6
- package/dist/core/abstractions/Reflector.vue.d.ts +9 -7
- package/dist/core/abstractions/Text3D.vue.d.ts +7 -5
- package/dist/core/abstractions/index.d.ts +2 -1
- package/dist/core/abstractions/useFBO/component.vue.d.ts +2 -2
- package/dist/core/abstractions/useFBO/index.d.ts +2 -2
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +6 -4
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +161 -133
- package/dist/core/controls/CameraControls.vue.d.ts +1593 -1473
- package/dist/core/controls/KeyboardControls.vue.d.ts +39 -85
- package/dist/core/controls/MapControls.vue.d.ts +9495 -2
- package/dist/core/controls/OrbitControls.vue.d.ts +1366 -1262
- package/dist/core/controls/PointerLockControls.vue.d.ts +1 -1
- package/dist/core/controls/ScrollControls.vue.d.ts +19 -15
- package/dist/core/controls/TransformControls.vue.d.ts +6 -2
- package/dist/core/index.d.ts +0 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +2 -2
- package/dist/core/loaders/useFBX/component.vue.d.ts +5 -5
- package/dist/core/loaders/useGLTF/component.vue.d.ts +9 -9
- package/dist/core/loaders/useGLTF/index.d.ts +41 -0
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +4 -2
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +22 -22
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +1 -1
- package/dist/core/materials/{blurPass.d.ts → meshReflectionMaterial/BlurPass.d.ts} +6 -5
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +170 -40
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +31 -34
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +7 -5
- package/dist/core/misc/html/HTML.vue.d.ts +8 -4
- package/dist/core/misc/index.d.ts +1 -2
- package/dist/core/shapes/Box.vue.d.ts +9 -7
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +3 -1
- package/dist/core/shapes/Circle.vue.d.ts +9 -7
- package/dist/core/shapes/Cone.vue.d.ts +9 -7
- package/dist/core/shapes/Cylinder.vue.d.ts +60 -0
- package/dist/core/shapes/Dodecahedron.vue.d.ts +9 -7
- package/dist/core/shapes/Icosahedron.vue.d.ts +9 -7
- package/dist/core/shapes/Line2.vue.d.ts +4 -2
- package/dist/core/shapes/Octahedron.vue.d.ts +9 -7
- package/dist/core/shapes/Plane.vue.d.ts +9 -7
- package/dist/core/shapes/Ring.vue.d.ts +9 -7
- package/dist/core/shapes/RoundedBox.vue.d.ts +9 -7
- package/dist/core/shapes/Sphere.vue.d.ts +9 -7
- package/dist/core/shapes/Superformula.vue.d.ts +8 -6
- package/dist/core/shapes/Tetrahedron.vue.d.ts +9 -7
- package/dist/core/shapes/Torus.vue.d.ts +9 -7
- package/dist/core/shapes/TorusKnot.vue.d.ts +9 -7
- package/dist/core/shapes/Tube.vue.d.ts +10 -8
- package/dist/core/shapes/index.d.ts +2 -1
- 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 +9 -6
- package/dist/core/staging/Ocean.vue.d.ts +11 -9
- package/dist/core/staging/Precipitation.vue.d.ts +6 -4
- package/dist/core/staging/Sky.vue.d.ts +2 -2
- package/dist/core/staging/Smoke.vue.d.ts +3 -3
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +3 -3
- package/dist/core/staging/Sparkles/component.vue.d.ts +10 -8
- package/dist/core/staging/Stars.vue.d.ts +4 -4
- package/dist/core/staging/useEnvironment/component.vue.d.ts +8 -6
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +11 -11
- package/dist/trescientos.js +6517 -6177
- package/dist/trescientos.umd.cjs +455 -440
- package/package.json +20 -24
- package/dist/core/directives/index.d.ts +0 -6
- package/dist/core/directives/vAlwaysLookAt.d.ts +0 -5
- package/dist/core/directives/vDistanceTo.d.ts +0 -4
- package/dist/core/directives/vLightHelper.d.ts +0 -7
- package/dist/core/directives/vLog.d.ts +0 -3
- package/dist/core/misc/useTweakPane/index.d.ts +0 -11
- /package/dist/core/materials/{convolutionMaterial.d.ts → meshReflectionMaterial/ConvolutionMaterial.d.ts} +0 -0
|
@@ -39,7 +39,7 @@ export interface PointerLockControlsProps {
|
|
|
39
39
|
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PointerLockControlsProps>, {
|
|
40
40
|
makeDefault: boolean;
|
|
41
41
|
}>, {
|
|
42
|
-
|
|
42
|
+
instance: import('vue').Ref<(import('three').EventDispatcher<{}> & {
|
|
43
43
|
enabled: boolean;
|
|
44
44
|
}) | null>;
|
|
45
45
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -40,26 +40,31 @@ export interface 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
62
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
58
|
-
pages?: number
|
|
59
|
-
distance?: number
|
|
60
|
-
smoothScroll?: number
|
|
61
|
-
horizontal?: boolean
|
|
62
|
-
htmlScroll?: boolean
|
|
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,4 +1,6 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
1
2
|
import { Camera, Object3D } from 'three';
|
|
3
|
+
import { TransformControls } from 'three-stdlib';
|
|
2
4
|
|
|
3
5
|
export interface TransformControlsProps {
|
|
4
6
|
object: Object3D;
|
|
@@ -24,7 +26,9 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
24
26
|
showX: boolean;
|
|
25
27
|
showY: boolean;
|
|
26
28
|
showZ: boolean;
|
|
27
|
-
}>, {
|
|
29
|
+
}>, {
|
|
30
|
+
instance: ShallowRef<TransformControls<Camera> | undefined>;
|
|
31
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
32
|
change: (...args: any[]) => void;
|
|
29
33
|
dragging: (...args: any[]) => void;
|
|
30
34
|
mouseDown: (...args: any[]) => void;
|
|
@@ -49,7 +53,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
49
53
|
size: number;
|
|
50
54
|
enabled: boolean;
|
|
51
55
|
mode: string;
|
|
52
|
-
axis: "
|
|
56
|
+
axis: "X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ";
|
|
53
57
|
space: "local" | "world";
|
|
54
58
|
showX: boolean;
|
|
55
59
|
showY: boolean;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -96,13 +96,13 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
96
96
|
skipFills: boolean;
|
|
97
97
|
depth: string;
|
|
98
98
|
}>, {
|
|
99
|
-
|
|
99
|
+
instance: import('vue').ShallowRef<any>;
|
|
100
100
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SVGProps>, {
|
|
101
101
|
skipStrokes: boolean;
|
|
102
102
|
skipFills: boolean;
|
|
103
103
|
depth: string;
|
|
104
104
|
}>>>, {
|
|
105
|
-
depth:
|
|
105
|
+
depth: "renderOrder" | "flat" | "offsetZ" | number;
|
|
106
106
|
skipStrokes: boolean;
|
|
107
107
|
skipFills: boolean;
|
|
108
108
|
}, {}>;
|
|
@@ -30,17 +30,17 @@ export interface FBXModelProps {
|
|
|
30
30
|
}
|
|
31
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
|
-
|
|
39
|
+
instance: import('vue').Ref<any>;
|
|
40
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;
|
|
@@ -52,23 +52,23 @@ export interface GLTFModelProps {
|
|
|
52
52
|
}
|
|
53
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
|
-
|
|
65
|
+
instance: import('vue').Ref<any>;
|
|
66
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;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TresLoader, TresObject3D } from '@tresjs/core';
|
|
2
|
+
import { AnimationClip, Material, Scene } from 'three';
|
|
3
|
+
import { DRACOLoader, GLTF } from 'three-stdlib';
|
|
4
|
+
|
|
5
|
+
export interface GLTFLoaderOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to use Draco compression.
|
|
8
|
+
*
|
|
9
|
+
* @type {boolean}
|
|
10
|
+
* @memberof GLTFLoaderOptions
|
|
11
|
+
*/
|
|
12
|
+
draco?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The path to the Draco decoder.
|
|
15
|
+
*
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof GLTFLoaderOptions
|
|
18
|
+
*/
|
|
19
|
+
decoderPath?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GLTFResult {
|
|
22
|
+
animations: Array<AnimationClip>;
|
|
23
|
+
nodes: Record<string, TresObject3D>;
|
|
24
|
+
materials: Record<string, Material>;
|
|
25
|
+
scene: Scene;
|
|
26
|
+
}
|
|
27
|
+
export interface TresGLTFLoader extends TresLoader<GLTF> {
|
|
28
|
+
setDRACOLoader?: (dracoLoader: DRACOLoader) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Loads a GLTF file and returns a THREE.Object3D.
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @param {(string | string[])} path
|
|
35
|
+
* @param {GLTFLoaderOptions} [options]
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
* @param {(loader: GLTFLoader) => void} [extendLoader]
|
|
39
|
+
* @return {*} {Promise<GLTFResult>}
|
|
40
|
+
*/
|
|
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;
|
|
@@ -8,7 +10,7 @@ interface CustomShaderMaterialProps {
|
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
12
|
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<CustomShaderMaterialProps>, {
|
|
11
|
-
|
|
13
|
+
instance: import('vue').ShallowRef<null>;
|
|
12
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;
|
|
@@ -3,17 +3,17 @@ import { Side } from 'three';
|
|
|
3
3
|
import { default as HolographicMaterial } from './HolographicMaterialParameters';
|
|
4
4
|
|
|
5
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?:
|
|
16
|
-
side?: Side
|
|
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
17
|
}>, {
|
|
18
18
|
fresnelAmount: number;
|
|
19
19
|
fresnelOpacity: number;
|
|
@@ -30,17 +30,17 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
30
30
|
root: import('vue').ShallowRef<any>;
|
|
31
31
|
constructor: typeof HolographicMaterial;
|
|
32
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?:
|
|
43
|
-
side?: Side
|
|
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
44
|
}>, {
|
|
45
45
|
fresnelAmount: number;
|
|
46
46
|
fresnelOpacity: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
-
|
|
2
|
+
instance: import('vue').ShallowRef<any>;
|
|
3
3
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Camera, Mesh, Scene, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { ConvolutionMaterial } from './
|
|
2
|
+
import { ConvolutionMaterial } from './ConvolutionMaterial';
|
|
3
3
|
|
|
4
4
|
export interface BlurPassProps {
|
|
5
5
|
resolution: number;
|
|
6
6
|
width?: number;
|
|
7
7
|
height?: number;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
depthEdge0?: number;
|
|
9
|
+
depthEdge1?: number;
|
|
10
10
|
depthScale?: number;
|
|
11
|
-
|
|
11
|
+
depthBias?: number;
|
|
12
12
|
}
|
|
13
13
|
export declare class BlurPass {
|
|
14
14
|
readonly renderTargetA: WebGLRenderTarget;
|
|
@@ -18,6 +18,7 @@ export declare class BlurPass {
|
|
|
18
18
|
readonly camera: Camera;
|
|
19
19
|
readonly screen: Mesh;
|
|
20
20
|
renderToScreen: boolean;
|
|
21
|
-
constructor({ resolution, width, height,
|
|
21
|
+
constructor({ resolution, width, height, depthEdge0, depthEdge1, depthScale, depthBias, }: BlurPassProps);
|
|
22
22
|
render(renderer: any, inputBuffer: any, outputBuffer: any): void;
|
|
23
|
+
dispose(): void;
|
|
23
24
|
}
|
|
@@ -1,59 +1,189 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Texture, Color, Euler, Vector2 } from 'three';
|
|
2
|
+
import { TresColor } from '@tresjs/core';
|
|
2
3
|
|
|
3
|
-
export interface
|
|
4
|
+
export interface MeshReflectionMaterialProps {
|
|
5
|
+
/** Length in pixels of one side of the square reflective textures. */
|
|
4
6
|
resolution?: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
/** Overall strength of the reflection. */
|
|
8
|
+
mix?: number;
|
|
9
|
+
/** Strength of the sharp reflection on smooth surfaces. */
|
|
10
|
+
sharpMix?: number;
|
|
11
|
+
/** Sharp reflection can be faded out by depth – distance from the reflective surface. Performance note: if the value is greater than `0`, a depth texture will be created. */
|
|
12
|
+
sharpDepthScale?: number;
|
|
13
|
+
/** Sharp reflection depth falloff bias. */
|
|
14
|
+
sharpDepthBias?: number;
|
|
15
|
+
/** Sharp reflection depth falloff start. */
|
|
16
|
+
sharpDepthEdgeMin?: number;
|
|
17
|
+
/** Sharp reflection depth falloff end. */
|
|
18
|
+
sharpDepthEdgeMax?: number;
|
|
19
|
+
/** Strength of the blurred reflection on smooth surfaces. */
|
|
20
|
+
blurMixSmooth?: number;
|
|
21
|
+
/** Strength of the blurred reflection on rough surfaces. */
|
|
22
|
+
blurMixRough?: number;
|
|
23
|
+
/** Blurred reflection can spread out by depth – distance from the reflective surface. Performance note: if the value is greater than `0`, depth texture will be rendered. */
|
|
24
|
+
blurDepthScale?: number;
|
|
25
|
+
/** Blurred reflection depth spread bias. */
|
|
26
|
+
blurDepthBias?: number;
|
|
27
|
+
/** Blurred reflection depth spread start. */
|
|
28
|
+
blurDepthEdgeMin?: number;
|
|
29
|
+
/** Blurred reflection depth spread end. */
|
|
30
|
+
blurDepthEdgeMax?: number;
|
|
31
|
+
/** Size of the blur. If `[number, number]`, first number is width, second is height. Performance note: if other than `[0, 0]` or `0`, a blur texture will be rendered. */
|
|
32
|
+
blurSize?: [number, number] | number;
|
|
33
|
+
/** Texture for offsetting the reflection. */
|
|
13
34
|
distortionMap?: Texture;
|
|
35
|
+
/** Influence of `distortionMap`. */
|
|
14
36
|
distortion?: number;
|
|
15
|
-
|
|
37
|
+
/** Offsets the reflection. */
|
|
16
38
|
reflectorOffset?: number;
|
|
39
|
+
color?: TresColor;
|
|
40
|
+
roughness?: number;
|
|
41
|
+
metalness?: number;
|
|
42
|
+
map?: Texture;
|
|
43
|
+
lightMap?: Texture;
|
|
44
|
+
lightMapIntensity?: number;
|
|
45
|
+
aoMap?: Texture | null;
|
|
46
|
+
aoMapIntensity?: number;
|
|
47
|
+
emissive?: TresColor;
|
|
48
|
+
emissiveIntensity?: number;
|
|
49
|
+
emissiveMap?: Texture;
|
|
50
|
+
bumpMap?: Texture;
|
|
51
|
+
bumpScale?: number;
|
|
52
|
+
normalMap?: Texture;
|
|
53
|
+
normalMapType?: number;
|
|
54
|
+
normalScale?: Vector2;
|
|
55
|
+
displacementMap?: Texture;
|
|
56
|
+
displacementScale?: number;
|
|
57
|
+
displacementBias?: number;
|
|
58
|
+
roughnessMap?: Texture | null;
|
|
59
|
+
metalnessMap?: Texture | null;
|
|
60
|
+
alphaMap?: Texture | null;
|
|
61
|
+
envMap?: Texture | null;
|
|
62
|
+
envMapRotation?: Euler;
|
|
63
|
+
envMapIntensity?: number;
|
|
64
|
+
wireframe?: boolean;
|
|
65
|
+
wireframeLinewidth?: number;
|
|
66
|
+
wireframeLinecap?: string;
|
|
67
|
+
wireframeLinejoin?: string;
|
|
68
|
+
flatShading?: boolean;
|
|
69
|
+
fog?: boolean;
|
|
17
70
|
}
|
|
18
|
-
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
19
|
-
mixBlur: number;
|
|
20
|
-
mixStrength: number;
|
|
71
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MeshReflectionMaterialProps>, {
|
|
21
72
|
resolution: number;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
73
|
+
mix: number;
|
|
74
|
+
sharpMix: number;
|
|
75
|
+
sharpDepthEdgeMin: number;
|
|
76
|
+
sharpDepthEdgeMax: number;
|
|
77
|
+
sharpDepthScale: number;
|
|
78
|
+
sharpDepthBias: number;
|
|
79
|
+
blurMixSmooth: number;
|
|
80
|
+
blurMixRough: number;
|
|
81
|
+
blurDepthEdgeMin: number;
|
|
82
|
+
blurDepthEdgeMax: number;
|
|
83
|
+
blurDepthScale: number;
|
|
84
|
+
blurDepthBias: number;
|
|
85
|
+
blurSize: () => number[];
|
|
28
86
|
distortion: number;
|
|
29
|
-
mixContrast: number;
|
|
30
87
|
reflectorOffset: number;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
88
|
+
color: () => Color;
|
|
89
|
+
roughness: number;
|
|
90
|
+
roughnessMap: null;
|
|
91
|
+
metalness: number;
|
|
92
|
+
lightMapIntensity: number;
|
|
93
|
+
aoMapIntensity: number;
|
|
94
|
+
emissive: () => Color;
|
|
95
|
+
emissiveIntensity: number;
|
|
96
|
+
bumpScale: number;
|
|
97
|
+
normalMapType: 0;
|
|
98
|
+
normalScale: () => Vector2;
|
|
99
|
+
displacementScale: number;
|
|
100
|
+
displacementBias: number;
|
|
101
|
+
envMapRotation: () => Euler;
|
|
102
|
+
envMapIntensity: number;
|
|
103
|
+
wireframe: boolean;
|
|
104
|
+
wireframeLinewidth: number;
|
|
105
|
+
wireframeLinecap: string;
|
|
106
|
+
wireframeLinejoin: string;
|
|
107
|
+
flatShading: boolean;
|
|
108
|
+
fog: boolean;
|
|
109
|
+
}>, {
|
|
110
|
+
instance: import('vue').ShallowRef<any>;
|
|
111
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MeshReflectionMaterialProps>, {
|
|
34
112
|
resolution: number;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
113
|
+
mix: number;
|
|
114
|
+
sharpMix: number;
|
|
115
|
+
sharpDepthEdgeMin: number;
|
|
116
|
+
sharpDepthEdgeMax: number;
|
|
117
|
+
sharpDepthScale: number;
|
|
118
|
+
sharpDepthBias: number;
|
|
119
|
+
blurMixSmooth: number;
|
|
120
|
+
blurMixRough: number;
|
|
121
|
+
blurDepthEdgeMin: number;
|
|
122
|
+
blurDepthEdgeMax: number;
|
|
123
|
+
blurDepthScale: number;
|
|
124
|
+
blurDepthBias: number;
|
|
125
|
+
blurSize: () => number[];
|
|
41
126
|
distortion: number;
|
|
42
|
-
mixContrast: number;
|
|
43
127
|
reflectorOffset: number;
|
|
128
|
+
color: () => Color;
|
|
129
|
+
roughness: number;
|
|
130
|
+
roughnessMap: null;
|
|
131
|
+
metalness: number;
|
|
132
|
+
lightMapIntensity: number;
|
|
133
|
+
aoMapIntensity: number;
|
|
134
|
+
emissive: () => Color;
|
|
135
|
+
emissiveIntensity: number;
|
|
136
|
+
bumpScale: number;
|
|
137
|
+
normalMapType: 0;
|
|
138
|
+
normalScale: () => Vector2;
|
|
139
|
+
displacementScale: number;
|
|
140
|
+
displacementBias: number;
|
|
141
|
+
envMapRotation: () => Euler;
|
|
142
|
+
envMapIntensity: number;
|
|
143
|
+
wireframe: boolean;
|
|
144
|
+
wireframeLinewidth: number;
|
|
145
|
+
wireframeLinecap: string;
|
|
146
|
+
wireframeLinejoin: string;
|
|
147
|
+
flatShading: boolean;
|
|
148
|
+
fog: boolean;
|
|
44
149
|
}>>>, {
|
|
45
|
-
|
|
150
|
+
color: TresColor;
|
|
151
|
+
fog: boolean;
|
|
152
|
+
lightMapIntensity: number;
|
|
153
|
+
aoMapIntensity: number;
|
|
154
|
+
envMapRotation: Euler;
|
|
155
|
+
wireframe: boolean;
|
|
156
|
+
wireframeLinewidth: number;
|
|
157
|
+
wireframeLinecap: string;
|
|
158
|
+
wireframeLinejoin: string;
|
|
46
159
|
resolution: number;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
160
|
+
mix: number;
|
|
161
|
+
sharpMix: number;
|
|
162
|
+
sharpDepthScale: number;
|
|
163
|
+
sharpDepthBias: number;
|
|
164
|
+
sharpDepthEdgeMin: number;
|
|
165
|
+
sharpDepthEdgeMax: number;
|
|
166
|
+
blurMixSmooth: number;
|
|
167
|
+
blurMixRough: number;
|
|
168
|
+
blurDepthScale: number;
|
|
169
|
+
blurDepthBias: number;
|
|
170
|
+
blurDepthEdgeMin: number;
|
|
171
|
+
blurDepthEdgeMax: number;
|
|
172
|
+
blurSize: [number, number] | number;
|
|
54
173
|
distortion: number;
|
|
55
|
-
mixContrast: number;
|
|
56
174
|
reflectorOffset: number;
|
|
175
|
+
roughness: number;
|
|
176
|
+
metalness: number;
|
|
177
|
+
emissive: TresColor;
|
|
178
|
+
emissiveIntensity: number;
|
|
179
|
+
bumpScale: number;
|
|
180
|
+
normalMapType: number;
|
|
181
|
+
normalScale: Vector2;
|
|
182
|
+
displacementScale: number;
|
|
183
|
+
displacementBias: number;
|
|
184
|
+
roughnessMap: Texture | null;
|
|
185
|
+
envMapIntensity: number;
|
|
186
|
+
flatShading: boolean;
|
|
57
187
|
}, {}>;
|
|
58
188
|
export default _default;
|
|
59
189
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,51 +1,48 @@
|
|
|
1
1
|
import { Matrix4, Texture, MeshStandardMaterial } from 'three';
|
|
2
2
|
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class MeshReflectionMaterial extends MeshStandardMaterial {
|
|
4
4
|
private _tDepth;
|
|
5
5
|
private _distortionMap;
|
|
6
|
-
private
|
|
7
|
-
private
|
|
6
|
+
private _tSharp;
|
|
7
|
+
private _tBlur;
|
|
8
8
|
private _textureMatrix;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
private
|
|
9
|
+
private _mix;
|
|
10
|
+
private _sharpMix;
|
|
11
|
+
private _blurMixSmooth;
|
|
12
|
+
private _blurMixRough;
|
|
13
|
+
private _sharpDepthEdgeMin;
|
|
14
|
+
private _sharpDepthEdgeMax;
|
|
15
|
+
private _sharpDepthScale;
|
|
16
|
+
private _sharpDepthBias;
|
|
17
17
|
private _distortion;
|
|
18
|
-
private _mixContrast;
|
|
19
18
|
constructor(parameters?: {});
|
|
20
19
|
onBeforeCompile(shader: any): void;
|
|
21
|
-
get
|
|
22
|
-
set
|
|
20
|
+
get tSharp(): Texture | null;
|
|
21
|
+
set tSharp(v: Texture | null);
|
|
23
22
|
get tDepth(): Texture | null;
|
|
24
23
|
set tDepth(v: Texture | null);
|
|
25
24
|
get distortionMap(): Texture | null;
|
|
26
25
|
set distortionMap(v: Texture | null);
|
|
27
|
-
get
|
|
28
|
-
set
|
|
26
|
+
get tBlur(): Texture | null;
|
|
27
|
+
set tBlur(v: Texture | null);
|
|
29
28
|
get textureMatrix(): Matrix4 | null;
|
|
30
29
|
set textureMatrix(v: Matrix4 | null);
|
|
31
|
-
get
|
|
32
|
-
set
|
|
33
|
-
get
|
|
34
|
-
set
|
|
35
|
-
get
|
|
36
|
-
set
|
|
37
|
-
get
|
|
38
|
-
set
|
|
39
|
-
get
|
|
40
|
-
set
|
|
41
|
-
get
|
|
42
|
-
set
|
|
43
|
-
get
|
|
44
|
-
set
|
|
45
|
-
get
|
|
46
|
-
set
|
|
30
|
+
get sharpMix(): number;
|
|
31
|
+
set sharpMix(v: number);
|
|
32
|
+
get blurMixSmooth(): number;
|
|
33
|
+
set blurMixSmooth(v: number);
|
|
34
|
+
get blurMixRough(): number;
|
|
35
|
+
set blurMixRough(v: number);
|
|
36
|
+
get mix(): number;
|
|
37
|
+
set mix(v: number);
|
|
38
|
+
get sharpDepthScale(): number;
|
|
39
|
+
set sharpDepthScale(v: number);
|
|
40
|
+
get sharpDepthBias(): number;
|
|
41
|
+
set sharpDepthBias(v: number);
|
|
42
|
+
get sharpDepthEdgeMin(): number;
|
|
43
|
+
set sharpDepthEdgeMin(v: number);
|
|
44
|
+
get sharpDepthEdgeMax(): number;
|
|
45
|
+
set sharpDepthEdgeMax(v: number);
|
|
47
46
|
get distortion(): number;
|
|
48
47
|
set distortion(v: number);
|
|
49
|
-
get mixContrast(): number;
|
|
50
|
-
set mixContrast(v: number);
|
|
51
48
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
speed?: number
|
|
3
|
-
factor?: number
|
|
2
|
+
speed?: number;
|
|
3
|
+
factor?: number;
|
|
4
4
|
}>, {
|
|
5
5
|
speed: number;
|
|
6
6
|
factor: number;
|
|
7
|
-
}>, {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
}>, {
|
|
8
|
+
instance: import('vue').ShallowRef<any>;
|
|
9
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
speed?: number;
|
|
11
|
+
factor?: number;
|
|
10
12
|
}>, {
|
|
11
13
|
speed: number;
|
|
12
14
|
factor: number;
|