@tresjs/cientos 4.0.0-rc.1 → 4.0.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.
Files changed (81) hide show
  1. package/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +0 -1
  2. package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +1 -5
  3. package/dist/core/abstractions/Lensflare/component.vue.d.ts +2 -3
  4. package/dist/core/abstractions/Lensflare/constants.d.ts +0 -1
  5. package/dist/core/abstractions/Lensflare/index.d.ts +0 -1
  6. package/dist/core/abstractions/PositionalAudio.vue.d.ts +0 -1
  7. package/dist/core/abstractions/Reflector.vue.d.ts +0 -1
  8. package/dist/core/abstractions/Text3D.vue.d.ts +1 -121
  9. package/dist/core/abstractions/index.d.ts +0 -1
  10. package/dist/core/abstractions/useAnimations.d.ts +0 -1
  11. package/dist/core/abstractions/useFBO/component.vue.d.ts +0 -1
  12. package/dist/core/abstractions/useFBO/index.d.ts +0 -1
  13. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +0 -1
  14. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +0 -1
  15. package/dist/core/controls/CameraControls.vue.d.ts +356 -765
  16. package/dist/core/controls/KeyboardControls.vue.d.ts +1 -4
  17. package/dist/core/controls/MapControls.vue.d.ts +288 -667
  18. package/dist/core/controls/OrbitControls.vue.d.ts +288 -667
  19. package/dist/core/controls/PointerLockControls.vue.d.ts +2 -4
  20. package/dist/core/controls/TransformControls.vue.d.ts +1 -3
  21. package/dist/core/controls/index.d.ts +0 -1
  22. package/dist/core/loaders/SVG/component.vue.d.ts +0 -1
  23. package/dist/core/loaders/index.d.ts +0 -1
  24. package/dist/core/loaders/useFBX/index.d.ts +0 -1
  25. package/dist/core/loaders/useGLTF/index.d.ts +0 -1
  26. package/dist/core/loaders/useProgress.d.ts +0 -1
  27. package/dist/core/loaders/useVideoTexture.d.ts +0 -1
  28. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +0 -1
  29. package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +2 -2
  30. package/dist/core/materials/holographicMaterial/index.vue.d.ts +0 -1
  31. package/dist/core/materials/index.d.ts +0 -1
  32. package/dist/core/materials/meshGlassMaterial/material.d.ts +0 -1
  33. package/dist/core/materials/meshReflectionMaterial/BlurPass.d.ts +2 -3
  34. package/dist/core/materials/meshReflectionMaterial/ConvolutionMaterial.d.ts +0 -1
  35. package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +0 -1
  36. package/dist/core/materials/meshReflectionMaterial/material.d.ts +0 -1
  37. package/dist/core/materials/meshWobbleMaterial/material.d.ts +8 -3
  38. package/dist/core/misc/html/HTML.vue.d.ts +2 -4
  39. package/dist/core/misc/html/utils.d.ts +0 -1
  40. package/dist/core/misc/index.d.ts +0 -1
  41. package/dist/core/misc/useGLTFExporter.d.ts +0 -1
  42. package/dist/core/shapes/Box.vue.d.ts +0 -1
  43. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +0 -1
  44. package/dist/core/shapes/Circle.vue.d.ts +0 -1
  45. package/dist/core/shapes/Cone.vue.d.ts +0 -1
  46. package/dist/core/shapes/Cylinder.vue.d.ts +0 -1
  47. package/dist/core/shapes/Dodecahedron.vue.d.ts +0 -1
  48. package/dist/core/shapes/Icosahedron.vue.d.ts +0 -1
  49. package/dist/core/shapes/Line2.vue.d.ts +0 -1
  50. package/dist/core/shapes/Octahedron.vue.d.ts +0 -1
  51. package/dist/core/shapes/Plane.vue.d.ts +0 -1
  52. package/dist/core/shapes/Ring.vue.d.ts +0 -1
  53. package/dist/core/shapes/RoundedBox.vue.d.ts +0 -1
  54. package/dist/core/shapes/Sphere.vue.d.ts +0 -1
  55. package/dist/core/shapes/Superformula.vue.d.ts +0 -1
  56. package/dist/core/shapes/Tetrahedron.vue.d.ts +0 -1
  57. package/dist/core/shapes/Torus.vue.d.ts +0 -1
  58. package/dist/core/shapes/TorusKnot.vue.d.ts +0 -1
  59. package/dist/core/shapes/Tube.vue.d.ts +0 -1
  60. package/dist/core/shapes/index.d.ts +1 -2
  61. package/dist/core/staging/ContactShadows.vue.d.ts +0 -1
  62. package/dist/core/staging/Fit.vue.d.ts +0 -1
  63. package/dist/core/staging/Ocean.vue.d.ts +0 -1
  64. package/dist/core/staging/Precipitation.vue.d.ts +1 -2
  65. package/dist/core/staging/Sky.vue.d.ts +0 -1
  66. package/dist/core/staging/Smoke.vue.d.ts +0 -1
  67. package/dist/core/staging/Sparkles/ShaderData.d.ts +0 -1
  68. package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +0 -1
  69. package/dist/core/staging/Sparkles/component.vue.d.ts +1 -3
  70. package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +0 -1
  71. package/dist/core/staging/index.d.ts +0 -1
  72. package/dist/core/staging/useEnvironment/component.vue.d.ts +2 -3
  73. package/dist/core/staging/useEnvironment/envSence.d.ts +0 -1
  74. package/dist/core/staging/useEnvironment/index.d.ts +1 -2
  75. package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +0 -1
  76. package/dist/trescientos.js +1489 -1465
  77. package/dist/trescientos.umd.cjs +56 -56
  78. package/dist/utils/Gradient.d.ts +1 -3
  79. package/dist/utils/index.d.ts +0 -1
  80. package/dist/utils/types.d.ts +0 -1
  81. package/package.json +17 -17
