@tresjs/core 3.6.0-next.0 → 3.7.0-next.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/README.md +6 -6
- package/dist/components/TresCanvas.vue.d.ts +1 -0
- package/dist/composables/useCamera/index.d.ts +18 -18
- package/dist/index.d.ts +2 -1
- package/dist/tres.js +431 -412
- package/dist/tres.umd.cjs +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.d.ts +8 -0
- package/package.json +22 -22
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Tres (Spanish word for "three", pronounced `/tres/` ) is a way of creating Three
|
|
|
19
19
|
|
|
20
20
|
It's build on-top of a [Vue Custom Renderer](https://vuejs.org/api/custom-renderer.html#createrenderer) and it's powered by Vite.
|
|
21
21
|
|
|
22
|
-
The goal is to provide the Vue's community an easy way of building 3D scenes with Vue, always up to date with the latest ThreeJS features and with 0-to-none
|
|
22
|
+
The goal is to provide the Vue's community an easy way of building 3D scenes with Vue, always up to date with the latest ThreeJS features and with 0-to-none maintenance.
|
|
23
23
|
|
|
24
24
|
## Installation
|
|
25
25
|
|
|
@@ -39,11 +39,11 @@ Checkout the [docs](https://tresjs.org)
|
|
|
39
39
|
|
|
40
40
|
| Package | Version |
|
|
41
41
|
| --------------------------- | :------------------------------------------------------------------------------------------------- |
|
|
42
|
-
| [Tres](
|
|
43
|
-
| [Cientos](
|
|
44
|
-
| [Post-processing](
|
|
45
|
-
| [Nuxt](
|
|
46
|
-
| [TresLeches 🍰](
|
|
42
|
+
| [Tres](https://github.com/TresJS/tres) |  |
|
|
43
|
+
| [Cientos](https://github.com/TresJS/cientos) |  |
|
|
44
|
+
| [Post-processing](https://github.com/TresJS/post-processing) |  |
|
|
45
|
+
| [Nuxt](https://github.com/TresJS/nuxt) |  |
|
|
46
|
+
| [TresLeches 🍰](https://github.com/TresJS/leches) |  |
|
|
47
47
|
|
|
48
48
|
## Contribution
|
|
49
49
|
|
|
@@ -30,6 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
30
30
|
failIfMajorPerformanceCaveat: undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
context: Ref<TresContext | null> | import("vue").ShallowRef<TresContext | null>;
|
|
33
|
+
dispose: () => void;
|
|
33
34
|
}, 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
35
|
alpha: undefined;
|
|
35
36
|
depth: undefined;
|
|
@@ -1052,9 +1052,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1052
1052
|
clone: () => import("three").AnimationClip;
|
|
1053
1053
|
toJSON: (clip: import("three").AnimationClip) => any;
|
|
1054
1054
|
}[];
|
|
1055
|
-
userData:
|
|
1056
|
-
[key: string]: any;
|
|
1057
|
-
};
|
|
1055
|
+
userData: Record<string, any>;
|
|
1058
1056
|
customDepthMaterial?: {
|
|
1059
1057
|
alphaHash: boolean;
|
|
1060
1058
|
alphaTest: number;
|
|
@@ -1259,7 +1257,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1259
1257
|
uuid: string;
|
|
1260
1258
|
vertexColors: boolean;
|
|
1261
1259
|
visible: boolean;
|
|
1262
|
-
userData: any
|
|
1260
|
+
userData: Record<string, any>;
|
|
1263
1261
|
version: number;
|
|
1264
1262
|
clone: () => import("three").Material;
|
|
1265
1263
|
copy: (material: import("three").Material) => import("three").Material;
|
|
@@ -1494,7 +1492,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1494
1492
|
uuid: string;
|
|
1495
1493
|
vertexColors: boolean;
|
|
1496
1494
|
visible: boolean;
|
|
1497
|
-
userData: any
|
|
1495
|
+
userData: Record<string, any>;
|
|
1498
1496
|
version: number;
|
|
1499
1497
|
clone: () => import("three").Material;
|
|
1500
1498
|
copy: (material: import("three").Material) => import("three").Material;
|
|
@@ -1525,6 +1523,8 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1525
1523
|
dispose: {};
|
|
1526
1524
|
}[T_6]) => void;
|
|
1527
1525
|
} | undefined;
|
|
1526
|
+
onBeforeShadow: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, shadowCamera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, depthMaterial: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
1527
|
+
onAfterShadow: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, shadowCamera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, depthMaterial: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
1528
1528
|
onBeforeRender: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, camera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, material: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
1529
1529
|
onAfterRender: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, camera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, material: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
1530
1530
|
applyMatrix4: (matrix: import("three").Matrix4) => void;
|
|
@@ -1556,7 +1556,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
1556
1556
|
getObjectById: (id: number) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
1557
1557
|
getObjectByName: (name: string) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
1558
1558
|
getObjectByProperty: (name: string, value: any) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
1559
|
-
getObjectsByProperty: (name: string, value: any) => import("three").Object3D<import("three").Object3DEventMap>[];
|
|
1559
|
+
getObjectsByProperty: (name: string, value: any, optionalTarget?: import("three").Object3D<import("three").Object3DEventMap>[] | undefined) => import("three").Object3D<import("three").Object3DEventMap>[];
|
|
1560
1560
|
getWorldPosition: (target: import("three").Vector3) => import("three").Vector3;
|
|
1561
1561
|
getWorldQuaternion: (target: import("three").Quaternion) => import("three").Quaternion;
|
|
1562
1562
|
getWorldScale: (target: import("three").Vector3) => import("three").Vector3;
|
|
@@ -2440,9 +2440,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2440
2440
|
clone: () => import("three").AnimationClip;
|
|
2441
2441
|
toJSON: (clip: import("three").AnimationClip) => any;
|
|
2442
2442
|
}[];
|
|
2443
|
-
userData:
|
|
2444
|
-
[key: string]: any;
|
|
2445
|
-
};
|
|
2443
|
+
userData: Record<string, any>;
|
|
2446
2444
|
customDepthMaterial?: {
|
|
2447
2445
|
alphaHash: boolean;
|
|
2448
2446
|
alphaTest: number;
|
|
@@ -2647,7 +2645,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2647
2645
|
uuid: string;
|
|
2648
2646
|
vertexColors: boolean;
|
|
2649
2647
|
visible: boolean;
|
|
2650
|
-
userData: any
|
|
2648
|
+
userData: Record<string, any>;
|
|
2651
2649
|
version: number;
|
|
2652
2650
|
clone: () => import("three").Material;
|
|
2653
2651
|
copy: (material: import("three").Material) => import("three").Material;
|
|
@@ -2882,7 +2880,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2882
2880
|
uuid: string;
|
|
2883
2881
|
vertexColors: boolean;
|
|
2884
2882
|
visible: boolean;
|
|
2885
|
-
userData: any
|
|
2883
|
+
userData: Record<string, any>;
|
|
2886
2884
|
version: number;
|
|
2887
2885
|
clone: () => import("three").Material;
|
|
2888
2886
|
copy: (material: import("three").Material) => import("three").Material;
|
|
@@ -2913,6 +2911,8 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2913
2911
|
dispose: {};
|
|
2914
2912
|
}[T_6]) => void;
|
|
2915
2913
|
} | undefined;
|
|
2914
|
+
onBeforeShadow: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, shadowCamera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, depthMaterial: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
2915
|
+
onAfterShadow: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, shadowCamera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, depthMaterial: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
2916
2916
|
onBeforeRender: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, camera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, material: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
2917
2917
|
onAfterRender: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, camera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, material: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
2918
2918
|
applyMatrix4: (matrix: import("three").Matrix4) => void;
|
|
@@ -2944,7 +2944,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
2944
2944
|
getObjectById: (id: number) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
2945
2945
|
getObjectByName: (name: string) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
2946
2946
|
getObjectByProperty: (name: string, value: any) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
2947
|
-
getObjectsByProperty: (name: string, value: any) => import("three").Object3D<import("three").Object3DEventMap>[];
|
|
2947
|
+
getObjectsByProperty: (name: string, value: any, optionalTarget?: import("three").Object3D<import("three").Object3DEventMap>[] | undefined) => import("three").Object3D<import("three").Object3DEventMap>[];
|
|
2948
2948
|
getWorldPosition: (target: import("three").Vector3) => import("three").Vector3;
|
|
2949
2949
|
getWorldQuaternion: (target: import("three").Quaternion) => import("three").Quaternion;
|
|
2950
2950
|
getWorldScale: (target: import("three").Vector3) => import("three").Vector3;
|
|
@@ -3809,9 +3809,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
3809
3809
|
clone: () => import("three").AnimationClip;
|
|
3810
3810
|
toJSON: (clip: import("three").AnimationClip) => any;
|
|
3811
3811
|
}[];
|
|
3812
|
-
userData:
|
|
3813
|
-
[key: string]: any;
|
|
3814
|
-
};
|
|
3812
|
+
userData: Record<string, any>;
|
|
3815
3813
|
customDepthMaterial?: {
|
|
3816
3814
|
alphaHash: boolean;
|
|
3817
3815
|
alphaTest: number;
|
|
@@ -4016,7 +4014,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4016
4014
|
uuid: string;
|
|
4017
4015
|
vertexColors: boolean;
|
|
4018
4016
|
visible: boolean;
|
|
4019
|
-
userData: any
|
|
4017
|
+
userData: Record<string, any>;
|
|
4020
4018
|
version: number;
|
|
4021
4019
|
clone: () => import("three").Material;
|
|
4022
4020
|
copy: (material: import("three").Material) => import("three").Material;
|
|
@@ -4251,7 +4249,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4251
4249
|
uuid: string;
|
|
4252
4250
|
vertexColors: boolean;
|
|
4253
4251
|
visible: boolean;
|
|
4254
|
-
userData: any
|
|
4252
|
+
userData: Record<string, any>;
|
|
4255
4253
|
version: number;
|
|
4256
4254
|
clone: () => import("three").Material;
|
|
4257
4255
|
copy: (material: import("three").Material) => import("three").Material;
|
|
@@ -4282,6 +4280,8 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4282
4280
|
dispose: {};
|
|
4283
4281
|
}[T_6]) => void;
|
|
4284
4282
|
} | undefined;
|
|
4283
|
+
onBeforeShadow: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, shadowCamera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, depthMaterial: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
4284
|
+
onAfterShadow: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, shadowCamera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, depthMaterial: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
4285
4285
|
onBeforeRender: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, camera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, material: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
4286
4286
|
onAfterRender: (renderer: import("three").WebGLRenderer, scene: import("three").Scene, camera: Camera, geometry: import("three").BufferGeometry<import("three").NormalBufferAttributes>, material: import("three").Material, group: import("three").Group<import("three").Object3DEventMap>) => void;
|
|
4287
4287
|
applyMatrix4: (matrix: import("three").Matrix4) => void;
|
|
@@ -4313,7 +4313,7 @@ export declare const useCamera: ({ sizes, scene }: Pick<TresContext, "sizes"> &
|
|
|
4313
4313
|
getObjectById: (id: number) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
4314
4314
|
getObjectByName: (name: string) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
4315
4315
|
getObjectByProperty: (name: string, value: any) => import("three").Object3D<import("three").Object3DEventMap> | undefined;
|
|
4316
|
-
getObjectsByProperty: (name: string, value: any) => import("three").Object3D<import("three").Object3DEventMap>[];
|
|
4316
|
+
getObjectsByProperty: (name: string, value: any, optionalTarget?: import("three").Object3D<import("three").Object3DEventMap>[] | undefined) => import("three").Object3D<import("three").Object3DEventMap>[];
|
|
4317
4317
|
getWorldPosition: (target: import("three").Vector3) => import("three").Vector3;
|
|
4318
4318
|
getWorldQuaternion: (target: import("three").Quaternion) => import("three").Quaternion;
|
|
4319
4319
|
getWorldScale: (target: import("three").Vector3) => import("three").Vector3;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
2
|
import { normalizeColor, normalizeVectorFlexibleParam } from './utils/normalize';
|
|
3
|
+
import { dispose } from './utils/';
|
|
3
4
|
import templateCompilerOptions from './utils/template-compiler-options';
|
|
4
5
|
export * from './composables';
|
|
5
6
|
export * from './core/catalogue';
|
|
@@ -14,4 +15,4 @@ export interface TresPlugin {
|
|
|
14
15
|
}
|
|
15
16
|
declare const plugin: TresPlugin;
|
|
16
17
|
export default plugin;
|
|
17
|
-
export { normalizeColor, normalizeVectorFlexibleParam, templateCompilerOptions, };
|
|
18
|
+
export { normalizeColor, normalizeVectorFlexibleParam, templateCompilerOptions, dispose, };
|