@tresjs/core 3.6.1 → 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/src/components/TresCanvas.vue.d.ts +1 -1
- package/dist/src/composables/useCamera/index.d.ts +12 -12
- 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 +1 -0
- package/dist/src/utils/index.d.ts +8 -0
- package/dist/tres.js +902 -464
- package/dist/tres.umd.cjs +2 -2
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
30
30
|
}>, {
|
|
31
31
|
context: import("vue").ShallowRef<TresContext | null>;
|
|
32
32
|
dispose: () => void;
|
|
33
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
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
34
|
alpha: undefined;
|
|
35
35
|
depth: undefined;
|
|
36
36
|
shadows: undefined;
|
|
@@ -1054,7 +1054,6 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1054
1054
|
}[];
|
|
1055
1055
|
userData: Record<string, any>;
|
|
1056
1056
|
customDepthMaterial?: {
|
|
1057
|
-
readonly isMaterial: true;
|
|
1058
1057
|
alphaHash: boolean;
|
|
1059
1058
|
alphaTest: number;
|
|
1060
1059
|
alphaToCoverage: boolean;
|
|
@@ -1239,6 +1238,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1239
1238
|
stencilFail: import("three").StencilOp;
|
|
1240
1239
|
stencilZFail: import("three").StencilOp;
|
|
1241
1240
|
stencilZPass: import("three").StencilOp;
|
|
1241
|
+
readonly isMaterial: true;
|
|
1242
1242
|
name: string;
|
|
1243
1243
|
needsUpdate: boolean;
|
|
1244
1244
|
opacity: number;
|
|
@@ -1262,7 +1262,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1262
1262
|
clone: () => import("three").Material;
|
|
1263
1263
|
copy: (material: import("three").Material) => import("three").Material;
|
|
1264
1264
|
dispose: () => void;
|
|
1265
|
-
onBeforeCompile: (
|
|
1265
|
+
onBeforeCompile: (shader: import("three").Shader, renderer: import("three").WebGLRenderer) => void;
|
|
1266
1266
|
customProgramCacheKey: () => string;
|
|
1267
1267
|
setValues: (values: import("three").MaterialParameters) => void;
|
|
1268
1268
|
toJSON: (meta?: any) => any;
|
|
@@ -1289,7 +1289,6 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1289
1289
|
}[T_6]) => void;
|
|
1290
1290
|
} | undefined;
|
|
1291
1291
|
customDistanceMaterial?: {
|
|
1292
|
-
readonly isMaterial: true;
|
|
1293
1292
|
alphaHash: boolean;
|
|
1294
1293
|
alphaTest: number;
|
|
1295
1294
|
alphaToCoverage: boolean;
|
|
@@ -1474,6 +1473,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1474
1473
|
stencilFail: import("three").StencilOp;
|
|
1475
1474
|
stencilZFail: import("three").StencilOp;
|
|
1476
1475
|
stencilZPass: import("three").StencilOp;
|
|
1476
|
+
readonly isMaterial: true;
|
|
1477
1477
|
name: string;
|
|
1478
1478
|
needsUpdate: boolean;
|
|
1479
1479
|
opacity: number;
|
|
@@ -1497,7 +1497,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1497
1497
|
clone: () => import("three").Material;
|
|
1498
1498
|
copy: (material: import("three").Material) => import("three").Material;
|
|
1499
1499
|
dispose: () => void;
|
|
1500
|
-
onBeforeCompile: (
|
|
1500
|
+
onBeforeCompile: (shader: import("three").Shader, renderer: import("three").WebGLRenderer) => void;
|
|
1501
1501
|
customProgramCacheKey: () => string;
|
|
1502
1502
|
setValues: (values: import("three").MaterialParameters) => void;
|
|
1503
1503
|
toJSON: (meta?: any) => any;
|
|
@@ -2442,7 +2442,6 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2442
2442
|
}[];
|
|
2443
2443
|
userData: Record<string, any>;
|
|
2444
2444
|
customDepthMaterial?: {
|
|
2445
|
-
readonly isMaterial: true;
|
|
2446
2445
|
alphaHash: boolean;
|
|
2447
2446
|
alphaTest: number;
|
|
2448
2447
|
alphaToCoverage: boolean;
|
|
@@ -2627,6 +2626,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2627
2626
|
stencilFail: import("three").StencilOp;
|
|
2628
2627
|
stencilZFail: import("three").StencilOp;
|
|
2629
2628
|
stencilZPass: import("three").StencilOp;
|
|
2629
|
+
readonly isMaterial: true;
|
|
2630
2630
|
name: string;
|
|
2631
2631
|
needsUpdate: boolean;
|
|
2632
2632
|
opacity: number;
|
|
@@ -2650,7 +2650,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2650
2650
|
clone: () => import("three").Material;
|
|
2651
2651
|
copy: (material: import("three").Material) => import("three").Material;
|
|
2652
2652
|
dispose: () => void;
|
|
2653
|
-
onBeforeCompile: (
|
|
2653
|
+
onBeforeCompile: (shader: import("three").Shader, renderer: import("three").WebGLRenderer) => void;
|
|
2654
2654
|
customProgramCacheKey: () => string;
|
|
2655
2655
|
setValues: (values: import("three").MaterialParameters) => void;
|
|
2656
2656
|
toJSON: (meta?: any) => any;
|
|
@@ -2677,7 +2677,6 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2677
2677
|
}[T_6]) => void;
|
|
2678
2678
|
} | undefined;
|
|
2679
2679
|
customDistanceMaterial?: {
|
|
2680
|
-
readonly isMaterial: true;
|
|
2681
2680
|
alphaHash: boolean;
|
|
2682
2681
|
alphaTest: number;
|
|
2683
2682
|
alphaToCoverage: boolean;
|
|
@@ -2862,6 +2861,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2862
2861
|
stencilFail: import("three").StencilOp;
|
|
2863
2862
|
stencilZFail: import("three").StencilOp;
|
|
2864
2863
|
stencilZPass: import("three").StencilOp;
|
|
2864
|
+
readonly isMaterial: true;
|
|
2865
2865
|
name: string;
|
|
2866
2866
|
needsUpdate: boolean;
|
|
2867
2867
|
opacity: number;
|
|
@@ -2885,7 +2885,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2885
2885
|
clone: () => import("three").Material;
|
|
2886
2886
|
copy: (material: import("three").Material) => import("three").Material;
|
|
2887
2887
|
dispose: () => void;
|
|
2888
|
-
onBeforeCompile: (
|
|
2888
|
+
onBeforeCompile: (shader: import("three").Shader, renderer: import("three").WebGLRenderer) => void;
|
|
2889
2889
|
customProgramCacheKey: () => string;
|
|
2890
2890
|
setValues: (values: import("three").MaterialParameters) => void;
|
|
2891
2891
|
toJSON: (meta?: any) => any;
|
|
@@ -3811,7 +3811,6 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
3811
3811
|
}[];
|
|
3812
3812
|
userData: Record<string, any>;
|
|
3813
3813
|
customDepthMaterial?: {
|
|
3814
|
-
readonly isMaterial: true;
|
|
3815
3814
|
alphaHash: boolean;
|
|
3816
3815
|
alphaTest: number;
|
|
3817
3816
|
alphaToCoverage: boolean;
|
|
@@ -3996,6 +3995,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
3996
3995
|
stencilFail: import("three").StencilOp;
|
|
3997
3996
|
stencilZFail: import("three").StencilOp;
|
|
3998
3997
|
stencilZPass: import("three").StencilOp;
|
|
3998
|
+
readonly isMaterial: true;
|
|
3999
3999
|
name: string;
|
|
4000
4000
|
needsUpdate: boolean;
|
|
4001
4001
|
opacity: number;
|
|
@@ -4019,7 +4019,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4019
4019
|
clone: () => import("three").Material;
|
|
4020
4020
|
copy: (material: import("three").Material) => import("three").Material;
|
|
4021
4021
|
dispose: () => void;
|
|
4022
|
-
onBeforeCompile: (
|
|
4022
|
+
onBeforeCompile: (shader: import("three").Shader, renderer: import("three").WebGLRenderer) => void;
|
|
4023
4023
|
customProgramCacheKey: () => string;
|
|
4024
4024
|
setValues: (values: import("three").MaterialParameters) => void;
|
|
4025
4025
|
toJSON: (meta?: any) => any;
|
|
@@ -4046,7 +4046,6 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4046
4046
|
}[T_6]) => void;
|
|
4047
4047
|
} | undefined;
|
|
4048
4048
|
customDistanceMaterial?: {
|
|
4049
|
-
readonly isMaterial: true;
|
|
4050
4049
|
alphaHash: boolean;
|
|
4051
4050
|
alphaTest: number;
|
|
4052
4051
|
alphaToCoverage: boolean;
|
|
@@ -4231,6 +4230,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4231
4230
|
stencilFail: import("three").StencilOp;
|
|
4232
4231
|
stencilZFail: import("three").StencilOp;
|
|
4233
4232
|
stencilZPass: import("three").StencilOp;
|
|
4233
|
+
readonly isMaterial: true;
|
|
4234
4234
|
name: string;
|
|
4235
4235
|
needsUpdate: boolean;
|
|
4236
4236
|
opacity: number;
|
|
@@ -4254,7 +4254,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4254
4254
|
clone: () => import("three").Material;
|
|
4255
4255
|
copy: (material: import("three").Material) => import("three").Material;
|
|
4256
4256
|
dispose: () => void;
|
|
4257
|
-
onBeforeCompile: (
|
|
4257
|
+
onBeforeCompile: (shader: import("three").Shader, renderer: import("three").WebGLRenderer) => void;
|
|
4258
4258
|
customProgramCacheKey: () => string;
|
|
4259
4259
|
setValues: (values: import("three").MaterialParameters) => void;
|
|
4260
4260
|
toJSON: (meta?: any) => any;
|
|
@@ -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;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { MeshBasicMaterial, Vector3 } from 'three';
|
|
2
|
+
import type { Mesh, Scene, Object3D } from 'three';
|
|
1
3
|
export declare function toSetMethodName(key: string): string;
|
|
2
4
|
export declare const merge: (target: any, source: any) => any;
|
|
3
5
|
export declare const isHTMLTag: (key: string) => boolean;
|
|
@@ -13,3 +15,9 @@ export declare function deepArrayEqual(arr1: any[], arr2: any[]): boolean;
|
|
|
13
15
|
* TypeSafe version of Array.isArray
|
|
14
16
|
*/
|
|
15
17
|
export declare const isArray: (a: any) => a is any[] | readonly any[];
|
|
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;
|