@tresjs/cientos 4.0.0-next.0 → 4.0.0-rc.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.
Files changed (106) hide show
  1. package/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +38 -0
  2. package/dist/core/abstractions/AnimatedSprite/AtlasAnimationDefinitionParser.d.ts +10 -0
  3. package/dist/core/abstractions/AnimatedSprite/StringOps.d.ts +2 -0
  4. package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +130 -0
  5. package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
  6. package/dist/core/abstractions/Lensflare/RandUtils.d.ts +2 -2
  7. package/dist/core/abstractions/Lensflare/component.vue.d.ts +22 -21
  8. package/dist/core/abstractions/Lensflare/constants.d.ts +2 -1
  9. package/dist/core/abstractions/Lensflare/index.d.ts +5 -4
  10. package/dist/core/abstractions/Levioso.vue.d.ts +25 -23
  11. package/dist/core/abstractions/MouseParallax.vue.d.ts +31 -20
  12. package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
  13. package/dist/core/abstractions/Reflector.vue.d.ts +21 -18
  14. package/dist/core/abstractions/Text3D.vue.d.ts +138 -15
  15. package/dist/core/abstractions/index.d.ts +11 -8
  16. package/dist/core/abstractions/useAnimations.d.ts +4 -4
  17. package/dist/core/abstractions/useFBO/component.vue.d.ts +15 -14
  18. package/dist/core/abstractions/useFBO/index.d.ts +5 -5
  19. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +14 -11
  20. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +170 -142
  21. package/dist/core/controls/CameraControls.vue.d.ts +4147 -3862
  22. package/dist/core/controls/KeyboardControls.vue.d.ts +51 -97
  23. package/dist/core/controls/MapControls.vue.d.ts +9507 -13
  24. package/dist/core/controls/OrbitControls.vue.d.ts +5906 -5660
  25. package/dist/core/controls/PointerLockControls.vue.d.ts +15 -14
  26. package/dist/core/controls/ScrollControls.vue.d.ts +34 -30
  27. package/dist/core/controls/TransformControls.vue.d.ts +20 -14
  28. package/dist/core/controls/index.d.ts +9 -8
  29. package/dist/core/index.d.ts +0 -1
  30. package/dist/core/loaders/SVG/component.vue.d.ts +23 -22
  31. package/dist/core/loaders/index.d.ts +4 -3
  32. package/dist/core/loaders/useFBX/component.vue.d.ts +18 -18
  33. package/dist/core/loaders/useFBX/index.d.ts +2 -1
  34. package/dist/core/loaders/useGLTF/component.vue.d.ts +25 -25
  35. package/dist/core/loaders/useGLTF/index.d.ts +14 -9
  36. package/dist/core/loaders/useProgress.d.ts +2 -1
  37. package/dist/core/loaders/useVideoTexture.d.ts +1 -0
  38. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +7 -5
  39. package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +41 -0
  40. package/dist/core/materials/holographicMaterial/index.vue.d.ts +86 -0
  41. package/dist/core/materials/holographicMaterial/material.d.ts +27 -0
  42. package/dist/core/materials/index.d.ts +7 -5
  43. package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +3 -3
  44. package/dist/core/materials/meshGlassMaterial/material.d.ts +2 -2
  45. package/dist/core/materials/{blurPass.d.ts → meshReflectionMaterial/BlurPass.d.ts} +8 -6
  46. package/dist/core/materials/{convolutionMaterial.d.ts → meshReflectionMaterial/ConvolutionMaterial.d.ts} +1 -0
  47. package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +180 -49
  48. package/dist/core/materials/meshReflectionMaterial/material.d.ts +33 -36
  49. package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +17 -15
  50. package/dist/core/materials/meshWobbleMaterial/material.d.ts +2 -2
  51. package/dist/core/misc/BakeShadows.d.ts +1 -1
  52. package/dist/core/misc/Stats.d.ts +2 -2
  53. package/dist/core/misc/StatsGl.d.ts +1 -1
  54. package/dist/core/misc/html/HTML.vue.d.ts +22 -17
  55. package/dist/core/misc/html/utils.d.ts +3 -3
  56. package/dist/core/misc/index.d.ts +3 -3
  57. package/dist/core/misc/useGLTFExporter.d.ts +2 -1
  58. package/dist/core/shapes/Box.vue.d.ts +22 -19
  59. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +15 -12
  60. package/dist/core/shapes/Circle.vue.d.ts +22 -19
  61. package/dist/core/shapes/Cone.vue.d.ts +22 -19
  62. package/dist/core/shapes/Cylinder.vue.d.ts +60 -0
  63. package/dist/core/shapes/Dodecahedron.vue.d.ts +22 -19
  64. package/dist/core/shapes/Icosahedron.vue.d.ts +22 -19
  65. package/dist/core/shapes/Line2.vue.d.ts +16 -13
  66. package/dist/core/shapes/Octahedron.vue.d.ts +22 -19
  67. package/dist/core/shapes/Plane.vue.d.ts +22 -19
  68. package/dist/core/shapes/Ring.vue.d.ts +22 -19
  69. package/dist/core/shapes/RoundedBox.vue.d.ts +22 -19
  70. package/dist/core/shapes/Sphere.vue.d.ts +22 -19
  71. package/dist/core/shapes/Superformula.vue.d.ts +35 -32
  72. package/dist/core/shapes/Tetrahedron.vue.d.ts +22 -19
  73. package/dist/core/shapes/Torus.vue.d.ts +22 -19
  74. package/dist/core/shapes/TorusKnot.vue.d.ts +22 -19
  75. package/dist/core/shapes/Tube.vue.d.ts +22 -20
  76. package/dist/core/shapes/index.d.ts +20 -18
  77. package/dist/core/staging/Backdrop.vue.d.ts +18 -14
  78. package/dist/core/staging/ContactShadows.vue.d.ts +168 -0
  79. package/dist/core/staging/Fit.vue.d.ts +64 -0
  80. package/dist/core/staging/Ocean.vue.d.ts +26 -23
  81. package/dist/core/staging/Precipitation.vue.d.ts +21 -18
  82. package/dist/core/staging/Sky.vue.d.ts +14 -13
  83. package/dist/core/staging/Smoke.vue.d.ts +18 -17
  84. package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
  85. package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +7 -7
  86. package/dist/core/staging/Sparkles/component.vue.d.ts +33 -31
  87. package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
  88. package/dist/core/staging/Stars.vue.d.ts +16 -16
  89. package/dist/core/staging/index.d.ts +13 -10
  90. package/dist/core/staging/useEnvironment/component.vue.d.ts +64 -0
  91. package/dist/core/staging/useEnvironment/const.d.ts +28 -0
  92. package/dist/core/staging/useEnvironment/envSence.d.ts +9 -0
  93. package/dist/core/staging/useEnvironment/index.d.ts +5 -3
  94. package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +56 -0
  95. package/dist/trescientos.js +7318 -6360
  96. package/dist/trescientos.umd.cjs +566 -428
  97. package/dist/utils/Gradient.d.ts +3 -2
  98. package/dist/utils/index.d.ts +1 -0
  99. package/dist/utils/types.d.ts +4 -0
  100. package/package.json +29 -29
  101. package/dist/core/directives/index.d.ts +0 -5
  102. package/dist/core/directives/vAlwaysLookAt.d.ts +0 -4
  103. package/dist/core/directives/vDistanceTo.d.ts +0 -4
  104. package/dist/core/directives/vLightHelper.d.ts +0 -5
  105. package/dist/core/directives/vLog.d.ts +0 -3
  106. package/dist/core/misc/useTweakPane/index.d.ts +0 -10
