@tresjs/core 5.0.0-next.1 → 5.0.0-next.3
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 +66 -64
- package/dist/src/composables/index.d.ts +0 -2
- package/dist/src/composables/useCamera/index.d.ts +6 -6
- package/dist/src/composables/useEventManager/index.d.ts +10 -0
- package/dist/src/composables/useRenderer/useRendererManager.d.ts +152 -63
- package/dist/src/composables/useTres/index.d.ts +4 -3
- package/dist/src/composables/useTresContextProvider/index.d.ts +5 -11
- package/dist/src/types/index.d.ts +3 -74
- package/dist/src/utils/pointerEvents.d.ts +10 -0
- package/dist/tres.js +2406 -1798
- package/package.json +3 -2
- package/dist/src/composables/useRaycaster/index.d.ts +0 -16
- package/dist/src/composables/useRenderer/const.d.ts +0 -18
- package/dist/src/composables/useTresEventManager/index.d.ts +0 -28
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.3",
|
|
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/)",
|
|
@@ -71,13 +71,14 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@alvarosabu/utils": "^3.2.0",
|
|
74
|
+
"@pmndrs/pointer-events": "^6.6.17",
|
|
74
75
|
"@vue/devtools-api": "^7.7.2",
|
|
75
76
|
"@vueuse/core": "^12.5.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@release-it/conventional-changelog": "^10.0.0",
|
|
79
80
|
"@stackblitz/sdk": "^1.11.0",
|
|
80
|
-
"@tresjs/cientos": "
|
|
81
|
+
"@tresjs/cientos": "5.0.0-next.0",
|
|
81
82
|
"@tresjs/eslint-config": "^1.4.0",
|
|
82
83
|
"@types/three": "^0.173.0",
|
|
83
84
|
"@typescript-eslint/eslint-plugin": "^8.23.0",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Intersection, Object3D, Object3DEventMap } from 'three';
|
|
2
|
-
import { ShallowRef } from 'vue';
|
|
3
|
-
import { TresEvent, TresInstance } from '../../types';
|
|
4
|
-
import { TresContext } from '../useTresContextProvider';
|
|
5
|
-
export declare const useRaycaster: (objectsWithEvents: ShallowRef<TresInstance[]>, ctx: TresContext) => {
|
|
6
|
-
intersects: ShallowRef<Intersection<Object3D<Object3DEventMap>>[]>;
|
|
7
|
-
onClick: (fn: (value: TresEvent) => void) => () => void;
|
|
8
|
-
onDblClick: (fn: (value: TresEvent) => void) => () => void;
|
|
9
|
-
onContextMenu: (fn: (value: TresEvent) => void) => () => void;
|
|
10
|
-
onPointerMove: (fn: (value: TresEvent) => void) => () => void;
|
|
11
|
-
onPointerUp: (fn: (value: TresEvent) => void) => () => void;
|
|
12
|
-
onPointerDown: (fn: (value: TresEvent) => void) => () => void;
|
|
13
|
-
onPointerMissed: (fn: (value: TresEvent) => void) => () => void;
|
|
14
|
-
onWheel: (fn: (value: TresEvent) => void) => () => void;
|
|
15
|
-
forceUpdate: () => void;
|
|
16
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const rendererPresets: {
|
|
2
|
-
realistic: {
|
|
3
|
-
shadows: boolean;
|
|
4
|
-
physicallyCorrectLights: boolean;
|
|
5
|
-
outputColorSpace: "srgb";
|
|
6
|
-
toneMapping: 4;
|
|
7
|
-
toneMappingExposure: number;
|
|
8
|
-
shadowMap: {
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
type: 2;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
flat: {
|
|
14
|
-
toneMapping: 0;
|
|
15
|
-
toneMappingExposure: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export type RendererPresetsType = keyof typeof rendererPresets;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { TresPointerEvent } from 'src/types';
|
|
2
|
-
import { Scene } from 'three';
|
|
3
|
-
import { TresContext } from '../useTresContextProvider';
|
|
4
|
-
import { EventHookOff } from '@vueuse/core';
|
|
5
|
-
export interface TresEventManager {
|
|
6
|
-
onEvent: EventHookOff<TresPointerEvent>;
|
|
7
|
-
/**
|
|
8
|
-
* Forces the event system to refire events with the previous mouse event
|
|
9
|
-
*/
|
|
10
|
-
forceUpdate: () => void;
|
|
11
|
-
/**
|
|
12
|
-
* pointer-missed events by definition are fired when the pointer missed every object in the scene
|
|
13
|
-
* So we need to track them separately
|
|
14
|
-
* Note: These are used in nodeOps
|
|
15
|
-
*/
|
|
16
|
-
registerObject: (object: unknown) => void;
|
|
17
|
-
deregisterObject: (object: unknown) => void;
|
|
18
|
-
registerPointerMissedObject: (object: unknown) => void;
|
|
19
|
-
deregisterPointerMissedObject: (object: unknown) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare function useTresEventManager(scene: Scene, context: TresContext): {
|
|
22
|
-
onEvent: import('@vueuse/core').EventHookOn<TresPointerEvent>;
|
|
23
|
-
forceUpdate: () => void;
|
|
24
|
-
registerObject: (maybeTresObject: unknown) => void;
|
|
25
|
-
deregisterObject: (maybeTresObject: unknown) => void;
|
|
26
|
-
registerPointerMissedObject: (maybeTresObject: unknown) => void;
|
|
27
|
-
deregisterPointerMissedObject: (maybeTresObject: unknown) => void;
|
|
28
|
-
};
|