@tresjs/core 3.7.0-next.0 → 3.7.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/dist/index.d.ts +3 -18
- package/dist/{components → src/components}/TresCanvas.vue.d.ts +4 -3
- package/dist/{composables → src/composables}/useRenderer/index.d.ts +1 -1
- package/dist/src/devtools/highlight.d.ts +7 -0
- package/dist/src/devtools/index.d.ts +1 -0
- package/dist/src/devtools/plugin.d.ts +15 -0
- package/dist/src/devtools/utils.d.ts +7 -0
- package/dist/src/directives/index.d.ts +5 -0
- package/dist/src/directives/vAlwaysLookAt.d.ts +6 -0
- package/dist/src/directives/vDistanceTo.d.ts +6 -0
- package/dist/src/directives/vLightHelper.d.ts +6 -0
- package/dist/src/directives/vLog.d.ts +6 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/{utils → src/utils}/index.d.ts +8 -8
- package/dist/tres.js +1010 -468
- package/dist/tres.umd.cjs +3 -3
- package/package.json +1 -1
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCamera/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useLoader/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useLogger.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePointerEventHandler/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRaycaster/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRenderLoop/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRenderer/const.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSeek/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTexture/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTresContextProvider/index.d.ts +0 -0
- /package/dist/{core → src/core}/catalogue.d.ts +0 -0
- /package/dist/{core → src/core}/nodeOps.d.ts +0 -0
- /package/dist/{core → src/core}/renderer.d.ts +0 -0
- /package/dist/{core → src/core}/revision.d.ts +0 -0
- /package/dist/{types → src/types}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/normalize.d.ts +0 -0
- /package/dist/{utils → src/utils}/perf.d.ts +0 -0
- /package/dist/{utils → src/utils}/template-compiler-options.d.ts +0 -0
- /package/dist/{utils → src/utils}/test-utils.d.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import templateCompilerOptions from './utils/template-compiler-options';
|
|
5
|
-
export * from './composables';
|
|
6
|
-
export * from './core/catalogue';
|
|
7
|
-
export * from './components';
|
|
8
|
-
export * from './types';
|
|
9
|
-
export interface TresOptions {
|
|
10
|
-
extends?: Record<string, unknown>;
|
|
11
|
-
}
|
|
12
|
-
export interface TresPlugin {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
install: (app: App, options?: TresOptions) => void;
|
|
15
|
-
}
|
|
16
|
-
declare const plugin: TresPlugin;
|
|
17
|
-
export default plugin;
|
|
18
|
-
export { normalizeColor, normalizeVectorFlexibleParam, templateCompilerOptions, dispose, };
|
|
1
|
+
export * from './src/index'
|
|
2
|
+
import Tres from './src/index'
|
|
3
|
+
export default Tres
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { WebGLRendererParameters, ColorSpace, ShadowMapType, ToneMapping } from 'three';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
3
2
|
import { type TresContext } from '../composables';
|
|
4
3
|
import type { RendererPresetsType } from '../composables/useRenderer/const';
|
|
5
4
|
import type { TresCamera } from '../types/';
|
|
@@ -29,7 +28,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
29
28
|
logarithmicDepthBuffer: undefined;
|
|
30
29
|
failIfMajorPerformanceCaveat: undefined;
|
|
31
30
|
}>, {
|
|
32
|
-
context:
|
|
31
|
+
context: import("vue").ShallowRef<TresContext | null>;
|
|
33
32
|
dispose: () => void;
|
|
34
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>, {
|
|
35
34
|
alpha: undefined;
|
|
@@ -57,7 +56,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
57
56
|
disableRender: boolean;
|
|
58
57
|
}, {}>, Readonly<{
|
|
59
58
|
default(): any;
|
|
60
|
-
}
|
|
59
|
+
}> & {
|
|
60
|
+
default(): any;
|
|
61
|
+
}>;
|
|
61
62
|
export default _default;
|
|
62
63
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
63
64
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -83,7 +83,7 @@ export declare function useRenderer({ scene, canvas, options, disableRender, con
|
|
|
83
83
|
contextParts: Pick<TresContext, 'sizes' | 'camera'>;
|
|
84
84
|
disableRender: MaybeRefOrGetter<boolean>;
|
|
85
85
|
}): {
|
|
86
|
-
renderer: import("vue").
|
|
86
|
+
renderer: import("vue").ShallowRef<WebGLRenderer>;
|
|
87
87
|
};
|
|
88
88
|
export type UseRendererReturn = ReturnType<typeof useRenderer>;
|
|
89
89
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { registerTresDevtools } from './plugin';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { App as DevtoolsApp } from '@vue/devtools-api';
|
|
2
|
+
import type { TresContext } from '../composables';
|
|
3
|
+
export interface Tags {
|
|
4
|
+
label: string;
|
|
5
|
+
textColor: number;
|
|
6
|
+
backgroundColor: number;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SceneGraphObject {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
children: SceneGraphObject[];
|
|
13
|
+
tags: Tags[];
|
|
14
|
+
}
|
|
15
|
+
export declare function registerTresDevtools(app: DevtoolsApp, tres: TresContext): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import { normalizeColor, normalizeVectorFlexibleParam } from './utils/normalize';
|
|
3
|
+
import templateCompilerOptions from './utils/template-compiler-options';
|
|
4
|
+
export * from './composables';
|
|
5
|
+
export * from './core/catalogue';
|
|
6
|
+
export * from './components';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './directives';
|
|
9
|
+
export interface TresOptions {
|
|
10
|
+
extends?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface TresPlugin {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
install: (app: App, options?: TresOptions) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const plugin: TresPlugin;
|
|
17
|
+
export default plugin;
|
|
18
|
+
export { normalizeColor, normalizeVectorFlexibleParam, templateCompilerOptions, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MeshBasicMaterial, Vector3 } from 'three';
|
|
2
|
+
import type { Mesh, Scene, Object3D } from 'three';
|
|
2
3
|
export declare function toSetMethodName(key: string): string;
|
|
3
4
|
export declare const merge: (target: any, source: any) => any;
|
|
4
5
|
export declare const isHTMLTag: (key: string) => boolean;
|
|
@@ -14,10 +15,9 @@ export declare function deepArrayEqual(arr1: any[], arr2: any[]): boolean;
|
|
|
14
15
|
* TypeSafe version of Array.isArray
|
|
15
16
|
*/
|
|
16
17
|
export declare const isArray: (a: any) => a is any[] | readonly any[];
|
|
17
|
-
export declare function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare function
|
|
23
|
-
export default disposeObject3D;
|
|
18
|
+
export declare function editSceneObject(scene: Scene, objectUuid: string, propertyPath: string[], value: any): void;
|
|
19
|
+
export declare function createHighlightMaterial(): MeshBasicMaterial;
|
|
20
|
+
export declare function animateHighlight(highlightMesh: Mesh, startTime: number): void;
|
|
21
|
+
export declare function stopHighlightAnimation(): void;
|
|
22
|
+
export declare function createHighlightMesh(object: Object3D): Mesh;
|
|
23
|
+
export declare function extractBindingPosition(binding: any): Vector3;
|