@tresjs/cientos 4.0.0-next.0 → 4.0.0-rc.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/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +38 -0
- package/dist/core/abstractions/AnimatedSprite/AtlasAnimationDefinitionParser.d.ts +10 -0
- package/dist/core/abstractions/AnimatedSprite/StringOps.d.ts +2 -0
- package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +130 -0
- 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 +22 -21
- 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 +25 -23
- package/dist/core/abstractions/MouseParallax.vue.d.ts +31 -20
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
- package/dist/core/abstractions/Reflector.vue.d.ts +21 -18
- package/dist/core/abstractions/Text3D.vue.d.ts +138 -15
- package/dist/core/abstractions/index.d.ts +11 -8
- package/dist/core/abstractions/useAnimations.d.ts +4 -4
- package/dist/core/abstractions/useFBO/component.vue.d.ts +15 -14
- package/dist/core/abstractions/useFBO/index.d.ts +5 -5
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +14 -11
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +170 -142
- package/dist/core/controls/CameraControls.vue.d.ts +4147 -3862
- package/dist/core/controls/KeyboardControls.vue.d.ts +51 -97
- package/dist/core/controls/MapControls.vue.d.ts +9507 -13
- package/dist/core/controls/OrbitControls.vue.d.ts +5906 -5660
- package/dist/core/controls/PointerLockControls.vue.d.ts +15 -14
- package/dist/core/controls/ScrollControls.vue.d.ts +34 -30
- package/dist/core/controls/TransformControls.vue.d.ts +20 -14
- package/dist/core/controls/index.d.ts +9 -8
- package/dist/core/index.d.ts +0 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +23 -22
- package/dist/core/loaders/index.d.ts +4 -3
- package/dist/core/loaders/useFBX/component.vue.d.ts +18 -18
- package/dist/core/loaders/useFBX/index.d.ts +2 -1
- package/dist/core/loaders/useGLTF/component.vue.d.ts +25 -25
- package/dist/core/loaders/useGLTF/index.d.ts +14 -9
- package/dist/core/loaders/useProgress.d.ts +2 -1
- package/dist/core/loaders/useVideoTexture.d.ts +1 -0
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +7 -5
- 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 -5
- 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/{blurPass.d.ts → meshReflectionMaterial/BlurPass.d.ts} +8 -6
- package/dist/core/materials/{convolutionMaterial.d.ts → meshReflectionMaterial/ConvolutionMaterial.d.ts} +1 -0
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +180 -49
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +33 -36
- package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +17 -15
- package/dist/core/materials/meshWobbleMaterial/material.d.ts +2 -2
- package/dist/core/misc/BakeShadows.d.ts +1 -1
- 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 +22 -17
- package/dist/core/misc/html/utils.d.ts +3 -3
- package/dist/core/misc/index.d.ts +3 -3
- package/dist/core/misc/useGLTFExporter.d.ts +2 -1
- package/dist/core/shapes/Box.vue.d.ts +22 -19
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +15 -12
- package/dist/core/shapes/Circle.vue.d.ts +22 -19
- package/dist/core/shapes/Cone.vue.d.ts +22 -19
- package/dist/core/shapes/Cylinder.vue.d.ts +60 -0
- package/dist/core/shapes/Dodecahedron.vue.d.ts +22 -19
- package/dist/core/shapes/Icosahedron.vue.d.ts +22 -19
- package/dist/core/shapes/Line2.vue.d.ts +16 -13
- package/dist/core/shapes/Octahedron.vue.d.ts +22 -19
- package/dist/core/shapes/Plane.vue.d.ts +22 -19
- package/dist/core/shapes/Ring.vue.d.ts +22 -19
- package/dist/core/shapes/RoundedBox.vue.d.ts +22 -19
- package/dist/core/shapes/Sphere.vue.d.ts +22 -19
- package/dist/core/shapes/Superformula.vue.d.ts +35 -32
- package/dist/core/shapes/Tetrahedron.vue.d.ts +22 -19
- package/dist/core/shapes/Torus.vue.d.ts +22 -19
- package/dist/core/shapes/TorusKnot.vue.d.ts +22 -19
- package/dist/core/shapes/Tube.vue.d.ts +22 -20
- package/dist/core/shapes/index.d.ts +20 -18
- package/dist/core/staging/Backdrop.vue.d.ts +18 -14
- package/dist/core/staging/ContactShadows.vue.d.ts +168 -0
- package/dist/core/staging/Fit.vue.d.ts +64 -0
- package/dist/core/staging/Ocean.vue.d.ts +26 -23
- package/dist/core/staging/Precipitation.vue.d.ts +21 -18
- package/dist/core/staging/Sky.vue.d.ts +14 -13
- package/dist/core/staging/Smoke.vue.d.ts +18 -17
- package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +7 -7
- package/dist/core/staging/Sparkles/component.vue.d.ts +33 -31
- package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
- package/dist/core/staging/Stars.vue.d.ts +16 -16
- package/dist/core/staging/index.d.ts +13 -10
- package/dist/core/staging/useEnvironment/component.vue.d.ts +64 -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 +7318 -6360
- package/dist/trescientos.umd.cjs +566 -428
- package/dist/utils/Gradient.d.ts +3 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/types.d.ts +4 -0
- package/package.json +29 -29
- package/dist/core/directives/index.d.ts +0 -5
- package/dist/core/directives/vAlwaysLookAt.d.ts +0 -4
- package/dist/core/directives/vDistanceTo.d.ts +0 -4
- package/dist/core/directives/vLightHelper.d.ts +0 -5
- package/dist/core/directives/vLog.d.ts +0 -3
- package/dist/core/misc/useTweakPane/index.d.ts +0 -10
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Texture } from 'three';
|
|
2
|
+
|
|
3
|
+
export declare function getTextureAndAtlasAsync(imagePathOrImageData: string, atlasPathOrAtlasish: string | Atlasish): Promise<[Texture | Texture[], Atlas]>;
|
|
4
|
+
export interface AtlasFrame {
|
|
5
|
+
name: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
offsetX: number;
|
|
9
|
+
offsetY: number;
|
|
10
|
+
repeatX: number;
|
|
11
|
+
repeatY: number;
|
|
12
|
+
}
|
|
13
|
+
export interface Atlas {
|
|
14
|
+
frames: AtlasFrame[];
|
|
15
|
+
animations: Record<string, AtlasFrame[]>;
|
|
16
|
+
}
|
|
17
|
+
export declare function getAtlas(atlasish: Atlasish, textureWidth: number, textureHeight: number): Atlas;
|
|
18
|
+
export declare function getAtlasFrames(atlas: Atlas, animationNameOrFrameNumber: string | number | [number, number], reversed: boolean): AtlasFrame[];
|
|
19
|
+
export declare function getNullAtlasFrame(): AtlasFrame;
|
|
20
|
+
export type AtlasData = TexturePackerFrameDataArray | TexturePackerFrameDataObject;
|
|
21
|
+
export type Atlasish = AtlasData | [number, number] | number;
|
|
22
|
+
interface TexturePackerFrameData {
|
|
23
|
+
filename: string;
|
|
24
|
+
frame: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
w: number;
|
|
28
|
+
h: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface TexturePackerFrameDataArray {
|
|
32
|
+
frames: TexturePackerFrameData[];
|
|
33
|
+
}
|
|
34
|
+
interface TexturePackerFrameDataObject {
|
|
35
|
+
frames: Record<string, TexturePackerFrameData>;
|
|
36
|
+
}
|
|
37
|
+
export declare function setAtlasDefinitions(atlas: Atlas, definitions?: Record<string, string>): void;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expand an animation definition string into an array of numbers.
|
|
3
|
+
* @param definitionStr - A comma-separated string of frame numbers with optional parentheses-surrounded durations.
|
|
4
|
+
* @example - expand("0,2") === [0,2]
|
|
5
|
+
* @example - expand("2(10)") === [2,2,2,2,2,2,2,2,2,2]
|
|
6
|
+
* @example - expand("1-4") === [1,2,3,4]
|
|
7
|
+
* @example - expand("10-5(2)") === [10,10,9,9,8,8,7,7,6,6,5,5]
|
|
8
|
+
* @example - expand("1-4(3),10(2)") === [1,1,1,2,2,2,3,3,3,4,4,4,10,10]
|
|
9
|
+
*/
|
|
10
|
+
export declare function expand(definitionStr: string): number[];
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { TresVector2 } from '@tresjs/core';
|
|
2
|
+
import { Intersection } from 'three';
|
|
3
|
+
import { Atlasish } from './Atlas';
|
|
4
|
+
|
|
5
|
+
export interface AnimatedSpriteProps {
|
|
6
|
+
/** URL of the image texture or an image dataURL. This prop is not reactive. */
|
|
7
|
+
image: string;
|
|
8
|
+
/**
|
|
9
|
+
* If `string`, the URL of the JSON atlas.
|
|
10
|
+
* If `number`, the number of columns in the texture.
|
|
11
|
+
* If `[number, number]`, the number of columns/rows in the texture.
|
|
12
|
+
* If `AtlasData`, the atlas as a JS object.
|
|
13
|
+
* This prop is not reactive.
|
|
14
|
+
*/
|
|
15
|
+
atlas: string | Atlasish;
|
|
16
|
+
/**
|
|
17
|
+
* Specify playback frame order and repeated frames (delays). `definitions` is a record where keys are atlas animation names and values are strings containing an animation definition.
|
|
18
|
+
* A "animation definition" comma-separated string of frame numbers with optional parentheses-surrounded durations.
|
|
19
|
+
* Here is how various definition strings convert to arrays of frames for playback:
|
|
20
|
+
* "0,2,1" - [0,2,1], i.e., play frame 0, 2, then 1.
|
|
21
|
+
* "2(10)" - [2,2,2,2,2,2,2,2,2,2], i.e., play from 2 10 times.
|
|
22
|
+
* "1-4" - [1,2,3,4]
|
|
23
|
+
* "10-5(2)" - [10,10,9,9,8,8,7,7,6,6,5,5]
|
|
24
|
+
* "1-4(3),10(2)" - [1,1,1,2,2,2,3,3,3,4,4,4,10,10]
|
|
25
|
+
*/
|
|
26
|
+
definitions?: Record<string, string>;
|
|
27
|
+
/** Desired frames per second of the animation. */
|
|
28
|
+
fps?: number;
|
|
29
|
+
/** Whether or not the animation should loop. */
|
|
30
|
+
loop?: boolean;
|
|
31
|
+
/** If `string`, name of the animation to play. If `[number, number]`, start and end frames of the animation. If `number`, frame number to display. */
|
|
32
|
+
animation?: string | [number, number] | number;
|
|
33
|
+
/** Event callback when the animation ends. */
|
|
34
|
+
paused?: boolean;
|
|
35
|
+
/** Whether to play the animation in reverse. */
|
|
36
|
+
reversed?: boolean;
|
|
37
|
+
/** Whether the sprite should be flipped, left to right. */
|
|
38
|
+
flipX?: boolean;
|
|
39
|
+
/** For a non-looping animation, when the animation ends, whether to display the zeroth frame. */
|
|
40
|
+
resetOnEnd?: boolean;
|
|
41
|
+
/** Whether to display the object as a THREE.Sprite. [See THREE.Sprite](https://threejs.org/docs/?q=sprite#api/en/objects/Sprite) */
|
|
42
|
+
asSprite?: boolean;
|
|
43
|
+
/** Anchor point of the object. A value of [0.5, 0.5] corresponds to the center. [0, 0] is left, bottom. */
|
|
44
|
+
center?: TresVector2;
|
|
45
|
+
/** Alpha test value for the material. [See THREE.Material.alphaTest](https://threejs.org/docs/#api/en/materials/Material.alphaTest) */
|
|
46
|
+
alphaTest?: number;
|
|
47
|
+
/** Depth test value for the material. [See THREE.Material.depthTest](https://threejs.org/docs/#api/en/materials/Material.depthTest) */
|
|
48
|
+
depthTest?: boolean;
|
|
49
|
+
/** Depth write value for the material. [See THREE.Material.depthWrite](https://threejs.org/docs/#api/en/materials/Material.depthWrite) */
|
|
50
|
+
depthWrite?: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare function __VLS_template(): {
|
|
53
|
+
default?(_: {}): any;
|
|
54
|
+
};
|
|
55
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AnimatedSpriteProps>, {
|
|
56
|
+
fps: number;
|
|
57
|
+
loop: boolean;
|
|
58
|
+
animation: number;
|
|
59
|
+
paused: boolean;
|
|
60
|
+
reversed: boolean;
|
|
61
|
+
flipX: boolean;
|
|
62
|
+
resetOnEnd: boolean;
|
|
63
|
+
asSprite: boolean;
|
|
64
|
+
center: () => number[];
|
|
65
|
+
alphaTest: number;
|
|
66
|
+
depthTest: boolean;
|
|
67
|
+
depthWrite: boolean;
|
|
68
|
+
}>, {
|
|
69
|
+
instance: import('vue').ShallowRef<any>;
|
|
70
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
71
|
+
frame: (frameName: string) => void;
|
|
72
|
+
end: (frameName: string) => void;
|
|
73
|
+
loop: (frameName: string) => void;
|
|
74
|
+
click: (event: Intersection<import('three').Object3D<import('three').Object3DEventMap>>) => void;
|
|
75
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AnimatedSpriteProps>, {
|
|
76
|
+
fps: number;
|
|
77
|
+
loop: boolean;
|
|
78
|
+
animation: number;
|
|
79
|
+
paused: boolean;
|
|
80
|
+
reversed: boolean;
|
|
81
|
+
flipX: boolean;
|
|
82
|
+
resetOnEnd: boolean;
|
|
83
|
+
asSprite: boolean;
|
|
84
|
+
center: () => number[];
|
|
85
|
+
alphaTest: number;
|
|
86
|
+
depthTest: boolean;
|
|
87
|
+
depthWrite: boolean;
|
|
88
|
+
}>>> & {
|
|
89
|
+
onClick?: ((event: Intersection<import('three').Object3D<import('three').Object3DEventMap>>) => any) | undefined;
|
|
90
|
+
onLoop?: ((frameName: string) => any) | undefined;
|
|
91
|
+
onFrame?: ((frameName: string) => any) | undefined;
|
|
92
|
+
onEnd?: ((frameName: string) => any) | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
center: TresVector2;
|
|
95
|
+
loop: boolean;
|
|
96
|
+
fps: number;
|
|
97
|
+
animation: string | [number, number] | number;
|
|
98
|
+
paused: boolean;
|
|
99
|
+
reversed: boolean;
|
|
100
|
+
flipX: boolean;
|
|
101
|
+
resetOnEnd: boolean;
|
|
102
|
+
asSprite: boolean;
|
|
103
|
+
alphaTest: number;
|
|
104
|
+
depthTest: boolean;
|
|
105
|
+
depthWrite: boolean;
|
|
106
|
+
}, {}>;
|
|
107
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
108
|
+
export default _default;
|
|
109
|
+
type __VLS_WithDefaults<P, D> = {
|
|
110
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
111
|
+
default: D[K];
|
|
112
|
+
}> : P[K];
|
|
113
|
+
};
|
|
114
|
+
type __VLS_Prettify<T> = {
|
|
115
|
+
[K in keyof T]: T[K];
|
|
116
|
+
} & {};
|
|
117
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
118
|
+
new (): {
|
|
119
|
+
$slots: S;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
123
|
+
type __VLS_TypePropsToOption<T> = {
|
|
124
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
125
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
126
|
+
} : {
|
|
127
|
+
type: import('vue').PropType<T[K]>;
|
|
128
|
+
required: true;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
@@ -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_TypePropsToOption<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
|
-
|
|
50
|
-
}, unknown, {}, {}, import(
|
|
50
|
+
instance: import('vue').ShallowRef<Lensflare | undefined>;
|
|
51
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LensflareProps>, {
|
|
51
52
|
scale: number;
|
|
52
53
|
elements: undefined;
|
|
53
54
|
seed: undefined;
|
|
@@ -57,25 +58,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
57
58
|
size: undefined;
|
|
58
59
|
texture: undefined;
|
|
59
60
|
}>>>, {
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
size: number;
|
|
62
|
+
color: TresColor;
|
|
63
|
+
texture: Texture | string[];
|
|
62
64
|
scale: number;
|
|
65
|
+
distance: number;
|
|
63
66
|
elements: Partial<LensflareElementProps>[];
|
|
64
|
-
size: number;
|
|
65
67
|
seed: number;
|
|
66
68
|
seedProps: SeedProps[];
|
|
67
|
-
distance: number;
|
|
68
69
|
}, {}>;
|
|
69
70
|
export default _default;
|
|
70
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
71
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
72
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
73
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
74
|
-
} : {
|
|
75
|
-
type: import('vue').PropType<T[K]>;
|
|
76
|
-
required: true;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
71
|
type __VLS_WithDefaults<P, D> = {
|
|
80
72
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
81
73
|
default: D[K];
|
|
@@ -84,3 +76,12 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
84
76
|
type __VLS_Prettify<T> = {
|
|
85
77
|
[K in keyof T]: T[K];
|
|
86
78
|
} & {};
|
|
79
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
80
|
+
type __VLS_TypePropsToOption<T> = {
|
|
81
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
82
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
83
|
+
} : {
|
|
84
|
+
type: import('vue').PropType<T[K]>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -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,20 +1,23 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
5
|
+
speed?: number;
|
|
6
|
+
rotationFactor?: number;
|
|
7
|
+
floatFactor?: number;
|
|
8
|
+
range?: [number, number];
|
|
6
9
|
}>, {
|
|
7
10
|
speed: number;
|
|
8
11
|
rotationFactor: number;
|
|
9
12
|
floatFactor: number;
|
|
10
13
|
range: () => number[];
|
|
11
14
|
}>, {
|
|
12
|
-
|
|
13
|
-
}, unknown, {}, {}, import(
|
|
14
|
-
speed
|
|
15
|
-
rotationFactor?: number
|
|
16
|
-
floatFactor?: number
|
|
17
|
-
range?: [number, number]
|
|
15
|
+
instance: import('vue').ShallowRef<any>;
|
|
16
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
17
|
+
speed?: number;
|
|
18
|
+
rotationFactor?: number;
|
|
19
|
+
floatFactor?: number;
|
|
20
|
+
range?: [number, number];
|
|
18
21
|
}>, {
|
|
19
22
|
speed: number;
|
|
20
23
|
rotationFactor: number;
|
|
@@ -25,19 +28,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
25
28
|
rotationFactor: number;
|
|
26
29
|
floatFactor: number;
|
|
27
30
|
range: [number, number];
|
|
28
|
-
}, {}
|
|
29
|
-
|
|
30
|
-
}>;
|
|
31
|
+
}, {}>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
31
33
|
export default _default;
|
|
32
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
34
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
-
} : {
|
|
37
|
-
type: import('vue').PropType<T[K]>;
|
|
38
|
-
required: true;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
34
|
type __VLS_WithDefaults<P, D> = {
|
|
42
35
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
43
36
|
default: D[K];
|
|
@@ -51,3 +44,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
51
44
|
$slots: S;
|
|
52
45
|
};
|
|
53
46
|
};
|
|
47
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
48
|
+
type __VLS_TypePropsToOption<T> = {
|
|
49
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
50
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
51
|
+
} : {
|
|
52
|
+
type: import('vue').PropType<T[K]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -9,44 +9,46 @@ export interface MouseParallaxProps {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
/**
|
|
11
11
|
* The factor to multiply the mouse movement by.
|
|
12
|
-
* @type {number}
|
|
12
|
+
* @type {number | [number, number]}
|
|
13
13
|
* @default 2.5
|
|
14
14
|
* @memberof MouseParallaxProps
|
|
15
15
|
*
|
|
16
|
-
|
|
17
|
-
factor?: number;
|
|
16
|
+
*/
|
|
17
|
+
factor?: number | [number, number];
|
|
18
18
|
/**
|
|
19
|
-
* The factor to
|
|
20
|
-
* @type {number}
|
|
19
|
+
* The factor to smooth the mouse movement by.
|
|
20
|
+
* @type {number | [number, number]}
|
|
21
21
|
* @default 2.5
|
|
22
22
|
* @memberof MouseParallaxProps
|
|
23
23
|
*
|
|
24
|
-
|
|
25
|
-
ease?: number;
|
|
24
|
+
*/
|
|
25
|
+
ease?: number | [number, 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_TypePropsToOption<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_TypePropsToOption<MouseParallaxProps>, {
|
|
32
41
|
disabled: boolean;
|
|
33
42
|
factor: number;
|
|
34
43
|
ease: number;
|
|
44
|
+
local: boolean;
|
|
35
45
|
}>>>, {
|
|
36
46
|
disabled: boolean;
|
|
37
|
-
factor: number;
|
|
38
|
-
ease: number;
|
|
47
|
+
factor: number | [number, number];
|
|
48
|
+
ease: number | [number, number];
|
|
49
|
+
local: boolean;
|
|
39
50
|
}, {}>;
|
|
40
51
|
export default _default;
|
|
41
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
42
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
43
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
44
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
45
|
-
} : {
|
|
46
|
-
type: import('vue').PropType<T[K]>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
52
|
type __VLS_WithDefaults<P, D> = {
|
|
51
53
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
52
54
|
default: D[K];
|
|
@@ -55,3 +57,12 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
55
57
|
type __VLS_Prettify<T> = {
|
|
56
58
|
[K in keyof T]: T[K];
|
|
57
59
|
} & {};
|
|
60
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
61
|
+
type __VLS_TypePropsToOption<T> = {
|
|
62
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
63
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
64
|
+
} : {
|
|
65
|
+
type: import('vue').PropType<T[K]>;
|
|
66
|
+
required: true;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -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_TypePropsToOption<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_TypePropsToOption<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
|
+
loop: boolean;
|
|
44
|
+
distance: number;
|
|
45
|
+
ready: boolean;
|
|
46
|
+
helper: boolean;
|
|
47
|
+
autoplay: boolean;
|
|
48
|
+
innerAngle: number;
|
|
49
|
+
outerAngle: number;
|
|
50
|
+
outerGain: number;
|
|
51
|
+
}, {}>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithDefaults<P, D> = {
|
|
54
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
55
|
+
default: D[K];
|
|
56
|
+
}> : P[K];
|
|
57
|
+
};
|
|
58
|
+
type __VLS_Prettify<T> = {
|
|
59
|
+
[K in keyof T]: T[K];
|
|
60
|
+
} & {};
|
|
61
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
62
|
+
type __VLS_TypePropsToOption<T> = {
|
|
63
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
64
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
65
|
+
} : {
|
|
66
|
+
type: import('vue').PropType<T[K]>;
|
|
67
|
+
required: true;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Reflector } from 'three
|
|
1
|
+
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { Reflector } from 'three-stdlib';
|
|
3
|
+
|
|
3
4
|
export interface ReflectorProps {
|
|
4
5
|
/**
|
|
5
6
|
* The color of the reflector.
|
|
@@ -56,7 +57,10 @@ export interface ReflectorProps {
|
|
|
56
57
|
*/
|
|
57
58
|
shader?: object;
|
|
58
59
|
}
|
|
59
|
-
declare
|
|
60
|
+
declare function __VLS_template(): {
|
|
61
|
+
default?(_: {}): any;
|
|
62
|
+
};
|
|
63
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ReflectorProps>, {
|
|
60
64
|
color: string;
|
|
61
65
|
textureWidth: number;
|
|
62
66
|
textureHeight: number;
|
|
@@ -64,8 +68,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
64
68
|
multisample: number;
|
|
65
69
|
shader: any;
|
|
66
70
|
}>, {
|
|
67
|
-
|
|
68
|
-
}, unknown, {}, {}, import(
|
|
71
|
+
instance: import('vue').ShallowRef<Reflector | undefined>;
|
|
72
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ReflectorProps>, {
|
|
69
73
|
color: string;
|
|
70
74
|
textureWidth: number;
|
|
71
75
|
textureHeight: number;
|
|
@@ -73,25 +77,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
73
77
|
multisample: number;
|
|
74
78
|
shader: any;
|
|
75
79
|
}>>>, {
|
|
76
|
-
color:
|
|
80
|
+
color: TresColor;
|
|
77
81
|
textureWidth: number;
|
|
78
82
|
textureHeight: number;
|
|
79
83
|
clipBias: number;
|
|
80
84
|
multisample: number;
|
|
81
85
|
shader: object;
|
|
82
|
-
}, {}
|
|
83
|
-
|
|
84
|
-
}>;
|
|
86
|
+
}, {}>;
|
|
87
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
85
88
|
export default _default;
|
|
86
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
87
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
88
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
89
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
90
|
-
} : {
|
|
91
|
-
type: import('vue').PropType<T[K]>;
|
|
92
|
-
required: true;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
89
|
type __VLS_WithDefaults<P, D> = {
|
|
96
90
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
97
91
|
default: D[K];
|
|
@@ -105,3 +99,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
105
99
|
$slots: S;
|
|
106
100
|
};
|
|
107
101
|
};
|
|
102
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
103
|
+
type __VLS_TypePropsToOption<T> = {
|
|
104
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
105
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
106
|
+
} : {
|
|
107
|
+
type: import('vue').PropType<T[K]>;
|
|
108
|
+
required: true;
|
|
109
|
+
};
|
|
110
|
+
};
|