@@ -1,5 +1,4 @@
1
1
  import { Texture } from 'three';
2
-
3
2
  export declare function getTextureAndAtlasAsync(imagePathOrImageData: string, atlasPathOrAtlasish: string | Atlasish): Promise<[Texture | Texture[], Atlas]>;
4
3
  export interface AtlasFrame {
5
4
  name: string;
@@ -1,7 +1,5 @@
1
1
  import { TresVector2 } from '@tresjs/core';
2
- import { Intersection } from 'three';
3
2
  import { Atlasish } from './Atlas';
4
-
5
3
  export interface AnimatedSpriteProps {
6
4
  /** URL of the image texture or an image dataURL. This prop is not reactive. */
7
5
  image: string;
@@ -30,7 +28,7 @@ export interface AnimatedSpriteProps {
30
28
  loop?: boolean;
31
29
  /** 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
30
  animation?: string | [number, number] | number;
33
- /** Event callback when the animation ends. */
31
+ /** Whether the animation is paused. */
34
32
  paused?: boolean;
35
33
  /** Whether to play the animation in reverse. */
36
34
  reversed?: boolean;
@@ -71,7 +69,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
71
69
  frame: (frameName: string) => void;
72
70
  end: (frameName: string) => void;
73
71
  loop: (frameName: string) => void;
74
- click: (event: Intersection<import('three').Object3D<import('three').Object3DEventMap>>) => void;
75
72
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AnimatedSpriteProps>, {
76
73
  fps: number;
77
74
  loop: boolean;
@@ -86,7 +83,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
86
83
  depthTest: boolean;
87
84
  depthWrite: boolean;
88
85
  }>>> & {
89
- onClick?: ((event: Intersection<import('three').Object3D<import('three').Object3DEventMap>>) => any) | undefined;
90
86
  onLoop?: ((frameName: string) => any) | undefined;
91
87
  onFrame?: ((frameName: string) => any) | undefined;
92
88
  onEnd?: ((frameName: string) => any) | undefined;
@@ -2,7 +2,6 @@ import { Lensflare } from 'three/examples/jsm/objects/Lensflare';
2
2
  import { Texture } from 'three';
3
3
  import { TresColor } from '@tresjs/core';
4
4
  import { LensflareElementProps, SeedProps } from '.';
5
-
6
5
  export interface LensflareProps {
7
6
  /**
8
7
  * scale of the lensflare
@@ -35,7 +34,7 @@ export interface LensflareProps {
35
34
  /**
36
35
  * default texture of lensflare elements
37
36
  */
38
- texture?: Texture | string[];
37
+ texture?: Texture | string;
39
38
  }
40
39
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<LensflareProps>, {
41
40
  scale: number;
@@ -60,7 +59,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
60
59
  }>>>, {
61
60
  size: number;
62
61
  color: TresColor;
63
- texture: Texture | string[];
62
+ texture: Texture | string;
64
63
  scale: number;
65
64
  distance: number;
66
65
  elements: Partial<LensflareElementProps>[];
@@ -1,5 +1,4 @@
1
1
  import { LensflareElementProps, SeedProps } from '.';
2
-
3
2
  export declare const TEXTURE_PATH = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/";
4
3
  export declare const circle = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/circle.png";
5
4
  export declare const circleBlur = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/circleBlur.png";
@@ -1,7 +1,6 @@
1
1
  import { Texture } from 'three';
2
2
  import { TresColor } from '@tresjs/core';
3
3
  import { default as Lensflare } from './component.vue';
4
-
5
4
  export { Lensflare };
6
5
  export interface SeedProps {
7
6
  texture: string[];
@@ -1,5 +1,4 @@
1
1
  import { PositionalAudio } from 'three';
2
-
3
2
  export interface PositionalAudioProps {
4
3
  ready: boolean;
5
4
  url: string;
@@ -1,6 +1,5 @@
1
1
  import { TresColor } from '@tresjs/core';
2
2
  import { Reflector } from 'three-stdlib';
3
-
4
3
  export interface ReflectorProps {
5
4
  /**
6
5
  * The color of the reflector.
@@ -155,127 +155,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
155
155
  }, {}>;
156
156
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
157
157
  export default _default;
158
- export declare const __VLS_globalTypesStart: {};
159
- declare global {
160
- type __VLS_IntrinsicElements = __VLS_PickNotAny<import('vue/jsx-runtime').JSX.IntrinsicElements, __VLS_PickNotAny<globalThis.JSX.IntrinsicElements, Record<string, any>>>;
161
- type __VLS_Element = __VLS_PickNotAny<import('vue/jsx-runtime').JSX.Element, globalThis.JSX.Element>;
162
- type __VLS_GlobalComponents = __VLS_PickNotAny<import('vue').GlobalComponents, {}> & __VLS_PickNotAny<import('@vue/runtime-core').GlobalComponents, {}> & __VLS_PickNotAny<import('@vue/runtime-dom').GlobalComponents, {}> & Pick<typeof import('vue'), 'Transition' | 'TransitionGroup' | 'KeepAlive' | 'Suspense' | 'Teleport'>;
163
- type __VLS_BuiltInPublicProps = __VLS_PickNotAny<import('vue').VNodeProps, {}> & __VLS_PickNotAny<import('vue').AllowedComponentProps, {}> & __VLS_PickNotAny<import('vue').ComponentCustomProps, {}>;
164
- type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
165
- type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
166
- const __VLS_intrinsicElements: __VLS_IntrinsicElements;
167
- function __VLS_getVForSourceType(source: number): [number, number, number][];
168
- function __VLS_getVForSourceType(source: string): [string, number, number][];
169
- function __VLS_getVForSourceType<T extends any[]>(source: T): [
170
- item: T[number],
171
- key: number,
172
- index: number
173
- ][];
174
- function __VLS_getVForSourceType<T extends {
175
- [Symbol.iterator](): Iterator<any>;
176
- }>(source: T): [
177
- item: T extends {
178
- [Symbol.iterator](): Iterator<infer T1>;
179
- } ? T1 : never,
180
- key: number,
181
- index: undefined
182
- ][];
183
- function __VLS_getVForSourceType<T extends number | {
184
- [Symbol.iterator](): Iterator<any>;
185
- }>(source: T): [
186
- item: number | (Exclude<T, number> extends {
187
- [Symbol.iterator](): Iterator<infer T1>;
188
- } ? T1 : never),
189
- key: number,
190
- index: undefined
191
- ][];
192
- function __VLS_getVForSourceType<T>(source: T): [
193
- item: T[keyof T],
194
- key: keyof T,
195
- index: number
196
- ][];
197
- function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
198
- function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
199
- function __VLS_directiveFunction<T>(dir: T): T extends import('vue').ObjectDirective<infer E, infer V> | import('vue').FunctionDirective<infer E, infer V> ? (value: V) => void : T;
200
- function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
201
- function __VLS_makeOptional<T>(t: T): {
202
- [K in keyof T]?: T[K];
203
- };
204
- type __VLS_SelfComponent<N, C> = string extends N ? {} : N extends string ? {
205
- [P in N]: C;
206
- } : {};
207
- type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> = N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
208
- [K in N0]: LocalComponents[N1];
209
- } : N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
210
- [K in N0]: LocalComponents[N2];
211
- } : N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
212
- [K in N0]: LocalComponents[N3];
213
- } : N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
214
- [K in N0]: __VLS_GlobalComponents[N1];
215
- } : N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
216
- [K in N0]: __VLS_GlobalComponents[N2];
217
- } : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
218
- [K in N0]: __VLS_GlobalComponents[N3];
219
- } : {
220
- [K in N0]: unknown;
221
- };
222
- function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K): T extends new (...args: any) => any ? (props: (K extends {
223
- $props: infer Props;
224
- } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
225
- __ctx?: {
226
- attrs?: any;
227
- slots?: K extends {
228
- $slots: infer Slots;
229
- } ? Slots : any;
230
- emit?: K extends {
231
- $emit: infer Emit;
232
- } ? Emit : any;
233
- } & {
234
- props?: (K extends {
235
- $props: infer Props;
236
- } ? Props : any) & Record<string, unknown>;
237
- expose?(exposed: K): void;
238
- };
239
- } : T extends () => any ? (props: {}, ctx?: any) => ReturnType<T> : T extends (...args: any) => any ? T : (_: {} & Record<string, unknown>, ctx?: any) => {
240
- __ctx?: {
241
- attrs?: any;
242
- expose?: any;
243
- slots?: any;
244
- emit?: any;
245
- props?: {} & Record<string, unknown>;
246
- };
247
- };
248
- function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
249
- function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): Parameters<T>['length'] extends 2 ? [any] : [];
250
- function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
251
- __ctx?: infer Ctx;
252
- } ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>;
253
- type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
254
- __ctx?: {
255
- props?: infer P;
256
- };
257
- } ? NonNullable<P> : never : T extends (props: infer P, ...args: any) => any ? P : {};
258
- type __VLS_AsFunctionOrAny<F> = unknown extends F ? any : ((...args: any) => any) extends F ? F : any;
259
- function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
260
- /**
261
- * emit
262
- */
263
- type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
264
- type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R ? U extends T ? never : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R) : never;
265
- type __VLS_OverloadUnion<T> = Exclude<__VLS_OverloadUnionInner<(() => never) & T>, T extends () => never ? never : () => never>;
266
- type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F ? F extends (event: infer E, ...args: infer A) => any ? {
267
- [K in E & string]: (...args: A) => void;
268
- } : never : never;
269
- type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<__VLS_UnionToIntersection<__VLS_ConstructorOverloads<T> & {
270
- [K in keyof T]: T[K] extends any[] ? {
271
- (...args: T[K]): void;
272
- } : never;
273
- }>>;
274
- type __VLS_PrettifyGlobal<T> = {
275
- [K in keyof T]: T[K];
276
- } & {};
277
- }
278
- export declare const __VLS_globalTypesEnd: {};
158
+
279
159
  type __VLS_WithDefaults<P, D> = {
280
160
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
281
161
  default: D[K];
@@ -9,7 +9,6 @@ import { default as Fbo } from './useFBO/component.vue';
9
9
  import { default as Sampler } from './useSurfaceSampler/component.vue';
10
10
  import { default as AnimatedSprite } from './AnimatedSprite/component.vue';
11
11
  import { default as PositionalAudio } from './PositionalAudio.vue';
12
-
13
12
  export * from './useFBO/';
14
13
  export * from './useSurfaceSampler';
15
14
  export * from '../staging/useEnvironment';
@@ -1,6 +1,5 @@
1
1
  import { AnimationAction, AnimationClip, Object3D, Scene, AnimationMixer } from 'three';
2
2
  import { Ref } from 'vue';
3
-
4
3
  /**
5
4
  * Creates an AnimationMixer and returns it.
6
5
  *
@@ -1,5 +1,4 @@
1
1
  import { FboOptions } from '.';
2
-
3
2
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<FboOptions>, {
4
3
  depth: boolean;
5
4
  settings: undefined;
@@ -1,6 +1,5 @@
1
1
  import { RenderTargetOptions, WebGLRenderTarget } from 'three';
2
2
  import { Ref } from 'vue';
3
-
4
3
  export interface FboOptions {
5
4
  width?: number;
6
5
  height?: number;
@@ -1,5 +1,4 @@
1
1
  import { useSurfaceSamplerProps } from '.';
2
-
3
2
  declare function __VLS_template(): {
4
3
  default?(_: {}): any;
5
4
  };
@@ -1,5 +1,4 @@
1
1
  import { Color, InterleavedBuffer, Object3D, Vector3, InstancedMesh, Mesh } from 'three';
2
-
3
2
  export interface useSurfaceSamplerProps {
4
3
  transform?: TransformFn;
5
4
  weight?: string;