@tresjs/cientos 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useLogger.d.ts +8 -0
- package/dist/core/Box.vue.d.ts +9 -7
- package/dist/core/Circle.vue.d.ts +9 -7
- package/dist/core/Cone.vue.d.ts +9 -7
- package/dist/core/Dodecahedron.vue.d.ts +9 -7
- package/dist/core/Icosahedron.vue.d.ts +9 -7
- package/dist/core/Octahedron.vue.d.ts +9 -7
- package/dist/core/OrbitControls.vue.d.ts +14 -21
- package/dist/core/Plane.vue.d.ts +9 -7
- package/dist/core/Ring.vue.d.ts +9 -7
- package/dist/core/Sphere.vue.d.ts +9 -7
- package/dist/core/Tetrahedron.vue.d.ts +9 -7
- package/dist/core/Text3D.vue.d.ts +50 -53
- package/dist/core/Torus.vue.d.ts +9 -7
- package/dist/core/TorusKnot.vue.d.ts +9 -7
- package/dist/core/TransformControls.vue.d.ts +28 -60
- package/dist/core/Tube.vue.d.ts +12 -8
- package/dist/core/useAnimations.d.ts +9 -0
- package/dist/core/useCientos.d.ts +8 -0
- package/dist/core/useEnvironment/component.d.ts +36 -0
- package/dist/core/useEnvironment/const.d.ts +44 -0
- package/dist/core/useEnvironment/index.d.ts +17 -0
- package/dist/core/useFBX/index.d.ts +7 -0
- package/dist/core/useGLTF/component.d.ts +24 -0
- package/dist/core/useGLTF/index.d.ts +25 -2
- package/dist/core/usePamCameraMouse/component.d.ts +26 -0
- package/dist/core/usePamCameraMouse/index.d.ts +2 -0
- package/dist/core/useTweakPane/index.d.ts +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/trescientos.js +5613 -4729
- package/dist/trescientos.umd.cjs +12 -8
- package/dist/utils/index.d.ts +18 -0
- package/dist/vite-env.d.ts +3 -0
- package/package.json +12 -12
- package/dist/env.d.ts +0 -20
- package/dist/types/index.d.ts +0 -5
package/dist/core/Torus.vue.d.ts
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { TresColor } from '@tresjs/core/dist/types';
|
|
1
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
4
|
args: {
|
|
3
|
-
type:
|
|
5
|
+
type: __PropType<number[] | undefined>;
|
|
4
6
|
required: false;
|
|
5
7
|
default: () => number[];
|
|
6
8
|
};
|
|
7
9
|
color: {
|
|
8
|
-
type:
|
|
10
|
+
type: __PropType<TresColor | undefined>;
|
|
9
11
|
required: false;
|
|
10
12
|
default: string;
|
|
11
13
|
};
|
|
12
14
|
}, {
|
|
13
|
-
|
|
15
|
+
value: import("vue").ShallowRef<any>;
|
|
14
16
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
17
|
args: {
|
|
16
|
-
type:
|
|
18
|
+
type: __PropType<number[] | undefined>;
|
|
17
19
|
required: false;
|
|
18
20
|
default: () => number[];
|
|
19
21
|
};
|
|
20
22
|
color: {
|
|
21
|
-
type:
|
|
23
|
+
type: __PropType<TresColor | undefined>;
|
|
22
24
|
required: false;
|
|
23
25
|
default: string;
|
|
24
26
|
};
|
|
25
27
|
}>>, {
|
|
26
|
-
args:
|
|
27
|
-
color:
|
|
28
|
+
args: number[] | undefined;
|
|
29
|
+
color: TresColor | undefined;
|
|
28
30
|
}>;
|
|
29
31
|
export default _sfc_main;
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { TresColor } from '@tresjs/core/dist/types';
|
|
1
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
4
|
args: {
|
|
3
|
-
type:
|
|
5
|
+
type: __PropType<number[] | undefined>;
|
|
4
6
|
required: false;
|
|
5
7
|
default: () => number[];
|
|
6
8
|
};
|
|
7
9
|
color: {
|
|
8
|
-
type:
|
|
10
|
+
type: __PropType<TresColor | undefined>;
|
|
9
11
|
required: false;
|
|
10
12
|
default: string;
|
|
11
13
|
};
|
|
12
14
|
}, {
|
|
13
|
-
|
|
15
|
+
value: import("vue").ShallowRef<any>;
|
|
14
16
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
17
|
args: {
|
|
16
|
-
type:
|
|
18
|
+
type: __PropType<number[] | undefined>;
|
|
17
19
|
required: false;
|
|
18
20
|
default: () => number[];
|
|
19
21
|
};
|
|
20
22
|
color: {
|
|
21
|
-
type:
|
|
23
|
+
type: __PropType<TresColor | undefined>;
|
|
22
24
|
required: false;
|
|
23
25
|
default: string;
|
|
24
26
|
};
|
|
25
27
|
}>>, {
|
|
26
|
-
args:
|
|
27
|
-
color:
|
|
28
|
+
args: number[] | undefined;
|
|
29
|
+
color: TresColor | undefined;
|
|
28
30
|
}>;
|
|
29
31
|
export default _sfc_main;
|
|
@@ -1,132 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { type Ref, ShallowRef } from 'vue';
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { Object3D, type Event } from 'three';
|
|
4
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
5
4
|
object: {
|
|
6
|
-
type:
|
|
5
|
+
type: __PropType<Object3D<Event>>;
|
|
7
6
|
required: true;
|
|
8
7
|
};
|
|
9
8
|
mode: {
|
|
10
|
-
type:
|
|
9
|
+
type: __PropType<string | undefined>;
|
|
11
10
|
required: false;
|
|
12
11
|
};
|
|
13
12
|
enabled: {
|
|
14
|
-
type:
|
|
13
|
+
type: __PropType<boolean | undefined>;
|
|
15
14
|
required: false;
|
|
16
15
|
default: boolean;
|
|
17
16
|
};
|
|
18
17
|
axis: {
|
|
19
|
-
type:
|
|
18
|
+
type: __PropType<"X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ" | undefined>;
|
|
20
19
|
required: false;
|
|
21
20
|
};
|
|
22
21
|
translationSnap: {
|
|
23
|
-
type:
|
|
22
|
+
type: __PropType<number | undefined>;
|
|
24
23
|
required: false;
|
|
25
24
|
};
|
|
26
25
|
rotationSnap: {
|
|
27
|
-
type:
|
|
26
|
+
type: __PropType<number | undefined>;
|
|
28
27
|
required: false;
|
|
29
28
|
};
|
|
30
29
|
scaleSnap: {
|
|
31
|
-
type:
|
|
30
|
+
type: __PropType<number | undefined>;
|
|
32
31
|
required: false;
|
|
33
32
|
};
|
|
34
33
|
space: {
|
|
35
|
-
type:
|
|
34
|
+
type: __PropType<"local" | "world" | undefined>;
|
|
36
35
|
required: false;
|
|
37
36
|
};
|
|
38
37
|
size: {
|
|
39
|
-
type:
|
|
38
|
+
type: __PropType<number | undefined>;
|
|
40
39
|
required: false;
|
|
41
40
|
};
|
|
42
41
|
showX: {
|
|
43
|
-
type:
|
|
42
|
+
type: __PropType<boolean | undefined>;
|
|
44
43
|
required: false;
|
|
45
44
|
};
|
|
46
45
|
showY: {
|
|
47
|
-
type:
|
|
46
|
+
type: __PropType<boolean | undefined>;
|
|
48
47
|
required: false;
|
|
49
48
|
};
|
|
50
49
|
showZ: {
|
|
51
|
-
type:
|
|
50
|
+
type: __PropType<boolean | undefined>;
|
|
52
51
|
required: false;
|
|
53
52
|
};
|
|
54
|
-
}, {
|
|
55
|
-
props: any;
|
|
56
|
-
emit: (event: "dragging" | "change" | "mouseDown" | "mouseUp" | "objectChange", ...args: any[]) => void;
|
|
57
|
-
controls: ShallowRef<TransformControlsImp<Camera> | undefined>;
|
|
58
|
-
camera: Ref<Camera> | undefined;
|
|
59
|
-
renderer: Ref<WebGLRenderer> | undefined;
|
|
60
|
-
scene: Ref<Scene> | undefined;
|
|
61
|
-
transformProps: import("vue").ComputedRef<Pick<{
|
|
62
|
-
object: Object3D;
|
|
63
|
-
mode?: string | undefined;
|
|
64
|
-
enabled: boolean;
|
|
65
|
-
axis?: "X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ" | undefined;
|
|
66
|
-
translationSnap?: number | undefined;
|
|
67
|
-
rotationSnap?: number | undefined;
|
|
68
|
-
scaleSnap?: number | undefined;
|
|
69
|
-
space?: "local" | "world" | undefined;
|
|
70
|
-
size?: number | undefined;
|
|
71
|
-
showX?: boolean | undefined;
|
|
72
|
-
showY?: boolean | undefined;
|
|
73
|
-
showZ?: boolean | undefined;
|
|
74
|
-
}, "mode" | "enabled" | "axis" | "translationSnap" | "rotationSnap" | "scaleSnap" | "space" | "size" | "showX" | "showY" | "showZ">>;
|
|
75
|
-
state: import("@tresjs/core").TresState;
|
|
76
|
-
onChange: () => void;
|
|
77
|
-
onMouseDown: () => void;
|
|
78
|
-
onMouseUp: () => void;
|
|
79
|
-
onObjectChange: () => void;
|
|
80
|
-
onDragingChange: (e: Event) => void;
|
|
81
|
-
addEventListeners: (controls: TransformControlsImp) => void;
|
|
82
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("dragging" | "change" | "mouseDown" | "mouseUp" | "objectChange")[], "dragging" | "change" | "mouseDown" | "mouseUp" | "objectChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("dragging" | "change" | "mouseDown" | "mouseUp" | "objectChange")[], "dragging" | "change" | "mouseDown" | "mouseUp" | "objectChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
83
54
|
object: {
|
|
84
|
-
type:
|
|
55
|
+
type: __PropType<Object3D<Event>>;
|
|
85
56
|
required: true;
|
|
86
57
|
};
|
|
87
58
|
mode: {
|
|
88
|
-
type:
|
|
59
|
+
type: __PropType<string | undefined>;
|
|
89
60
|
required: false;
|
|
90
61
|
};
|
|
91
62
|
enabled: {
|
|
92
|
-
type:
|
|
63
|
+
type: __PropType<boolean | undefined>;
|
|
93
64
|
required: false;
|
|
94
65
|
default: boolean;
|
|
95
66
|
};
|
|
96
67
|
axis: {
|
|
97
|
-
type:
|
|
68
|
+
type: __PropType<"X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ" | undefined>;
|
|
98
69
|
required: false;
|
|
99
70
|
};
|
|
100
71
|
translationSnap: {
|
|
101
|
-
type:
|
|
72
|
+
type: __PropType<number | undefined>;
|
|
102
73
|
required: false;
|
|
103
74
|
};
|
|
104
75
|
rotationSnap: {
|
|
105
|
-
type:
|
|
76
|
+
type: __PropType<number | undefined>;
|
|
106
77
|
required: false;
|
|
107
78
|
};
|
|
108
79
|
scaleSnap: {
|
|
109
|
-
type:
|
|
80
|
+
type: __PropType<number | undefined>;
|
|
110
81
|
required: false;
|
|
111
82
|
};
|
|
112
83
|
space: {
|
|
113
|
-
type:
|
|
84
|
+
type: __PropType<"local" | "world" | undefined>;
|
|
114
85
|
required: false;
|
|
115
86
|
};
|
|
116
87
|
size: {
|
|
117
|
-
type:
|
|
88
|
+
type: __PropType<number | undefined>;
|
|
118
89
|
required: false;
|
|
119
90
|
};
|
|
120
91
|
showX: {
|
|
121
|
-
type:
|
|
92
|
+
type: __PropType<boolean | undefined>;
|
|
122
93
|
required: false;
|
|
123
94
|
};
|
|
124
95
|
showY: {
|
|
125
|
-
type:
|
|
96
|
+
type: __PropType<boolean | undefined>;
|
|
126
97
|
required: false;
|
|
127
98
|
};
|
|
128
99
|
showZ: {
|
|
129
|
-
type:
|
|
100
|
+
type: __PropType<boolean | undefined>;
|
|
130
101
|
required: false;
|
|
131
102
|
};
|
|
132
103
|
}>> & {
|
|
@@ -136,9 +107,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
136
107
|
onMouseUp?: ((...args: any[]) => any) | undefined;
|
|
137
108
|
onObjectChange?: ((...args: any[]) => any) | undefined;
|
|
138
109
|
}, {
|
|
139
|
-
enabled: boolean;
|
|
140
|
-
showX: boolean;
|
|
141
|
-
showY: boolean;
|
|
142
|
-
showZ: boolean;
|
|
110
|
+
enabled: boolean | undefined;
|
|
143
111
|
}>;
|
|
144
112
|
export default _sfc_main;
|
package/dist/core/Tube.vue.d.ts
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { TresColor } from '@tresjs/core/dist/types';
|
|
3
|
+
import { CatmullRomCurve3, CubicBezierCurve3, LineCurve3, QuadraticBezierCurve3 } from 'three';
|
|
4
|
+
type CurveType = QuadraticBezierCurve3 | CubicBezierCurve3 | CatmullRomCurve3 | LineCurve3;
|
|
5
|
+
type TubeGeometryParams = [CurveType, number, number, number, boolean];
|
|
2
6
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
7
|
args: {
|
|
4
|
-
type:
|
|
8
|
+
type: __PropType<TubeGeometryParams | undefined>;
|
|
5
9
|
required: false;
|
|
6
10
|
default: () => (number | boolean | QuadraticBezierCurve3)[];
|
|
7
11
|
};
|
|
8
12
|
color: {
|
|
9
|
-
type:
|
|
13
|
+
type: __PropType<TresColor | undefined>;
|
|
10
14
|
required: false;
|
|
11
15
|
default: string;
|
|
12
16
|
};
|
|
13
17
|
}, {
|
|
14
|
-
|
|
18
|
+
value: import("vue").ShallowRef<any>;
|
|
15
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
20
|
args: {
|
|
17
|
-
type:
|
|
21
|
+
type: __PropType<TubeGeometryParams | undefined>;
|
|
18
22
|
required: false;
|
|
19
23
|
default: () => (number | boolean | QuadraticBezierCurve3)[];
|
|
20
24
|
};
|
|
21
25
|
color: {
|
|
22
|
-
type:
|
|
26
|
+
type: __PropType<TresColor | undefined>;
|
|
23
27
|
required: false;
|
|
24
28
|
default: string;
|
|
25
29
|
};
|
|
26
30
|
}>>, {
|
|
27
|
-
args:
|
|
28
|
-
color:
|
|
31
|
+
args: TubeGeometryParams | undefined;
|
|
32
|
+
color: TresColor | undefined;
|
|
29
33
|
}>;
|
|
30
34
|
export default _sfc_main;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { AnimationAction, AnimationClip, AnimationMixer, Object3D, Scene } from 'three';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Creates an AnimationMixer and returns it.
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @template T
|
|
8
|
+
* @param {T[]} animations
|
|
9
|
+
* @param {(Scene | Ref<Object3D | undefined | null>)} [modelRef]
|
|
10
|
+
* @return {*}
|
|
11
|
+
*/
|
|
3
12
|
export declare function useAnimations<T extends AnimationClip>(animations: T[], modelRef?: Scene | Ref<Object3D | undefined | null>): {
|
|
4
13
|
actions: import("vue").ShallowReactive<{
|
|
5
14
|
[key: string]: AnimationAction;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allows to use and extend the state of the core package.
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @return {*}
|
|
6
|
+
*/
|
|
1
7
|
export declare function useCientos(): {
|
|
8
|
+
state: import("@tresjs/core").TresState;
|
|
9
|
+
setState: (key: string, value: any) => void;
|
|
2
10
|
extend: (objects: any) => void;
|
|
3
11
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TextureEncoding } from 'three';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
export declare const Environment: import("vue").DefineComponent<{
|
|
4
|
+
background: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
blur: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
files: {
|
|
13
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
14
|
+
};
|
|
15
|
+
encoding: PropType<TextureEncoding>;
|
|
16
|
+
path: StringConstructor;
|
|
17
|
+
preset: PropType<"sunset">;
|
|
18
|
+
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
background: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
blur: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
files: {
|
|
28
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
29
|
+
};
|
|
30
|
+
encoding: PropType<TextureEncoding>;
|
|
31
|
+
path: StringConstructor;
|
|
32
|
+
preset: PropType<"sunset">;
|
|
33
|
+
}>>, {
|
|
34
|
+
background: boolean;
|
|
35
|
+
blur: number;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TextureEncoding } from 'three';
|
|
2
|
+
export type EnvironmentOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* If true, the environment will be set as the scene's background.
|
|
5
|
+
*
|
|
6
|
+
* @type {boolean}
|
|
7
|
+
*/
|
|
8
|
+
background?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The blur radius of the environment.
|
|
11
|
+
*
|
|
12
|
+
* @type {number}
|
|
13
|
+
*/
|
|
14
|
+
blur?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The files to load. If a string is provided, it will be loaded as an equirectangular texture.
|
|
17
|
+
* If an array is provided, it will be loaded as a cube texture.
|
|
18
|
+
*
|
|
19
|
+
* @type {(string | string[])}
|
|
20
|
+
*/
|
|
21
|
+
files?: string | string[];
|
|
22
|
+
/**
|
|
23
|
+
* The path to the files.
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
path?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The preset to use. If provided, the files and path props will be ignored.
|
|
30
|
+
*
|
|
31
|
+
* @type {EnvironmentPresetsType}
|
|
32
|
+
*/
|
|
33
|
+
preset?: EnvironmentPresetsType;
|
|
34
|
+
/**
|
|
35
|
+
* The encoding of the environment.
|
|
36
|
+
*
|
|
37
|
+
* @type {TextureEncoding}
|
|
38
|
+
*/
|
|
39
|
+
encoding?: TextureEncoding;
|
|
40
|
+
};
|
|
41
|
+
export declare const environmentPresets: {
|
|
42
|
+
sunset: string;
|
|
43
|
+
};
|
|
44
|
+
export type EnvironmentPresetsType = keyof typeof environmentPresets;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CubeTexture, Texture } from 'three';
|
|
2
|
+
import { EnvironmentOptions } from './const';
|
|
3
|
+
/**
|
|
4
|
+
* Component that loads an environment map and sets it as the scene's background and environment.
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @param {Partial<EnvironmentOptions>} {
|
|
8
|
+
* files = ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png'],
|
|
9
|
+
* blur = 0,
|
|
10
|
+
* background = false,
|
|
11
|
+
* path = undefined,
|
|
12
|
+
* preset = undefined,
|
|
13
|
+
* encoding = undefined,
|
|
14
|
+
* }
|
|
15
|
+
* @return {*} {(Promise<Texture | CubeTexture>)}
|
|
16
|
+
*/
|
|
17
|
+
export declare function useEnvironment({ files, blur, background, path, preset, encoding, }: Partial<EnvironmentOptions>): Promise<Texture | CubeTexture>;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Loads an FBX file and returns a THREE.Object3D.
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @param {(string | string[])} path
|
|
7
|
+
* @return {*} {Promise<Object3D>}
|
|
8
|
+
*/
|
|
2
9
|
export declare function useFBX(path: string | string[]): Promise<Object3D>;
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
export declare const GLTFModel: import("vue").DefineComponent<{
|
|
2
|
+
/**
|
|
3
|
+
* The path to the GLTF file.
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
2
6
|
path: StringConstructor;
|
|
7
|
+
/**
|
|
8
|
+
* Whether to use Draco compression.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
3
11
|
draco: BooleanConstructor;
|
|
12
|
+
/**
|
|
13
|
+
* The path to the Draco decoder.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
4
16
|
decoderPath: StringConstructor;
|
|
5
17
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
/**
|
|
19
|
+
* The path to the GLTF file.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
6
22
|
path: StringConstructor;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to use Draco compression.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
7
27
|
draco: BooleanConstructor;
|
|
28
|
+
/**
|
|
29
|
+
* The path to the Draco decoder.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
8
32
|
decoderPath: StringConstructor;
|
|
9
33
|
}>>, {
|
|
10
34
|
draco: boolean;
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import { GLTFLoader } from 'three-stdlib';
|
|
2
|
-
import {
|
|
2
|
+
import { Object3D } from 'three';
|
|
3
3
|
export interface GLTFLoaderOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Whether to use Draco compression.
|
|
6
|
+
*
|
|
7
|
+
* @type {boolean}
|
|
8
|
+
* @memberof GLTFLoaderOptions
|
|
9
|
+
*/
|
|
4
10
|
draco?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The path to the Draco decoder.
|
|
13
|
+
*
|
|
14
|
+
* @type {string}
|
|
15
|
+
* @memberof GLTFLoaderOptions
|
|
16
|
+
*/
|
|
5
17
|
decoderPath?: string;
|
|
6
18
|
}
|
|
7
19
|
export interface GLTFResult {
|
|
8
20
|
animations: Array<THREE.AnimationClip>;
|
|
9
|
-
nodes: Array<
|
|
21
|
+
nodes: Array<Object3D>;
|
|
10
22
|
materials: Array<THREE.Material>;
|
|
11
23
|
scene: THREE.Scene;
|
|
12
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Loads a GLTF file and returns a THREE.Object3D.
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @param {(string | string[])} path
|
|
30
|
+
* @param {GLTFLoaderOptions} [options={
|
|
31
|
+
* draco: false,
|
|
32
|
+
* }]
|
|
33
|
+
* @param {(loader: GLTFLoader) => void} [extendLoader]
|
|
34
|
+
* @return {*} {Promise<GLTFResult>}
|
|
35
|
+
*/
|
|
13
36
|
export declare function useGLTF(path: string | string[], options?: GLTFLoaderOptions, extendLoader?: (loader: GLTFLoader) => void): Promise<GLTFResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const PamCameraMouse: import("vue").DefineComponent<{
|
|
2
|
+
disabled: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
required: false;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
factor: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
required: false;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
disabled: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
required: false;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
factor: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
required: false;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
}>>, {
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
factor: number;
|
|
26
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import OrbitControls from './core/OrbitControls.vue';
|
|
2
2
|
import TransformControls from './core/TransformControls.vue';
|
|
3
|
+
import { PamCameraMouse } from './core/usePamCameraMouse/component';
|
|
3
4
|
import { useTweakPane } from './core/useTweakPane';
|
|
4
5
|
import { useAnimations } from './core/useAnimations';
|
|
5
6
|
import { GLTFModel } from './core/useGLTF/component';
|
|
@@ -18,7 +19,9 @@ import Tetrahedron from './core/Tetrahedron.vue';
|
|
|
18
19
|
import Icosahedron from './core/Icosahedron.vue';
|
|
19
20
|
import Octahedron from './core/Octahedron.vue';
|
|
20
21
|
import Dodecahedron from './core/Dodecahedron.vue';
|
|
22
|
+
import { Environment } from './core/useEnvironment/component';
|
|
21
23
|
export * from './core/useGLTF';
|
|
22
24
|
export * from './core/useFBX';
|
|
23
|
-
export * from './
|
|
24
|
-
export
|
|
25
|
+
export * from './core/useEnvironment';
|
|
26
|
+
export * from './core/usePamCameraMouse';
|
|
27
|
+
export { OrbitControls, TransformControls, useTweakPane, GLTFModel, FBXModel, Text3D, Plane, Box, Sphere, Torus, TorusKnot, Circle, Cone, Tube, Ring, Tetrahedron, Icosahedron, Octahedron, Dodecahedron, useAnimations, Environment, PamCameraMouse, };
|