@tresjs/cientos 4.0.3 → 4.1.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/core/abstractions/AnimatedSprite/component.vue.d.ts +18 -5
- package/dist/core/abstractions/Billboard.vue.d.ts +61 -0
- package/dist/core/abstractions/CubeCamera/component.vue.d.ts +39 -0
- package/dist/core/abstractions/CubeCamera/useCubeCamera.d.ts +23 -0
- package/dist/core/abstractions/Edges.vue.d.ts +36 -0
- package/dist/core/abstractions/GradientTexture.vue.d.ts +47 -0
- package/dist/core/abstractions/Image/ImageMaterial.vue.d.ts +4 -0
- package/dist/core/abstractions/Image/ImageMaterialImpl.d.ts +8 -0
- package/dist/core/abstractions/Image/component.vue.d.ts +81 -0
- package/dist/core/abstractions/Lensflare/component.vue.d.ts +2 -2
- package/dist/core/abstractions/Levioso.vue.d.ts +17 -3
- package/dist/core/abstractions/Mask/component.vue.d.ts +40 -0
- package/dist/core/abstractions/Mask/useMask.d.ts +9 -0
- package/dist/core/abstractions/Outline/OutlineMaterialImpl.d.ts +4 -0
- package/dist/core/abstractions/Outline/component.vue.d.ts +34 -0
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +1 -1
- package/dist/core/abstractions/Reflector.vue.d.ts +10 -3
- package/dist/core/abstractions/ScreenSizer.vue.d.ts +35 -0
- package/dist/core/abstractions/ScreenSpace.vue.d.ts +32 -0
- package/dist/core/abstractions/Text3D.vue.d.ts +17 -3
- package/dist/core/abstractions/index.d.ts +11 -1
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +16 -2
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +756 -602
- package/dist/core/controls/CameraControls.vue.d.ts +304 -0
- package/dist/core/controls/MapControls.vue.d.ts +258 -0
- package/dist/core/controls/OrbitControls.vue.d.ts +262 -0
- package/dist/core/controls/PointerLockControls.vue.d.ts +1 -2
- package/dist/core/controls/ScrollControls.vue.d.ts +18 -4
- package/dist/core/controls/TransformControls.vue.d.ts +1 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +1 -1
- package/dist/core/loaders/useFBX/index.d.ts +3 -3
- package/dist/core/loaders/useGLTF/index.d.ts +7 -8
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +1 -1
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +1 -1
- package/dist/core/materials/index.d.ts +2 -1
- package/dist/core/materials/meshDiscardMaterial/index.vue.d.ts +4 -0
- package/dist/core/materials/meshDiscardMaterial/material.d.ts +4 -0
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +1 -1
- package/dist/core/materials/meshGlassMaterial/material.d.ts +1 -3
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +1 -1
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +1 -1
- package/dist/core/misc/html/HTML.vue.d.ts +24 -2
- package/dist/core/shapes/Box.vue.d.ts +17 -3
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +1 -1
- package/dist/core/shapes/Circle.vue.d.ts +17 -3
- package/dist/core/shapes/Cone.vue.d.ts +17 -3
- package/dist/core/shapes/Cylinder.vue.d.ts +17 -3
- package/dist/core/shapes/Dodecahedron.vue.d.ts +17 -3
- package/dist/core/shapes/Icosahedron.vue.d.ts +17 -3
- package/dist/core/shapes/Line2.vue.d.ts +1 -1
- package/dist/core/shapes/Octahedron.vue.d.ts +17 -3
- package/dist/core/shapes/Plane.vue.d.ts +17 -3
- package/dist/core/shapes/Ring.vue.d.ts +17 -3
- package/dist/core/shapes/RoundedBox.vue.d.ts +17 -3
- package/dist/core/shapes/Sphere.vue.d.ts +17 -3
- package/dist/core/shapes/Superformula.vue.d.ts +18 -3
- package/dist/core/shapes/Tetrahedron.vue.d.ts +17 -3
- package/dist/core/shapes/Torus.vue.d.ts +17 -3
- package/dist/core/shapes/TorusKnot.vue.d.ts +17 -3
- package/dist/core/shapes/Tube.vue.d.ts +17 -3
- package/dist/core/staging/Align.vue.d.ts +87 -0
- package/dist/core/staging/Backdrop.vue.d.ts +26 -3
- package/dist/core/staging/ContactShadows.vue.d.ts +1 -1
- package/dist/core/staging/Fit.vue.d.ts +35 -5
- package/dist/core/staging/Grid.vue.d.ts +52 -0
- package/dist/core/staging/Ocean.vue.d.ts +10 -3
- package/dist/core/staging/Precipitation.vue.d.ts +17 -16
- package/dist/core/staging/Sky.vue.d.ts +1 -1
- package/dist/core/staging/Smoke.vue.d.ts +1 -1
- package/dist/core/staging/SoftShadows.vue.d.ts +14 -0
- package/dist/core/staging/Sparkles/ShaderData.d.ts +1 -1
- package/dist/core/staging/Stars.vue.d.ts +1 -1
- package/dist/core/staging/index.d.ts +4 -1
- package/dist/core/staging/useEnvironment/{envSence.d.ts → EnvironmentScene.d.ts} +3 -3
- package/dist/core/staging/useEnvironment/component.vue.d.ts +12 -5
- package/dist/core/staging/useEnvironment/index.d.ts +14 -0
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +6 -4
- package/dist/trescientos.js +15618 -15159
- package/dist/trescientos.umd.cjs +819 -517
- package/dist/utils/calculateScaleFactor.d.ts +7 -0
- package/dist/utils/shaderMaterial.d.ts +6 -0
- package/package.json +22 -22
|
@@ -1,19 +1,42 @@
|
|
|
1
|
+
import { PlaneGeometry } from 'three';
|
|
1
2
|
export interface BackdropProps {
|
|
2
3
|
floor?: number;
|
|
3
4
|
segments?: number;
|
|
4
5
|
receiveShadow?: boolean;
|
|
5
6
|
}
|
|
6
7
|
declare function __VLS_template(): {
|
|
7
|
-
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
backdropRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<import('three').Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<import('three').Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<import('three').Group<import('three').Object3DEventMap>, typeof import('three').Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
13
|
+
P: {};
|
|
14
|
+
B: {};
|
|
15
|
+
D: {};
|
|
16
|
+
C: {};
|
|
17
|
+
M: {};
|
|
18
|
+
Defaults: {};
|
|
19
|
+
}, Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<import('three').Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<import('three').Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<import('three').Group<import('three').Object3DEventMap>, typeof import('three').Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, {}> | null;
|
|
20
|
+
planeRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<PlaneGeometry, import('@tresjs/core').WithMathProps<PlaneGeometry> & import('@tresjs/core').VueProps>>, Omit<import('@tresjs/core').InstanceProps<PlaneGeometry, typeof PlaneGeometry>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
21
|
+
P: {};
|
|
22
|
+
B: {};
|
|
23
|
+
D: {};
|
|
24
|
+
C: {};
|
|
25
|
+
M: {};
|
|
26
|
+
Defaults: {};
|
|
27
|
+
}, Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<PlaneGeometry, import('@tresjs/core').WithMathProps<PlaneGeometry> & import('@tresjs/core').VueProps>>, Omit<import('@tresjs/core').InstanceProps<PlaneGeometry, typeof PlaneGeometry>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, {}> | null;
|
|
28
|
+
};
|
|
29
|
+
attrs: Partial<{}>;
|
|
8
30
|
};
|
|
31
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
32
|
declare const __VLS_component: import('vue').DefineComponent<BackdropProps, {
|
|
10
|
-
instance: import('vue').ShallowRef<any>;
|
|
33
|
+
instance: import('vue').ShallowRef<any, any>;
|
|
11
34
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BackdropProps> & Readonly<{}>, {
|
|
12
35
|
receiveShadow: boolean;
|
|
13
36
|
segments: number;
|
|
14
37
|
floor: number;
|
|
15
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component,
|
|
39
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
40
|
export default _default;
|
|
18
41
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
42
|
new (): {
|
|
@@ -108,7 +108,6 @@ export interface ContactShadowsProps {
|
|
|
108
108
|
declare const _default: import('vue').DefineComponent<ContactShadowsProps, {
|
|
109
109
|
instance: Group<import('three').Object3DEventMap>;
|
|
110
110
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContactShadowsProps> & Readonly<{}>, {
|
|
111
|
-
blur: number;
|
|
112
111
|
depthWrite: boolean;
|
|
113
112
|
color: TresColor;
|
|
114
113
|
scale: number | [x: number, y: number];
|
|
@@ -116,6 +115,7 @@ declare const _default: import('vue').DefineComponent<ContactShadowsProps, {
|
|
|
116
115
|
width: number;
|
|
117
116
|
height: number;
|
|
118
117
|
opacity: number;
|
|
118
|
+
blur: number;
|
|
119
119
|
resolution: number;
|
|
120
120
|
frames: number;
|
|
121
121
|
tint: TresColor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box3, Vector3, Object3D } from 'three';
|
|
1
|
+
import { Box3, Group, Vector3, Object3D } from 'three';
|
|
2
2
|
export interface Props {
|
|
3
3
|
/**
|
|
4
4
|
* If `into` is:
|
|
@@ -21,17 +21,47 @@ declare const props: Readonly<{}> & {
|
|
|
21
21
|
readonly precise: boolean;
|
|
22
22
|
};
|
|
23
23
|
declare function __VLS_template(): {
|
|
24
|
-
|
|
24
|
+
slots: {
|
|
25
|
+
default?(_: {}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {
|
|
28
|
+
outer: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<Group<import('three').Object3DEventMap>, typeof Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
29
|
+
P: {};
|
|
30
|
+
B: {};
|
|
31
|
+
D: {};
|
|
32
|
+
C: {};
|
|
33
|
+
M: {};
|
|
34
|
+
Defaults: {};
|
|
35
|
+
}, Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<Group<import('three').Object3DEventMap>, typeof Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, {}> | null;
|
|
36
|
+
middle: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<Group<import('three').Object3DEventMap>, typeof Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
37
|
+
P: {};
|
|
38
|
+
B: {};
|
|
39
|
+
D: {};
|
|
40
|
+
C: {};
|
|
41
|
+
M: {};
|
|
42
|
+
Defaults: {};
|
|
43
|
+
}, Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<Group<import('three').Object3DEventMap>, typeof Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, {}> | null;
|
|
44
|
+
inner: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<Group<import('three').Object3DEventMap>, typeof Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
45
|
+
P: {};
|
|
46
|
+
B: {};
|
|
47
|
+
D: {};
|
|
48
|
+
C: {};
|
|
49
|
+
M: {};
|
|
50
|
+
Defaults: {};
|
|
51
|
+
}, Readonly<import('@tresjs/core').Mutable<import('@tresjs/core').Overwrite<Partial<import('@tresjs/core').Overwrite<Group<import('three').Object3DEventMap>, import('@tresjs/core').WithMathProps<Group<import('three').Object3DEventMap>> & import('@tresjs/core').VueProps & Partial<import('@tresjs/core').EventHandlers>>>, Omit<import('@tresjs/core').InstanceProps<Group<import('three').Object3DEventMap>, typeof Group>, "object">>>>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, {}> | null;
|
|
52
|
+
};
|
|
53
|
+
attrs: Partial<{}>;
|
|
25
54
|
};
|
|
55
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
56
|
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
27
|
-
instance: import('vue').ShallowRef<any>;
|
|
57
|
+
instance: import('vue').ShallowRef<any, any>;
|
|
28
58
|
fit: (into?: typeof props.into, precise?: boolean) => void;
|
|
29
59
|
update: () => void;
|
|
30
60
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
31
|
-
into: number | [number, number, number] | Vector3 | Box3 | Object3D | null;
|
|
32
61
|
precise: boolean;
|
|
62
|
+
into: number | [number, number, number] | Vector3 | Box3 | Object3D | null;
|
|
33
63
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
34
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component,
|
|
64
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
65
|
export default _default;
|
|
36
66
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
67
|
new (): {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ColorRepresentation, PlaneGeometry, Side } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
Based on
|
|
4
|
+
https://github.com/Fyrestar/THREE.InfiniteGridHelper by https://github.com/Fyrestar
|
|
5
|
+
and https://github.com/threlte/threlte/blob/main/packages/extras/src/lib/components/Grid/Grid.svelte
|
|
6
|
+
by https://github.com/grischaerbe and https://github.com/jerzakm
|
|
7
|
+
*/
|
|
8
|
+
export interface GridMaterialType {
|
|
9
|
+
/** Cell size, default: 0.5 */
|
|
10
|
+
cellSize?: number;
|
|
11
|
+
/** Cell thickness, default: 0.5 */
|
|
12
|
+
cellThickness?: number;
|
|
13
|
+
/** Cell color, default: black */
|
|
14
|
+
cellColor?: ColorRepresentation;
|
|
15
|
+
/** Section size, default: 1 */
|
|
16
|
+
sectionSize?: number;
|
|
17
|
+
/** Section thickness, default: 1 */
|
|
18
|
+
sectionThickness?: number;
|
|
19
|
+
/** Section color, default: #2080ff */
|
|
20
|
+
sectionColor?: ColorRepresentation;
|
|
21
|
+
/** Follow camera, default: false */
|
|
22
|
+
followCamera?: boolean;
|
|
23
|
+
/** Display the grid infinitely, default: false */
|
|
24
|
+
infiniteGrid?: boolean;
|
|
25
|
+
/** Fade distance, default: 100 */
|
|
26
|
+
fadeDistance?: number;
|
|
27
|
+
/** Fade strength, default: 1 */
|
|
28
|
+
fadeStrength?: number;
|
|
29
|
+
/** Fade from camera (1) or origin (0), or somewhere in between, default: camera */
|
|
30
|
+
fadeFrom?: number;
|
|
31
|
+
/** Material side, default: THREE.BackSide */
|
|
32
|
+
side?: Side;
|
|
33
|
+
}
|
|
34
|
+
export type GridProps = GridMaterialType & {
|
|
35
|
+
/** Default plane-geometry arguments */
|
|
36
|
+
args?: ConstructorParameters<typeof PlaneGeometry>;
|
|
37
|
+
};
|
|
38
|
+
declare const _default: import('vue').DefineComponent<GridProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GridProps> & Readonly<{}>, {
|
|
39
|
+
side: Side;
|
|
40
|
+
cellSize: number;
|
|
41
|
+
cellThickness: number;
|
|
42
|
+
cellColor: ColorRepresentation;
|
|
43
|
+
sectionSize: number;
|
|
44
|
+
sectionThickness: number;
|
|
45
|
+
sectionColor: ColorRepresentation;
|
|
46
|
+
followCamera: boolean;
|
|
47
|
+
infiniteGrid: boolean;
|
|
48
|
+
fadeDistance: number;
|
|
49
|
+
fadeStrength: number;
|
|
50
|
+
fadeFrom: number;
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
52
|
+
export default _default;
|
|
@@ -97,10 +97,17 @@ export interface OceanProps {
|
|
|
97
97
|
side?: TresVector3;
|
|
98
98
|
}
|
|
99
99
|
declare function __VLS_template(): {
|
|
100
|
-
|
|
100
|
+
slots: {
|
|
101
|
+
default?(_: {}): any;
|
|
102
|
+
};
|
|
103
|
+
refs: {
|
|
104
|
+
waterRef: unknown;
|
|
105
|
+
};
|
|
106
|
+
attrs: Partial<{}>;
|
|
101
107
|
};
|
|
108
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
102
109
|
declare const __VLS_component: import('vue').DefineComponent<OceanProps, {
|
|
103
|
-
instance: import('vue').ShallowRef<any>;
|
|
110
|
+
instance: import('vue').ShallowRef<any, any>;
|
|
104
111
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OceanProps> & Readonly<{}>, {
|
|
105
112
|
side: TresVector3;
|
|
106
113
|
size: number;
|
|
@@ -114,7 +121,7 @@ declare const __VLS_component: import('vue').DefineComponent<OceanProps, {
|
|
|
114
121
|
distortionScale: number;
|
|
115
122
|
alpha: number;
|
|
116
123
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
117
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component,
|
|
124
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
118
125
|
export default _default;
|
|
119
126
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
120
127
|
new (): {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { Texture } from 'three';
|
|
2
3
|
export interface PrecipitationProps {
|
|
3
4
|
/**
|
|
4
5
|
* The size of the drops.
|
|
@@ -28,24 +29,24 @@ export interface PrecipitationProps {
|
|
|
28
29
|
/**
|
|
29
30
|
* Color texture of the drops.
|
|
30
31
|
*
|
|
31
|
-
* @type {
|
|
32
|
-
* @memberof
|
|
32
|
+
* @type {Texture}
|
|
33
|
+
* @memberof PrecipitationProps
|
|
33
34
|
* @default null
|
|
34
35
|
*/
|
|
35
|
-
map?: null;
|
|
36
|
+
map?: string | Texture | null;
|
|
36
37
|
/**
|
|
37
38
|
* texture of the alphaMap Drops.
|
|
38
39
|
*
|
|
39
|
-
* @type {
|
|
40
|
-
* @memberof
|
|
40
|
+
* @type {Texture}
|
|
41
|
+
* @memberof PrecipitationProps
|
|
41
42
|
* @default null
|
|
42
43
|
*/
|
|
43
|
-
alphaMap?: string;
|
|
44
|
+
alphaMap?: string | Texture | null;
|
|
44
45
|
/**
|
|
45
46
|
* enables the WebGL to know when not to render the pixel.
|
|
46
47
|
*
|
|
47
48
|
* @type {number}
|
|
48
|
-
* @memberof
|
|
49
|
+
* @memberof PrecipitationProps
|
|
49
50
|
* @default 0.01
|
|
50
51
|
*/
|
|
51
52
|
alphaTest?: number;
|
|
@@ -53,7 +54,7 @@ export interface PrecipitationProps {
|
|
|
53
54
|
* Set the opacity of the drops.
|
|
54
55
|
*
|
|
55
56
|
* @type {number}
|
|
56
|
-
* @memberof
|
|
57
|
+
* @memberof PrecipitationProps
|
|
57
58
|
* @default 0.8
|
|
58
59
|
*/
|
|
59
60
|
opacity?: number;
|
|
@@ -61,7 +62,7 @@ export interface PrecipitationProps {
|
|
|
61
62
|
* number of drops.
|
|
62
63
|
*
|
|
63
64
|
* @type {number}
|
|
64
|
-
* @memberof
|
|
65
|
+
* @memberof PrecipitationProps
|
|
65
66
|
* @default 5000
|
|
66
67
|
*/
|
|
67
68
|
count?: number;
|
|
@@ -69,7 +70,7 @@ export interface PrecipitationProps {
|
|
|
69
70
|
* Speed of drops.
|
|
70
71
|
*
|
|
71
72
|
* @type {number}
|
|
72
|
-
* @memberof
|
|
73
|
+
* @memberof PrecipitationProps
|
|
73
74
|
* @default 5000
|
|
74
75
|
*/
|
|
75
76
|
speed?: number;
|
|
@@ -78,7 +79,7 @@ export interface PrecipitationProps {
|
|
|
78
79
|
*
|
|
79
80
|
* @default 0.5
|
|
80
81
|
* @type {number}
|
|
81
|
-
* @memberof
|
|
82
|
+
* @memberof PrecipitationProps
|
|
82
83
|
*
|
|
83
84
|
*/
|
|
84
85
|
randomness?: number;
|
|
@@ -87,7 +88,7 @@ export interface PrecipitationProps {
|
|
|
87
88
|
*
|
|
88
89
|
* @default false
|
|
89
90
|
* @type {boolean}
|
|
90
|
-
* @memberof
|
|
91
|
+
* @memberof PrecipitationProps
|
|
91
92
|
*
|
|
92
93
|
*/
|
|
93
94
|
depthWrite?: boolean;
|
|
@@ -95,7 +96,7 @@ export interface PrecipitationProps {
|
|
|
95
96
|
* show transparency on the drops texture.
|
|
96
97
|
*
|
|
97
98
|
* @type {boolean}
|
|
98
|
-
* @memberof
|
|
99
|
+
* @memberof PrecipitationProps
|
|
99
100
|
* @default true
|
|
100
101
|
*/
|
|
101
102
|
transparent?: boolean;
|
|
@@ -103,13 +104,13 @@ export interface PrecipitationProps {
|
|
|
103
104
|
* keep the same size regardless distance.
|
|
104
105
|
*
|
|
105
106
|
* @type {boolean}
|
|
106
|
-
* @memberof
|
|
107
|
+
* @memberof PrecipitationProps
|
|
107
108
|
* @default true
|
|
108
109
|
*/
|
|
109
110
|
sizeAttenuation?: boolean;
|
|
110
111
|
}
|
|
111
112
|
declare const _default: import('vue').DefineComponent<PrecipitationProps, {
|
|
112
|
-
instance: import('vue').ShallowRef<any>;
|
|
113
|
+
instance: import('vue').ShallowRef<any, any>;
|
|
113
114
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PrecipitationProps> & Readonly<{}>, {
|
|
114
115
|
alphaTest: number;
|
|
115
116
|
depthWrite: boolean;
|
|
@@ -119,8 +120,8 @@ declare const _default: import('vue').DefineComponent<PrecipitationProps, {
|
|
|
119
120
|
transparent: boolean;
|
|
120
121
|
size: number;
|
|
121
122
|
sizeAttenuation: boolean;
|
|
122
|
-
speed: number;
|
|
123
123
|
area: [number, number, number];
|
|
124
|
+
speed: number;
|
|
124
125
|
randomness: number;
|
|
125
126
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
126
127
|
export default _default;
|
|
@@ -32,7 +32,7 @@ export interface SkyProps {
|
|
|
32
32
|
distance?: number;
|
|
33
33
|
}
|
|
34
34
|
declare const _default: import('vue').DefineComponent<SkyProps, {
|
|
35
|
-
instance: import('vue').ShallowRef<SkyImpl | undefined>;
|
|
35
|
+
instance: import('vue').ShallowRef<SkyImpl | undefined, SkyImpl | undefined>;
|
|
36
36
|
sunPosition: Vector3;
|
|
37
37
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkyProps> & Readonly<{}>, {
|
|
38
38
|
distance: number;
|
|
@@ -66,7 +66,7 @@ export interface SmokeProps {
|
|
|
66
66
|
depthTest?: boolean;
|
|
67
67
|
}
|
|
68
68
|
declare const _default: import('vue').DefineComponent<SmokeProps, {
|
|
69
|
-
instance: import('vue').ShallowRef<any>;
|
|
69
|
+
instance: import('vue').ShallowRef<any, any>;
|
|
70
70
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SmokeProps> & Readonly<{}>, {
|
|
71
71
|
texture: string;
|
|
72
72
|
depthTest: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface SoftShadowsProps {
|
|
2
|
+
/** Size of the light source (the larger the softer the light), default: 25 */
|
|
3
|
+
size?: number;
|
|
4
|
+
/** Number of samples (more samples less noise but more expensive), default: 10 */
|
|
5
|
+
samples?: number;
|
|
6
|
+
/** Depth focus, use it to shift the focal point (where the shadow is the sharpest), default: 0 (the beginning) */
|
|
7
|
+
focus?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('vue').DefineComponent<SoftShadowsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SoftShadowsProps> & Readonly<{}>, {
|
|
10
|
+
focus: number;
|
|
11
|
+
samples: number;
|
|
12
|
+
size: number;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -7,7 +7,7 @@ export declare class ShaderData {
|
|
|
7
7
|
private resolution;
|
|
8
8
|
constructor(entries: ShaderDataEntry<any>[], resolution: number);
|
|
9
9
|
useTexture(): {
|
|
10
|
-
texture: import('vue').ShallowRef<DataTexture>;
|
|
10
|
+
texture: import('vue').ShallowRef<DataTexture, DataTexture>;
|
|
11
11
|
dispose: () => void;
|
|
12
12
|
yFor: Record<string, number>;
|
|
13
13
|
};
|
|
@@ -65,7 +65,7 @@ export interface StarsProps {
|
|
|
65
65
|
alphaMap?: null;
|
|
66
66
|
}
|
|
67
67
|
declare const _default: import('vue').DefineComponent<StarsProps, {
|
|
68
|
-
instance: import('vue').ShallowRef<any>;
|
|
68
|
+
instance: import('vue').ShallowRef<any, any>;
|
|
69
69
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StarsProps> & Readonly<{}>, {
|
|
70
70
|
alphaTest: number;
|
|
71
71
|
depth: number;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { default as Align } from './Align.vue';
|
|
1
2
|
import { default as Backdrop } from './Backdrop.vue';
|
|
2
3
|
import { default as ContactShadows } from './ContactShadows.vue';
|
|
3
4
|
import { default as Fit } from './Fit.vue';
|
|
5
|
+
import { default as Grid } from './Grid.vue';
|
|
4
6
|
import { default as Ocean } from './Ocean.vue';
|
|
5
7
|
import { default as Precipitation } from './Precipitation.vue';
|
|
6
8
|
import { default as Sky } from './Sky.vue';
|
|
7
9
|
import { default as Smoke } from './Smoke.vue';
|
|
10
|
+
import { default as SoftShadows } from './SoftShadows.vue';
|
|
8
11
|
import { default as Sparkles } from './Sparkles/component.vue';
|
|
9
12
|
import { default as Stars } from './Stars.vue';
|
|
10
13
|
import { default as Environment } from './useEnvironment/component.vue';
|
|
11
14
|
import { default as Lightformer } from './useEnvironment/lightformer/index.vue';
|
|
12
|
-
export { Backdrop, ContactShadows, Environment, Fit, Lightformer, Ocean, Precipitation, Sky, Smoke, Sparkles, Stars, };
|
|
15
|
+
export { Align, Backdrop, ContactShadows, Environment, Fit, Grid, Lightformer, Ocean, Precipitation, Sky, Smoke, SoftShadows, Sparkles, Stars, };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Object3D, Scene } from 'three';
|
|
2
|
-
declare class
|
|
2
|
+
declare class EnvironmentScene extends Object3D {
|
|
3
3
|
virtualScene: Scene;
|
|
4
4
|
constructor();
|
|
5
5
|
add(...object: Object3D[]): this;
|
|
6
|
-
|
|
6
|
+
dispose(): void;
|
|
7
7
|
}
|
|
8
|
-
export default
|
|
8
|
+
export default EnvironmentScene;
|
|
@@ -2,22 +2,29 @@ import { CubeTexture, Texture } from 'three';
|
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { EnvironmentOptions } from './const';
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
|
-
|
|
5
|
+
slots: {
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {
|
|
9
|
+
environmentScene: unknown;
|
|
10
|
+
};
|
|
11
|
+
attrs: Partial<{}>;
|
|
6
12
|
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
7
14
|
declare const __VLS_component: import('vue').DefineComponent<EnvironmentOptions, {
|
|
8
15
|
texture: Ref<Texture | CubeTexture | null, Texture | CubeTexture | null>;
|
|
9
16
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EnvironmentOptions> & Readonly<{}>, {
|
|
10
|
-
blur: number;
|
|
11
17
|
path: string;
|
|
12
18
|
near: number;
|
|
13
19
|
far: number;
|
|
20
|
+
blur: number;
|
|
14
21
|
background: boolean | string;
|
|
15
|
-
preset: import('./const').EnvironmentPresetsType;
|
|
16
|
-
files: string | string[];
|
|
17
22
|
resolution: number;
|
|
18
23
|
frames: number;
|
|
24
|
+
preset: import('./const').EnvironmentPresetsType;
|
|
25
|
+
files: string | string[];
|
|
19
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component,
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
28
|
export default _default;
|
|
22
29
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
30
|
new (): {
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { CubeTexture, Texture, WebGLCubeRenderTarget } from 'three';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { EnvironmentOptions } from './const';
|
|
4
|
+
/**
|
|
5
|
+
* Component that loads an environment map and sets it as the scene's background and environment.
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @param {Partial<EnvironmentOptions>} options - The options for the environment map
|
|
9
|
+
* files = ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png'],
|
|
10
|
+
* blur = 0,
|
|
11
|
+
* background = false,
|
|
12
|
+
* path = undefined,
|
|
13
|
+
* preset = undefined,
|
|
14
|
+
* colorSpace = undefined,
|
|
15
|
+
* @param {Ref<WebGLCubeRenderTarget | null>} fbo - The framebuffer object
|
|
16
|
+
* @return {Promise<Ref<Texture | CubeTexture | null>>} The loaded texture
|
|
17
|
+
*/
|
|
4
18
|
export declare function useEnvironment(options: Partial<EnvironmentOptions>, fbo: Ref<WebGLCubeRenderTarget | null>): Promise<Ref<Texture | CubeTexture | null>>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Texture } from 'three';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<{
|
|
3
3
|
args?: any[];
|
|
4
|
-
|
|
4
|
+
form?: "circle" | "ring" | "rect" | any;
|
|
5
5
|
toneMapped?: boolean;
|
|
6
6
|
map?: Texture;
|
|
7
7
|
intensity?: number;
|
|
8
8
|
color?: any;
|
|
9
|
-
}, {
|
|
9
|
+
}, {
|
|
10
|
+
mesh: import('vue').Ref<any, any>;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
10
12
|
args?: any[];
|
|
11
|
-
|
|
13
|
+
form?: "circle" | "ring" | "rect" | any;
|
|
12
14
|
toneMapped?: boolean;
|
|
13
15
|
map?: Texture;
|
|
14
16
|
intensity?: number;
|
|
@@ -19,6 +21,6 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
19
21
|
args: any[];
|
|
20
22
|
toneMapped: boolean;
|
|
21
23
|
intensity: number;
|
|
22
|
-
|
|
24
|
+
form: "circle" | "ring" | "rect" | any;
|
|
23
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
26
|
export default _default;
|