@tresjs/core 4.2.2 → 4.2.4
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,7 +1,7 @@
|
|
|
1
|
-
import { Camera,
|
|
1
|
+
import { Camera, WebGLRenderer, Raycaster } from 'three';
|
|
2
2
|
import { ComputedRef, DeepReadonly, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef } from 'vue';
|
|
3
3
|
import { UseRendererOptions } from '../useRenderer';
|
|
4
|
-
import { EmitEventFn, TresObject, TresScene } from '../../types';
|
|
4
|
+
import { EmitEventFn, TresControl, TresObject, TresScene } from '../../types';
|
|
5
5
|
import { TresEventManager } from '../useTresEventManager';
|
|
6
6
|
import { SizesType } from '../useSizes';
|
|
7
7
|
import { RendererLoop } from '../../core/loop';
|
|
@@ -41,9 +41,7 @@ export interface TresContext {
|
|
|
41
41
|
extend: (objects: any) => void;
|
|
42
42
|
camera: ComputedRef<Camera | undefined>;
|
|
43
43
|
cameras: DeepReadonly<Ref<Camera[]>>;
|
|
44
|
-
controls:
|
|
45
|
-
enabled: boolean;
|
|
46
|
-
}) | null>;
|
|
44
|
+
controls: TresControl | null;
|
|
47
45
|
renderer: ShallowRef<WebGLRenderer>;
|
|
48
46
|
raycaster: ShallowRef<Raycaster>;
|
|
49
47
|
perf: PerformanceState;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -151,6 +151,9 @@ export type TresColorArray = typeof THREE.Color | [color: THREE.ColorRepresentat
|
|
|
151
151
|
export type TresLayers = THREE.Layers | Parameters<THREE.Layers['set']>[0];
|
|
152
152
|
export type TresQuaternion = THREE.Quaternion | Parameters<THREE.Quaternion['set']>;
|
|
153
153
|
export type TresEuler = THREE.Euler;
|
|
154
|
+
export type TresControl = THREE.EventDispatcher & {
|
|
155
|
+
enabled: boolean;
|
|
156
|
+
};
|
|
154
157
|
type WithMathProps<P> = {
|
|
155
158
|
[K in keyof P]: P[K] extends MathRepresentation | THREE.Euler ? MathType<P[K]> : P[K];
|
|
156
159
|
};
|
package/dist/src/utils/is.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TresObject, TresPrimitive } from 'src/types';
|
|
2
|
-
import { BufferGeometry, Camera, Fog, Material, Object3D, Scene } from 'three';
|
|
2
|
+
import { BufferGeometry, Camera, Fog, Light, Material, Object3D, Scene } from 'three';
|
|
3
3
|
|
|
4
4
|
export declare function und(u: unknown): u is undefined;
|
|
5
5
|
export declare function arr(u: unknown): u is any[];
|
|
@@ -12,6 +12,7 @@ export declare function object3D(u: unknown): u is Object3D;
|
|
|
12
12
|
export declare function camera(u: unknown): u is Camera;
|
|
13
13
|
export declare function bufferGeometry(u: unknown): u is BufferGeometry;
|
|
14
14
|
export declare function material(u: unknown): u is Material;
|
|
15
|
+
export declare function light(u: unknown): u is Light;
|
|
15
16
|
export declare function fog(u: unknown): u is Fog;
|
|
16
17
|
export declare function scene(u: unknown): u is Scene;
|
|
17
18
|
export declare function tresObject(u: unknown): u is TresObject;
|