@tresjs/cientos 1.3.0 → 1.5.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.
@@ -0,0 +1,29 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{
2
+ args: {
3
+ type: ArrayConstructor;
4
+ required: false;
5
+ default: () => number[];
6
+ };
7
+ color: {
8
+ type: null;
9
+ required: false;
10
+ default: string;
11
+ };
12
+ }, {
13
+ planeRef: import("vue").ShallowRef<any>;
14
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ args: {
16
+ type: ArrayConstructor;
17
+ required: false;
18
+ default: () => number[];
19
+ };
20
+ color: {
21
+ type: null;
22
+ required: false;
23
+ default: string;
24
+ };
25
+ }>>, {
26
+ args: unknown[];
27
+ color: any;
28
+ }>;
29
+ export default _sfc_main;
@@ -0,0 +1,8 @@
1
+ import { AnimationAction, AnimationClip, AnimationMixer, Object3D, Scene } from 'three';
2
+ import { Ref } from 'vue';
3
+ export declare function useAnimations<T extends AnimationClip>(animations: T[], modelRef?: Scene | Ref<Object3D | undefined | null>): {
4
+ actions: import("vue").ShallowReactive<{
5
+ [key: string]: AnimationAction;
6
+ }>;
7
+ mixer: AnimationMixer;
8
+ };
@@ -0,0 +1,11 @@
1
+ export declare const FBXModel: import("vue").DefineComponent<{
2
+ path: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ }, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ path: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ }>>, {}>;
@@ -0,0 +1,2 @@
1
+ import { Object3D } from 'three';
2
+ export declare function useFBX(path: string | string[]): Promise<Object3D>;
@@ -1,14 +1,11 @@
1
1
  import { GLTFLoader } from 'three-stdlib';
2
- import { Object3D } from 'three';
2
+ import { TresObject } from '../../types';
3
3
  export interface GLTFLoaderOptions {
4
4
  draco?: boolean;
5
5
  decoderPath?: string;
6
6
  }
7
- export interface TresObject extends Object3D {
8
- geometry: THREE.BufferGeometry;
9
- material: THREE.Material;
10
- }
11
7
  export interface GLTFResult {
8
+ animations: Array<THREE.AnimationClip>;
12
9
  nodes: Array<TresObject>;
13
10
  materials: Array<THREE.Material>;
14
11
  scene: THREE.Scene;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  import OrbitControls from './core/OrbitControls.vue';
2
2
  import TransformControls from './core/TransformControls.vue';
3
3
  import { useTweakPane } from './core/useTweakPane';
4
+ import { useAnimations } from './core/useAnimations';
4
5
  import { GLTFModel } from './core/useGLTF/component';
6
+ import { FBXModel } from './core/useFBX/component';
5
7
  import Text3D from './core/Text3D.vue';
8
+ import Plane from './core/Plane.vue';
6
9
  export * from './core/useGLTF';
7
- export { OrbitControls, TransformControls, useTweakPane, GLTFModel, Text3D };
10
+ export * from './core/useFBX';
11
+ export * from './types';
12
+ export { OrbitControls, TransformControls, useTweakPane, GLTFModel, FBXModel, Text3D, Plane, useAnimations };