@tresjs/cientos 4.0.2 → 4.1.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 (105) hide show
  1. package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +27 -56
  2. package/dist/core/abstractions/Billboard.vue.d.ts +61 -0
  3. package/dist/core/abstractions/CubeCamera/component.vue.d.ts +39 -0
  4. package/dist/core/abstractions/CubeCamera/useCubeCamera.d.ts +23 -0
  5. package/dist/core/abstractions/Edges.vue.d.ts +36 -0
  6. package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
  7. package/dist/core/abstractions/GradientTexture.vue.d.ts +47 -0
  8. package/dist/core/abstractions/Image/ImageMaterial.vue.d.ts +4 -0
  9. package/dist/core/abstractions/Image/ImageMaterialImpl.d.ts +8 -0
  10. package/dist/core/abstractions/Image/component.vue.d.ts +81 -0
  11. package/dist/core/abstractions/Lensflare/component.vue.d.ts +9 -44
  12. package/dist/core/abstractions/Lensflare/index.d.ts +1 -1
  13. package/dist/core/abstractions/Levioso.vue.d.ts +22 -35
  14. package/dist/core/abstractions/Mask/component.vue.d.ts +40 -0
  15. package/dist/core/abstractions/Mask/useMask.d.ts +9 -0
  16. package/dist/core/abstractions/MouseParallax.vue.d.ts +2 -29
  17. package/dist/core/abstractions/Outline/OutlineMaterialImpl.d.ts +4 -0
  18. package/dist/core/abstractions/Outline/component.vue.d.ts +34 -0
  19. package/dist/core/abstractions/PositionalAudio.vue.d.ts +7 -42
  20. package/dist/core/abstractions/Reflector.vue.d.ts +14 -38
  21. package/dist/core/abstractions/ScreenSizer.vue.d.ts +35 -0
  22. package/dist/core/abstractions/ScreenSpace.vue.d.ts +32 -0
  23. package/dist/core/abstractions/Text3D.vue.d.ts +20 -46
  24. package/dist/core/abstractions/index.d.ts +19 -9
  25. package/dist/core/abstractions/useAnimations.d.ts +1 -1
  26. package/dist/core/abstractions/useFBO/component.vue.d.ts +4 -29
  27. package/dist/core/abstractions/useFBO/index.d.ts +2 -2
  28. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +19 -14
  29. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +1059 -299
  30. package/dist/core/controls/CameraControls.vue.d.ts +18 -10095
  31. package/dist/core/controls/KeyboardControls.vue.d.ts +6 -29
  32. package/dist/core/controls/MapControls.vue.d.ts +15 -8925
  33. package/dist/core/controls/OrbitControls.vue.d.ts +20 -8940
  34. package/dist/core/controls/PointerLockControls.vue.d.ts +6 -28
  35. package/dist/core/controls/ScrollControls.vue.d.ts +24 -39
  36. package/dist/core/controls/TransformControls.vue.d.ts +8 -43
  37. package/dist/core/controls/index.d.ts +5 -5
  38. package/dist/core/index.d.ts +2 -2
  39. package/dist/core/loaders/SVG/component.vue.d.ts +4 -29
  40. package/dist/core/loaders/index.d.ts +3 -3
  41. package/dist/core/loaders/useFBX/component.vue.d.ts +6 -29
  42. package/dist/core/loaders/useFBX/index.d.ts +3 -3
  43. package/dist/core/loaders/useGLTF/component.vue.d.ts +6 -33
  44. package/dist/core/loaders/useGLTF/index.d.ts +8 -9
  45. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +3 -12
  46. package/dist/core/materials/holographicMaterial/index.vue.d.ts +6 -47
  47. package/dist/core/materials/index.d.ts +5 -4
  48. package/dist/core/materials/meshDiscardMaterial/index.vue.d.ts +4 -0
  49. package/dist/core/materials/meshDiscardMaterial/material.d.ts +4 -0
  50. package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +2 -2
  51. package/dist/core/materials/meshGlassMaterial/material.d.ts +1 -3
  52. package/dist/core/materials/meshReflectionMaterial/BlurPass.d.ts +1 -1
  53. package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +16 -109
  54. package/dist/core/materials/meshReflectionMaterial/material.d.ts +1 -1
  55. package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +6 -29
  56. package/dist/core/materials/meshWobbleMaterial/material.d.ts +1 -1
  57. package/dist/core/misc/BakeShadows.d.ts +1 -1
  58. package/dist/core/misc/Stats.d.ts +4 -4
  59. package/dist/core/misc/StatsGl.d.ts +1 -1
  60. package/dist/core/misc/html/HTML.vue.d.ts +30 -42
  61. package/dist/core/misc/html/utils.d.ts +1 -1
  62. package/dist/core/misc/index.d.ts +3 -3
  63. package/dist/core/shapes/Box.vue.d.ts +20 -29
  64. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +6 -33
  65. package/dist/core/shapes/Circle.vue.d.ts +20 -29
  66. package/dist/core/shapes/Cone.vue.d.ts +20 -29
  67. package/dist/core/shapes/Cylinder.vue.d.ts +20 -29
  68. package/dist/core/shapes/Dodecahedron.vue.d.ts +20 -29
  69. package/dist/core/shapes/Icosahedron.vue.d.ts +20 -29
  70. package/dist/core/shapes/Line2.vue.d.ts +6 -45
  71. package/dist/core/shapes/Octahedron.vue.d.ts +20 -29
  72. package/dist/core/shapes/Plane.vue.d.ts +20 -29
  73. package/dist/core/shapes/Ring.vue.d.ts +20 -29
  74. package/dist/core/shapes/RoundedBox.vue.d.ts +20 -29
  75. package/dist/core/shapes/Sphere.vue.d.ts +20 -29
  76. package/dist/core/shapes/Superformula.vue.d.ts +21 -39
  77. package/dist/core/shapes/Tetrahedron.vue.d.ts +20 -29
  78. package/dist/core/shapes/Torus.vue.d.ts +20 -29
  79. package/dist/core/shapes/TorusKnot.vue.d.ts +20 -29
  80. package/dist/core/shapes/Tube.vue.d.ts +21 -30
  81. package/dist/core/shapes/index.d.ts +1 -1
  82. package/dist/core/staging/Align.vue.d.ts +87 -0
  83. package/dist/core/staging/Backdrop.vue.d.ts +29 -31
  84. package/dist/core/staging/ContactShadows.vue.d.ts +7 -50
  85. package/dist/core/staging/Fit.vue.d.ts +37 -30
  86. package/dist/core/staging/Grid.vue.d.ts +52 -0
  87. package/dist/core/staging/Ocean.vue.d.ts +15 -50
  88. package/dist/core/staging/Precipitation.vue.d.ts +22 -62
  89. package/dist/core/staging/Sky.vue.d.ts +4 -37
  90. package/dist/core/staging/Smoke.vue.d.ts +6 -41
  91. package/dist/core/staging/SoftShadows.vue.d.ts +14 -0
  92. package/dist/core/staging/Sparkles/ShaderData.d.ts +1 -1
  93. package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +1 -1
  94. package/dist/core/staging/Sparkles/component.vue.d.ts +9 -86
  95. package/dist/core/staging/Stars.vue.d.ts +5 -40
  96. package/dist/core/staging/index.d.ts +7 -4
  97. package/dist/core/staging/useEnvironment/{envSence.d.ts → EnvironmentScene.d.ts} +3 -3
  98. package/dist/core/staging/useEnvironment/component.vue.d.ts +15 -45
  99. package/dist/core/staging/useEnvironment/index.d.ts +14 -0
  100. package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +10 -39
  101. package/dist/trescientos.js +15288 -14829
  102. package/dist/trescientos.umd.cjs +1064 -762
  103. package/dist/utils/calculateScaleFactor.d.ts +7 -0
  104. package/dist/utils/shaderMaterial.d.ts +6 -0
  105. package/package.json +28 -26
