@tresjs/cientos 5.1.0 → 5.1.2
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/trescientos.d.ts +11587 -0
- package/dist/trescientos.js +11796 -60020
- package/package.json +11 -17
- package/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +0 -37
- package/dist/core/abstractions/AnimatedSprite/AtlasAnimationDefinitionParser.d.ts +0 -10
- package/dist/core/abstractions/AnimatedSprite/StringOps.d.ts +0 -2
- package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +0 -107
- package/dist/core/abstractions/Billboard.vue.d.ts +0 -79
- package/dist/core/abstractions/CubeCamera/component.vue.d.ts +0 -49
- package/dist/core/abstractions/CubeCamera/useCubeCamera.d.ts +0 -24
- package/dist/core/abstractions/Edges.vue.d.ts +0 -46
- package/dist/core/abstractions/GlobalAudio.d.ts +0 -50
- package/dist/core/abstractions/GradientTexture.vue.d.ts +0 -60
- package/dist/core/abstractions/Image/ImageMaterial.vue.d.ts +0 -6
- package/dist/core/abstractions/Image/ImageMaterialImpl.d.ts +0 -8
- package/dist/core/abstractions/Image/component.vue.d.ts +0 -75
- package/dist/core/abstractions/Lensflare/LensflareImpl.d.ts +0 -23
- package/dist/core/abstractions/Lensflare/RandUtils.d.ts +0 -68
- package/dist/core/abstractions/Lensflare/component.vue.d.ts +0 -60
- package/dist/core/abstractions/Lensflare/constants.d.ts +0 -20
- package/dist/core/abstractions/Lensflare/index.d.ts +0 -36
- package/dist/core/abstractions/Levioso.vue.d.ts +0 -48
- package/dist/core/abstractions/MarchingCubes/MarchingCube.vue.d.ts +0 -22
- package/dist/core/abstractions/MarchingCubes/MarchingCubes.vue.d.ts +0 -35
- package/dist/core/abstractions/MarchingCubes/MarchingPlane.vue.d.ts +0 -20
- package/dist/core/abstractions/MarchingCubes/const.d.ts +0 -2
- package/dist/core/abstractions/Mask/component.vue.d.ts +0 -50
- package/dist/core/abstractions/Mask/useMask.d.ts +0 -9
- package/dist/core/abstractions/MouseParallax.vue.d.ts +0 -51
- package/dist/core/abstractions/Outline/OutlineMaterialImpl.d.ts +0 -4
- package/dist/core/abstractions/Outline/component.vue.d.ts +0 -44
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +0 -42
- package/dist/core/abstractions/Reflector.vue.d.ts +0 -88
- package/dist/core/abstractions/ScreenSizer.vue.d.ts +0 -53
- package/dist/core/abstractions/ScreenSpace.vue.d.ts +0 -42
- package/dist/core/abstractions/Text3D.vue.d.ts +0 -164
- package/dist/core/abstractions/index.d.ts +0 -28
- package/dist/core/abstractions/useAnimations.d.ts +0 -19
- package/dist/core/abstractions/useFBO/component.vue.d.ts +0 -9
- package/dist/core/abstractions/useFBO/index.d.ts +0 -17
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +0 -38
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +0 -1412
- package/dist/core/controls/CameraControls.vue.d.ts +0 -306
- package/dist/core/controls/Helper/component.vue.d.ts +0 -16
- package/dist/core/controls/Helper/useHelper.d.ts +0 -10
- package/dist/core/controls/KeyboardControls.vue.d.ts +0 -58
- package/dist/core/controls/MapControls.vue.d.ts +0 -260
- package/dist/core/controls/OrbitControls.vue.d.ts +0 -285
- package/dist/core/controls/PointerLockControls.vue.d.ts +0 -51
- package/dist/core/controls/ScrollControls.vue.d.ts +0 -96
- package/dist/core/controls/TransformControls.vue.d.ts +0 -44
- package/dist/core/controls/index.d.ts +0 -9
- package/dist/core/index.d.ts +0 -7
- package/dist/core/loaders/index.d.ts +0 -12
- package/dist/core/loaders/useFBX/component.vue.d.ts +0 -38
- package/dist/core/loaders/useFBX/index.d.ts +0 -32
- package/dist/core/loaders/useGLTF/component.vue.d.ts +0 -61
- package/dist/core/loaders/useGLTF/index.d.ts +0 -43
- package/dist/core/loaders/useProgress.d.ts +0 -6
- package/dist/core/loaders/useSVG/component.vue.d.ts +0 -101
- package/dist/core/loaders/useSVG/index.d.ts +0 -65
- package/dist/core/loaders/useTexture/component.vue.d.ts +0 -5134
- package/dist/core/loaders/useTexture/index.d.ts +0 -3
- package/dist/core/loaders/useTextures/index.d.ts +0 -13
- package/dist/core/loaders/useVideoTexture.d.ts +0 -28
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +0 -16
- package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +0 -41
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +0 -35
- package/dist/core/materials/holographicMaterial/material.d.ts +0 -27
- package/dist/core/materials/index.d.ts +0 -8
- package/dist/core/materials/meshDiscardMaterial/index.vue.d.ts +0 -6
- package/dist/core/materials/meshDiscardMaterial/material.d.ts +0 -4
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +0 -6
- package/dist/core/materials/meshGlassMaterial/material.d.ts +0 -37
- package/dist/core/materials/meshReflectionMaterial/BlurPass.d.ts +0 -23
- package/dist/core/materials/meshReflectionMaterial/ConvolutionMaterial.d.ts +0 -7
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +0 -113
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +0 -47
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +0 -13
- package/dist/core/materials/meshWobbleMaterial/material.d.ts +0 -21
- package/dist/core/materials/pointMaterial/component.vue.d.ts +0 -8
- package/dist/core/materials/pointMaterial/material.d.ts +0 -4
- package/dist/core/misc/BakeShadows.d.ts +0 -1
- package/dist/core/misc/LOD.vue.d.ts +0 -52
- package/dist/core/misc/Stats.d.ts +0 -13
- package/dist/core/misc/StatsGl.d.ts +0 -10
- package/dist/core/misc/html/HTML.vue.d.ts +0 -82
- package/dist/core/misc/html/utils.d.ts +0 -17
- package/dist/core/misc/index.d.ts +0 -8
- package/dist/core/misc/useGLTFExporter.d.ts +0 -12
- package/dist/core/misc/useIntersect.d.ts +0 -9
- package/dist/core/shapes/Box.vue.d.ts +0 -61
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +0 -30
- package/dist/core/shapes/Circle.vue.d.ts +0 -60
- package/dist/core/shapes/Cone.vue.d.ts +0 -60
- package/dist/core/shapes/CubicBezierLine.vue.d.ts +0 -49
- package/dist/core/shapes/Cylinder.vue.d.ts +0 -60
- package/dist/core/shapes/Dodecahedron.vue.d.ts +0 -60
- package/dist/core/shapes/Icosahedron.vue.d.ts +0 -60
- package/dist/core/shapes/Line2.vue.d.ts +0 -32
- package/dist/core/shapes/Octahedron.vue.d.ts +0 -60
- package/dist/core/shapes/Plane.vue.d.ts +0 -60
- package/dist/core/shapes/QuadraticBezierLine.vue.d.ts +0 -48
- package/dist/core/shapes/Ring.vue.d.ts +0 -60
- package/dist/core/shapes/RoundedBox.vue.d.ts +0 -61
- package/dist/core/shapes/ScreenQuad.vue.d.ts +0 -38
- package/dist/core/shapes/Sphere.vue.d.ts +0 -61
- package/dist/core/shapes/Superformula.vue.d.ts +0 -79
- package/dist/core/shapes/Tetrahedron.vue.d.ts +0 -60
- package/dist/core/shapes/Torus.vue.d.ts +0 -60
- package/dist/core/shapes/TorusKnot.vue.d.ts +0 -60
- package/dist/core/shapes/Tube.vue.d.ts +0 -60
- package/dist/core/shapes/index.d.ts +0 -22
- package/dist/core/staging/AccumulativeShadows/ProgressiveLightMap.d.ts +0 -35
- package/dist/core/staging/AccumulativeShadows/SoftShadowMaterial.d.ts +0 -10
- package/dist/core/staging/AccumulativeShadows/component.vue.d.ts +0 -115
- package/dist/core/staging/Align.vue.d.ts +0 -117
- package/dist/core/staging/Backdrop.vue.d.ts +0 -63
- package/dist/core/staging/Bounds/Bounds.d.ts +0 -73
- package/dist/core/staging/Bounds/component.vue.d.ts +0 -60
- package/dist/core/staging/CircleShadow.vue.d.ts +0 -27
- package/dist/core/staging/ContactShadows.vue.d.ts +0 -124
- package/dist/core/staging/Fit.vue.d.ts +0 -96
- package/dist/core/staging/Grid.vue.d.ts +0 -61
- package/dist/core/staging/Ocean.vue.d.ts +0 -133
- package/dist/core/staging/Precipitation.vue.d.ts +0 -144
- package/dist/core/staging/RandomizedLights/RandomizedLights.d.ts +0 -29
- package/dist/core/staging/RandomizedLights/component.vue.d.ts +0 -43
- package/dist/core/staging/Sky.vue.d.ts +0 -46
- package/dist/core/staging/Smoke.vue.d.ts +0 -97
- package/dist/core/staging/SoftShadows.vue.d.ts +0 -14
- package/dist/core/staging/Sparkles/ShaderData.d.ts +0 -37
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +0 -42
- package/dist/core/staging/Sparkles/component.vue.d.ts +0 -168
- package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +0 -2
- package/dist/core/staging/Stage.vue.d.ts +0 -677
- package/dist/core/staging/Stars.vue.d.ts +0 -88
- package/dist/core/staging/index.d.ts +0 -20
- package/dist/core/staging/useEnvironment/EnvironmentScene.d.ts +0 -8
- package/dist/core/staging/useEnvironment/component.vue.d.ts +0 -38
- package/dist/core/staging/useEnvironment/const.d.ts +0 -116
- package/dist/core/staging/useEnvironment/index.d.ts +0 -23
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +0 -37
- package/dist/index.d.ts +0 -2
- package/dist/utils/Gradient.d.ts +0 -10
- package/dist/utils/calculateScaleFactor.d.ts +0 -7
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/easing.d.ts +0 -5
- package/dist/utils/index.d.ts +0 -22
- package/dist/utils/shaderMaterial.d.ts +0 -6
- package/dist/utils/types.d.ts +0 -3
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { TresObject } from '@tresjs/core';
|
|
2
|
-
import { ComputedRef, MaybeRef, Ref } 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
|
-
* A traverse function applied to the scene upon loading the model.
|
|
17
|
-
* @type {Function}
|
|
18
|
-
*/
|
|
19
|
-
traverse?: (child: TresObject) => void;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Vue composable for loading GLTF models in TresJS
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* This composable uses Three.js GLTFLoader under the hood and supports DRACO compression.
|
|
26
|
-
* When DRACO compression is enabled, it will use the specified decoder path or fallback to Google's CDN.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const { state: model } = useGLTF('/path/to/model.glb', { draco: true })
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @param {MaybeRef<string>} path - Path to the GLTF model file
|
|
34
|
-
* @param {UseGLTFOptions} options - Options for loading the model
|
|
35
|
-
* @returns {{ state: GLTF, isLoading: boolean, execute: () => Promise<void> }} Object containing the model state, loading state and reload function
|
|
36
|
-
*/
|
|
37
|
-
export declare function useGLTF(path: MaybeRef<string>, options?: UseGLTFOptions): {
|
|
38
|
-
state: Ref<GLTF | null>;
|
|
39
|
-
isLoading: Ref<boolean>;
|
|
40
|
-
execute: (delay?: number, ...args: any[]) => Promise<GLTF>;
|
|
41
|
-
nodes: ComputedRef<Record<string, any>>;
|
|
42
|
-
materials: ComputedRef<Record<string, any>>;
|
|
43
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { TresOptions } from '@tresjs/core';
|
|
2
|
-
import { MeshBasicMaterialParameters } from 'three';
|
|
3
|
-
interface SVGProps {
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* The SVG data or path to an SVG file
|
|
7
|
-
*
|
|
8
|
-
* @type {string}
|
|
9
|
-
* @required
|
|
10
|
-
* @memberof SVGProps
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
src: string;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* Whether to draw strokes
|
|
17
|
-
*
|
|
18
|
-
* @type {boolean}
|
|
19
|
-
* @default false
|
|
20
|
-
* @memberof SVGProps
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
skipStrokes?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* Whether to draw fills
|
|
27
|
-
*
|
|
28
|
-
* @type {boolean}
|
|
29
|
-
* @default false
|
|
30
|
-
* @memberof SVGProps
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
skipFills?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* Fill material properties
|
|
37
|
-
*
|
|
38
|
-
* @type {MeshBasicMaterialParameters}
|
|
39
|
-
* @default undefined
|
|
40
|
-
* @memberof SVGProps
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
fillMaterial?: MeshBasicMaterialParameters;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* Stroke material properties
|
|
47
|
-
*
|
|
48
|
-
* @type {MeshBasicMaterialParameters}
|
|
49
|
-
* @default undefined
|
|
50
|
-
* @memberof SVGProps
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
strokeMaterial?: MeshBasicMaterialParameters;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* Fill Mesh properties
|
|
57
|
-
*
|
|
58
|
-
* @type {TresOptions}
|
|
59
|
-
* @default undefined
|
|
60
|
-
* @memberof SVGProps
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
fillMeshProps?: TresOptions;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* Stroke Mesh properties
|
|
67
|
-
*
|
|
68
|
-
* @type {TresOptions}
|
|
69
|
-
* @default undefined
|
|
70
|
-
* @memberof SVGProps
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
strokeMeshProps?: TresOptions;
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* Depth type
|
|
77
|
-
* How should the resulting meshes and materials be rendered?
|
|
78
|
-
* 'renderOrder' disables `depthWrite` and sets the `renderOrder` of each layer.
|
|
79
|
-
* 'flat' disables `depthWrite` on materials.
|
|
80
|
-
* 'offsetZ' enables `depthWrite` and inserts a small distance between each layer on the z-axis to avoid z-fighting.
|
|
81
|
-
* number is treated the same as 'offsetZ'; the number is used as the distance between layers
|
|
82
|
-
*
|
|
83
|
-
* depthWrite documentation: https://threejs.org/docs/#api/en/materials/Material.depthWrite
|
|
84
|
-
* renderOrder documentation: https://threejs.org/docs/?q=mesh#api/en/core/Object3D.renderOrder
|
|
85
|
-
*
|
|
86
|
-
* @type { 'renderOrder' | 'flat' | 'offsetZ' | number }
|
|
87
|
-
* @default 'renderOrder'
|
|
88
|
-
* @memberof SVGProps
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
depth?: 'renderOrder' | 'flat' | 'offsetZ' | number;
|
|
92
|
-
}
|
|
93
|
-
declare const _default: import('vue').DefineComponent<SVGProps, {
|
|
94
|
-
instance: import('vue').Ref<import('three-stdlib').SVGResult | null, import('three-stdlib').SVGResult | null>;
|
|
95
|
-
layers: import('vue').ComputedRef<import('.').SVGLayer[]>;
|
|
96
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SVGProps> & Readonly<{}>, {
|
|
97
|
-
depth: "renderOrder" | "flat" | "offsetZ" | number;
|
|
98
|
-
skipStrokes: boolean;
|
|
99
|
-
skipFills: boolean;
|
|
100
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
101
|
-
export default _default;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, MaybeRef, Ref } 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
|
-
state: Ref<SVGResult | null>;
|
|
61
|
-
isLoading: Ref<boolean>;
|
|
62
|
-
execute: (delay?: number, ...args: any[]) => Promise<SVGResult>;
|
|
63
|
-
layers: ComputedRef<SVGLayer[]>;
|
|
64
|
-
dispose: () => void;
|
|
65
|
-
};
|