@tresjs/core 5.0.0-next.0 → 5.0.0-next.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tresjs/core",
3
3
  "type": "module",
4
- "version": "5.0.0-next.0",
4
+ "version": "5.0.0-next.1",
5
5
  "packageManager": "pnpm@10.6.3",
6
6
  "description": "Declarative ThreeJS using Vue Components",
7
7
  "author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
@@ -58,6 +58,7 @@
58
58
  "coverage": "vitest run --coverage",
59
59
  "lint": "eslint .",
60
60
  "lint:fix": "eslint . --fix",
61
+ "typecheck": "vue-tsc --noEmit",
61
62
  "docs:dev": "vitepress dev docs",
62
63
  "docs:build": "vitepress build docs",
63
64
  "docs:serve": "vitepress serve docs",
@@ -76,7 +77,7 @@
76
77
  "devDependencies": {
77
78
  "@release-it/conventional-changelog": "^10.0.0",
78
79
  "@stackblitz/sdk": "^1.11.0",
79
- "@tresjs/cientos": "4.1.0",
80
+ "@tresjs/cientos": "https://pkg.pr.new/@tresjs/cientos@14afe95",
80
81
  "@tresjs/eslint-config": "^1.4.0",
81
82
  "@types/three": "^0.173.0",
82
83
  "@typescript-eslint/eslint-plugin": "^8.23.0",
@@ -112,6 +113,7 @@
112
113
  "vitepress": "1.6.3",
113
114
  "vitest": "3.0.5",
114
115
  "vue": "3.5.13",
115
- "vue-demi": "^0.14.10"
116
+ "vue-demi": "^0.14.10",
117
+ "vue-tsc": "^2.2.0"
116
118
  }
117
119
  }