@@ -64,51 +64,16 @@ export interface StarsProps {
64
64
  */
65
65
  alphaMap?: null;
66
66
  }
67
- declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<StarsProps>, {
68
- size: number;
69
- sizeAttenuation: boolean;
70
- transparent: boolean;
67
+ declare const _default: import('vue').DefineComponent<StarsProps, {
68
+ instance: import('vue').ShallowRef<any, any>;
69
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StarsProps> & Readonly<{}>, {
71
70
  alphaTest: number;
72
- alphaMap: null;
73
- count: number;
74
71
  depth: number;
72
+ count: number;
75
73
  radius: number;
76
- }>, {
77
- instance: import('vue').ShallowRef<any>;
78
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<StarsProps>, {
79
- size: number;
80
- sizeAttenuation: boolean;
81
74
  transparent: boolean;
82
- alphaTest: number;
83
75
  alphaMap: null;
84
- count: number;
85
- depth: number;
86
- radius: number;
87
- }>>>, {
88
76
  size: number;
89
- depth: number;
90
- count: number;
91
- alphaTest: number;
92
- alphaMap: null;
93
77
  sizeAttenuation: boolean;
94
- transparent: boolean;
95
- radius: number;
96
- }, {}>;
78
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
97
79
  export default _default;
98
- type __VLS_WithDefaults<P, D> = {
99
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
100
- default: D[K];
101
- }> : P[K];
102
- };
103
- type __VLS_Prettify<T> = {
104
- [K in keyof T]: T[K];
105
- } & {};
106
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
107
- type __VLS_TypePropsToOption<T> = {
108
- [K in keyof T]-?: {} extends Pick<T, K> ? {
109
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
110
- } : {
111
- type: import('vue').PropType<T[K]>;
112
- required: true;
113
- };
114
- };
@@ -1,12 +1,15 @@
1
- import { default as Environment } from './useEnvironment/component.vue';
2
- import { default as Lightformer } from './useEnvironment/lightformer/index.vue';
1
+ import { default as Align } from './Align.vue';
3
2
  import { default as Backdrop } from './Backdrop.vue';
4
3
  import { default as ContactShadows } from './ContactShadows.vue';
5
4
  import { default as Fit } from './Fit.vue';
5
+ import { default as Grid } from './Grid.vue';
6
+ import { default as Ocean } from './Ocean.vue';
6
7
  import { default as Precipitation } from './Precipitation.vue';
7
8
  import { default as Sky } from './Sky.vue';
8
9
  import { default as Smoke } from './Smoke.vue';
10
+ import { default as SoftShadows } from './SoftShadows.vue';
9
11
  import { default as Sparkles } from './Sparkles/component.vue';
10
12
  import { default as Stars } from './Stars.vue';
11
- import { default as Ocean } from './Ocean.vue';
12
- export { Backdrop, ContactShadows, Environment, Fit, Precipitation, Sky, Smoke, Sparkles, Stars, Ocean, Lightformer, };
13
+ import { default as Environment } from './useEnvironment/component.vue';
14
+ import { default as Lightformer } from './useEnvironment/lightformer/index.vue';
15
+ export { Align, Backdrop, ContactShadows, Environment, Fit, Grid, Lightformer, Ocean, Precipitation, Sky, Smoke, SoftShadows, Sparkles, Stars, };
@@ -1,8 +1,8 @@
1
1
  import { Object3D, Scene } from 'three';
2
- declare class EnvSence extends Object3D {
2
+ declare class EnvironmentScene extends Object3D {
3
3
  virtualScene: Scene;
4
4
  constructor();
5
5
  add(...object: Object3D[]): this;
6
- destructor(): void;
6
+ dispose(): void;
7
7
  }
8
- export default EnvSence;
8
+ export default EnvironmentScene;
@@ -1,63 +1,33 @@
1
- import { Ref } from 'vue';
2
1
  import { CubeTexture, Texture } from 'three';
2
+ import { Ref } from 'vue';
3
3
  import { EnvironmentOptions } from './const';
4
4
  declare function __VLS_template(): {
5
- default?(_: {}): any;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {
9
+ environmentScene: unknown;
10
+ };
11
+ attrs: Partial<{}>;
6
12
  };
7
- declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<EnvironmentOptions>, {
8
- background: boolean;
9
- blur: number;
10
- files: () => never[];
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<EnvironmentOptions, {
15
+ texture: Ref<Texture | CubeTexture | null, Texture | CubeTexture | null>;
16
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EnvironmentOptions> & Readonly<{}>, {
11
17
  path: string;
12
- preset: undefined;
13
- resolution: number;
14
18
  near: number;
15
19
  far: number;
16
- frames: number;
17
- }>, {
18
- texture: Ref<Texture | CubeTexture | null>;
19
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<EnvironmentOptions>, {
20
- background: boolean;
21
20
  blur: number;
22
- files: () => never[];
23
- path: string;
24
- preset: undefined;
21
+ background: boolean | string;
25
22
  resolution: number;
26
- near: number;
27
- far: number;
28
23
  frames: number;
29
- }>>>, {
30
- path: string;
31
- background: boolean | string;
32
- blur: number;
33
24
  preset: import('./const').EnvironmentPresetsType;
34
25
  files: string | string[];
35
- resolution: number;
36
- near: number;
37
- far: number;
38
- frames: number;
39
- }, {}>;
40
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
28
  export default _default;
42
- type __VLS_WithDefaults<P, D> = {
43
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
- default: D[K];
45
- }> : P[K];
46
- };
47
- type __VLS_Prettify<T> = {
48
- [K in keyof T]: T[K];
49
- } & {};
50
29
  type __VLS_WithTemplateSlots<T, S> = T & {
51
30
  new (): {
52
31
  $slots: S;
53
32
  };
54
33
  };
55
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
56
- type __VLS_TypePropsToOption<T> = {
57
- [K in keyof T]-?: {} extends Pick<T, K> ? {
58
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
59
- } : {
60
- type: import('vue').PropType<T[K]>;
61
- required: true;
62
- };
63
- };
@@ -1,4 +1,18 @@
1
1
  import { CubeTexture, Texture, WebGLCubeRenderTarget } from 'three';
2
2
  import { Ref } from 'vue';
3
3
  import { EnvironmentOptions } from './const';
4
+ /**
5
+ * Component that loads an environment map and sets it as the scene's background and environment.
6
+ *
7
+ * @export
8
+ * @param {Partial<EnvironmentOptions>} options - The options for the environment map
9
+ * files = ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png'],
10
+ * blur = 0,
11
+ * background = false,
12
+ * path = undefined,
13
+ * preset = undefined,
14
+ * colorSpace = undefined,
15
+ * @param {Ref<WebGLCubeRenderTarget | null>} fbo - The framebuffer object
16
+ * @return {Promise<Ref<Texture | CubeTexture | null>>} The loaded texture
17
+ */
4
18
  export declare function useEnvironment(options: Partial<EnvironmentOptions>, fbo: Ref<WebGLCubeRenderTarget | null>): Promise<Ref<Texture | CubeTexture | null>>;
@@ -1,55 +1,26 @@
1
- import { Texture, Color } from 'three';
2
- declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
1
+ import { Texture } from 'three';
2
+ declare const _default: import('vue').DefineComponent<{
3
3
  args?: any[];
4
- from?: "circle" | "ring" | "rect" | any;
4
+ form?: "circle" | "ring" | "rect" | any;
5
5
  toneMapped?: boolean;
6
6
  map?: Texture;
7
7
  intensity?: number;
8
8
  color?: any;
9
- }>, {
10
- args: any;
11
- from: string;
12
- toneMapped: boolean;
13
- map: any;
14
- intensity: number;
15
- color: Color;
16
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
9
+ }, {
10
+ mesh: import('vue').Ref<any, any>;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
17
12
  args?: any[];
18
- from?: "circle" | "ring" | "rect" | any;
13
+ form?: "circle" | "ring" | "rect" | any;
19
14
  toneMapped?: boolean;
20
15
  map?: Texture;
21
16
  intensity?: number;
22
17
  color?: any;
23
- }>, {
24
- args: any;
25
- from: string;
26
- toneMapped: boolean;
27
- map: any;
28
- intensity: number;
29
- color: Color;
30
- }>>>, {
18
+ }> & Readonly<{}>, {
31
19
  map: Texture;
32
20
  color: any;
33
21
  args: any[];
34
22
  toneMapped: boolean;
35
- from: "circle" | "ring" | "rect" | any;
36
23
  intensity: number;
37
- }, {}>;
24
+ form: "circle" | "ring" | "rect" | any;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
26
  export default _default;
39
- type __VLS_WithDefaults<P, D> = {
40
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
41
- default: D[K];
42
- }> : P[K];
43
- };
44
- type __VLS_Prettify<T> = {
45
- [K in keyof T]: T[K];
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
- };