@tresjs/cientos 4.3.1 → 5.0.0-next.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 +14 -4
- package/dist/core/abstractions/Billboard.vue.d.ts +24 -6
- package/dist/core/abstractions/CubeCamera/component.vue.d.ts +14 -4
- package/dist/core/abstractions/Edges.vue.d.ts +14 -4
- package/dist/core/abstractions/GradientTexture.vue.d.ts +14 -1
- package/dist/core/abstractions/Image/ImageMaterial.vue.d.ts +3 -1
- package/dist/core/abstractions/Image/component.vue.d.ts +3 -9
- package/dist/core/abstractions/Lensflare/LensflareImpl.d.ts +23 -0
- package/dist/core/abstractions/Lensflare/component.vue.d.ts +12 -3
- package/dist/core/abstractions/Levioso.vue.d.ts +22 -16
- package/dist/core/abstractions/MarchingCubes/MarchingCube.vue.d.ts +22 -0
- package/dist/core/abstractions/MarchingCubes/MarchingCubes.vue.d.ts +35 -0
- package/dist/core/abstractions/MarchingCubes/MarchingPlane.vue.d.ts +20 -0
- package/dist/core/abstractions/MarchingCubes/const.d.ts +2 -0
- package/dist/core/abstractions/Mask/component.vue.d.ts +14 -4
- package/dist/core/abstractions/MouseParallax.vue.d.ts +11 -1
- package/dist/core/abstractions/Outline/component.vue.d.ts +11 -1
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +11 -2
- package/dist/core/abstractions/Reflector.vue.d.ts +5 -2
- package/dist/core/abstractions/ScreenSizer.vue.d.ts +24 -6
- package/dist/core/abstractions/ScreenSpace.vue.d.ts +14 -4
- package/dist/core/abstractions/Text3D.vue.d.ts +2 -17
- package/dist/core/abstractions/index.d.ts +4 -1
- package/dist/core/abstractions/useAnimations.d.ts +4 -4
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +14 -4
- package/dist/core/controls/CameraControls.vue.d.ts +4 -2
- package/dist/core/controls/Helper/component.vue.d.ts +17 -0
- package/dist/core/controls/Helper/useHelper.d.ts +9 -0
- package/dist/core/controls/MapControls.vue.d.ts +3 -1
- package/dist/core/controls/OrbitControls.vue.d.ts +3 -1
- package/dist/core/controls/PointerLockControls.vue.d.ts +3 -1
- package/dist/core/controls/ScrollControls.vue.d.ts +23 -18
- package/dist/core/controls/TransformControls.vue.d.ts +3 -1
- package/dist/core/controls/index.d.ts +2 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +10 -1
- package/dist/core/loaders/index.d.ts +4 -1
- package/dist/core/loaders/useGLTF/component.vue.d.ts +3 -10
- package/dist/core/loaders/useGLTF/index.d.ts +38 -27
- package/dist/core/loaders/useTexture/component.vue.d.ts +5077 -0
- package/dist/core/loaders/useTexture/index.d.ts +3 -0
- package/dist/core/loaders/useTextures/index.d.ts +13 -0
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +3 -1
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +7 -16
- package/dist/core/materials/index.d.ts +2 -1
- package/dist/core/materials/meshDiscardMaterial/index.vue.d.ts +3 -1
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +3 -1
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +4 -2
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +7 -7
- package/dist/core/materials/pointMaterial/component.vue.d.ts +8 -0
- package/dist/core/materials/pointMaterial/material.d.ts +4 -0
- package/dist/core/misc/LOD.vue.d.ts +52 -0
- package/dist/core/misc/html/HTML.vue.d.ts +25 -7
- package/dist/core/misc/index.d.ts +3 -1
- package/dist/core/misc/useIntersect.d.ts +9 -0
- package/dist/core/shapes/Box.vue.d.ts +14 -4
- package/dist/core/shapes/Circle.vue.d.ts +15 -5
- package/dist/core/shapes/Cone.vue.d.ts +14 -4
- package/dist/core/shapes/CubicBezierLine.vue.d.ts +49 -0
- package/dist/core/shapes/Cylinder.vue.d.ts +14 -4
- package/dist/core/shapes/Dodecahedron.vue.d.ts +14 -4
- package/dist/core/shapes/Icosahedron.vue.d.ts +14 -4
- package/dist/core/shapes/Octahedron.vue.d.ts +14 -4
- package/dist/core/shapes/Plane.vue.d.ts +15 -5
- package/dist/core/shapes/QuadraticBezierLine.vue.d.ts +48 -0
- package/dist/core/shapes/Ring.vue.d.ts +14 -4
- package/dist/core/shapes/RoundedBox.vue.d.ts +14 -4
- package/dist/core/shapes/ScreenQuad.vue.d.ts +38 -0
- package/dist/core/shapes/Sphere.vue.d.ts +14 -4
- package/dist/core/shapes/Superformula.vue.d.ts +14 -4
- package/dist/core/shapes/Tetrahedron.vue.d.ts +14 -4
- package/dist/core/shapes/Torus.vue.d.ts +14 -4
- package/dist/core/shapes/TorusKnot.vue.d.ts +14 -4
- package/dist/core/shapes/Tube.vue.d.ts +14 -4
- package/dist/core/shapes/index.d.ts +4 -1
- package/dist/core/staging/AccumulativeShadows/ProgressiveLightMap.d.ts +35 -0
- package/dist/core/staging/AccumulativeShadows/SoftShadowMaterial.d.ts +10 -0
- package/dist/core/staging/AccumulativeShadows/component.vue.d.ts +115 -0
- package/dist/core/staging/Align.vue.d.ts +42 -12
- package/dist/core/staging/Backdrop.vue.d.ts +23 -5
- package/dist/core/staging/Bounds/Bounds.d.ts +73 -0
- package/dist/core/staging/Bounds/component.vue.d.ts +60 -0
- package/dist/core/staging/CircleShadow.vue.d.ts +27 -0
- package/dist/core/staging/Fit.vue.d.ts +35 -9
- package/dist/core/staging/Grid.vue.d.ts +11 -2
- package/dist/core/staging/Ocean.vue.d.ts +6 -3
- package/dist/core/staging/Precipitation.vue.d.ts +18 -1
- package/dist/core/staging/RandomizedLights/RandomizedLights.d.ts +29 -0
- package/dist/core/staging/RandomizedLights/component.vue.d.ts +43 -0
- package/dist/core/staging/Smoke.vue.d.ts +18 -1
- package/dist/core/staging/Stage.vue.d.ts +677 -0
- package/dist/core/staging/Stars.vue.d.ts +11 -2
- package/dist/core/staging/index.d.ts +6 -1
- package/dist/core/staging/useEnvironment/component.vue.d.ts +7 -4
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +24 -13
- package/dist/trescientos.js +15333 -9636
- package/package.json +24 -24
- package/dist/composables/useLogger.d.ts +0 -8
- package/dist/core/loaders/useFBX/component.vue.d.ts +0 -45
- package/dist/core/staging/Sky.vue.d.ts +0 -46
- package/dist/core/staging/Sparkles/component.vue.d.ts +0 -168
- package/dist/trescientos.umd.cjs +0 -1721
|
@@ -1,39 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export interface GLTFLoaderOptions {
|
|
1
|
+
import { MaybeRef } from 'vue';
|
|
2
|
+
import { GLTF } from 'three-stdlib';
|
|
3
|
+
export interface UseGLTFOptions {
|
|
5
4
|
/**
|
|
6
|
-
* Whether to use
|
|
7
|
-
*
|
|
5
|
+
* Whether to use DRACO compression for loading the model
|
|
8
6
|
* @type {boolean}
|
|
9
|
-
* @memberof GLTFLoaderOptions
|
|
10
7
|
*/
|
|
11
8
|
draco?: boolean;
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* Path to the DRACO decoder. Defaults to https://www.gstatic.com/draco/versioned/decoders/1.5.6/
|
|
15
11
|
* @type {string}
|
|
16
|
-
* @memberof GLTFLoaderOptions
|
|
17
12
|
*/
|
|
18
13
|
decoderPath?: string;
|
|
19
14
|
}
|
|
20
|
-
export interface GLTFResult {
|
|
21
|
-
animations: Array<AnimationClip>;
|
|
22
|
-
nodes: Record<string, TresObject3D>;
|
|
23
|
-
materials: Record<string, Material>;
|
|
24
|
-
scene: Scene;
|
|
25
|
-
}
|
|
26
|
-
export interface TresGLTFLoaderType extends TresLoader<GLTF> {
|
|
27
|
-
setDRACOLoader?: (dracoLoader: DRACOLoader) => void;
|
|
28
|
-
}
|
|
29
15
|
/**
|
|
30
|
-
*
|
|
16
|
+
* Vue composable for loading GLTF models in TresJS
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This composable uses Three.js GLTFLoader under the hood and supports DRACO compression.
|
|
20
|
+
* When DRACO compression is enabled, it will use the specified decoder path or fallback to Google's CDN.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const { state: model } = useGLTF('/path/to/model.glb', { draco: true })
|
|
25
|
+
* ```
|
|
31
26
|
*
|
|
32
|
-
* @
|
|
33
|
-
* @
|
|
34
|
-
* @
|
|
35
|
-
* @param {GLTFLoaderOptions} [options] - Options for the loader
|
|
36
|
-
* @param {(loader: TresGLTFLoaderType) => void} [extendLoader] - Function to extend the loader
|
|
37
|
-
* @returns {Promise<T extends string[] ? GLTFResult[] : GLTFResult>} Promise that resolves with the loaded model(s)
|
|
27
|
+
* @param {MaybeRef<string>} path - Path to the GLTF model file
|
|
28
|
+
* @param {UseGLTFOptions} options - Options for loading the model
|
|
29
|
+
* @returns {{ state: GLTF, isLoading: boolean, execute: () => Promise<void> }} Object containing the model state, loading state and reload function
|
|
38
30
|
*/
|
|
39
|
-
export declare function useGLTF
|
|
31
|
+
export declare function useGLTF(path: MaybeRef<string>, options?: UseGLTFOptions): {
|
|
32
|
+
nodes: import('vue').ComputedRef<{
|
|
33
|
+
[name: string]: import('three').Object3D<import('three').Object3DEventMap>;
|
|
34
|
+
}>;
|
|
35
|
+
materials: import('vue').ComputedRef<{
|
|
36
|
+
[name: string]: import('three').Material;
|
|
37
|
+
}>;
|
|
38
|
+
state: import('vue').Ref<GLTF, GLTF>;
|
|
39
|
+
isReady: import('vue').Ref<boolean>;
|
|
40
|
+
isLoading: import('vue').Ref<boolean>;
|
|
41
|
+
error: import('vue').Ref<unknown>;
|
|
42
|
+
execute: (delay?: number, args_0: string) => Promise<GLTF>;
|
|
43
|
+
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>;
|
|
44
|
+
load: (path: string) => void;
|
|
45
|
+
progress: {
|
|
46
|
+
loaded: number;
|
|
47
|
+
total: number;
|
|
48
|
+
percentage: number;
|
|
49
|
+
};
|
|
50
|
+
};
|