@tresjs/core 3.7.0-next.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.
@@ -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;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { App } from 'vue';
2
2
  import { normalizeColor, normalizeVectorFlexibleParam } from './utils/normalize';
3
- import { dispose } from './utils/';
4
3
  import templateCompilerOptions from './utils/template-compiler-options';
5
4
  export * from './composables';
6
5
  export * from './core/catalogue';
@@ -15,4 +14,4 @@ export interface TresPlugin {
15
14
  }
16
15
  declare const plugin: TresPlugin;
17
16
  export default plugin;
18
- export { normalizeColor, normalizeVectorFlexibleParam, templateCompilerOptions, dispose, };
17
+ export { normalizeColor, normalizeVectorFlexibleParam, templateCompilerOptions, };