@tresjs/core 3.6.0 → 4.0.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 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 mantainance.
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](packages/tres) | ![tres version](https://img.shields.io/npm/v/@tresjs/core/latest.svg?label=%20&color=%2382DBCA) |
43
- | [Cientos](packages/cientos) | ![cientos version](https://img.shields.io/npm/v/@tresjs/cientos/latest.svg?label=%20&color=%23f19b00) |
44
- | [Post-processing](packages/post-processing) | ![post-processing version](https://img.shields.io/npm/v/@tresjs/post-processing/latest.svg?label=%20&color=ff7bac) |
45
- | [Nuxt](packages/nuxt) | ![nuxt version](https://img.shields.io/npm/v/@tresjs/nuxt/latest.svg?label=%20&color=4f4f4f&logo=nuxt.js) |
46
- | [TresLeches 🍰](packages/leches) | ![tresleches version](https://img.shields.io/npm/v/@tresjs/leches/latest.svg?label=%20&color=ffffff) |
42
+ | [Tres](https://github.com/TresJS/tres) | ![tres version](https://img.shields.io/npm/v/@tresjs/core/latest.svg?label=%20&color=%2382DBCA) |
43
+ | [Cientos](https://github.com/TresJS/cientos) | ![cientos version](https://img.shields.io/npm/v/@tresjs/cientos/latest.svg?label=%20&color=%23f19b00) |
44
+ | [Post-processing](https://github.com/TresJS/post-processing) | ![post-processing version](https://img.shields.io/npm/v/@tresjs/post-processing/latest.svg?label=%20&color=ff7bac) |
45
+ | [Nuxt](https://github.com/TresJS/nuxt) | ![nuxt version](https://img.shields.io/npm/v/@tresjs/nuxt/latest.svg?label=%20&color=4f4f4f&logo=nuxt.js) |
46
+ | [TresLeches 🍰](https://github.com/TresJS/leches) | ![tresleches version](https://img.shields.io/npm/v/@tresjs/leches/latest.svg?label=%20&color=ffffff) |
47
47
 
48
48
  ## Contribution
49
49
 
@@ -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: Ref<TresContext | null> | import("vue").ShallowRef<TresContext | null>;
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").Ref<WebGLRenderer> | import("vue").ShallowRef<WebGLRenderer>;
86
+ renderer: import("vue").ShallowRef<WebGLRenderer>;
87
87
  };
88
88
  export type UseRendererReturn = ReturnType<typeof useRenderer>;
89
89
  export {};
@@ -0,0 +1,7 @@
1
+ import * as THREE from 'three';
2
+ export declare class HightlightMesh extends THREE.Mesh {
3
+ type: string;
4
+ createTime: number;
5
+ constructor(...args: THREE.Mesh['args']);
6
+ onBeforeRender(): void;
7
+ }
@@ -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,7 @@
1
+ /**
2
+ * Shows a toast or console.log
3
+ *
4
+ * @param message - message to log
5
+ * @param type - different color of the tooltip
6
+ */
7
+ export declare function toastMessage(message: string, type?: 'normal' | 'error' | 'warn' | undefined): void;