@tresjs/core 3.5.0 → 3.6.0-next.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 CHANGED
@@ -1,7 +1,8 @@
1
1
  ![repo-banner](/public/repo-banner.png)
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/latest?color=%2382DBCA" alt="npm package"></a>
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) | ![tres version](https://img.shields.io/npm/v/@tresjs/core/latest.svg?label=%20&color=%2382DBCA) |
42
43
  | [Cientos](packages/cientos) | ![cientos version](https://img.shields.io/npm/v/@tresjs/cientos/latest.svg?label=%20&color=%23f19b00) |
43
- | [Post-processing](packages/post-processing) | ![post-processing version](https://img.shields.io/npm/v/@tresjs/post-processing/latest.svg?label=%20&color=%ff7bac00) |
44
+ | [Post-processing](packages/post-processing) | ![post-processing version](https://img.shields.io/npm/v/@tresjs/post-processing/latest.svg?label=%20&color=ff7bac) |
45
+ | [Nuxt](packages/nuxt) | ![nuxt version](https://img.shields.io/npm/v/@tresjs/nuxt/latest.svg?label=%20&color=4f4f4f&logo=nuxt.js) |
46
+ | [TresLeches 🍰](packages/leches) | ![tresleches version](https://img.shields.io/npm/v/@tresjs/leches/latest.svg?label=%20&color=ffffff) |
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,33 @@ 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
- context: {
20
- type: import("vue").PropType<WebGLRenderingContext>;
21
- };
22
- precision: {
23
- type: import("vue").PropType<string>;
24
- };
25
- alpha: {
26
- type: import("vue").PropType<boolean>;
27
- default: undefined;
28
- };
29
- premultipliedAlpha: {
30
- type: import("vue").PropType<boolean>;
31
- };
32
- antialias: {
33
- type: import("vue").PropType<boolean>;
34
- default: undefined;
35
- };
36
- stencil: {
37
- type: import("vue").PropType<boolean>;
38
- default: undefined;
39
- };
40
- preserveDrawingBuffer: {
41
- type: import("vue").PropType<boolean>;
42
- default: undefined;
43
- };
44
- powerPreference: {
45
- type: import("vue").PropType<string>;
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
+ }, 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>, {
34
+ alpha: undefined;
35
+ depth: undefined;
36
+ shadows: undefined;
37
+ stencil: undefined;
38
+ antialias: undefined;
39
+ windowSize: undefined;
40
+ disableRender: undefined;
41
+ useLegacyLights: undefined;
42
+ preserveDrawingBuffer: undefined;
43
+ logarithmicDepthBuffer: undefined;
44
+ failIfMajorPerformanceCaveat: undefined;
45
+ }>>>, {
177
46
  alpha: boolean;
178
47
  antialias: boolean;
179
48
  stencil: boolean;
@@ -185,10 +54,27 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
185
54
  useLegacyLights: boolean;
186
55
  windowSize: boolean;
187
56
  disableRender: boolean;
188
- }, {}>, {
57
+ }, {}>, Readonly<{
189
58
  default(): any;
190
- }>;
59
+ }>>;
191
60
  export default _default;
61
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
62
+ type __VLS_TypePropsToRuntimeProps<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
+ };
70
+ type __VLS_WithDefaults<P, D> = {
71
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
72
+ default: D[K];
73
+ }> : P[K];
74
+ };
75
+ type __VLS_Prettify<T> = {
76
+ [K in keyof T]: T[K];
77
+ } & {};
192
78
  type __VLS_WithTemplateSlots<T, S> = T & {
193
79
  new (): {
194
80
  $slots: S;