@tresjs/cientos 3.7.0 → 3.9.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.
- package/README.md +7 -6
- package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
- package/dist/core/abstractions/Lensflare/RandUtils.d.ts +2 -2
- package/dist/core/abstractions/Lensflare/component.vue.d.ts +11 -10
- package/dist/core/abstractions/Lensflare/constants.d.ts +2 -1
- package/dist/core/abstractions/Lensflare/index.d.ts +5 -4
- package/dist/core/abstractions/Levioso.vue.d.ts +5 -5
- package/dist/core/abstractions/MouseParallax.vue.d.ts +16 -5
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
- package/dist/core/abstractions/Reflector.vue.d.ts +6 -5
- package/dist/core/abstractions/Text3D.vue.d.ts +3 -3
- package/dist/core/abstractions/index.d.ts +10 -8
- package/dist/core/abstractions/useAnimations.d.ts +4 -4
- package/dist/core/abstractions/useFBO/component.vue.d.ts +6 -5
- package/dist/core/abstractions/useFBO/index.d.ts +4 -4
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +5 -4
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +12 -6
- package/dist/core/controls/CameraControls.vue.d.ts +3251 -3161
- package/dist/core/controls/KeyboardControls.vue.d.ts +13 -13
- package/dist/core/controls/MapControls.vue.d.ts +4 -3
- package/dist/core/controls/OrbitControls.vue.d.ts +5188 -5116
- package/dist/core/controls/PointerLockControls.vue.d.ts +6 -5
- package/dist/core/controls/ScrollControls.vue.d.ts +8 -8
- package/dist/core/controls/TransformControls.vue.d.ts +6 -4
- package/dist/core/controls/index.d.ts +9 -8
- package/dist/core/directives/index.d.ts +1 -0
- package/dist/core/directives/vAlwaysLookAt.d.ts +2 -1
- package/dist/core/directives/vLightHelper.d.ts +3 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +13 -12
- package/dist/core/loaders/index.d.ts +4 -3
- package/dist/core/loaders/useFBX/component.vue.d.ts +45 -4
- package/dist/core/loaders/useFBX/index.d.ts +2 -1
- package/dist/core/loaders/useGLTF/component.vue.d.ts +36 -6
- package/dist/core/loaders/useProgress.d.ts +2 -1
- package/dist/core/loaders/useVideoTexture.d.ts +1 -0
- package/dist/core/materials/blurPass.d.ts +23 -0
- package/dist/core/materials/convolutionMaterial.d.ts +8 -0
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +3 -3
- package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +41 -0
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +86 -0
- package/dist/core/materials/holographicMaterial/material.d.ts +27 -0
- package/dist/core/materials/index.d.ts +7 -4
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +3 -3
- package/dist/core/materials/meshGlassMaterial/material.d.ts +2 -2
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +75 -0
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +51 -0
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +2 -2
- package/dist/core/materials/meshWobbleMaterial/material.d.ts +2 -2
- package/dist/core/misc/BakeShadows.d.ts +1 -0
- package/dist/core/misc/Stats.d.ts +2 -2
- package/dist/core/misc/StatsGl.d.ts +1 -1
- package/dist/core/misc/html/HTML.vue.d.ts +8 -7
- package/dist/core/misc/html/utils.d.ts +3 -3
- package/dist/core/misc/index.d.ts +5 -2
- package/dist/core/misc/useGLTFExporter.d.ts +13 -0
- package/dist/core/misc/useTweakPane/index.d.ts +3 -2
- package/dist/core/shapes/Box.vue.d.ts +7 -6
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +4 -3
- package/dist/core/shapes/Circle.vue.d.ts +7 -6
- package/dist/core/shapes/Cone.vue.d.ts +7 -6
- package/dist/core/shapes/Dodecahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Icosahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Line2.vue.d.ts +5 -4
- package/dist/core/shapes/Octahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Plane.vue.d.ts +7 -6
- package/dist/core/shapes/Ring.vue.d.ts +7 -6
- package/dist/core/shapes/RoundedBox.vue.d.ts +59 -0
- package/dist/core/shapes/Sphere.vue.d.ts +7 -6
- package/dist/core/shapes/Superformula.vue.d.ts +21 -20
- package/dist/core/shapes/Tetrahedron.vue.d.ts +7 -6
- package/dist/core/shapes/Torus.vue.d.ts +7 -6
- package/dist/core/shapes/TorusKnot.vue.d.ts +7 -6
- package/dist/core/shapes/Tube.vue.d.ts +8 -8
- package/dist/core/shapes/index.d.ts +19 -17
- package/dist/core/staging/Backdrop.vue.d.ts +2 -2
- package/dist/core/staging/Fit.vue.d.ts +56 -0
- package/dist/core/staging/Ocean.vue.d.ts +164 -0
- package/dist/core/staging/Precipitation.vue.d.ts +6 -5
- package/dist/core/staging/Sky.vue.d.ts +8 -2
- package/dist/core/staging/Smoke.vue.d.ts +6 -5
- package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +4 -4
- package/dist/core/staging/Sparkles/component.vue.d.ts +19 -19
- package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
- package/dist/core/staging/Stars.vue.d.ts +4 -4
- package/dist/core/staging/index.d.ts +13 -9
- package/dist/core/staging/useEnvironment/component.vue.d.ts +62 -0
- package/dist/core/staging/useEnvironment/const.d.ts +28 -0
- package/dist/core/staging/useEnvironment/envSence.d.ts +9 -0
- package/dist/core/staging/useEnvironment/index.d.ts +5 -3
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +56 -0
- package/dist/trescientos.js +8570 -5962
- package/dist/trescientos.umd.cjs +480 -117
- package/dist/utils/Gradient.d.ts +3 -2
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/types.d.ts +4 -0
- package/package.json +32 -29
- package/dist/core/loaders/useGLTF/index.d.ts +0 -36
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="https://www.npmjs.com/package/@tresjs/cientos"><img src="https://img.shields.io/npm/v/@tresjs/cientos/latest?color
|
|
4
|
+
<a href="https://www.npmjs.com/package/@tresjs/cientos"><img src="https://img.shields.io/npm/v/@tresjs/cientos/latest?color=FBB03B" alt="npm package"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@tresjs/cientos"><img src="https://img.shields.io/npm/dm/@tresjs/cientos?color=FBB03B" alt="npm downloads"></a>
|
|
5
6
|
<a href="https://discord.gg/UCr96AQmWn"><img src="https://img.shields.io/badge/chat-discord-purple?style=flat&logo=discord" alt="discord chat"></a>
|
|
6
7
|
</p>
|
|
7
8
|
<br/>
|
|
@@ -12,12 +13,12 @@
|
|
|
12
13
|
|
|
13
14
|
- 💡 Build a 3D scene working only with Vue components.
|
|
14
15
|
- ⚡️ Powered by Vite
|
|
15
|
-
- 🥰 It brings all the updated features of ThreeJS right
|
|
16
|
+
- 🥰 It brings all the updated features of ThreeJS right away regardless the version
|
|
16
17
|
- 🦾 Fully Typed
|
|
17
18
|
|
|
18
|
-
Cientos (Spanish word for "hundreds", pronounced /θjentos/ ) is
|
|
19
|
+
Cientos (the Spanish word for "hundreds", pronounced /θjentos/ ) is a collection of useful ready-to-go helpers and components that are not part of the core package. The name uses the word used in Spanish to multiply by 100, to refer to the potential reach of the package to hold an amazing abstraction.
|
|
19
20
|
|
|
20
|
-
The cientos package uses three-stdlib module under the hood instead of the three/examples/jsm module. This means that you don't need to extend the
|
|
21
|
+
The cientos package uses `three-stdlib` module under the hood instead of the three/examples/jsm module. This means that you don't need to extend the catalog of components using the extend method from the `core`, cientos does it for you.
|
|
21
22
|
|
|
22
23
|
It just works. 💯
|
|
23
24
|
|
|
@@ -49,9 +50,9 @@ pnpm run build
|
|
|
49
50
|
|
|
50
51
|
### Playground
|
|
51
52
|
|
|
52
|
-
To run the playground run,
|
|
53
|
+
To run the playground run, is a great way to test the components and helpers locally:
|
|
53
54
|
|
|
54
|
-
First install dependencies
|
|
55
|
+
First, install dependencies
|
|
55
56
|
|
|
56
57
|
```
|
|
57
58
|
pnpm i
|
|
@@ -47,4 +47,4 @@ export interface AudioProps {
|
|
|
47
47
|
*/
|
|
48
48
|
playbackRate?: number;
|
|
49
49
|
}
|
|
50
|
-
export declare const GlobalAudio: import(
|
|
50
|
+
export declare const GlobalAudio: import('vue').DefineComponent<AudioProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AudioProps>, {}, {}>;
|
|
@@ -6,8 +6,8 @@ export default class RandUtils {
|
|
|
6
6
|
private _getGenerator;
|
|
7
7
|
/**
|
|
8
8
|
* Create a new seeded pseudorandom number generator.
|
|
9
|
-
* @param [seed
|
|
10
|
-
* @param [getSeededRandomGenerator
|
|
9
|
+
* @param [seed] - the seed for the generator
|
|
10
|
+
* @param [getSeededRandomGenerator] - a function that returns a pseudorandom number generator
|
|
11
11
|
* @constructor
|
|
12
12
|
*/
|
|
13
13
|
constructor(seed?: number, getSeededRandomGenerator?: (seed: number) => () => number);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Lensflare } from 'three/examples/jsm/objects/Lensflare';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { Texture } from 'three';
|
|
3
|
+
import { TresColor } from '@tresjs/core';
|
|
4
|
+
import { LensflareElementProps, SeedProps } from '.';
|
|
5
|
+
|
|
5
6
|
export interface LensflareProps {
|
|
6
7
|
/**
|
|
7
8
|
* scale of the lensflare
|
|
@@ -12,8 +13,8 @@ export interface LensflareProps {
|
|
|
12
13
|
*/
|
|
13
14
|
elements?: Partial<LensflareElementProps>[];
|
|
14
15
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
* random seed for generating random seeded elements
|
|
17
|
+
*/
|
|
17
18
|
seed?: number;
|
|
18
19
|
/**
|
|
19
20
|
* specifications for generating random seeded elements
|
|
@@ -36,7 +37,7 @@ export interface LensflareProps {
|
|
|
36
37
|
*/
|
|
37
38
|
texture?: Texture | string[];
|
|
38
39
|
}
|
|
39
|
-
declare const _default: import(
|
|
40
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<LensflareProps>, {
|
|
40
41
|
scale: number;
|
|
41
42
|
elements: undefined;
|
|
42
43
|
seed: undefined;
|
|
@@ -46,8 +47,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
46
47
|
size: undefined;
|
|
47
48
|
texture: undefined;
|
|
48
49
|
}>, {
|
|
49
|
-
value: import(
|
|
50
|
-
}, unknown, {}, {}, import(
|
|
50
|
+
value: import('vue').ShallowRef<Lensflare | undefined>;
|
|
51
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<LensflareProps>, {
|
|
51
52
|
scale: number;
|
|
52
53
|
elements: undefined;
|
|
53
54
|
seed: undefined;
|
|
@@ -57,14 +58,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
57
58
|
size: undefined;
|
|
58
59
|
texture: undefined;
|
|
59
60
|
}>>>, {
|
|
60
|
-
color: import(
|
|
61
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
61
62
|
texture: string[] | Texture;
|
|
62
63
|
scale: number;
|
|
63
64
|
elements: Partial<LensflareElementProps>[];
|
|
65
|
+
distance: number;
|
|
64
66
|
size: number;
|
|
65
67
|
seed: number;
|
|
66
68
|
seedProps: SeedProps[];
|
|
67
|
-
distance: number;
|
|
68
69
|
}, {}>;
|
|
69
70
|
export default _default;
|
|
70
71
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LensflareElementProps, SeedProps } from '.';
|
|
2
|
+
|
|
2
3
|
export declare const TEXTURE_PATH = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/";
|
|
3
4
|
export declare const circle = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/circle.png";
|
|
4
5
|
export declare const circleBlur = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/circleBlur.png";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import Lensflare from './component.vue';
|
|
1
|
+
import { Texture } from 'three';
|
|
2
|
+
import { TresColor } from '@tresjs/core';
|
|
3
|
+
import { default as Lensflare } from './component.vue';
|
|
4
|
+
|
|
4
5
|
export { Lensflare };
|
|
5
6
|
export interface SeedProps {
|
|
6
7
|
texture: string[];
|
|
@@ -25,7 +26,7 @@ export interface SeedProps {
|
|
|
25
26
|
* @param seedProps - `undefined` or an array of SeedProps for generating random seeded properties
|
|
26
27
|
* @param systemDefaultElement - default values to "fill in" any remaining missing props
|
|
27
28
|
* @returns LensflareElementProps[] - An array of complete props
|
|
28
|
-
|
|
29
|
+
*/
|
|
29
30
|
export declare const partialLensflarePropsArrayToLensflarePropsArray: (elements: Partial<LensflareElementProps>[] | undefined, userDefaultElement: Partial<LensflareElementProps>, seed?: number | undefined, seedProps?: SeedProps[] | undefined, systemDefaultElement?: LensflareElementProps) => LensflareElementProps[];
|
|
30
31
|
export interface LensflareElementProps {
|
|
31
32
|
texture: Texture | string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
2
|
-
speed
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
speed?: number | undefined;
|
|
3
3
|
rotationFactor?: number | undefined;
|
|
4
4
|
floatFactor?: number | undefined;
|
|
5
5
|
range?: [number, number] | undefined;
|
|
@@ -9,9 +9,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
floatFactor: number;
|
|
10
10
|
range: () => number[];
|
|
11
11
|
}>, {
|
|
12
|
-
value: import(
|
|
13
|
-
}, unknown, {}, {}, import(
|
|
14
|
-
speed
|
|
12
|
+
value: import('vue').ShallowRef<any>;
|
|
13
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
14
|
+
speed?: number | undefined;
|
|
15
15
|
rotationFactor?: number | undefined;
|
|
16
16
|
floatFactor?: number | undefined;
|
|
17
17
|
range?: [number, number] | undefined;
|
|
@@ -13,29 +13,40 @@ export interface MouseParallaxProps {
|
|
|
13
13
|
* @default 2.5
|
|
14
14
|
* @memberof MouseParallaxProps
|
|
15
15
|
*
|
|
16
|
-
|
|
16
|
+
*/
|
|
17
17
|
factor?: number;
|
|
18
18
|
/**
|
|
19
|
-
* The factor to
|
|
19
|
+
* The factor to smooth the mouse movement by.
|
|
20
20
|
* @type {number}
|
|
21
21
|
* @default 2.5
|
|
22
22
|
* @memberof MouseParallaxProps
|
|
23
23
|
*
|
|
24
|
-
|
|
24
|
+
*/
|
|
25
25
|
ease?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to apply the parallax effect to the local canvas.
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
* @default false
|
|
30
|
+
* @memberof MouseParallaxProps
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
local?: boolean;
|
|
26
34
|
}
|
|
27
|
-
declare const _default: import(
|
|
35
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MouseParallaxProps>, {
|
|
28
36
|
disabled: boolean;
|
|
29
37
|
factor: number;
|
|
30
38
|
ease: number;
|
|
31
|
-
|
|
39
|
+
local: boolean;
|
|
40
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MouseParallaxProps>, {
|
|
32
41
|
disabled: boolean;
|
|
33
42
|
factor: number;
|
|
34
43
|
ease: number;
|
|
44
|
+
local: boolean;
|
|
35
45
|
}>>>, {
|
|
36
46
|
disabled: boolean;
|
|
37
47
|
factor: number;
|
|
38
48
|
ease: number;
|
|
49
|
+
local: boolean;
|
|
39
50
|
}, {}>;
|
|
40
51
|
export default _default;
|
|
41
52
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PositionalAudio } from 'three';
|
|
2
|
+
|
|
3
|
+
export interface PositionalAudioProps {
|
|
4
|
+
ready: boolean;
|
|
5
|
+
url: string;
|
|
6
|
+
distance?: number;
|
|
7
|
+
helper?: boolean;
|
|
8
|
+
loop?: boolean;
|
|
9
|
+
autoplay?: boolean;
|
|
10
|
+
innerAngle?: number;
|
|
11
|
+
outerAngle?: number;
|
|
12
|
+
outerGain?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PositionalAudioProps>, {
|
|
15
|
+
ready: boolean;
|
|
16
|
+
helper: boolean;
|
|
17
|
+
distance: number;
|
|
18
|
+
loop: boolean;
|
|
19
|
+
autoplay: boolean;
|
|
20
|
+
innerAngle: number;
|
|
21
|
+
outerAngle: number;
|
|
22
|
+
outerGain: number;
|
|
23
|
+
}>, {
|
|
24
|
+
root: import('vue').ShallowRef<PositionalAudio | null>;
|
|
25
|
+
play: () => void;
|
|
26
|
+
stop: () => void;
|
|
27
|
+
pause: () => void;
|
|
28
|
+
dispose: () => void;
|
|
29
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
isPlaying: (...args: any[]) => void;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PositionalAudioProps>, {
|
|
32
|
+
ready: boolean;
|
|
33
|
+
helper: boolean;
|
|
34
|
+
distance: number;
|
|
35
|
+
loop: boolean;
|
|
36
|
+
autoplay: boolean;
|
|
37
|
+
innerAngle: number;
|
|
38
|
+
outerAngle: number;
|
|
39
|
+
outerGain: number;
|
|
40
|
+
}>>> & {
|
|
41
|
+
onIsPlaying?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
ready: boolean;
|
|
44
|
+
distance: number;
|
|
45
|
+
helper: boolean;
|
|
46
|
+
loop: boolean;
|
|
47
|
+
autoplay: boolean;
|
|
48
|
+
innerAngle: number;
|
|
49
|
+
outerAngle: number;
|
|
50
|
+
outerGain: number;
|
|
51
|
+
}, {}>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
54
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
55
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
56
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
57
|
+
} : {
|
|
58
|
+
type: import('vue').PropType<T[K]>;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
type __VLS_WithDefaults<P, D> = {
|
|
63
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
64
|
+
default: D[K];
|
|
65
|
+
}> : P[K];
|
|
66
|
+
};
|
|
67
|
+
type __VLS_Prettify<T> = {
|
|
68
|
+
[K in keyof T]: T[K];
|
|
69
|
+
} & {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
2
|
import { Reflector } from 'three/examples/jsm/objects/Reflector.js';
|
|
3
|
+
|
|
3
4
|
export interface ReflectorProps {
|
|
4
5
|
/**
|
|
5
6
|
* The color of the reflector.
|
|
@@ -56,7 +57,7 @@ export interface ReflectorProps {
|
|
|
56
57
|
*/
|
|
57
58
|
shader?: object;
|
|
58
59
|
}
|
|
59
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
60
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ReflectorProps>, {
|
|
60
61
|
color: string;
|
|
61
62
|
textureWidth: number;
|
|
62
63
|
textureHeight: number;
|
|
@@ -64,8 +65,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
64
65
|
multisample: number;
|
|
65
66
|
shader: any;
|
|
66
67
|
}>, {
|
|
67
|
-
reflectorRef: import(
|
|
68
|
-
}, unknown, {}, {}, import(
|
|
68
|
+
reflectorRef: import('vue').ShallowRef<Reflector | undefined>;
|
|
69
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ReflectorProps>, {
|
|
69
70
|
color: string;
|
|
70
71
|
textureWidth: number;
|
|
71
72
|
textureHeight: number;
|
|
@@ -73,7 +74,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
73
74
|
multisample: number;
|
|
74
75
|
shader: any;
|
|
75
76
|
}>>>, {
|
|
76
|
-
color: import(
|
|
77
|
+
color: import('three').ColorRepresentation | [r: number, g: number, b: number];
|
|
77
78
|
textureWidth: number;
|
|
78
79
|
textureHeight: number;
|
|
79
80
|
clipBias: number;
|
|
@@ -114,7 +114,7 @@ export interface Text3DProps {
|
|
|
114
114
|
*/
|
|
115
115
|
needUpdates?: boolean;
|
|
116
116
|
}
|
|
117
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
117
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Text3DProps>, {
|
|
118
118
|
size: number;
|
|
119
119
|
height: number;
|
|
120
120
|
curveSegments: number;
|
|
@@ -126,8 +126,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
126
126
|
center: boolean;
|
|
127
127
|
needUpdates: boolean;
|
|
128
128
|
}>, {
|
|
129
|
-
value: import(
|
|
130
|
-
}, unknown, {}, {}, import(
|
|
129
|
+
value: import('vue').ShallowRef<any>;
|
|
130
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Text3DProps>, {
|
|
131
131
|
size: number;
|
|
132
132
|
height: number;
|
|
133
133
|
curveSegments: number;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import Text3D from './Text3D.vue';
|
|
1
|
+
import { default as Text3D } from './Text3D.vue';
|
|
2
2
|
import { useAnimations } from './useAnimations';
|
|
3
|
-
import Levioso from './Levioso.vue';
|
|
4
|
-
import Reflector from './Reflector.vue';
|
|
5
|
-
import MouseParallax from './MouseParallax.vue';
|
|
3
|
+
import { default as Levioso } from './Levioso.vue';
|
|
4
|
+
import { default as Reflector } from './Reflector.vue';
|
|
5
|
+
import { default as MouseParallax } from './MouseParallax.vue';
|
|
6
6
|
import { GlobalAudio } from './GlobalAudio';
|
|
7
|
-
import Lensflare from './Lensflare/component.vue';
|
|
8
|
-
import Fbo from './useFBO/component.vue';
|
|
9
|
-
import Sampler from './useSurfaceSampler/component.vue';
|
|
7
|
+
import { default as Lensflare } from './Lensflare/component.vue';
|
|
8
|
+
import { default as Fbo } from './useFBO/component.vue';
|
|
9
|
+
import { default as Sampler } from './useSurfaceSampler/component.vue';
|
|
10
|
+
import { default as PositionalAudio } from './PositionalAudio.vue';
|
|
11
|
+
|
|
10
12
|
export * from './useFBO/';
|
|
11
13
|
export * from './useSurfaceSampler';
|
|
12
14
|
export * from '../staging/useEnvironment';
|
|
13
|
-
export { Text3D, useAnimations, MouseParallax, Levioso, Reflector, Lensflare, GlobalAudio, Fbo, Sampler, };
|
|
15
|
+
export { Text3D, useAnimations, MouseParallax, Levioso, Reflector, Lensflare, GlobalAudio, Fbo, Sampler, PositionalAudio, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { AnimationAction, AnimationClip, Object3D, Scene, AnimationMixer } from 'three';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
|
|
4
4
|
/**
|
|
5
5
|
* Creates an AnimationMixer and returns it.
|
|
6
6
|
*
|
|
@@ -11,7 +11,7 @@ import type { Ref } from 'vue';
|
|
|
11
11
|
* @return {*}
|
|
12
12
|
*/
|
|
13
13
|
export declare function useAnimations<T extends AnimationClip>(animations: T[], modelRef?: Scene | Ref<Object3D | undefined | null>): {
|
|
14
|
-
actions: import(
|
|
14
|
+
actions: import('vue').ShallowReactive<{
|
|
15
15
|
[key: string]: AnimationAction;
|
|
16
16
|
}>;
|
|
17
17
|
mixer: AnimationMixer;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { FboOptions } from '.';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FboOptions>, {
|
|
3
4
|
depth: boolean;
|
|
4
5
|
settings: undefined;
|
|
5
6
|
}>, {
|
|
6
|
-
value: import(
|
|
7
|
-
}, unknown, {}, {}, import(
|
|
7
|
+
value: import('vue').Ref<import('three').WebGLRenderTarget<import('three').Texture> | null>;
|
|
8
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FboOptions>, {
|
|
8
9
|
depth: boolean;
|
|
9
10
|
settings: undefined;
|
|
10
11
|
}>>>, {
|
|
11
|
-
settings:
|
|
12
|
+
settings: any;
|
|
12
13
|
depth: boolean;
|
|
13
14
|
}, {}>;
|
|
14
15
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { WebGLRenderTargetOptions, WebGLRenderTarget } from 'three';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
|
|
4
4
|
export interface FboOptions {
|
|
5
5
|
width?: number;
|
|
6
6
|
height?: number;
|
|
7
7
|
depth?: boolean;
|
|
8
8
|
settings?: WebGLRenderTargetOptions;
|
|
9
9
|
}
|
|
10
|
-
export declare function useFBO(options: FboOptions): Ref<WebGLRenderTarget<import(
|
|
10
|
+
export declare function useFBO(options: FboOptions): Ref<WebGLRenderTarget<import('three').Texture> | null>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useSurfaceSamplerProps } from '.';
|
|
2
|
+
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<useSurfaceSamplerProps>, {
|
|
4
|
+
samplerRef: import('vue').Ref<any>;
|
|
5
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<useSurfaceSamplerProps>>>, {}, {}>, {
|
|
5
6
|
default?(_: {}): any;
|
|
6
7
|
}>;
|
|
7
8
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Color, InterleavedBuffer, Object3D, Vector3, InstancedMesh, Mesh } from 'three';
|
|
2
|
+
|
|
3
3
|
export interface useSurfaceSamplerProps {
|
|
4
4
|
transform?: TransformFn;
|
|
5
5
|
weight?: string;
|
|
@@ -37,7 +37,7 @@ type TransformPayload = SamplePayload & {
|
|
|
37
37
|
};
|
|
38
38
|
export type TransformFn = (payload: TransformPayload, i: number) => void;
|
|
39
39
|
export declare const useSurfaceSampler: (mesh: Mesh, count?: number, instanceMesh?: InstancedMesh | null, weight?: string, transform?: TransformFn) => {
|
|
40
|
-
buffer: import(
|
|
40
|
+
buffer: import('vue').Ref<{
|
|
41
41
|
array: {
|
|
42
42
|
[x: number]: number;
|
|
43
43
|
readonly BYTES_PER_ELEMENT: number;
|
|
@@ -589,19 +589,25 @@ export declare const useSurfaceSampler: (mesh: Mesh, count?: number, instanceMes
|
|
|
589
589
|
readonly [Symbol.toStringTag]: "Float64Array";
|
|
590
590
|
};
|
|
591
591
|
stride: number;
|
|
592
|
-
usage: import(
|
|
592
|
+
usage: import('three').Usage;
|
|
593
593
|
updateRange: {
|
|
594
594
|
offset: number;
|
|
595
595
|
count: number;
|
|
596
596
|
};
|
|
597
|
+
updateRanges: {
|
|
598
|
+
start: number;
|
|
599
|
+
count: number;
|
|
600
|
+
}[];
|
|
597
601
|
version: number;
|
|
598
602
|
count: number;
|
|
599
603
|
needsUpdate: boolean;
|
|
600
604
|
uuid: string;
|
|
601
605
|
set: (value: ArrayLike<number>, offset: number) => InterleavedBuffer;
|
|
602
|
-
setUsage: (value: import(
|
|
606
|
+
setUsage: (value: import('three').Usage) => InterleavedBuffer;
|
|
607
|
+
addUpdateRange: (start: number, count: number) => void;
|
|
608
|
+
clearUpdateRanges: () => void;
|
|
603
609
|
copy: (source: InterleavedBuffer) => InterleavedBuffer;
|
|
604
|
-
copyAt: (index1: number, attribute: import(
|
|
610
|
+
copyAt: (index1: number, attribute: import('three').InterleavedBufferAttribute, index2: number) => InterleavedBuffer;
|
|
605
611
|
clone: (data: {}) => InterleavedBuffer;
|
|
606
612
|
toJSON: (data: {}) => {
|
|
607
613
|
uuid: string;
|