@tresjs/core 5.4.0 → 5.4.1
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/tres.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/core
|
|
3
|
-
* version: v5.4.
|
|
3
|
+
* version: v5.4.1
|
|
4
4
|
* (c) 2026
|
|
5
5
|
* description: Declarative ThreeJS using Vue Components
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as vue9 from "vue";
|
|
9
9
|
import { App, ComputedRef, DefineComponent, MaybeRef, MaybeRefOrGetter, Reactive, Ref, ShallowRef, VNode, VNodeRef } from "vue";
|
|
10
10
|
import * as THREE from "three";
|
|
11
11
|
import { BufferGeometry, Camera, Color, ColorRepresentation, ColorSpace, Event, Fog, Group, Layers, Light, Loader, LoadingManager, Material, Mesh, Object3D, Object3DEventMap, OrthographicCamera, PerspectiveCamera, Scene, ShadowMapType, ToneMapping, Vector3, WebGLRenderer } from "three";
|
|
@@ -321,11 +321,11 @@ declare function useRendererManager({
|
|
|
321
321
|
onRender: _vueuse_core0.EventHookOn<TresRenderer>;
|
|
322
322
|
onError: _vueuse_core0.EventHookOn<TresRendererError>;
|
|
323
323
|
invalidate: (amountOfFramesToInvalidate?: number) => void;
|
|
324
|
-
canBeInvalidated:
|
|
324
|
+
canBeInvalidated: vue9.ComputedRef<boolean>;
|
|
325
325
|
mode: "always" | "on-demand" | "manual" | undefined;
|
|
326
326
|
replaceRenderFunction: (fn: RenderFunction) => void;
|
|
327
|
-
isInitialized:
|
|
328
|
-
error:
|
|
327
|
+
isInitialized: vue9.Ref<boolean, boolean>;
|
|
328
|
+
error: vue9.Ref<TresRendererError | null, TresRendererError | null>;
|
|
329
329
|
};
|
|
330
330
|
type UseRendererManagerReturn = ReturnType<typeof useRendererManager>;
|
|
331
331
|
//#endregion
|
|
@@ -512,7 +512,7 @@ declare function buildGraph(object: Object3D | TresObject): TresObjectMap;
|
|
|
512
512
|
//#endregion
|
|
513
513
|
//#region src/composables/useLoader/component.vue.d.ts
|
|
514
514
|
declare const __VLS_export$1: <T extends TresObjectMap>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
515
|
-
props:
|
|
515
|
+
props: vue9.PublicProps & __VLS_PrettifyLocal<{
|
|
516
516
|
/**
|
|
517
517
|
* The THREE.js loader to use
|
|
518
518
|
*/
|
|
@@ -535,20 +535,20 @@ declare const __VLS_export$1: <T extends TresObjectMap>(__VLS_props: NonNullable
|
|
|
535
535
|
attrs: any;
|
|
536
536
|
slots: {
|
|
537
537
|
default?: (props: {
|
|
538
|
-
state:
|
|
538
|
+
state: vue9.UnwrapRef<T>;
|
|
539
539
|
isLoading: boolean;
|
|
540
540
|
error: unknown;
|
|
541
541
|
}) => any;
|
|
542
542
|
};
|
|
543
543
|
emit: ((evt: "error", error: unknown) => void) & ((evt: "loaded", result: T) => void);
|
|
544
|
-
}>) =>
|
|
544
|
+
}>) => vue9.VNode & {
|
|
545
545
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
546
546
|
};
|
|
547
547
|
declare const _default$1: typeof __VLS_export$1;
|
|
548
548
|
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
549
549
|
//#endregion
|
|
550
550
|
//#region src/composables/useGraph/index.d.ts
|
|
551
|
-
declare const useGraph: (object: MaybeRef$1<TresObject | undefined>) =>
|
|
551
|
+
declare const useGraph: (object: MaybeRef$1<TresObject | undefined>) => vue9.ComputedRef<TresObjectMap | undefined>;
|
|
552
552
|
//#endregion
|
|
553
553
|
//#region src/utils/createPriorityEventHook.d.ts
|
|
554
554
|
type Callback<T> = Parameters<EventHookOff<T>>[0];
|
|
@@ -599,7 +599,7 @@ type LoopContext = RafLoopContext & TresPartialContext;
|
|
|
599
599
|
declare const useLoop: () => {
|
|
600
600
|
stop: () => void;
|
|
601
601
|
start: () => void;
|
|
602
|
-
isActive: Readonly<
|
|
602
|
+
isActive: Readonly<vue9.ShallowRef<boolean>>;
|
|
603
603
|
onBeforeRender: PriorityEventHookOn<LoopContext>;
|
|
604
604
|
onRender: PriorityEventHookOn<LoopContext>;
|
|
605
605
|
render: (fn: RenderFunction) => void;
|
|
@@ -706,7 +706,7 @@ interface TresCanvasInstance {
|
|
|
706
706
|
type __VLS_Slots = {
|
|
707
707
|
default: () => any;
|
|
708
708
|
};
|
|
709
|
-
declare const __VLS_base:
|
|
709
|
+
declare const __VLS_base: vue9.DefineComponent<ContextProps, TresCanvasInstance, {}, {}, {}, vue9.ComponentOptionsMixin, vue9.ComponentOptionsMixin, {
|
|
710
710
|
click: (event: TresPointerEvent) => any;
|
|
711
711
|
contextmenu: (event: TresPointerEvent) => any;
|
|
712
712
|
pointermove: (event: TresPointerEvent) => any;
|
|
@@ -726,7 +726,7 @@ declare const __VLS_base: vue6.DefineComponent<ContextProps, TresCanvasInstance,
|
|
|
726
726
|
render: (context: TresContext) => any;
|
|
727
727
|
beforeLoop: (context: TresContextWithClock) => any;
|
|
728
728
|
loop: (context: TresContextWithClock) => any;
|
|
729
|
-
}, string,
|
|
729
|
+
}, string, vue9.PublicProps, Readonly<ContextProps> & Readonly<{
|
|
730
730
|
onClick?: ((event: TresPointerEvent) => any) | undefined;
|
|
731
731
|
onContextmenu?: ((event: TresPointerEvent) => any) | undefined;
|
|
732
732
|
onPointermove?: ((event: TresPointerEvent) => any) | undefined;
|
|
@@ -763,7 +763,7 @@ declare const __VLS_base: vue6.DefineComponent<ContextProps, TresCanvasInstance,
|
|
|
763
763
|
shadowMapType: THREE.ShadowMapType;
|
|
764
764
|
useLegacyLights: boolean;
|
|
765
765
|
renderMode: "always" | "on-demand" | "manual";
|
|
766
|
-
}, {}, {}, {}, string,
|
|
766
|
+
}, {}, {}, {}, string, vue9.ComponentProvideOptions, false, {}, any>;
|
|
767
767
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
768
768
|
declare const _default: typeof __VLS_export;
|
|
769
769
|
type __VLS_WithSlots<T, S> = T & {
|
package/dist/tres.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/core
|
|
3
|
-
* version: v5.4.
|
|
3
|
+
* version: v5.4.1
|
|
4
4
|
* (c) 2026
|
|
5
5
|
* description: Declarative ThreeJS using Vue Components
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
@@ -14,7 +14,7 @@ import { forwardHtmlEvents, getVoidObject } from "@pmndrs/pointer-events";
|
|
|
14
14
|
import { setupDevtoolsPlugin } from "@vue/devtools-api";
|
|
15
15
|
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "5.4.
|
|
17
|
+
var version = "5.4.1";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/utils/makeMap.ts
|
|
@@ -728,13 +728,13 @@ const useCreateRafLoop = (cycleFn) => {
|
|
|
728
728
|
after: createEventHook()
|
|
729
729
|
};
|
|
730
730
|
const { pause, resume, isActive } = useRafFn(() => {
|
|
731
|
-
const
|
|
731
|
+
const context = {
|
|
732
732
|
delta: clock.getDelta(),
|
|
733
733
|
elapsed: clock.elapsedTime
|
|
734
|
-
}
|
|
735
|
-
eventHooks.before.trigger(
|
|
734
|
+
};
|
|
735
|
+
eventHooks.before.trigger(context);
|
|
736
736
|
cycleFn();
|
|
737
|
-
eventHooks.after.trigger(
|
|
737
|
+
eventHooks.after.trigger(context);
|
|
738
738
|
}, { immediate: false });
|
|
739
739
|
const start = () => {
|
|
740
740
|
clock.start();
|
package/package.json
CHANGED