@tresjs/core 3.5.0 → 3.5.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/README.md +5 -2
- package/dist/components/TresCanvas.vue.d.ts +48 -161
- package/dist/composables/useCamera/index.d.ts +583 -142
- package/dist/composables/useRenderer/index.d.ts +1 -1
- package/dist/tres.js +227 -227
- package/dist/tres.umd.cjs +2 -2
- package/package.json +36 -39
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/core"><img src="https://img.shields.io/npm/v/@tresjs/core
|
|
4
|
+
<a href="https://www.npmjs.com/package/@tresjs/core"><img src="https://img.shields.io/npm/v/@tresjs/core?color=%2382DBCA&logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjY4NTQgMy40MjkxNkMxMi4wNzM4IDIuNzgxODIgMTMuMDEyIDIuNzgxODIgMTMuNDAwNCAzLjQyOTE1TDE5LjE3NzEgMTMuMDU2OUMxOS41NzcgMTMuNzIzNSAxOS4wOTY5IDE0LjU3MTQgMTguMzE5NiAxNC41NzE0SDYuNzY2MjRDNS45ODg5NCAxNC41NzE0IDUuNTA4ODMgMTMuNzIzNSA1LjkwODc1IDEzLjA1NjlMMTEuNjg1NCAzLjQyOTE2WiIgZmlsbD0iIzgyREJDNSIvPgo8cGF0aCBkPSJNMTUuNjg1NyAxMC41NDI5QzE1LjY4NTcgOS45OTA1OSAxNi4xMzM0IDkuNTQyODggMTYuNjg1NyA5LjU0Mjg4SDI2QzI2LjU1MjIgOS41NDI4OCAyNyA5Ljk5MDU5IDI3IDEwLjU0MjlWMTkuODU3MkMyNyAyMC40MDk0IDI2LjU1MjIgMjAuODU3MiAyNiAyMC44NTcySDE2LjY4NTdDMTYuMTMzNCAyMC44NTcyIDE1LjY4NTcgMjAuNDA5NCAxNS42ODU3IDE5Ljg1NzJWMTAuNTQyOVoiIGZpbGw9IiM0RjRGNEYiLz4KPGNpcmNsZSBjeD0iMTYiIGN5PSIyMiIgcj0iNiIgZmlsbD0iI0VGQUMzNSIvPgo8L3N2Zz4K" alt="npm package"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@tresjs/core"><img src="https://img.shields.io/npm/dm/@tresjs/core?color=%2382DBCA" 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
|
|
|
@@ -40,7 +41,9 @@ Checkout the [docs](https://tresjs.org)
|
|
|
40
41
|
| --------------------------- | :------------------------------------------------------------------------------------------------- |
|
|
41
42
|
| [Tres](packages/tres) |  |
|
|
42
43
|
| [Cientos](packages/cientos) |  |
|
|
43
|
-
| [Post-processing](packages/post-processing) |  |  |
|
|
45
|
+
| [Nuxt](packages/nuxt) |  |
|
|
46
|
+
| [TresLeches 🍰](packages/leches) |  |
|
|
44
47
|
|
|
45
48
|
## Contribution
|
|
46
49
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WebGLRendererParameters, ColorSpace, ShadowMapType, ToneMapping } from 'three';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
2
3
|
import { type TresContext } from '../composables';
|
|
3
4
|
import type { RendererPresetsType } from '../composables/useRenderer/const';
|
|
4
5
|
import type { TresCamera } from '../types/';
|
|
@@ -15,165 +16,34 @@ export interface TresCanvasProps extends Omit<WebGLRendererParameters, 'canvas'>
|
|
|
15
16
|
windowSize?: boolean;
|
|
16
17
|
disableRender?: boolean;
|
|
17
18
|
}
|
|
18
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
depth: {
|
|
48
|
-
type: import("vue").PropType<boolean>;
|
|
49
|
-
default: undefined;
|
|
50
|
-
};
|
|
51
|
-
logarithmicDepthBuffer: {
|
|
52
|
-
type: import("vue").PropType<boolean>;
|
|
53
|
-
default: undefined;
|
|
54
|
-
};
|
|
55
|
-
failIfMajorPerformanceCaveat: {
|
|
56
|
-
type: import("vue").PropType<boolean>;
|
|
57
|
-
default: undefined;
|
|
58
|
-
};
|
|
59
|
-
shadows: {
|
|
60
|
-
type: import("vue").PropType<boolean>;
|
|
61
|
-
default: undefined;
|
|
62
|
-
};
|
|
63
|
-
shadowMapType: {
|
|
64
|
-
type: import("vue").PropType<ShadowMapType>;
|
|
65
|
-
};
|
|
66
|
-
useLegacyLights: {
|
|
67
|
-
type: import("vue").PropType<boolean>;
|
|
68
|
-
default: undefined;
|
|
69
|
-
};
|
|
70
|
-
outputColorSpace: {
|
|
71
|
-
type: import("vue").PropType<ColorSpace>;
|
|
72
|
-
};
|
|
73
|
-
toneMapping: {
|
|
74
|
-
type: import("vue").PropType<ToneMapping>;
|
|
75
|
-
};
|
|
76
|
-
toneMappingExposure: {
|
|
77
|
-
type: import("vue").PropType<number>;
|
|
78
|
-
};
|
|
79
|
-
clearColor: {
|
|
80
|
-
type: import("vue").PropType<string>;
|
|
81
|
-
};
|
|
82
|
-
windowSize: {
|
|
83
|
-
type: import("vue").PropType<boolean>;
|
|
84
|
-
default: undefined;
|
|
85
|
-
};
|
|
86
|
-
preset: {
|
|
87
|
-
type: import("vue").PropType<"realistic">;
|
|
88
|
-
};
|
|
89
|
-
camera: {
|
|
90
|
-
type: import("vue").PropType<TresCamera>;
|
|
91
|
-
};
|
|
92
|
-
disableRender: {
|
|
93
|
-
type: import("vue").PropType<boolean>;
|
|
94
|
-
default: undefined;
|
|
95
|
-
};
|
|
96
|
-
}, {
|
|
97
|
-
context: import("vue").ShallowRef<TresContext | null>;
|
|
98
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
99
|
-
context: {
|
|
100
|
-
type: import("vue").PropType<WebGLRenderingContext>;
|
|
101
|
-
};
|
|
102
|
-
precision: {
|
|
103
|
-
type: import("vue").PropType<string>;
|
|
104
|
-
};
|
|
105
|
-
alpha: {
|
|
106
|
-
type: import("vue").PropType<boolean>;
|
|
107
|
-
default: undefined;
|
|
108
|
-
};
|
|
109
|
-
premultipliedAlpha: {
|
|
110
|
-
type: import("vue").PropType<boolean>;
|
|
111
|
-
};
|
|
112
|
-
antialias: {
|
|
113
|
-
type: import("vue").PropType<boolean>;
|
|
114
|
-
default: undefined;
|
|
115
|
-
};
|
|
116
|
-
stencil: {
|
|
117
|
-
type: import("vue").PropType<boolean>;
|
|
118
|
-
default: undefined;
|
|
119
|
-
};
|
|
120
|
-
preserveDrawingBuffer: {
|
|
121
|
-
type: import("vue").PropType<boolean>;
|
|
122
|
-
default: undefined;
|
|
123
|
-
};
|
|
124
|
-
powerPreference: {
|
|
125
|
-
type: import("vue").PropType<string>;
|
|
126
|
-
};
|
|
127
|
-
depth: {
|
|
128
|
-
type: import("vue").PropType<boolean>;
|
|
129
|
-
default: undefined;
|
|
130
|
-
};
|
|
131
|
-
logarithmicDepthBuffer: {
|
|
132
|
-
type: import("vue").PropType<boolean>;
|
|
133
|
-
default: undefined;
|
|
134
|
-
};
|
|
135
|
-
failIfMajorPerformanceCaveat: {
|
|
136
|
-
type: import("vue").PropType<boolean>;
|
|
137
|
-
default: undefined;
|
|
138
|
-
};
|
|
139
|
-
shadows: {
|
|
140
|
-
type: import("vue").PropType<boolean>;
|
|
141
|
-
default: undefined;
|
|
142
|
-
};
|
|
143
|
-
shadowMapType: {
|
|
144
|
-
type: import("vue").PropType<ShadowMapType>;
|
|
145
|
-
};
|
|
146
|
-
useLegacyLights: {
|
|
147
|
-
type: import("vue").PropType<boolean>;
|
|
148
|
-
default: undefined;
|
|
149
|
-
};
|
|
150
|
-
outputColorSpace: {
|
|
151
|
-
type: import("vue").PropType<ColorSpace>;
|
|
152
|
-
};
|
|
153
|
-
toneMapping: {
|
|
154
|
-
type: import("vue").PropType<ToneMapping>;
|
|
155
|
-
};
|
|
156
|
-
toneMappingExposure: {
|
|
157
|
-
type: import("vue").PropType<number>;
|
|
158
|
-
};
|
|
159
|
-
clearColor: {
|
|
160
|
-
type: import("vue").PropType<string>;
|
|
161
|
-
};
|
|
162
|
-
windowSize: {
|
|
163
|
-
type: import("vue").PropType<boolean>;
|
|
164
|
-
default: undefined;
|
|
165
|
-
};
|
|
166
|
-
preset: {
|
|
167
|
-
type: import("vue").PropType<"realistic">;
|
|
168
|
-
};
|
|
169
|
-
camera: {
|
|
170
|
-
type: import("vue").PropType<TresCamera>;
|
|
171
|
-
};
|
|
172
|
-
disableRender: {
|
|
173
|
-
type: import("vue").PropType<boolean>;
|
|
174
|
-
default: undefined;
|
|
175
|
-
};
|
|
176
|
-
}>>, {
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TresCanvasProps>, {
|
|
20
|
+
alpha: undefined;
|
|
21
|
+
depth: undefined;
|
|
22
|
+
shadows: undefined;
|
|
23
|
+
stencil: undefined;
|
|
24
|
+
antialias: undefined;
|
|
25
|
+
windowSize: undefined;
|
|
26
|
+
disableRender: undefined;
|
|
27
|
+
useLegacyLights: undefined;
|
|
28
|
+
preserveDrawingBuffer: undefined;
|
|
29
|
+
logarithmicDepthBuffer: undefined;
|
|
30
|
+
failIfMajorPerformanceCaveat: undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
context: Ref<TresContext | null> | import("vue").ShallowRef<TresContext | null>;
|
|
33
|
+
dispose: () => void;
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TresCanvasProps>, {
|
|
35
|
+
alpha: undefined;
|
|
36
|
+
depth: undefined;
|
|
37
|
+
shadows: undefined;
|
|
38
|
+
stencil: undefined;
|
|
39
|
+
antialias: undefined;
|
|
40
|
+
windowSize: undefined;
|
|
41
|
+
disableRender: undefined;
|
|
42
|
+
useLegacyLights: undefined;
|
|
43
|
+
preserveDrawingBuffer: undefined;
|
|
44
|
+
logarithmicDepthBuffer: undefined;
|
|
45
|
+
failIfMajorPerformanceCaveat: undefined;
|
|
46
|
+
}>>>, {
|
|
177
47
|
alpha: boolean;
|
|
178
48
|
antialias: boolean;
|
|
179
49
|
stencil: boolean;
|
|
@@ -185,10 +55,27 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
185
55
|
useLegacyLights: boolean;
|
|
186
56
|
windowSize: boolean;
|
|
187
57
|
disableRender: boolean;
|
|
188
|
-
}, {}>, {
|
|
58
|
+
}, {}>, Readonly<{
|
|
189
59
|
default(): any;
|
|
190
|
-
}
|
|
60
|
+
}>>;
|
|
191
61
|
export default _default;
|
|
62
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
63
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
64
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
65
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
66
|
+
} : {
|
|
67
|
+
type: import('vue').PropType<T[K]>;
|
|
68
|
+
required: true;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
type __VLS_WithDefaults<P, D> = {
|
|
72
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
73
|
+
default: D[K];
|
|
74
|
+
}> : P[K];
|
|
75
|
+
};
|
|
76
|
+
type __VLS_Prettify<T> = {
|
|
77
|
+
[K in keyof T]: T[K];
|
|
78
|
+
} & {};
|
|
192
79
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
193
80
|
new (): {
|
|
194
81
|
$slots: S;
|