@tresjs/core 5.0.0-next.3 → 5.0.0-next.5
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 +17 -13
- package/dist/src/composables/index.d.ts +0 -1
- package/dist/src/composables/useCreateRafLoop/index.d.ts +18 -0
- package/dist/src/composables/useEventManager/index.d.ts +2 -2
- package/dist/src/composables/useGraph/index.d.ts +1 -2
- package/dist/src/composables/useLoop/index.d.ts +13 -16
- package/dist/src/composables/useRenderer/useRendererManager.d.ts +13 -8
- package/dist/src/composables/useTresContextProvider/index.d.ts +0 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/src/types/index.d.ts +10 -0
- package/dist/src/utils/createPriorityEventHook.d.ts +3 -5
- package/dist/src/utils/graph.d.ts +5 -4
- package/dist/tres.js +1502 -1589
- package/package.json +5 -5
- package/dist/src/composables/useRenderLoop/index.d.ts +0 -17
- package/dist/src/core/loop.d.ts +0 -36
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tresjs/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-next.
|
|
4
|
+
"version": "5.0.0-next.5",
|
|
5
5
|
"packageManager": "pnpm@10.6.3",
|
|
6
6
|
"description": "Declarative ThreeJS using Vue Components",
|
|
7
7
|
"author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@stackblitz/sdk": "^1.11.0",
|
|
81
81
|
"@tresjs/cientos": "5.0.0-next.0",
|
|
82
82
|
"@tresjs/eslint-config": "^1.4.0",
|
|
83
|
-
"@types/three": "^0.
|
|
83
|
+
"@types/three": "^0.177.0",
|
|
84
84
|
"@typescript-eslint/eslint-plugin": "^8.23.0",
|
|
85
85
|
"@typescript-eslint/parser": "^8.23.0",
|
|
86
86
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
@@ -101,19 +101,19 @@
|
|
|
101
101
|
"rollup-plugin-copy": "^3.5.0",
|
|
102
102
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
103
103
|
"sponsorkit": "^16.3.0",
|
|
104
|
-
"three": "^0.
|
|
104
|
+
"three": "^0.177.0",
|
|
105
105
|
"unocss": "^65.4.3",
|
|
106
106
|
"unplugin": "^2.1.2",
|
|
107
107
|
"unplugin-vue-components": "^28.0.0",
|
|
108
108
|
"vite": "^6.1.0",
|
|
109
109
|
"vite-plugin-banner": "^0.8.0",
|
|
110
|
-
"vite-plugin-dts": "4.5.
|
|
110
|
+
"vite-plugin-dts": "4.5.4",
|
|
111
111
|
"vite-plugin-inspect": "^10.1.0",
|
|
112
112
|
"vite-plugin-require-transform": "^1.0.21",
|
|
113
113
|
"vite-svg-loader": "^5.1.0",
|
|
114
114
|
"vitepress": "1.6.3",
|
|
115
115
|
"vitest": "3.0.5",
|
|
116
|
-
"vue": "3.5.
|
|
116
|
+
"vue": "3.5.17",
|
|
117
117
|
"vue-demi": "^0.14.10",
|
|
118
118
|
"vue-tsc": "^2.2.0"
|
|
119
119
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EventHookOn, Fn } from '@vueuse/core';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
import { Clock } from 'three';
|
|
4
|
-
export interface RenderLoop {
|
|
5
|
-
delta: number;
|
|
6
|
-
elapsed: number;
|
|
7
|
-
clock: Clock;
|
|
8
|
-
}
|
|
9
|
-
export interface UseRenderLoopReturn {
|
|
10
|
-
onBeforeLoop: EventHookOn<RenderLoop>;
|
|
11
|
-
onLoop: EventHookOn<RenderLoop>;
|
|
12
|
-
onAfterLoop: EventHookOn<RenderLoop>;
|
|
13
|
-
pause: Fn;
|
|
14
|
-
resume: Fn;
|
|
15
|
-
isActive: Ref<boolean>;
|
|
16
|
-
}
|
|
17
|
-
export declare const useRenderLoop: () => UseRenderLoopReturn;
|
package/dist/src/core/loop.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Fn } from '@vueuse/core';
|
|
2
|
-
import { Camera, EventDispatcher, Raycaster, Scene, WebGLRenderer, Clock } from 'three';
|
|
3
|
-
import { Ref } from 'vue';
|
|
4
|
-
export type LoopStage = 'before' | 'render' | 'after';
|
|
5
|
-
export interface LoopCallback {
|
|
6
|
-
delta: number;
|
|
7
|
-
elapsed: number;
|
|
8
|
-
clock: Clock;
|
|
9
|
-
}
|
|
10
|
-
export interface LoopCallbackWithCtx extends LoopCallback {
|
|
11
|
-
camera: Camera;
|
|
12
|
-
scene: Scene;
|
|
13
|
-
renderer: WebGLRenderer;
|
|
14
|
-
raycaster: Raycaster;
|
|
15
|
-
controls: Ref<(EventDispatcher<object> & {
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
}) | null>;
|
|
18
|
-
}
|
|
19
|
-
export type LoopCallbackFn = (params: LoopCallbackWithCtx) => void;
|
|
20
|
-
export interface RendererLoop {
|
|
21
|
-
loopId: string;
|
|
22
|
-
register: (callback: LoopCallbackFn, stage: LoopStage, index?: number) => {
|
|
23
|
-
off: Fn;
|
|
24
|
-
};
|
|
25
|
-
start: Fn;
|
|
26
|
-
stop: Fn;
|
|
27
|
-
pause: Fn;
|
|
28
|
-
resume: Fn;
|
|
29
|
-
pauseRender: Fn;
|
|
30
|
-
resumeRender: Fn;
|
|
31
|
-
isActive: Ref<boolean>;
|
|
32
|
-
isRenderPaused: Ref<boolean>;
|
|
33
|
-
setContext: (newContext: Record<string, any>) => void;
|
|
34
|
-
setReady: (isReady: boolean) => void;
|
|
35
|
-
}
|
|
36
|
-
export declare function createRenderLoop(): RendererLoop;
|