@@ -1,4 +1,5 @@
1
- import type { Camera } from 'three';
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("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PointerLockControlsProps>, {
39
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<PointerLockControlsProps>, {
39
40
  makeDefault: boolean;
40
41
  }>, {
41
- value: import("vue").Ref<(import("three").EventDispatcher<{}> & {
42
+ instance: import('vue').Ref<(import('three').EventDispatcher<{}> & {
42
43
  enabled: boolean;
43
44
  }) | null>;
44
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
45
46
  change: (...args: any[]) => void;
46
47
  isLock: (...args: any[]) => void;
47
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PointerLockControlsProps>, {
48
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<PointerLockControlsProps>, {
48
49
  makeDefault: boolean;
49
50
  }>>> & {
50
51
  onChange?: ((...args: any[]) => any) | undefined;
@@ -53,15 +54,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
53
54
  makeDefault: boolean;
54
55
  }, {}>;
55
56
  export default _default;
56
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
57
- type __VLS_TypePropsToRuntimeProps<T> = {
58
- [K in keyof T]-?: {} extends Pick<T, K> ? {
59
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
60
- } : {
61
- type: import('vue').PropType<T[K]>;
62
- required: true;
63
- };
64
- };
65
57
  type __VLS_WithDefaults<P, D> = {
66
58
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
67
59
  default: D[K];
@@ -70,3 +62,12 @@ type __VLS_WithDefaults<P, D> = {
70
62
  type __VLS_Prettify<T> = {
71
63
  [K in keyof T]: T[K];
72
64
  } & {};
65
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
66
+ type __VLS_TypePropsToOption<T> = {
67
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
68
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
69
+ } : {
70
+ type: import('vue').PropType<T[K]>;
71
+ required: true;
72
+ };
73
+ };
@@ -2,7 +2,7 @@ export interface ScrollControlsProps {
2
2
  /**
3
3
  * The scroll size.
4
4
  *
5
- * @type {Number}
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 {Number}
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 {Number}
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 {Boolean}
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 {Boolean}
37
+ * @type {boolean}
38
38
  * @default false
39
39
  * @memberof ScrollControlsProps
40
40
  */
41
41
  htmlScroll?: boolean;
42
42
  }
43
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
44
- pages?: number | undefined;
45
- distance?: number | undefined;
46
- smoothScroll?: number | undefined;
47
- horizontal?: boolean | undefined;
48
- htmlScroll?: boolean | undefined;
43
+ declare function __VLS_template(): {
44
+ default?(_: {}): any;
45
+ };
46
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
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
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
58
- pages?: number | undefined;
59
- distance?: number | undefined;
60
- smoothScroll?: number | undefined;
61
- horizontal?: boolean | undefined;
62
- htmlScroll?: boolean | undefined;
62
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
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,19 +79,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
74
79
  smoothScroll: number;
75
80
  horizontal: boolean;
76
81
  htmlScroll: boolean;
77
- }, {}>, {
78
- default?(_: {}): any;
79
- }>;
82
+ }, {}>;
83
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
80
84
  export default _default;
81
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
82
- type __VLS_TypePropsToRuntimeProps<T> = {
83
- [K in keyof T]-?: {} extends Pick<T, K> ? {
84
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
85
- } : {
86
- type: import('vue').PropType<T[K]>;
87
- required: true;
88
- };
89
- };
90
85
  type __VLS_WithDefaults<P, D> = {
91
86
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
92
87
  default: D[K];
@@ -100,3 +95,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
100
95
  $slots: S;
101
96
  };
102
97
  };
98
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
99
+ type __VLS_TypePropsToOption<T> = {
100
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
101
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
102
+ } : {
103
+ type: import('vue').PropType<T[K]>;
104
+ required: true;
105
+ };
106
+ };
@@ -1,6 +1,10 @@
1
- import type { Object3D } from 'three';
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("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TransformControlsProps>, {
20
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<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
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TransformControlsProps>, {
37
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<TransformControlsProps>, {
32
38
  mode: string;
33
39
  enabled: boolean;
34
40
  axis: string;
@@ -47,22 +53,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
47
53
  size: number;
48
54
  enabled: boolean;
49
55
  mode: string;
50
- axis: "XYZ" | "X" | "Y" | "Z" | "XY" | "YZ" | "XZ";
56
+ axis: "X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ";
51
57
  space: "local" | "world";
52
58
  showX: boolean;
53
59
  showY: boolean;
54
60
  showZ: boolean;
55
61
  }, {}>;
56
62
  export default _default;
57
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
58
- type __VLS_TypePropsToRuntimeProps<T> = {
59
- [K in keyof T]-?: {} extends Pick<T, K> ? {
60
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
61
- } : {
62
- type: import('vue').PropType<T[K]>;
63
- required: true;
64
- };
65
- };
66
63
  type __VLS_WithDefaults<P, D> = {
67
64
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
68
65
  default: D[K];
@@ -71,3 +68,12 @@ type __VLS_WithDefaults<P, D> = {
71
68
  type __VLS_Prettify<T> = {
72
69
  [K in keyof T]: T[K];
73
70
  } & {};
71
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
72
+ type __VLS_TypePropsToOption<T> = {
73
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
74
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
75
+ } : {
76
+ type: import('vue').PropType<T[K]>;
77
+ required: true;
78
+ };
79
+ };
@@ -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
- export { OrbitControls, TransformControls, PointerLockControls, MapControls, KeyboardControls, ScrollControls, CameraControls, };
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, };
@@ -5,4 +5,3 @@ export * from './materials';
5
5
  export * from './shapes';
6
6
  export * from './staging';
7
7
  export * from './misc';
8
- export * from './directives';
@@ -1,5 +1,6 @@
1
- import type { TresOptions } from '@tresjs/core';
2
- import type { MeshBasicMaterialParameters } from 'three';
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,31 +91,22 @@ interface SVGProps {
90
91
  */
91
92
  depth?: 'renderOrder' | 'flat' | 'offsetZ' | number;
92
93
  }
93
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SVGProps>, {
94
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SVGProps>, {
94
95
  skipStrokes: boolean;
95
96
  skipFills: boolean;
96
97
  depth: string;
97
98
  }>, {
98
- value: import("vue").ShallowRef<any>;
99
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SVGProps>, {
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_TypePropsToOption<SVGProps>, {
100
101
  skipStrokes: boolean;
101
102
  skipFills: boolean;
102
103
  depth: string;
103
104
  }>>>, {
104
- depth: number | "flat" | "renderOrder" | "offsetZ";
105
+ depth: "renderOrder" | "flat" | "offsetZ" | number;
105
106
  skipStrokes: boolean;
106
107
  skipFills: boolean;
107
108
  }, {}>;
108
109
  export default _default;
109
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
110
- type __VLS_TypePropsToRuntimeProps<T> = {
111
- [K in keyof T]-?: {} extends Pick<T, K> ? {
112
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
113
- } : {
114
- type: import('vue').PropType<T[K]>;
115
- required: true;
116
- };
117
- };
118
110
  type __VLS_WithDefaults<P, D> = {
119
111
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
120
112
  default: D[K];
@@ -123,3 +115,12 @@ type __VLS_WithDefaults<P, D> = {
123
115
  type __VLS_Prettify<T> = {
124
116
  [K in keyof T]: T[K];
125
117
  } & {};
118
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
119
+ type __VLS_TypePropsToOption<T> = {
120
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
121
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
122
+ } : {
123
+ type: import('vue').PropType<T[K]>;
124
+ required: true;
125
+ };
126
+ };
@@ -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("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
31
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
32
32
  path: string;
33
- castShadow?: boolean | undefined;
34
- receiveShadow?: boolean | undefined;
33
+ castShadow?: boolean;
34
+ receiveShadow?: boolean;
35
35
  }>, {
36
36
  castShadow: boolean;
37
37
  receiveShadow: boolean;
38
38
  }>, {
39
- value: import("vue").Ref<any>;
40
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
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_TypePropsToOption<{
41
41
  path: string;
42
- castShadow?: boolean | undefined;
43
- receiveShadow?: boolean | undefined;
42
+ castShadow?: boolean;
43
+ receiveShadow?: boolean;
44
44
  }>, {
45
45
  castShadow: boolean;
46
46
  receiveShadow: boolean;
@@ -49,15 +49,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
49
49
  receiveShadow: boolean;
50
50
  }, {}>;
51
51
  export default _default;
52
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
53
- type __VLS_TypePropsToRuntimeProps<T> = {
54
- [K in keyof T]-?: {} extends Pick<T, K> ? {
55
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
56
- } : {
57
- type: import('vue').PropType<T[K]>;
58
- required: true;
59
- };
60
- };
61
52
  type __VLS_WithDefaults<P, D> = {
62
53
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
63
54
  default: D[K];
@@ -66,3 +57,12 @@ type __VLS_WithDefaults<P, D> = {
66
57
  type __VLS_Prettify<T> = {
67
58
  [K in keyof T]: T[K];
68
59
  } & {};
60
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
61
+ type __VLS_TypePropsToOption<T> = {
62
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
63
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
64
+ } : {
65
+ type: import('vue').PropType<T[K]>;
66
+ required: true;
67
+ };
68
+ };
@@ -1,4 +1,5 @@
1
- import type { Object3D } from 'three';
1
+ import { Object3D } from 'three';
2
+
2
3
  /**
3
4
  * Loads an FBX file and returns a THREE.Object3D.
4
5
  *
@@ -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("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
53
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
54
54
  path: string;
55
- draco?: boolean | undefined;
56
- decoderPath?: string | undefined;
57
- castShadow?: boolean | undefined;
58
- receiveShadow?: boolean | undefined;
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
- value: import("vue").Ref<any>;
66
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
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_TypePropsToOption<{
67
67
  path: string;
68
- draco?: boolean | undefined;
69
- decoderPath?: string | undefined;
70
- castShadow?: boolean | undefined;
71
- receiveShadow?: boolean | undefined;
68
+ draco?: boolean;
69
+ decoderPath?: string;
70
+ castShadow?: boolean;
71
+ receiveShadow?: boolean;
72
72
  }>, {
73
73
  draco: boolean;
74
74
  castShadow: boolean;
@@ -81,15 +81,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
81
81
  decoderPath: string;
82
82
  }, {}>;
83
83
  export default _default;
84
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
85
- type __VLS_TypePropsToRuntimeProps<T> = {
86
- [K in keyof T]-?: {} extends Pick<T, K> ? {
87
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
88
- } : {
89
- type: import('vue').PropType<T[K]>;
90
- required: true;
91
- };
92
- };
93
84
  type __VLS_WithDefaults<P, D> = {
94
85
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
95
86
  default: D[K];
@@ -98,3 +89,12 @@ type __VLS_WithDefaults<P, D> = {
98
89
  type __VLS_Prettify<T> = {
99
90
  [K in keyof T]: T[K];
100
91
  } & {};
92
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
93
+ type __VLS_TypePropsToOption<T> = {
94
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
95
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
96
+ } : {
97
+ type: import('vue').PropType<T[K]>;
98
+ required: true;
99
+ };
100
+ };
@@ -1,5 +1,7 @@
1
- import { GLTFLoader } from 'three-stdlib';
2
- import type { TresObject3D } from '@tresjs/core';
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<THREE.AnimationClip>;
22
+ animations: Array<AnimationClip>;
21
23
  nodes: Record<string, TresObject3D>;
22
- materials: Record<string, THREE.Material>;
23
- scene: THREE.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
- * draco: false,
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: GLTFLoader) => void): Promise<T extends string[] ? GLTFResult[] : GLTFResult>;
41
+ export declare function useGLTF<T extends string | string[]>(path: T, options?: GLTFLoaderOptions, extendLoader?: (loader: TresGLTFLoader) => void): Promise<T extends string[] ? GLTFResult[] : GLTFResult>;
@@ -1,4 +1,5 @@
1
- import type { Ref } from 'vue';
1
+ import { Ref } from 'vue';
2
+
2
3
  export declare function useProgress(): Promise<{
3
4
  hasFinishLoading: Ref<boolean>;
4
5
  progress: Ref<number>;
@@ -1,4 +1,5 @@
1
1
  import { VideoTexture } from 'three';
2
+
2
3
  interface VideoTextureProps extends HTMLVideoElement {
3
4
  unsuspend?: 'canplay' | 'canplaythrough' | 'loadstart' | 'loadedmetadata';
4
5
  start?: boolean;