@tresjs/cientos 5.0.0-next.5 → 5.0.0-next.6

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.
@@ -1,51 +0,0 @@
1
- import { TresObject } from '@tresjs/core';
2
- import { MaybeRef } from 'vue';
3
- import { GLTF } from 'three-stdlib';
4
- export interface UseGLTFOptions {
5
- /**
6
- * Whether to use DRACO compression for loading the model
7
- * @type {boolean}
8
- */
9
- draco?: boolean;
10
- /**
11
- * Path to the DRACO decoder. Defaults to https://www.gstatic.com/draco/versioned/decoders/1.5.6/
12
- * @type {string}
13
- */
14
- decoderPath?: string;
15
- }
16
- /**
17
- * Vue composable for loading GLTF models in TresJS
18
- *
19
- * @remarks
20
- * This composable uses Three.js GLTFLoader under the hood and supports DRACO compression.
21
- * When DRACO compression is enabled, it will use the specified decoder path or fallback to Google's CDN.
22
- *
23
- * @example
24
- * ```ts
25
- * const { state: model } = useGLTF('/path/to/model.glb', { draco: true })
26
- * ```
27
- *
28
- * @param {MaybeRef<string>} path - Path to the GLTF model file
29
- * @param {UseGLTFOptions} options - Options for loading the model
30
- * @returns {{ state: GLTF, isLoading: boolean, execute: () => Promise<void> }} Object containing the model state, loading state and reload function
31
- */
32
- export declare function useGLTF(path: MaybeRef<string>, options?: UseGLTFOptions): {
33
- nodes: import('vue').ComputedRef<{
34
- [name: string]: TresObject;
35
- }>;
36
- materials: import('vue').ComputedRef<{
37
- [name: string]: import('@tresjs/core').TresMaterial;
38
- }>;
39
- state: import('vue').Ref<GLTF, GLTF>;
40
- isReady: import('vue').Ref<boolean>;
41
- isLoading: import('vue').Ref<boolean>;
42
- error: import('vue').Ref<unknown>;
43
- execute: (delay?: number, args_0: string) => Promise<GLTF>;
44
- then<TResult1 = import('@vueuse/core').UseAsyncStateReturnBase<GLTF, [string], true>, TResult2 = never>(onfulfilled?: ((value: import('@vueuse/core').UseAsyncStateReturnBase<GLTF, [string], true>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): PromiseLike<TResult1 | TResult2>;
45
- load: (path: string) => void;
46
- progress: {
47
- loaded: number;
48
- total: number;
49
- percentage: number;
50
- };
51
- };
@@ -1,74 +0,0 @@
1
- import { MaybeRef } from 'vue';
2
- import { BufferGeometry, MeshBasicMaterialParameters } from 'three';
3
- import { SVGResult } from 'three-stdlib';
4
- export interface UseSVGOptions {
5
- /**
6
- * Whether to skip rendering strokes
7
- * @type {boolean}
8
- * @default false
9
- */
10
- skipStrokes?: boolean;
11
- /**
12
- * Whether to skip rendering fills
13
- * @type {boolean}
14
- * @default false
15
- */
16
- skipFills?: boolean;
17
- /**
18
- * Fill material properties
19
- * @type {MeshBasicMaterialParameters}
20
- */
21
- fillMaterial?: MeshBasicMaterialParameters;
22
- /**
23
- * Stroke material properties
24
- * @type {MeshBasicMaterialParameters}
25
- */
26
- strokeMaterial?: MeshBasicMaterialParameters;
27
- /**
28
- * Depth type - how should the resulting meshes be rendered?
29
- * 'renderOrder' disables depthWrite and sets renderOrder of each layer
30
- * 'flat' disables depthWrite on materials
31
- * 'offsetZ' enables depthWrite and inserts small distance between layers
32
- * number is treated same as 'offsetZ' using the number as distance
33
- * @type {'renderOrder' | 'flat' | 'offsetZ' | number}
34
- * @default 'renderOrder'
35
- */
36
- depth?: 'renderOrder' | 'flat' | 'offsetZ' | number;
37
- }
38
- export interface SVGLayer {
39
- geometry: BufferGeometry;
40
- material: MeshBasicMaterialParameters;
41
- isStroke: boolean;
42
- }
43
- /**
44
- * Vue composable for loading SVG files in TresJS
45
- *
46
- * @remarks
47
- * This composable uses Three.js SVGLoader under the hood to load and process SVG files
48
- * into geometries and materials that can be rendered in a 3D scene.
49
- *
50
- * @example
51
- * ```ts
52
- * const { state: svg, layers } = useSVG('/path/to/file.svg', { skipStrokes: false })
53
- * ```
54
- *
55
- * @param {MaybeRef<string>} path - Path to the SVG file or SVG data string
56
- * @param {UseSVGOptions} options - Options for processing the SVG
57
- * @returns Object containing the SVG state, loading state, processed layers and disposal function
58
- */
59
- export declare function useSVG(path: MaybeRef<string>, options?: UseSVGOptions): {
60
- layers: import('vue').ComputedRef<SVGLayer[]>;
61
- dispose: () => void;
62
- state: import('vue').Ref<SVGResult, SVGResult>;
63
- isReady: import('vue').Ref<boolean>;
64
- isLoading: import('vue').Ref<boolean>;
65
- error: import('vue').Ref<unknown>;
66
- execute: (delay?: number, args_0: string) => Promise<SVGResult>;
67
- then<TResult1 = import('@vueuse/core').UseAsyncStateReturnBase<SVGResult, [string], true>, TResult2 = never>(onfulfilled?: ((value: import('@vueuse/core').UseAsyncStateReturnBase<SVGResult, [string], true>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): PromiseLike<TResult1 | TResult2>;
68
- load: (path: string) => void;
69
- progress: {
70
- loaded: number;
71
- total: number;
72
- percentage: number;
73
- };
74
- };