@@ -1,20 +0,0 @@
1
- import { Object3D, Scene } from 'three';
2
- /**
3
- * Seek composable return type
4
- *
5
- * @export
6
- * @interface UseSeekReturn
7
- */
8
- export interface UseSeekReturn {
9
- seek: (parent: Scene | Object3D, property: string, value: string) => Object3D | null;
10
- seekByName: (parent: Scene | Object3D, value: string) => Object3D | null;
11
- seekAll: (parent: Scene | Object3D, property: string, value: string) => Object3D[];
12
- seekAllByName: (parent: Scene | Object3D, value: string) => Object3D[];
13
- }
14
- /**
15
- * Composable that provides utilities to easily traverse and navigate through complex scenes and object children graphs
16
- *
17
- * @export
18
- * @return {*} {UseSeekReturn}
19
- */
20
- export declare function useSeek(): UseSeekReturn;
@@ -1,29 +0,0 @@
1
- import { PBRUseTextureMap } from './index';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {
6
- textures: {
7
- map: import('three').Texture;
8
- displacementMap: import('three').Texture;
9
- normalMap: import('three').Texture;
10
- roughnessMap: import('three').Texture;
11
- metalnessMap: import('three').Texture;
12
- aoMap: import('three').Texture;
13
- alphaMap: import('three').Texture;
14
- matcap: import('three').Texture;
15
- };
16
- }): any;
17
- };
18
- refs: {};
19
- rootEl: any;
20
- };
21
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
- declare const __VLS_component: import('vue').DefineComponent<PBRUseTextureMap, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PBRUseTextureMap> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
- export default _default;
25
- type __VLS_WithTemplateSlots<T, S> = T & {
26
- new (): {
27
- $slots: S;
28
- };
29
- };
@@ -1,103 +0,0 @@
1
- import { Texture } from 'three';
2
- export interface PBRMaterialOptions {
3
- /**
4
- * List of texture maps to load.
5
- *
6
- * @type {string[]}
7
- * @memberof PBRMaterialOptions
8
- */
9
- maps: string[];
10
- /**
11
- * Path to the texture maps.
12
- *
13
- * @type {('png' | 'jpg')}
14
- * @memberof PBRMaterialOptions
15
- */
16
- ext: 'png' | 'jpg';
17
- }
18
- export interface PBRTextureMaps {
19
- [key: string]: Texture | null;
20
- }
21
- /**
22
- * Map of textures to load that can be passed to `useTexture()`.
23
- */
24
- export interface PBRUseTextureMap {
25
- map?: string;
26
- displacementMap?: string;
27
- normalMap?: string;
28
- roughnessMap?: string;
29
- metalnessMap?: string;
30
- aoMap?: string;
31
- alphaMap?: string;
32
- matcap?: string;
33
- }
34
- /**
35
- * Loads a single texture.
36
- *
37
- * ```ts
38
- * import { useTexture } from 'tres'
39
- *
40
- * const matcapTexture = await useTexture(['path/to/texture.png'])
41
- * ```
42
- * Then you can use the texture in your material.
43
- *
44
- * ```vue
45
- * <TresMeshMatcapMaterial :matcap="matcapTexture" />
46
- * ```
47
- * @see https://tresjs.org/examples/load-textures.html
48
- * @export
49
- * @param paths
50
- * @return A promise of the resulting texture
51
- */
52
- export declare function useTexture(paths: readonly [string]): Promise<Texture>;
53
- /**
54
- * Loads multiple textures.
55
- *
56
- * ```ts
57
- * import { useTexture } from 'tres'
58
- *
59
- * const [texture1, texture2] = await useTexture([
60
- * 'path/to/texture1.png',
61
- * 'path/to/texture2.png',
62
- * ])
63
- * ```
64
- * Then you can use the texture in your material.
65
- *
66
- * ```vue
67
- * <TresMeshStandardMaterial map="texture1" />
68
- * ```
69
- * @see https://tresjs.org/examples/load-textures.html
70
- * @export
71
- * @param paths
72
- * @return A promise of the resulting textures
73
- */
74
- export declare function useTexture<T extends string[]>(paths: [...T]): Promise<{
75
- [K in keyof T]: Texture;
76
- }>;
77
- /**
78
- * Loads a PBR texture map.
79
- *
80
- * ```ts
81
- * import { useTexture } from 'tres'
82
- *
83
- * const pbrTexture = await useTexture({
84
- * map: 'path/to/texture.png',
85
- * displacementMap: 'path/to/displacement-map.png',
86
- * roughnessMap: 'path/to/roughness-map.png',
87
- * normalMap: 'path/to/normal-map.png',
88
- * ambientOcclusionMap: 'path/to/ambient-occlusion-map.png',
89
- * })
90
- * ```
91
- * Then you can use the texture in your material.
92
- *
93
- * ```vue
94
- * <TresMeshStandardMaterial v-bind="pbrTexture" />
95
- * ```
96
- * @see https://tresjs.org/examples/load-textures.html
97
- * @export
98
- * @param paths
99
- * @return A promise of the resulting pbr texture map
100
- */
101
- export declare function useTexture<TextureMap extends PBRUseTextureMap>(paths: TextureMap): Promise<{
102
- [K in keyof Required<PBRUseTextureMap>]: K extends keyof TextureMap ? Texture : null;
103
- }>;
@@ -1,4 +0,0 @@
1
- import { EventHook } from '@vueuse/core';
2
- export declare function createReadyEventHook<T>(getIsReady: () => boolean, triggerParams: T, pollIntervalMs?: number): EventHook<T> & {
3
- cancel: () => void;
4
- };
@@ -1,7 +0,0 @@
1
- import { TresContext } from '../useTresContextProvider';
2
- export declare function useTresReady(ctx?: TresContext): import('@vueuse/core').EventHook<TresContext> & {
3
- cancel: () => void;
4
- };
5
- export declare function onTresReady(fn: (ctx: TresContext) => void): {
6
- off: () => void;
7
- } | undefined;