@react-three/drei 11.0.0-alpha.4 → 11.0.0-alpha.6
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/README.md +17 -1
- package/core/index.d.mts +249 -108
- package/core/index.d.ts +249 -108
- package/core/index.mjs +919 -692
- package/experimental/index.d.mts +24 -4
- package/experimental/index.d.ts +24 -4
- package/experimental/index.mjs +1 -0
- package/external/index.d.mts +42 -6
- package/external/index.d.ts +42 -6
- package/external/index.mjs +4 -4
- package/index.d.mts +266 -110
- package/index.d.ts +266 -110
- package/index.mjs +920 -693
- package/legacy/index.d.mts +344 -142
- package/legacy/index.d.ts +344 -142
- package/legacy/index.mjs +1536 -803
- package/native/index.d.mts +385 -489
- package/native/index.d.ts +385 -489
- package/native/index.mjs +2047 -2434
- package/package.json +8 -9
- package/webgpu/index.d.mts +416 -332
- package/webgpu/index.d.ts +416 -332
- package/webgpu/index.mjs +2273 -1880
package/native/index.d.mts
CHANGED
|
@@ -3,20 +3,12 @@ import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, CSSPropertie
|
|
|
3
3
|
import * as _react_three_fiber from '@react-three/fiber';
|
|
4
4
|
import { ThreeElements, ReactThreeFiber, ComputeFunction, Vector2, Vector3, ThreeElement, ThreeEvent, Color as Color$1, ObjectMap, Euler } from '@react-three/fiber';
|
|
5
5
|
import * as THREE from 'three/webgpu';
|
|
6
|
-
import { MeshBasicNodeMaterial, MeshNormalNodeMaterial, MeshPhysicalNodeMaterial, Material, Color, ColorRepresentation, Object3D, Texture as Texture$1, Fog, FogExp2,
|
|
7
|
-
import { reflector,
|
|
6
|
+
import { MeshBasicNodeMaterial, MeshNormalNodeMaterial, MeshPhysicalNodeMaterial, Material, CubeRenderTarget, Color, ColorRepresentation, Object3D, Texture as Texture$1, Fog, FogExp2, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, EventDispatcher, Camera, Group, Matrix4, Vector3 as Vector3$1, LOD, Mesh, ExtrudeGeometry, PositionalAudio as PositionalAudio$1, AnimationClip, AnimationMixer, AnimationAction, BufferGeometry, BufferAttribute, InstancedMesh as InstancedMesh$1, InstancedBufferAttribute, DepthTexture, CubeTexture as CubeTexture$1, Raycaster, Intersection, RenderTargetOptions, Box3, Sphere as Sphere$1, Loader as Loader$1, ColorSpace, Scene, PlaneGeometry, MeshBasicMaterial, SpriteNodeMaterial, SpotLight as SpotLight$1 } from 'three/webgpu';
|
|
7
|
+
import { reflector, Fn } from 'three/tsl';
|
|
8
8
|
import { LineSegments2 } from 'three/examples/jsm/lines/webgpu/LineSegments2.js';
|
|
9
|
-
import { ArcballControls as ArcballControls$1 } from 'three/examples/jsm/controls/ArcballControls.js';
|
|
10
|
-
import { DeviceOrientationControls as DeviceOrientationControls$1 } from 'three-stdlib';
|
|
11
|
-
import { DragConfig } from '@use-gesture/react';
|
|
12
|
-
import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls.js';
|
|
13
|
-
import { FlyControls as FlyControls$1 } from 'three/examples/jsm/controls/FlyControls.js';
|
|
14
9
|
import * as zustand from 'zustand';
|
|
15
10
|
import { StoreApi } from 'zustand';
|
|
16
|
-
import {
|
|
17
|
-
import { OrbitControls as OrbitControls$1 } from 'three/addons/controls/OrbitControls.js';
|
|
18
|
-
import { PointerLockControls as PointerLockControls$1 } from 'three/examples/jsm/controls/PointerLockControls.js';
|
|
19
|
-
import { TrackballControls as TrackballControls$1 } from 'three/examples/jsm/controls/TrackballControls.js';
|
|
11
|
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
20
12
|
import * as three from 'three';
|
|
21
13
|
import { Line2 as Line2$1 } from 'three/examples/jsm/lines/Line2.js';
|
|
22
14
|
import { Line2 } from 'three/examples/jsm/lines/webgpu/Line2.js';
|
|
@@ -24,10 +16,11 @@ import { Flow } from 'three/examples/jsm/modifiers/CurveModifier.js';
|
|
|
24
16
|
import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry.js';
|
|
25
17
|
import * as three_examples_jsm_loaders_FontLoader_js from 'three/examples/jsm/loaders/FontLoader.js';
|
|
26
18
|
import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls.js';
|
|
27
|
-
import { Falsey
|
|
19
|
+
import { Falsey } from 'utility-types';
|
|
28
20
|
import * as hls_js from 'hls.js';
|
|
29
21
|
import hls_js__default from 'hls.js';
|
|
30
22
|
import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
23
|
+
import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
|
|
31
24
|
import * as detect_gpu from 'detect-gpu';
|
|
32
25
|
import { GetGPUTier } from 'detect-gpu';
|
|
33
26
|
import Stats$1 from 'stats-gl';
|
|
@@ -36,10 +29,6 @@ import { Sky as Sky$1 } from 'three/examples/jsm/objects/Sky.js';
|
|
|
36
29
|
|
|
37
30
|
type NamedArrayTuple<T extends (...args: any) => any> = Parameters<T>;
|
|
38
31
|
type ForwardRefComponent<P, T> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
|
|
39
|
-
type NonFunctionKeys<T> = {
|
|
40
|
-
[K in keyof T]-?: T[K] extends Function ? never : K;
|
|
41
|
-
}[keyof T];
|
|
42
|
-
type Overwrite<T, O> = Omit<T, NonFunctionKeys<O>> & O;
|
|
43
32
|
|
|
44
33
|
type ContactShadowsProps = Omit<ThreeElements['group'], 'ref' | 'scale'> & {
|
|
45
34
|
opacity?: number;
|
|
@@ -76,25 +65,33 @@ interface AccumulativeContext {
|
|
|
76
65
|
frames: number;
|
|
77
66
|
blend: number;
|
|
78
67
|
count: number;
|
|
79
|
-
getMesh: () => THREE.Mesh<THREE.PlaneGeometry,
|
|
68
|
+
getMesh: () => THREE.Mesh<THREE.PlaneGeometry, SoftShadowMaterialImpl>;
|
|
80
69
|
reset: () => void;
|
|
81
70
|
update: (frames?: number) => void;
|
|
82
71
|
}
|
|
83
72
|
interface AccumulativeLightContext {
|
|
84
73
|
update: () => void;
|
|
85
74
|
}
|
|
86
|
-
type SoftShadowMaterialProps = {
|
|
87
|
-
map: THREE.Texture;
|
|
88
|
-
color?: ReactThreeFiber.Color;
|
|
89
|
-
alphaTest?: number;
|
|
90
|
-
blend?: number;
|
|
91
|
-
};
|
|
92
|
-
declare module '@react-three/fiber' {
|
|
93
|
-
interface ThreeElements {
|
|
94
|
-
softShadowMaterial: ThreeElements['shaderMaterial'] & SoftShadowMaterialProps;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
75
|
declare const accumulativeContext: React.Context<AccumulativeContext>;
|
|
76
|
+
declare class SoftShadowMaterialImpl extends MeshBasicNodeMaterial {
|
|
77
|
+
private _color;
|
|
78
|
+
private _blend;
|
|
79
|
+
private _alphaTest;
|
|
80
|
+
private _opacity;
|
|
81
|
+
private _map;
|
|
82
|
+
constructor();
|
|
83
|
+
private _buildShader;
|
|
84
|
+
get shadowColor(): THREE.ColorRepresentation;
|
|
85
|
+
set shadowColor(v: THREE.ColorRepresentation);
|
|
86
|
+
get blend(): number;
|
|
87
|
+
set blend(v: number);
|
|
88
|
+
get alphaTest(): number;
|
|
89
|
+
set alphaTest(v: number);
|
|
90
|
+
get opacity(): number;
|
|
91
|
+
set opacity(v: number);
|
|
92
|
+
get map(): THREE.Texture;
|
|
93
|
+
set map(v: THREE.Texture);
|
|
94
|
+
}
|
|
98
95
|
declare const AccumulativeShadows: ForwardRefComponent<AccumulativeShadowsProps, AccumulativeContext>;
|
|
99
96
|
type RandomizedLightProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
100
97
|
frames?: number;
|
|
@@ -112,19 +109,6 @@ type RandomizedLightProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
112
109
|
};
|
|
113
110
|
declare const RandomizedLight: ForwardRefComponent<RandomizedLightProps, AccumulativeLightContext>;
|
|
114
111
|
|
|
115
|
-
type CausticsProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
116
|
-
frames?: number;
|
|
117
|
-
debug?: boolean;
|
|
118
|
-
causticsOnly?: boolean;
|
|
119
|
-
backside?: boolean;
|
|
120
|
-
ior?: number;
|
|
121
|
-
backsideIOR?: number;
|
|
122
|
-
worldRadius?: number;
|
|
123
|
-
intensity?: number;
|
|
124
|
-
color?: ReactThreeFiber.Color;
|
|
125
|
-
resolution?: number;
|
|
126
|
-
lightSource?: [x: number, y: number, z: number] | React.RefObject<THREE.Object3D>;
|
|
127
|
-
};
|
|
128
112
|
declare class CausticsProjectionMaterial extends MeshBasicNodeMaterial {
|
|
129
113
|
private _causticsTexture;
|
|
130
114
|
private _causticsTextureB;
|
|
@@ -206,6 +190,7 @@ type MeshTransmissionMaterialType = Omit<ThreeElements['meshPhysicalMaterial'],
|
|
|
206
190
|
temporalDistortion?: number;
|
|
207
191
|
buffer?: THREE.Texture;
|
|
208
192
|
time?: number;
|
|
193
|
+
debugMode?: number;
|
|
209
194
|
args?: [samples: number, transmissionSampler: boolean];
|
|
210
195
|
};
|
|
211
196
|
type MeshTransmissionMaterialProps = Omit<MeshTransmissionMaterialType, 'ref' | 'args'> & {
|
|
@@ -223,44 +208,7 @@ declare module '@react-three/fiber' {
|
|
|
223
208
|
meshTransmissionMaterial: MeshTransmissionMaterialType;
|
|
224
209
|
}
|
|
225
210
|
}
|
|
226
|
-
declare
|
|
227
|
-
private _chromaticAberration;
|
|
228
|
-
private _anisotropicBlur;
|
|
229
|
-
private _time;
|
|
230
|
-
private _distortion;
|
|
231
|
-
private _distortionScale;
|
|
232
|
-
private _temporalDistortion;
|
|
233
|
-
private _buffer;
|
|
234
|
-
private _transmissionValue;
|
|
235
|
-
private _attenuationDistance;
|
|
236
|
-
private _attenuationColor;
|
|
237
|
-
private _samples;
|
|
238
|
-
private _transmissionSampler;
|
|
239
|
-
readonly isMeshTransmissionMaterial = true;
|
|
240
|
-
constructor(samples?: number, transmissionSampler?: boolean);
|
|
241
|
-
private _buildTransmissionShader;
|
|
242
|
-
get chromaticAberration(): number;
|
|
243
|
-
set chromaticAberration(v: number);
|
|
244
|
-
get anisotropicBlur(): number;
|
|
245
|
-
set anisotropicBlur(v: number);
|
|
246
|
-
get time(): number;
|
|
247
|
-
set time(v: number);
|
|
248
|
-
get distortion(): number;
|
|
249
|
-
set distortion(v: number);
|
|
250
|
-
get distortionScale(): number;
|
|
251
|
-
set distortionScale(v: number);
|
|
252
|
-
get temporalDistortion(): number;
|
|
253
|
-
set temporalDistortion(v: number);
|
|
254
|
-
get buffer(): THREE.Texture | null;
|
|
255
|
-
set buffer(v: THREE.Texture | null);
|
|
256
|
-
get _transmission(): number;
|
|
257
|
-
set _transmission(v: number);
|
|
258
|
-
get attenuationDistance(): number;
|
|
259
|
-
set attenuationDistance(v: number);
|
|
260
|
-
get attenuationColor(): THREE.Color;
|
|
261
|
-
set attenuationColor(v: THREE.Color);
|
|
262
|
-
}
|
|
263
|
-
declare const MeshTransmissionMaterial: ForwardRefComponent<MeshTransmissionMaterialProps, MeshTransmissionMaterialImpl>;
|
|
211
|
+
declare const MeshTransmissionMaterial: ForwardRefComponent<MeshTransmissionMaterialProps, ThreeElements['meshTransmissionMaterial']>;
|
|
264
212
|
|
|
265
213
|
interface MeshReflectorMaterialOptions {
|
|
266
214
|
resolution?: number;
|
|
@@ -277,18 +225,18 @@ interface MeshReflectorMaterialOptions {
|
|
|
277
225
|
}
|
|
278
226
|
declare class MeshReflectorMaterial$1 extends THREE.MeshStandardNodeMaterial {
|
|
279
227
|
reflection: ReturnType<typeof reflector>;
|
|
280
|
-
mirrorUniform:
|
|
281
|
-
mixBlurUniform:
|
|
282
|
-
mixStrengthUniform:
|
|
283
|
-
minDepthThresholdUniform:
|
|
284
|
-
maxDepthThresholdUniform:
|
|
285
|
-
depthScaleUniform:
|
|
286
|
-
depthToBlurRatioBiasUniform:
|
|
287
|
-
distortionUniform:
|
|
288
|
-
mixContrastUniform:
|
|
289
|
-
blurRadiusUniform:
|
|
290
|
-
hasBlurUniform:
|
|
291
|
-
hasDepthUniform:
|
|
228
|
+
mirrorUniform: THREE.UniformNode<'float', number>;
|
|
229
|
+
mixBlurUniform: THREE.UniformNode<'float', number>;
|
|
230
|
+
mixStrengthUniform: THREE.UniformNode<'float', number>;
|
|
231
|
+
minDepthThresholdUniform: THREE.UniformNode<'float', number>;
|
|
232
|
+
maxDepthThresholdUniform: THREE.UniformNode<'float', number>;
|
|
233
|
+
depthScaleUniform: THREE.UniformNode<'float', number>;
|
|
234
|
+
depthToBlurRatioBiasUniform: THREE.UniformNode<'float', number>;
|
|
235
|
+
distortionUniform: THREE.UniformNode<'float', number>;
|
|
236
|
+
mixContrastUniform: THREE.UniformNode<'float', number>;
|
|
237
|
+
blurRadiusUniform: THREE.UniformNode<'float', number>;
|
|
238
|
+
hasBlurUniform: THREE.UniformNode<'float', number>;
|
|
239
|
+
hasDepthUniform: THREE.UniformNode<'float', number>;
|
|
292
240
|
constructor(options?: MeshReflectorMaterialOptions, parameters?: THREE.MeshStandardMaterialParameters);
|
|
293
241
|
private setupNodes;
|
|
294
242
|
get mirror(): number;
|
|
@@ -354,6 +302,7 @@ type MeshRefractionMaterialType = Omit<ThreeElements['meshPhysicalMaterial'], 'a
|
|
|
354
302
|
fastChroma?: boolean;
|
|
355
303
|
tintColor?: THREE.ColorRepresentation;
|
|
356
304
|
opacity?: number;
|
|
305
|
+
args?: [fastChroma?: boolean];
|
|
357
306
|
};
|
|
358
307
|
type MeshRefractionMaterialProps = Omit<MeshRefractionMaterialType, 'ref'>;
|
|
359
308
|
declare module '@react-three/fiber' {
|
|
@@ -369,8 +318,6 @@ declare class MeshRefractionMaterialImpl extends MeshPhysicalNodeMaterial {
|
|
|
369
318
|
private _aberrationStrength;
|
|
370
319
|
private _color;
|
|
371
320
|
private _opacityValue;
|
|
372
|
-
private _resolution;
|
|
373
|
-
private _thickness;
|
|
374
321
|
private _fastChroma;
|
|
375
322
|
readonly isMeshRefractionMaterial = true;
|
|
376
323
|
constructor(fastChroma?: boolean);
|
|
@@ -389,10 +336,6 @@ declare class MeshRefractionMaterialImpl extends MeshPhysicalNodeMaterial {
|
|
|
389
336
|
set tintColor(v: THREE.Color | THREE.ColorRepresentation);
|
|
390
337
|
get opacity(): number;
|
|
391
338
|
set opacity(v: number);
|
|
392
|
-
get resolution(): THREE.Vector2;
|
|
393
|
-
set resolution(v: THREE.Vector2);
|
|
394
|
-
get thickness(): number;
|
|
395
|
-
set thickness(v: number);
|
|
396
339
|
}
|
|
397
340
|
declare const MeshRefractionMaterial: ForwardRefComponent<MeshRefractionMaterialProps, MeshRefractionMaterialImpl>;
|
|
398
341
|
|
|
@@ -431,16 +374,16 @@ declare class PortalMaterialImpl extends MeshBasicNodeMaterial {
|
|
|
431
374
|
declare const MeshPortalMaterial: ForwardRefComponent<PortalProps, PortalMaterialImpl>;
|
|
432
375
|
|
|
433
376
|
declare class DistortMaterialImplWebGPU extends THREE.MeshPhysicalNodeMaterial {
|
|
434
|
-
timeUniform:
|
|
435
|
-
distortUniform:
|
|
436
|
-
radiusUniform:
|
|
377
|
+
timeUniform: THREE.UniformNode<'float', number>;
|
|
378
|
+
distortUniform: THREE.UniformNode<'float', number>;
|
|
379
|
+
radiusUniform: THREE.UniformNode<'float', number>;
|
|
437
380
|
constructor(parameters?: THREE.MeshPhysicalMaterialParameters);
|
|
438
|
-
get time():
|
|
439
|
-
set time(v:
|
|
440
|
-
get distort():
|
|
441
|
-
set distort(v:
|
|
442
|
-
get radius():
|
|
443
|
-
set radius(v:
|
|
381
|
+
get time(): number;
|
|
382
|
+
set time(v: number);
|
|
383
|
+
get distort(): number;
|
|
384
|
+
set distort(v: number);
|
|
385
|
+
get radius(): number;
|
|
386
|
+
set radius(v: number);
|
|
444
387
|
}
|
|
445
388
|
declare module '@react-three/fiber' {
|
|
446
389
|
interface ThreeElements {
|
|
@@ -458,13 +401,13 @@ type MeshDistortMaterialProps = Omit<ThreeElements['distortMaterialImplWebGPU'],
|
|
|
458
401
|
declare const MeshDistortMaterial: ForwardRefComponent<MeshDistortMaterialProps, DistortMaterialImplWebGPU>;
|
|
459
402
|
|
|
460
403
|
declare class WobbleMaterialImpl extends THREE.MeshStandardNodeMaterial {
|
|
461
|
-
timeUniform:
|
|
462
|
-
factorUniform:
|
|
404
|
+
timeUniform: THREE.UniformNode<'float', number>;
|
|
405
|
+
factorUniform: THREE.UniformNode<'float', number>;
|
|
463
406
|
constructor(parameters?: THREE.MeshStandardMaterialParameters);
|
|
464
|
-
get time():
|
|
465
|
-
set time(v:
|
|
466
|
-
get factor():
|
|
467
|
-
set factor(v:
|
|
407
|
+
get time(): number;
|
|
408
|
+
set time(v: number);
|
|
409
|
+
get factor(): number;
|
|
410
|
+
set factor(v: number);
|
|
468
411
|
}
|
|
469
412
|
declare module '@react-three/fiber' {
|
|
470
413
|
interface ThreeElements {
|
|
@@ -481,7 +424,7 @@ type WobbleMaterialProps = Omit<ThreeElements['meshStandardMaterial'], 'ref'> &
|
|
|
481
424
|
};
|
|
482
425
|
declare const MeshWobbleMaterial: ForwardRefComponent<WobbleMaterialProps, WobbleMaterialImpl>;
|
|
483
426
|
|
|
484
|
-
declare function FakeCloudMaterial(BaseMaterial: typeof Material): Material
|
|
427
|
+
declare function FakeCloudMaterial(BaseMaterial: typeof Material): Material<three.MaterialEventMap>;
|
|
485
428
|
|
|
486
429
|
type OutlinesProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
487
430
|
color?: ReactThreeFiber.Color;
|
|
@@ -535,7 +478,7 @@ type RenderCubeTextureProps = Omit<ThreeElements['texture'], 'ref' | 'args' | 'r
|
|
|
535
478
|
};
|
|
536
479
|
type RenderCubeTextureApi = {
|
|
537
480
|
scene: THREE.Scene;
|
|
538
|
-
fbo:
|
|
481
|
+
fbo: CubeRenderTarget;
|
|
539
482
|
camera: THREE.CubeCamera;
|
|
540
483
|
};
|
|
541
484
|
declare const RenderCubeTexture: ForwardRefComponent<RenderCubeTextureProps, RenderCubeTextureApi>;
|
|
@@ -565,8 +508,8 @@ type SegmentsProps = {
|
|
|
565
508
|
children: React.ReactNode;
|
|
566
509
|
};
|
|
567
510
|
type SegmentProps = Omit<ThreeElements['segmentObject'], 'ref' | 'start' | 'end' | 'color'> & {
|
|
568
|
-
start
|
|
569
|
-
end
|
|
511
|
+
start?: ReactThreeFiber.Vector3;
|
|
512
|
+
end?: ReactThreeFiber.Vector3;
|
|
570
513
|
color?: ReactThreeFiber.Color;
|
|
571
514
|
};
|
|
572
515
|
declare const Segments: ForwardRefComponent<SegmentsProps, LineSegments2>;
|
|
@@ -577,8 +520,8 @@ declare module '@react-three/fiber' {
|
|
|
577
520
|
}
|
|
578
521
|
declare class SegmentObject {
|
|
579
522
|
color: THREE.Color;
|
|
580
|
-
start
|
|
581
|
-
end
|
|
523
|
+
start?: THREE.Vector3;
|
|
524
|
+
end?: THREE.Vector3;
|
|
582
525
|
constructor();
|
|
583
526
|
}
|
|
584
527
|
declare const Segment: ForwardRefComponent<SegmentProps, SegmentObject>;
|
|
@@ -611,7 +554,7 @@ type CubeCameraProps = Omit<ThreeElements['group'], 'children'> & {
|
|
|
611
554
|
frames?: number;
|
|
612
555
|
} & CubeCameraOptions;
|
|
613
556
|
declare function useCubeCamera({ resolution, near, far, envMap, fog }?: CubeCameraOptions): {
|
|
614
|
-
fbo:
|
|
557
|
+
fbo: CubeRenderTarget;
|
|
615
558
|
camera: CubeCamera$1;
|
|
616
559
|
update: () => void;
|
|
617
560
|
};
|
|
@@ -637,17 +580,33 @@ type PerspectiveCameraProps = Omit<ThreeElements['perspectiveCamera'], 'ref' | '
|
|
|
637
580
|
};
|
|
638
581
|
declare const PerspectiveCamera: ForwardRefComponent<PerspectiveCameraProps, PerspectiveCamera$1>;
|
|
639
582
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
583
|
+
interface StandardControlsEventMap {
|
|
584
|
+
change: {};
|
|
585
|
+
start: {};
|
|
586
|
+
end: {};
|
|
587
|
+
}
|
|
588
|
+
declare class DeviceOrientationControls$1 extends EventDispatcher<StandardControlsEventMap> {
|
|
589
|
+
object: Camera;
|
|
590
|
+
private changeEvent;
|
|
591
|
+
private EPS;
|
|
592
|
+
enabled: boolean;
|
|
593
|
+
deviceOrientation: Partial<DeviceOrientationEvent>;
|
|
594
|
+
screenOrientation: string | number;
|
|
595
|
+
alphaOffset: number;
|
|
596
|
+
constructor(object: Camera);
|
|
597
|
+
private onDeviceOrientationChangeEvent;
|
|
598
|
+
private onScreenOrientationChangeEvent;
|
|
599
|
+
private zee;
|
|
600
|
+
private euler;
|
|
601
|
+
private q0;
|
|
602
|
+
private q1;
|
|
603
|
+
private setObjectQuaternion;
|
|
604
|
+
connect: () => void;
|
|
605
|
+
disconnect: () => void;
|
|
606
|
+
private lastQuaternion;
|
|
607
|
+
update: () => void;
|
|
608
|
+
dispose: () => void;
|
|
609
|
+
}
|
|
651
610
|
|
|
652
611
|
type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientationControls$1>, 'ref' | 'args'> & {
|
|
653
612
|
camera?: THREE.Camera;
|
|
@@ -656,33 +615,6 @@ type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientation
|
|
|
656
615
|
};
|
|
657
616
|
declare const DeviceOrientationControls: ForwardRefComponent<DeviceOrientationControlsProps, DeviceOrientationControls$1>;
|
|
658
617
|
|
|
659
|
-
type DragControlsProps = {
|
|
660
|
-
autoTransform?: boolean;
|
|
661
|
-
matrix?: THREE.Matrix4;
|
|
662
|
-
axisLock?: 'x' | 'y' | 'z';
|
|
663
|
-
dragLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
|
|
664
|
-
onHover?: (hovering: boolean) => void;
|
|
665
|
-
onDragStart?: (origin: THREE.Vector3) => void;
|
|
666
|
-
onDrag?: (localMatrix: THREE.Matrix4, deltaLocalMatrix: THREE.Matrix4, worldMatrix: THREE.Matrix4, deltaWorldMatrix: THREE.Matrix4) => void;
|
|
667
|
-
onDragEnd?: () => void;
|
|
668
|
-
children: React.ReactNode;
|
|
669
|
-
dragConfig?: DragConfig;
|
|
670
|
-
};
|
|
671
|
-
declare const DragControls: ForwardRefComponent<DragControlsProps, THREE.Group>;
|
|
672
|
-
|
|
673
|
-
type FirstPersonControlsProps = Omit<ThreeElement<typeof FirstPersonControls$1>, 'ref' | 'args'> & {
|
|
674
|
-
domElement?: HTMLElement;
|
|
675
|
-
makeDefault?: boolean;
|
|
676
|
-
};
|
|
677
|
-
declare const FirstPersonControls: ForwardRefComponent<FirstPersonControlsProps, FirstPersonControls$1>;
|
|
678
|
-
|
|
679
|
-
type FlyControlsProps = Omit<ThreeElement<typeof FlyControls$1>, 'ref' | 'args'> & {
|
|
680
|
-
onChange?: (e?: THREE.Event) => void;
|
|
681
|
-
domElement?: HTMLElement;
|
|
682
|
-
makeDefault?: boolean;
|
|
683
|
-
};
|
|
684
|
-
declare const FlyControls: ForwardRefComponent<FlyControlsProps, FlyControls$1>;
|
|
685
|
-
|
|
686
618
|
type State = object;
|
|
687
619
|
type StateSelector<T extends State, U> = (state: T) => U;
|
|
688
620
|
type EqualityChecker<T> = (state: T, newState: T) => boolean;
|
|
@@ -704,13 +636,6 @@ type KeyboardControlsEntry<T extends string = string> = {
|
|
|
704
636
|
keys: string[];
|
|
705
637
|
up?: boolean;
|
|
706
638
|
};
|
|
707
|
-
type KeyboardControlsProps = {
|
|
708
|
-
map: KeyboardControlsEntry[];
|
|
709
|
-
children: React.ReactNode;
|
|
710
|
-
onChange?: (name: string, pressed: boolean, state: KeyboardControlsState) => void;
|
|
711
|
-
domElement?: HTMLElement;
|
|
712
|
-
};
|
|
713
|
-
declare function KeyboardControls({ map, children, onChange, domElement }: KeyboardControlsProps): React.JSX.Element;
|
|
714
639
|
type Selector<T extends string = string> = (state: KeyboardControlsState<T>) => boolean;
|
|
715
640
|
declare function useKeyboardControls<T extends string = string>(): [
|
|
716
641
|
StoreApiWithSubscribeWithSelector<KeyboardControlsState<T>>['subscribe'],
|
|
@@ -718,17 +643,6 @@ declare function useKeyboardControls<T extends string = string>(): [
|
|
|
718
643
|
];
|
|
719
644
|
declare function useKeyboardControls<T extends string = string>(sel: Selector<T>): ReturnType<Selector<T>>;
|
|
720
645
|
|
|
721
|
-
type MapControlsProps = Omit<Overwrite<ThreeElement<typeof MapControls$1>, {
|
|
722
|
-
target?: ReactThreeFiber.Vector3;
|
|
723
|
-
camera?: THREE.Camera;
|
|
724
|
-
makeDefault?: boolean;
|
|
725
|
-
onChange?: (e?: THREE.Event) => void;
|
|
726
|
-
onStart?: (e?: THREE.Event) => void;
|
|
727
|
-
onEnd?: (e?: THREE.Event) => void;
|
|
728
|
-
domElement?: HTMLElement;
|
|
729
|
-
}>, 'ref' | 'args'>;
|
|
730
|
-
declare const MapControls: ForwardRefComponent<MapControlsProps, MapControls$1>;
|
|
731
|
-
|
|
732
646
|
type MotionPathProps = ThreeElements['group'] & {
|
|
733
647
|
curves?: THREE.Curve<THREE.Vector3>[];
|
|
734
648
|
debug?: boolean;
|
|
@@ -762,32 +676,7 @@ declare const MotionPathControls: React.ForwardRefExoticComponent<Omit<MotionPat
|
|
|
762
676
|
type ExtractCallback<T, E extends string> = T extends {
|
|
763
677
|
addEventListener(event: E, callback: infer C): void;
|
|
764
678
|
} ? C : never;
|
|
765
|
-
type OrbitControlsChangeEvent = Parameters<ExtractCallback<OrbitControls
|
|
766
|
-
type OrbitControlsProps = Omit<Overwrite<ThreeElement<typeof OrbitControls$1>, {
|
|
767
|
-
camera?: Camera;
|
|
768
|
-
domElement?: HTMLElement;
|
|
769
|
-
enableDamping?: boolean;
|
|
770
|
-
makeDefault?: boolean;
|
|
771
|
-
onChange?: (e?: OrbitControlsChangeEvent) => void;
|
|
772
|
-
onEnd?: (e?: Event) => void;
|
|
773
|
-
onStart?: (e?: Event) => void;
|
|
774
|
-
regress?: boolean;
|
|
775
|
-
target?: ReactThreeFiber.Vector3;
|
|
776
|
-
keyEvents?: boolean | HTMLElement;
|
|
777
|
-
}>, 'ref' | 'args'>;
|
|
778
|
-
declare const OrbitControls: ForwardRefComponent<OrbitControlsProps, OrbitControls$1>;
|
|
779
|
-
|
|
780
|
-
type PointerLockControlsProps = Omit<ThreeElement<typeof PointerLockControls$1>, 'ref' | 'args'> & {
|
|
781
|
-
domElement?: HTMLElement;
|
|
782
|
-
selector?: string;
|
|
783
|
-
enabled?: boolean;
|
|
784
|
-
camera?: THREE.Camera;
|
|
785
|
-
onChange?: (e?: THREE.Event) => void;
|
|
786
|
-
onLock?: (e?: THREE.Event) => void;
|
|
787
|
-
onUnlock?: (e?: THREE.Event) => void;
|
|
788
|
-
makeDefault?: boolean;
|
|
789
|
-
};
|
|
790
|
-
declare const PointerLockControls: ForwardRefComponent<PointerLockControlsProps, PointerLockControls$1>;
|
|
679
|
+
type OrbitControlsChangeEvent = Parameters<ExtractCallback<OrbitControls, 'change'>>[0];
|
|
791
680
|
|
|
792
681
|
type PresentationControlProps = {
|
|
793
682
|
snap?: Boolean | number;
|
|
@@ -805,19 +694,6 @@ type PresentationControlProps = {
|
|
|
805
694
|
};
|
|
806
695
|
declare function PresentationControls({ enabled, snap, global, domElement, cursor, children, speed, rotation, zoom, polar, azimuth, damping, }: PresentationControlProps): React.JSX.Element;
|
|
807
696
|
|
|
808
|
-
type ScrollControlsProps = {
|
|
809
|
-
eps?: number;
|
|
810
|
-
horizontal?: boolean;
|
|
811
|
-
infinite?: boolean;
|
|
812
|
-
pages?: number;
|
|
813
|
-
distance?: number;
|
|
814
|
-
damping?: number;
|
|
815
|
-
maxSpeed?: number;
|
|
816
|
-
prepend?: boolean;
|
|
817
|
-
enabled?: boolean;
|
|
818
|
-
style?: React.CSSProperties;
|
|
819
|
-
children: React.ReactNode;
|
|
820
|
-
};
|
|
821
697
|
type ScrollControlsState = {
|
|
822
698
|
el: HTMLDivElement;
|
|
823
699
|
eps: number;
|
|
@@ -831,9 +707,9 @@ type ScrollControlsState = {
|
|
|
831
707
|
range(from: number, distance: number, margin?: number): number;
|
|
832
708
|
curve(from: number, distance: number, margin?: number): number;
|
|
833
709
|
visible(from: number, distance: number, margin?: number): boolean;
|
|
710
|
+
pixelPerfect: boolean;
|
|
834
711
|
};
|
|
835
712
|
declare function useScroll(): ScrollControlsState;
|
|
836
|
-
declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, style, children, }: ScrollControlsProps): React.JSX.Element;
|
|
837
713
|
interface ScrollPropsWithFalseHtml {
|
|
838
714
|
children?: React.ReactNode;
|
|
839
715
|
html?: false;
|
|
@@ -847,18 +723,6 @@ interface ScrollPropsWithTrueHtml {
|
|
|
847
723
|
type ScrollProps = ScrollPropsWithFalseHtml | ScrollPropsWithTrueHtml;
|
|
848
724
|
declare const Scroll: ForwardRefComponent<ScrollProps, THREE.Group & HTMLDivElement>;
|
|
849
725
|
|
|
850
|
-
type TrackballControlsProps = Omit<Overwrite<ThreeElement<typeof TrackballControls$1>, {
|
|
851
|
-
target?: ReactThreeFiber.Vector3;
|
|
852
|
-
camera?: THREE.Camera;
|
|
853
|
-
domElement?: HTMLElement;
|
|
854
|
-
regress?: boolean;
|
|
855
|
-
makeDefault?: boolean;
|
|
856
|
-
onChange?: (e?: THREE.Event) => void;
|
|
857
|
-
onStart?: (e?: THREE.Event) => void;
|
|
858
|
-
onEnd?: (e?: THREE.Event) => void;
|
|
859
|
-
}>, 'ref' | 'args'>;
|
|
860
|
-
declare const TrackballControls: ForwardRefComponent<TrackballControlsProps, TrackballControls$1>;
|
|
861
|
-
|
|
862
726
|
interface ShakeController {
|
|
863
727
|
getIntensity: () => number;
|
|
864
728
|
setIntensity: (val: number) => void;
|
|
@@ -905,6 +769,7 @@ type CloudsProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
905
769
|
frustumCulled?: boolean;
|
|
906
770
|
};
|
|
907
771
|
type CloudProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
772
|
+
materialFactory?: (baseMaterial: typeof Material) => Material;
|
|
908
773
|
seed?: number;
|
|
909
774
|
segments?: number;
|
|
910
775
|
bounds?: ReactThreeFiber.Vector3;
|
|
@@ -922,9 +787,52 @@ type CloudProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
922
787
|
opacity?: number;
|
|
923
788
|
color?: ReactThreeFiber.Color;
|
|
924
789
|
};
|
|
925
|
-
declare const Clouds: React.ForwardRefExoticComponent<Omit<
|
|
926
|
-
|
|
927
|
-
|
|
790
|
+
declare const Clouds: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<Group<three.Object3DEventMap>, _react_three_fiber.MathProps<Group<three.Object3DEventMap>> & _react_three_fiber.ReactProps<Group<three.Object3DEventMap>> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<Group<three.Object3DEventMap>>>>, Omit<_react_three_fiber.InstanceProps<Group<three.Object3DEventMap>, typeof Group>, "object">>>, "ref"> & {
|
|
791
|
+
texture?: string;
|
|
792
|
+
limit?: number;
|
|
793
|
+
range?: number;
|
|
794
|
+
material?: typeof Material;
|
|
795
|
+
materialFactory?: (baseMaterial: typeof Material) => Material;
|
|
796
|
+
frustumCulled?: boolean;
|
|
797
|
+
} & React.RefAttributes<Group<three.Object3DEventMap>>>;
|
|
798
|
+
declare const CloudInstance: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<Group<three.Object3DEventMap>, _react_three_fiber.MathProps<Group<three.Object3DEventMap>> & _react_three_fiber.ReactProps<Group<three.Object3DEventMap>> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<Group<three.Object3DEventMap>>>>, Omit<_react_three_fiber.InstanceProps<Group<three.Object3DEventMap>, typeof Group>, "object">>>, "ref"> & {
|
|
799
|
+
materialFactory?: (baseMaterial: typeof Material) => Material;
|
|
800
|
+
seed?: number;
|
|
801
|
+
segments?: number;
|
|
802
|
+
bounds?: ReactThreeFiber.Vector3;
|
|
803
|
+
concentrate?: "random" | "inside" | "outside";
|
|
804
|
+
scale?: ReactThreeFiber.Vector3;
|
|
805
|
+
volume?: number;
|
|
806
|
+
smallestVolume?: number;
|
|
807
|
+
distribute?: (cloud: CloudState, index: number) => {
|
|
808
|
+
point: Vector3$1;
|
|
809
|
+
volume?: number;
|
|
810
|
+
};
|
|
811
|
+
growth?: number;
|
|
812
|
+
speed?: number;
|
|
813
|
+
fade?: number;
|
|
814
|
+
opacity?: number;
|
|
815
|
+
color?: ReactThreeFiber.Color;
|
|
816
|
+
} & React.RefAttributes<Group<three.Object3DEventMap>>>;
|
|
817
|
+
declare const Cloud: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<Group<three.Object3DEventMap>, _react_three_fiber.MathProps<Group<three.Object3DEventMap>> & _react_three_fiber.ReactProps<Group<three.Object3DEventMap>> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<Group<three.Object3DEventMap>>>>, Omit<_react_three_fiber.InstanceProps<Group<three.Object3DEventMap>, typeof Group>, "object">>>, "ref"> & {
|
|
818
|
+
materialFactory?: (baseMaterial: typeof Material) => Material;
|
|
819
|
+
seed?: number;
|
|
820
|
+
segments?: number;
|
|
821
|
+
bounds?: ReactThreeFiber.Vector3;
|
|
822
|
+
concentrate?: "random" | "inside" | "outside";
|
|
823
|
+
scale?: ReactThreeFiber.Vector3;
|
|
824
|
+
volume?: number;
|
|
825
|
+
smallestVolume?: number;
|
|
826
|
+
distribute?: (cloud: CloudState, index: number) => {
|
|
827
|
+
point: Vector3$1;
|
|
828
|
+
volume?: number;
|
|
829
|
+
};
|
|
830
|
+
growth?: number;
|
|
831
|
+
speed?: number;
|
|
832
|
+
fade?: number;
|
|
833
|
+
opacity?: number;
|
|
834
|
+
color?: ReactThreeFiber.Color;
|
|
835
|
+
} & React.RefAttributes<Group<three.Object3DEventMap>>>;
|
|
928
836
|
|
|
929
837
|
type CatmullRomLineProps = Omit<LineProps, 'ref' | 'segments'> & {
|
|
930
838
|
closed?: boolean;
|
|
@@ -1044,25 +952,25 @@ type Args<T> = T extends new (...args: any) => any ? ConstructorParameters<T> :
|
|
|
1044
952
|
type ShapeProps<T> = Omit<ThreeElements['mesh'], 'ref' | 'args'> & {
|
|
1045
953
|
args?: Args<T>;
|
|
1046
954
|
};
|
|
1047
|
-
declare const Box: ForwardRefComponent<ShapeProps<typeof THREE.BoxGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1048
|
-
declare const Circle: ForwardRefComponent<ShapeProps<typeof THREE.CircleGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1049
|
-
declare const Cone: ForwardRefComponent<ShapeProps<typeof THREE.ConeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1050
|
-
declare const Cylinder: ForwardRefComponent<ShapeProps<typeof THREE.CylinderGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1051
|
-
declare const Sphere: ForwardRefComponent<ShapeProps<typeof THREE.SphereGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1052
|
-
declare const Plane: ForwardRefComponent<ShapeProps<typeof THREE.PlaneGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1053
|
-
declare const Tube: ForwardRefComponent<ShapeProps<typeof THREE.TubeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1054
|
-
declare const Torus: ForwardRefComponent<ShapeProps<typeof THREE.TorusGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1055
|
-
declare const TorusKnot: ForwardRefComponent<ShapeProps<typeof THREE.TorusKnotGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1056
|
-
declare const Tetrahedron: ForwardRefComponent<ShapeProps<typeof THREE.TetrahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1057
|
-
declare const Ring: ForwardRefComponent<ShapeProps<typeof THREE.RingGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1058
|
-
declare const Polyhedron: ForwardRefComponent<ShapeProps<typeof THREE.PolyhedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1059
|
-
declare const Icosahedron: ForwardRefComponent<ShapeProps<typeof THREE.IcosahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1060
|
-
declare const Octahedron: ForwardRefComponent<ShapeProps<typeof THREE.OctahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1061
|
-
declare const Dodecahedron: ForwardRefComponent<ShapeProps<typeof THREE.DodecahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1062
|
-
declare const Extrude: ForwardRefComponent<ShapeProps<typeof THREE.ExtrudeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1063
|
-
declare const Lathe: ForwardRefComponent<ShapeProps<typeof THREE.LatheGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1064
|
-
declare const Capsule: ForwardRefComponent<ShapeProps<typeof THREE.CapsuleGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1065
|
-
declare const Shape: ForwardRefComponent<ShapeProps<typeof THREE.ShapeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
955
|
+
declare const Box: ForwardRefComponent<ShapeProps<typeof THREE.BoxGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
956
|
+
declare const Circle: ForwardRefComponent<ShapeProps<typeof THREE.CircleGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
957
|
+
declare const Cone: ForwardRefComponent<ShapeProps<typeof THREE.ConeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
958
|
+
declare const Cylinder: ForwardRefComponent<ShapeProps<typeof THREE.CylinderGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
959
|
+
declare const Sphere: ForwardRefComponent<ShapeProps<typeof THREE.SphereGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
960
|
+
declare const Plane: ForwardRefComponent<ShapeProps<typeof THREE.PlaneGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
961
|
+
declare const Tube: ForwardRefComponent<ShapeProps<typeof THREE.TubeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
962
|
+
declare const Torus: ForwardRefComponent<ShapeProps<typeof THREE.TorusGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
963
|
+
declare const TorusKnot: ForwardRefComponent<ShapeProps<typeof THREE.TorusKnotGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
964
|
+
declare const Tetrahedron: ForwardRefComponent<ShapeProps<typeof THREE.TetrahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
965
|
+
declare const Ring: ForwardRefComponent<ShapeProps<typeof THREE.RingGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
966
|
+
declare const Polyhedron: ForwardRefComponent<ShapeProps<typeof THREE.PolyhedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
967
|
+
declare const Icosahedron: ForwardRefComponent<ShapeProps<typeof THREE.IcosahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
968
|
+
declare const Octahedron: ForwardRefComponent<ShapeProps<typeof THREE.OctahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
969
|
+
declare const Dodecahedron: ForwardRefComponent<ShapeProps<typeof THREE.DodecahedronGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
970
|
+
declare const Extrude: ForwardRefComponent<ShapeProps<typeof THREE.ExtrudeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
971
|
+
declare const Lathe: ForwardRefComponent<ShapeProps<typeof THREE.LatheGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
972
|
+
declare const Capsule: ForwardRefComponent<ShapeProps<typeof THREE.CapsuleGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
973
|
+
declare const Shape: ForwardRefComponent<ShapeProps<typeof THREE.ShapeGeometry>, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>>;
|
|
1066
974
|
|
|
1067
975
|
type Glyph = {
|
|
1068
976
|
_cachedOutline: string[];
|
|
@@ -1101,60 +1009,13 @@ type Text3DProps = Omit<ThreeElements['mesh'], 'ref'> & {
|
|
|
1101
1009
|
font: FontData | string;
|
|
1102
1010
|
bevelSegments?: number;
|
|
1103
1011
|
smooth?: number;
|
|
1104
|
-
|
|
1012
|
+
height?: number;
|
|
1013
|
+
} & Omit<TextGeometryParameters, 'font' | 'depth'>;
|
|
1105
1014
|
declare const Text3D: ForwardRefComponent<React.PropsWithChildren<Text3DProps & {
|
|
1106
1015
|
letterSpacing?: number;
|
|
1107
1016
|
lineHeight?: number;
|
|
1108
1017
|
}>, THREE.Mesh>;
|
|
1109
1018
|
|
|
1110
|
-
interface WireframeMaterialProps$1 extends THREE.ShaderMaterialParameters {
|
|
1111
|
-
fillOpacity?: number;
|
|
1112
|
-
fillMix?: number;
|
|
1113
|
-
strokeOpacity?: number;
|
|
1114
|
-
thickness?: number;
|
|
1115
|
-
colorBackfaces?: boolean;
|
|
1116
|
-
dashInvert?: boolean;
|
|
1117
|
-
dash?: boolean;
|
|
1118
|
-
dashRepeats?: number;
|
|
1119
|
-
dashLength?: number;
|
|
1120
|
-
squeeze?: boolean;
|
|
1121
|
-
squeezeMin?: number;
|
|
1122
|
-
squeezeMax?: number;
|
|
1123
|
-
stroke?: THREE.ColorRepresentation;
|
|
1124
|
-
backfaceStroke?: THREE.ColorRepresentation;
|
|
1125
|
-
fill?: THREE.ColorRepresentation;
|
|
1126
|
-
}
|
|
1127
|
-
declare const WireframeMaterial$1: _react_three_fiber.ConstructorRepresentation<THREE.ShaderMaterial & {
|
|
1128
|
-
strokeOpacity: number;
|
|
1129
|
-
fillOpacity: number;
|
|
1130
|
-
fillMix: number;
|
|
1131
|
-
thickness: number;
|
|
1132
|
-
colorBackfaces: boolean;
|
|
1133
|
-
dashInvert: boolean;
|
|
1134
|
-
dash: boolean;
|
|
1135
|
-
dashRepeats: number;
|
|
1136
|
-
dashLength: number;
|
|
1137
|
-
squeeze: boolean;
|
|
1138
|
-
squeezeMin: number;
|
|
1139
|
-
squeezeMax: number;
|
|
1140
|
-
stroke: THREE.Color;
|
|
1141
|
-
backfaceStroke: THREE.Color;
|
|
1142
|
-
fill: THREE.Color;
|
|
1143
|
-
}> & {
|
|
1144
|
-
key: string;
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
declare module '@react-three/fiber' {
|
|
1148
|
-
interface ThreeElements {
|
|
1149
|
-
meshWireframeMaterial: ThreeElement<typeof WireframeMaterial$1>;
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
interface WireframeProps {
|
|
1153
|
-
geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
|
|
1154
|
-
simplify?: boolean;
|
|
1155
|
-
}
|
|
1156
|
-
declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps$1): React.JSX.Element;
|
|
1157
|
-
|
|
1158
1019
|
type GizmoHelperContext = {
|
|
1159
1020
|
tweenCamera: (direction: Vector3$1) => void;
|
|
1160
1021
|
};
|
|
@@ -1201,6 +1062,17 @@ type OnDragStartProps = {
|
|
|
1201
1062
|
origin: THREE.Vector3;
|
|
1202
1063
|
directions: THREE.Vector3[];
|
|
1203
1064
|
};
|
|
1065
|
+
type OnDragProps = {
|
|
1066
|
+
local: THREE.Matrix4;
|
|
1067
|
+
deltaLocal: THREE.Matrix4;
|
|
1068
|
+
world: THREE.Matrix4;
|
|
1069
|
+
deltaWorld: THREE.Matrix4;
|
|
1070
|
+
};
|
|
1071
|
+
type OnHoverProps = {
|
|
1072
|
+
component: 'Arrow' | 'Slider' | 'Rotator' | 'Sphere';
|
|
1073
|
+
axis: 0 | 1 | 2;
|
|
1074
|
+
hovering: boolean;
|
|
1075
|
+
};
|
|
1204
1076
|
|
|
1205
1077
|
type PivotControlsProps = {
|
|
1206
1078
|
enabled?: boolean;
|
|
@@ -1210,6 +1082,7 @@ type PivotControlsProps = {
|
|
|
1210
1082
|
offset?: [number, number, number];
|
|
1211
1083
|
rotation?: [number, number, number];
|
|
1212
1084
|
matrix?: THREE.Matrix4;
|
|
1085
|
+
object?: THREE.Object3D | React.MutableRefObject<THREE.Object3D>;
|
|
1213
1086
|
anchor?: [number, number, number];
|
|
1214
1087
|
autoTransform?: boolean;
|
|
1215
1088
|
activeAxes?: [boolean, boolean, boolean];
|
|
@@ -1225,8 +1098,9 @@ type PivotControlsProps = {
|
|
|
1225
1098
|
annotations?: boolean;
|
|
1226
1099
|
annotationsClass?: string;
|
|
1227
1100
|
onDragStart?: (props: OnDragStartProps) => void;
|
|
1228
|
-
onDrag?: (
|
|
1229
|
-
onDragEnd?: () => void;
|
|
1101
|
+
onDrag?: (props: OnDragProps) => void;
|
|
1102
|
+
onDragEnd?: (props: OnDragProps) => void;
|
|
1103
|
+
onHover?: (props: OnHoverProps) => void;
|
|
1230
1104
|
depthTest?: boolean;
|
|
1231
1105
|
renderOrder?: number;
|
|
1232
1106
|
opacity?: number;
|
|
@@ -1268,8 +1142,8 @@ type HelperType = Object3D & {
|
|
|
1268
1142
|
dispose: () => void;
|
|
1269
1143
|
};
|
|
1270
1144
|
type HelperConstructor = new (...args: any[]) => any;
|
|
1271
|
-
type HelperArgs<T> = T extends [infer _, ...infer R] ? R :
|
|
1272
|
-
declare function useHelper<T extends HelperConstructor>(object3D: React.RefObject<Object3D> | Falsey, helperConstructor: T, ...args: HelperArgs<ConstructorParameters<T>>): React.RefObject<HelperType | null>;
|
|
1145
|
+
type HelperArgs<T> = T extends [infer _, ...infer R] ? R : [];
|
|
1146
|
+
declare function useHelper<T extends HelperConstructor>(object3D: React.RefObject<Object3D | null> | Falsey, helperConstructor: T, ...args: HelperArgs<ConstructorParameters<T>>): React.RefObject<HelperType | null>;
|
|
1273
1147
|
type HelperProps<T extends HelperConstructor> = {
|
|
1274
1148
|
type: T;
|
|
1275
1149
|
args?: HelperArgs<ConstructorParameters<T>>;
|
|
@@ -1312,6 +1186,7 @@ type InstancedAttributeProps = Omit<ThreeElements['instancedBufferAttribute'], '
|
|
|
1312
1186
|
defaultValue: any;
|
|
1313
1187
|
normalized?: boolean;
|
|
1314
1188
|
usage?: number;
|
|
1189
|
+
type?: 'float' | 'int' | 'uint' | 'short' | 'ushort' | 'byte';
|
|
1315
1190
|
};
|
|
1316
1191
|
type InstancedMesh = Omit<THREE.InstancedMesh, 'instanceMatrix' | 'instanceColor'> & {
|
|
1317
1192
|
instanceMatrix: THREE.InstancedBufferAttribute;
|
|
@@ -1325,7 +1200,7 @@ declare class PositionMesh extends THREE.Group {
|
|
|
1325
1200
|
get geometry(): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap> | undefined;
|
|
1326
1201
|
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
1327
1202
|
}
|
|
1328
|
-
declare const Instance: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<PositionMesh, _react_three_fiber.MathProps<PositionMesh> & _react_three_fiber.ReactProps<PositionMesh> & Partial<_react_three_fiber.EventHandlers>>>, Omit<_react_three_fiber.InstanceProps<PositionMesh, typeof PositionMesh>, "object">>>, "ref"> & {
|
|
1203
|
+
declare const Instance: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<PositionMesh, _react_three_fiber.MathProps<PositionMesh> & _react_three_fiber.ReactProps<PositionMesh> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<PositionMesh>>>, Omit<_react_three_fiber.InstanceProps<PositionMesh, typeof PositionMesh>, "object">>>, "ref"> & {
|
|
1329
1204
|
context?: React.Context<Api$1>;
|
|
1330
1205
|
} & React.RefAttributes<unknown>>;
|
|
1331
1206
|
declare const Instances: ForwardRefComponent<InstancesProps, THREE.InstancedMesh>;
|
|
@@ -1334,10 +1209,21 @@ interface MergedProps extends Omit<InstancesProps, 'children'> {
|
|
|
1334
1209
|
children: (...instances: [React.FC<InstanceProps> & Record<string, React.FC<InstanceProps>>, ...React.FC<InstanceProps>[]]) => React.ReactNode;
|
|
1335
1210
|
}
|
|
1336
1211
|
declare const Merged: ForwardRefComponent<MergedProps, THREE.Group>;
|
|
1337
|
-
declare function createInstances<T = InstanceProps>(): readonly [React.ForwardRefExoticComponent<Omit<
|
|
1212
|
+
declare function createInstances<T = InstanceProps>(): readonly [React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.InstancedMeshEventMap>, _react_three_fiber.MathProps<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.InstancedMeshEventMap>> & _react_three_fiber.ReactProps<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.InstancedMeshEventMap>> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.InstancedMeshEventMap>>>>, Omit<_react_three_fiber.InstanceProps<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.InstancedMeshEventMap>, typeof THREE.InstancedMesh>, "object">>>, "ref" | "args"> & {
|
|
1213
|
+
context?: React.Context<Api$1>;
|
|
1214
|
+
range?: number;
|
|
1215
|
+
limit?: number;
|
|
1216
|
+
frames?: number;
|
|
1217
|
+
} & React.RefAttributes<THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.InstancedMeshEventMap>>>, React.ForwardRefExoticComponent<React.PropsWithoutRef<T & Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<PositionMesh, _react_three_fiber.MathProps<PositionMesh> & _react_three_fiber.ReactProps<PositionMesh> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<PositionMesh>>>, Omit<_react_three_fiber.InstanceProps<PositionMesh, typeof PositionMesh>, "object">>>, "ref"> & {
|
|
1338
1218
|
context?: React.Context<Api$1>;
|
|
1339
1219
|
}> & React.RefAttributes<PositionMesh & T>>];
|
|
1340
|
-
declare const InstancedAttribute: React.ForwardRefExoticComponent<Omit<
|
|
1220
|
+
declare const InstancedAttribute: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<THREE.InstancedBufferAttribute, _react_three_fiber.MathProps<THREE.InstancedBufferAttribute> & _react_three_fiber.ReactProps<THREE.InstancedBufferAttribute> & _react_three_fiber.NodeProps<THREE.InstancedBufferAttribute>>>, Omit<_react_three_fiber.InstanceProps<THREE.InstancedBufferAttribute, typeof THREE.InstancedBufferAttribute>, "object">>>, "ref" | "args"> & {
|
|
1221
|
+
name: string;
|
|
1222
|
+
defaultValue: any;
|
|
1223
|
+
normalized?: boolean;
|
|
1224
|
+
usage?: number;
|
|
1225
|
+
type?: "float" | "int" | "uint" | "short" | "ushort" | "byte";
|
|
1226
|
+
} & React.RefAttributes<THREE.InstancedBufferAttribute>>;
|
|
1341
1227
|
|
|
1342
1228
|
type Size = {
|
|
1343
1229
|
w: number;
|
|
@@ -1441,7 +1327,40 @@ type SpriteAnimatorState = {
|
|
|
1441
1327
|
ref: React.Ref<THREE.Group>;
|
|
1442
1328
|
};
|
|
1443
1329
|
declare function useSpriteAnimator(): SpriteAnimatorState | null;
|
|
1444
|
-
declare const SpriteAnimator: React.ForwardRefExoticComponent<
|
|
1330
|
+
declare const SpriteAnimator: React.ForwardRefExoticComponent<{
|
|
1331
|
+
startFrame?: number;
|
|
1332
|
+
endFrame?: number;
|
|
1333
|
+
fps?: number;
|
|
1334
|
+
frameName?: string;
|
|
1335
|
+
textureDataURL?: string;
|
|
1336
|
+
textureImageURL?: string;
|
|
1337
|
+
loop?: boolean;
|
|
1338
|
+
numberOfFrames?: number;
|
|
1339
|
+
autoPlay?: boolean;
|
|
1340
|
+
animationNames?: Array<string>;
|
|
1341
|
+
onStart?: (data: AnimationEventData) => void;
|
|
1342
|
+
onEnd?: (data: AnimationEventData) => void;
|
|
1343
|
+
onLoopEnd?: (data: AnimationEventData) => void;
|
|
1344
|
+
onFrame?: (data: AnimationEventData) => void;
|
|
1345
|
+
play?: boolean;
|
|
1346
|
+
pause?: boolean;
|
|
1347
|
+
flipX?: boolean;
|
|
1348
|
+
alphaTest?: number;
|
|
1349
|
+
asSprite?: boolean;
|
|
1350
|
+
offset?: number;
|
|
1351
|
+
playBackwards?: boolean;
|
|
1352
|
+
resetOnEnd?: boolean;
|
|
1353
|
+
instanceItems?: Vector3[];
|
|
1354
|
+
maxItems?: number;
|
|
1355
|
+
spriteDataset?: {
|
|
1356
|
+
spriteTexture: THREE.Texture;
|
|
1357
|
+
spriteData: SpriteData | null;
|
|
1358
|
+
aspect: Vector3;
|
|
1359
|
+
} | null;
|
|
1360
|
+
canvasRenderingContext2DSettings?: CanvasRenderingContext2DSettings;
|
|
1361
|
+
roundFramePosition?: boolean;
|
|
1362
|
+
meshProps?: CommonMeshProps;
|
|
1363
|
+
} & Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<THREE.Group<THREE.Object3DEventMap>, _react_three_fiber.MathProps<THREE.Group<THREE.Object3DEventMap>> & _react_three_fiber.ReactProps<THREE.Group<THREE.Object3DEventMap>> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<THREE.Group<THREE.Object3DEventMap>>>>, Omit<_react_three_fiber.InstanceProps<THREE.Group<THREE.Object3DEventMap>, typeof THREE.Group>, "object">>>, "ref"> & React.RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
|
|
1445
1364
|
|
|
1446
1365
|
type Api<T extends AnimationClip> = {
|
|
1447
1366
|
ref: React.RefObject<Object3D | undefined | null>;
|
|
@@ -1527,7 +1446,7 @@ declare const Svg: ForwardRefComponent<SvgProps, Object3D>;
|
|
|
1527
1446
|
declare function useDepthBuffer({ size, frames }?: {
|
|
1528
1447
|
size?: number;
|
|
1529
1448
|
frames?: number;
|
|
1530
|
-
}): DepthTexture | null;
|
|
1449
|
+
}): DepthTexture<three.DepthTextureImageData> | null;
|
|
1531
1450
|
|
|
1532
1451
|
interface CubeTextureOptions {
|
|
1533
1452
|
path: string;
|
|
@@ -1626,33 +1545,52 @@ declare function Fbx({ path, ...props }: {
|
|
|
1626
1545
|
type Path = string | string[];
|
|
1627
1546
|
type UseDraco = boolean | string;
|
|
1628
1547
|
type UseMeshopt = boolean;
|
|
1629
|
-
type
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1548
|
+
type UseKTX2 = boolean | string;
|
|
1549
|
+
type ExtendLoader$1 = (loader: GLTFLoader) => void;
|
|
1550
|
+
interface UseGLTFOptions {
|
|
1551
|
+
draco?: UseDraco;
|
|
1552
|
+
meshopt?: UseMeshopt;
|
|
1553
|
+
ktx2?: UseKTX2;
|
|
1554
|
+
extendLoader?: ExtendLoader$1;
|
|
1555
|
+
}
|
|
1556
|
+
declare function useGLTF<T extends Path>(path: T, optionsOrDraco?: UseGLTFOptions | UseDraco, useMeshoptArg?: UseMeshopt, useKTX2Arg?: UseKTX2, extendLoaderArg?: ExtendLoader$1): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
|
|
1557
|
+
declare namespace useGLTF {
|
|
1558
|
+
var preload: (path: Path, optionsOrDraco?: UseGLTFOptions | UseDraco, useMeshoptArg?: UseMeshopt, useKTX2Arg?: UseKTX2, extendLoaderArg?: ExtendLoader$1) => void;
|
|
1559
|
+
var clear: (path: Path) => void;
|
|
1560
|
+
var setDecoderPath: (path: string) => void;
|
|
1561
|
+
var setKTX2TranscoderPath: (path: string) => void;
|
|
1562
|
+
}
|
|
1636
1563
|
type GltfProps = Omit<CloneProps, 'object'> & {
|
|
1637
1564
|
src: string;
|
|
1638
1565
|
useDraco?: UseDraco;
|
|
1639
1566
|
useMeshOpt?: UseMeshopt;
|
|
1640
|
-
extendLoader?: ExtendLoader;
|
|
1567
|
+
extendLoader?: ExtendLoader$1;
|
|
1568
|
+
options?: UseGLTFOptions;
|
|
1641
1569
|
};
|
|
1642
|
-
declare const Gltf: React.ForwardRefExoticComponent<Omit<
|
|
1570
|
+
declare const Gltf: React.ForwardRefExoticComponent<Omit<CloneProps, "object"> & {
|
|
1571
|
+
src: string;
|
|
1572
|
+
useDraco?: UseDraco;
|
|
1573
|
+
useMeshOpt?: UseMeshopt;
|
|
1574
|
+
extendLoader?: ExtendLoader$1;
|
|
1575
|
+
options?: UseGLTFOptions;
|
|
1576
|
+
} & React.RefAttributes<three.Group<three.Object3DEventMap>>>;
|
|
1643
1577
|
|
|
1644
|
-
|
|
1578
|
+
type ExtendLoader = (loader: KTX2Loader) => void;
|
|
1579
|
+
declare function useKTX2<Url extends string[] | string | Record<string, string>>(input: Url, basisPath?: boolean | string, extendLoader?: ExtendLoader): Url extends any[] ? Texture$1[] : Url extends object ? {
|
|
1645
1580
|
[key in keyof Url]: Texture$1;
|
|
1646
1581
|
} : Texture$1;
|
|
1647
1582
|
declare namespace useKTX2 {
|
|
1648
|
-
var preload: (url: string
|
|
1583
|
+
var preload: (url: string | string[], basisPath?: boolean | string, extendLoader?: ExtendLoader) => void;
|
|
1649
1584
|
var clear: (input: string | string[]) => void;
|
|
1585
|
+
var setTranscoderPath: (path: string) => void;
|
|
1650
1586
|
}
|
|
1651
|
-
|
|
1587
|
+
type Ktx2Props = {
|
|
1652
1588
|
children?: (texture: ReturnType<typeof useKTX2>) => React.ReactNode;
|
|
1653
1589
|
input: Parameters<typeof useKTX2>[0];
|
|
1654
1590
|
basisPath?: Parameters<typeof useKTX2>[1];
|
|
1655
|
-
|
|
1591
|
+
extendLoader?: ExtendLoader;
|
|
1592
|
+
};
|
|
1593
|
+
declare const Ktx2: ({ children, input, basisPath, extendLoader }: Ktx2Props) => React.JSX.Element;
|
|
1656
1594
|
|
|
1657
1595
|
type Data = {
|
|
1658
1596
|
errors: string[];
|
|
@@ -1768,7 +1706,7 @@ declare const StatsGl: ForwardRefComponent<StatsGlProps, HTMLDivElement>;
|
|
|
1768
1706
|
type FBOSettings = {
|
|
1769
1707
|
depth?: boolean;
|
|
1770
1708
|
} & RenderTargetOptions;
|
|
1771
|
-
declare function useFBO(width?: number | FBOSettings, height?: number, settings?: FBOSettings): THREE.WebGLRenderTarget<THREE.Texture<unknown>>;
|
|
1709
|
+
declare function useFBO(width?: number | FBOSettings, height?: number, settings?: FBOSettings): THREE.WebGLRenderTarget<THREE.Texture<unknown, THREE.TextureEventMap>>;
|
|
1772
1710
|
type UseFBOParams = Parameters<typeof useFBO>;
|
|
1773
1711
|
type FboProps = {
|
|
1774
1712
|
children?: (target: Fbo) => React.ReactNode;
|
|
@@ -1782,7 +1720,7 @@ declare const Fbo: React.ForwardRefExoticComponent<{
|
|
|
1782
1720
|
height?: UseFBOParams[1];
|
|
1783
1721
|
} & {
|
|
1784
1722
|
depth?: boolean;
|
|
1785
|
-
} & THREE.RenderTargetOptions & React.RefAttributes<THREE.WebGLRenderTarget<THREE.Texture<unknown>>>>;
|
|
1723
|
+
} & THREE.RenderTargetOptions & React.RefAttributes<THREE.WebGLRenderTarget<THREE.Texture<unknown, THREE.TextureEventMap>>>>;
|
|
1786
1724
|
|
|
1787
1725
|
type FisheyeProps = ThreeElements['mesh'] & {
|
|
1788
1726
|
zoom?: number;
|
|
@@ -1955,7 +1893,7 @@ type EnvironmentLoaderProps = {
|
|
|
1955
1893
|
extensions?: (loader: Loader$1) => void;
|
|
1956
1894
|
colorSpace?: ColorSpace;
|
|
1957
1895
|
};
|
|
1958
|
-
declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture$1<unknown>;
|
|
1896
|
+
declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown, three.TextureEventMap> | CubeTexture$1<unknown>;
|
|
1959
1897
|
declare namespace useEnvironment {
|
|
1960
1898
|
var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
|
|
1961
1899
|
var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
|
|
@@ -2026,7 +1964,13 @@ type ResizeProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
2026
1964
|
box3?: THREE.Box3;
|
|
2027
1965
|
precise?: boolean;
|
|
2028
1966
|
};
|
|
2029
|
-
declare const Resize: React.ForwardRefExoticComponent<Omit<
|
|
1967
|
+
declare const Resize: React.ForwardRefExoticComponent<Omit<_react_three_fiber.Mutable<_react_three_fiber.Overwrite<Partial<_react_three_fiber.Overwrite<THREE.Group<THREE.Object3DEventMap>, _react_three_fiber.MathProps<THREE.Group<THREE.Object3DEventMap>> & _react_three_fiber.ReactProps<THREE.Group<THREE.Object3DEventMap>> & Partial<_react_three_fiber.EventHandlers> & _react_three_fiber.NodeProps<THREE.Group<THREE.Object3DEventMap>>>>, Omit<_react_three_fiber.InstanceProps<THREE.Group<THREE.Object3DEventMap>, typeof THREE.Group>, "object">>>, "ref"> & {
|
|
1968
|
+
width?: boolean;
|
|
1969
|
+
height?: boolean;
|
|
1970
|
+
depth?: boolean;
|
|
1971
|
+
box3?: THREE.Box3;
|
|
1972
|
+
precise?: boolean;
|
|
1973
|
+
} & React.RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
|
|
2030
1974
|
|
|
2031
1975
|
type ScreenSizerProps = Omit<ThreeElements['object3D'], 'ref'> & {
|
|
2032
1976
|
scale?: number;
|
|
@@ -2110,28 +2054,6 @@ declare function defaultCalculatePosition(el: Object3D, camera: Camera, size: {
|
|
|
2110
2054
|
height: number;
|
|
2111
2055
|
}): number[];
|
|
2112
2056
|
type CalculatePosition = typeof defaultCalculatePosition;
|
|
2113
|
-
type PointerEventsProperties = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit';
|
|
2114
|
-
interface HtmlProps extends Omit<Assign<React.HTMLAttributes<HTMLDivElement>, ThreeElements['group']>, 'ref'> {
|
|
2115
|
-
prepend?: boolean;
|
|
2116
|
-
center?: boolean;
|
|
2117
|
-
fullscreen?: boolean;
|
|
2118
|
-
eps?: number;
|
|
2119
|
-
portal?: React.RefObject<HTMLElement>;
|
|
2120
|
-
distanceFactor?: number;
|
|
2121
|
-
sprite?: boolean;
|
|
2122
|
-
transform?: boolean;
|
|
2123
|
-
zIndexRange?: Array<number>;
|
|
2124
|
-
calculatePosition?: CalculatePosition;
|
|
2125
|
-
as?: string;
|
|
2126
|
-
wrapperClass?: string;
|
|
2127
|
-
pointerEvents?: PointerEventsProperties;
|
|
2128
|
-
occlude?: React.RefObject<Object3D>[] | boolean | 'raycast' | 'blending';
|
|
2129
|
-
onOcclude?: (hidden: boolean) => void;
|
|
2130
|
-
material?: React.ReactNode;
|
|
2131
|
-
geometry?: React.ReactNode;
|
|
2132
|
-
castShadow?: boolean;
|
|
2133
|
-
receiveShadow?: boolean;
|
|
2134
|
-
}
|
|
2135
2057
|
|
|
2136
2058
|
declare function useAspect(width: number, height: number, factor?: number): [number, number, number];
|
|
2137
2059
|
|
|
@@ -2156,36 +2078,116 @@ type SelectProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
2156
2078
|
declare function Select({ box, multiple, children, onChange, onChangePointerUp, border, backgroundColor, filter: customFilter, ...props }: SelectProps): React.JSX.Element;
|
|
2157
2079
|
declare function useSelect(): THREE.Object3D[];
|
|
2158
2080
|
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2081
|
+
interface WireframeMaterialProps {
|
|
2082
|
+
fillOpacity?: number;
|
|
2083
|
+
fillMix?: number;
|
|
2084
|
+
strokeOpacity?: number;
|
|
2085
|
+
thickness?: number;
|
|
2086
|
+
colorBackfaces?: boolean;
|
|
2087
|
+
dashInvert?: boolean;
|
|
2088
|
+
dash?: boolean;
|
|
2089
|
+
dashRepeats?: number;
|
|
2090
|
+
dashLength?: number;
|
|
2091
|
+
squeeze?: boolean;
|
|
2092
|
+
squeezeMin?: number;
|
|
2093
|
+
squeezeMax?: number;
|
|
2094
|
+
stroke?: THREE.ColorRepresentation;
|
|
2095
|
+
backfaceStroke?: THREE.ColorRepresentation;
|
|
2096
|
+
fill?: THREE.ColorRepresentation;
|
|
2166
2097
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
height?: number;
|
|
2173
|
-
minDepthThreshold?: number;
|
|
2174
|
-
maxDepthThreshold?: number;
|
|
2175
|
-
depthScale?: number;
|
|
2176
|
-
depthToBlurRatioBias?: number;
|
|
2098
|
+
type WireframeMaterialType = Omit<ThreeElements['meshBasicMaterial'], 'args'> & WireframeMaterialProps;
|
|
2099
|
+
declare module '@react-three/fiber' {
|
|
2100
|
+
interface ThreeElements {
|
|
2101
|
+
wireframeMaterial: WireframeMaterialType;
|
|
2102
|
+
}
|
|
2177
2103
|
}
|
|
2178
|
-
declare class
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2104
|
+
declare class WireframeMaterialImpl extends MeshBasicNodeMaterial {
|
|
2105
|
+
private _strokeOpacity;
|
|
2106
|
+
private _fillOpacity;
|
|
2107
|
+
private _fillMix;
|
|
2108
|
+
private _thickness;
|
|
2109
|
+
private _colorBackfaces;
|
|
2110
|
+
private _dashInvert;
|
|
2111
|
+
private _dash;
|
|
2112
|
+
private _dashRepeats;
|
|
2113
|
+
private _dashLength;
|
|
2114
|
+
private _squeeze;
|
|
2115
|
+
private _squeezeMin;
|
|
2116
|
+
private _squeezeMax;
|
|
2117
|
+
private _stroke;
|
|
2118
|
+
private _backfaceStroke;
|
|
2119
|
+
private _fill;
|
|
2120
|
+
readonly isWireframeMaterial = true;
|
|
2121
|
+
constructor();
|
|
2122
|
+
private _buildWireframeShader;
|
|
2123
|
+
get strokeOpacity(): number;
|
|
2124
|
+
set strokeOpacity(v: number);
|
|
2125
|
+
get fillOpacity(): number;
|
|
2126
|
+
set fillOpacity(v: number);
|
|
2127
|
+
get fillMix(): number;
|
|
2128
|
+
set fillMix(v: number);
|
|
2129
|
+
get thickness(): number;
|
|
2130
|
+
set thickness(v: number);
|
|
2131
|
+
get colorBackfaces(): boolean;
|
|
2132
|
+
set colorBackfaces(v: boolean);
|
|
2133
|
+
get dashInvert(): boolean;
|
|
2134
|
+
set dashInvert(v: boolean);
|
|
2135
|
+
get dash(): boolean;
|
|
2136
|
+
set dash(v: boolean);
|
|
2137
|
+
get dashRepeats(): number;
|
|
2138
|
+
set dashRepeats(v: number);
|
|
2139
|
+
get dashLength(): number;
|
|
2140
|
+
set dashLength(v: number);
|
|
2141
|
+
get squeeze(): boolean;
|
|
2142
|
+
set squeeze(v: boolean);
|
|
2143
|
+
get squeezeMin(): number;
|
|
2144
|
+
set squeezeMin(v: number);
|
|
2145
|
+
get squeezeMax(): number;
|
|
2146
|
+
set squeezeMax(v: number);
|
|
2147
|
+
get stroke(): THREE.Color;
|
|
2148
|
+
set stroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2149
|
+
get backfaceStroke(): THREE.Color;
|
|
2150
|
+
set backfaceStroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2151
|
+
get fill(): THREE.Color;
|
|
2152
|
+
set fill(v: THREE.Color | THREE.ColorRepresentation);
|
|
2188
2153
|
}
|
|
2154
|
+
declare function setBarycentricCoordinates(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
|
|
2155
|
+
declare const WireframeMaterial: ForwardRefComponent<WireframeMaterialProps, WireframeMaterialImpl>;
|
|
2156
|
+
declare const WireframeMaterialShaders: {
|
|
2157
|
+
uniforms: {
|
|
2158
|
+
strokeOpacity: number;
|
|
2159
|
+
fillOpacity: number;
|
|
2160
|
+
fillMix: number;
|
|
2161
|
+
thickness: number;
|
|
2162
|
+
colorBackfaces: boolean;
|
|
2163
|
+
dashInvert: boolean;
|
|
2164
|
+
dash: boolean;
|
|
2165
|
+
dashRepeats: number;
|
|
2166
|
+
dashLength: number;
|
|
2167
|
+
squeeze: boolean;
|
|
2168
|
+
squeezeMin: number;
|
|
2169
|
+
squeezeMax: number;
|
|
2170
|
+
stroke: THREE.Color;
|
|
2171
|
+
backfaceStroke: THREE.Color;
|
|
2172
|
+
fill: THREE.Color;
|
|
2173
|
+
};
|
|
2174
|
+
vertex: string;
|
|
2175
|
+
fragment: string;
|
|
2176
|
+
};
|
|
2177
|
+
declare function setWireframeOverride(_material: THREE.Material, _uniforms: {
|
|
2178
|
+
[key: string]: THREE.Uniform<any>;
|
|
2179
|
+
}): void;
|
|
2180
|
+
declare function useWireframeUniforms(_uniforms: {
|
|
2181
|
+
[key: string]: THREE.Uniform<any>;
|
|
2182
|
+
}, _props: WireframeMaterialProps): void;
|
|
2183
|
+
|
|
2184
|
+
interface WireframeProps {
|
|
2185
|
+
geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
|
|
2186
|
+
simplify?: boolean;
|
|
2187
|
+
}
|
|
2188
|
+
declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps): React.JSX.Element;
|
|
2189
|
+
|
|
2190
|
+
declare function BakeShadows(): null;
|
|
2189
2191
|
|
|
2190
2192
|
declare class ConvolutionMaterial extends MeshBasicNodeMaterial {
|
|
2191
2193
|
private _inputBuffer;
|
|
@@ -2251,7 +2253,7 @@ type GradientTextureProps = {
|
|
|
2251
2253
|
type?: GradientType;
|
|
2252
2254
|
innerCircleRadius?: number;
|
|
2253
2255
|
outerCircleRadius?: number | 'auto';
|
|
2254
|
-
} & Omit<ThreeElements['canvasTexture'], 'args'>;
|
|
2256
|
+
} & Omit<ThreeElements['canvasTexture'], 'args' | 'type'>;
|
|
2255
2257
|
declare function GradientTexture({ stops, colors, size, width, type, innerCircleRadius, outerCircleRadius, ...props }: GradientTextureProps): React.JSX.Element;
|
|
2256
2258
|
|
|
2257
2259
|
type ImageProps = Omit<ThreeElements['mesh'], 'scale'> & {
|
|
@@ -2274,13 +2276,6 @@ type ImageProps = Omit<ThreeElements['mesh'], 'scale'> & {
|
|
|
2274
2276
|
});
|
|
2275
2277
|
declare const Image: ForwardRefComponent<ImageProps, THREE.Mesh>;
|
|
2276
2278
|
|
|
2277
|
-
type SoftShadowsProps = {
|
|
2278
|
-
size?: number;
|
|
2279
|
-
samples?: number;
|
|
2280
|
-
focus?: number;
|
|
2281
|
-
};
|
|
2282
|
-
declare function SoftShadows({ focus, samples, size }: SoftShadowsProps): null;
|
|
2283
|
-
|
|
2284
2279
|
declare class SpotLightMaterial extends MeshBasicNodeMaterial {
|
|
2285
2280
|
private _depth;
|
|
2286
2281
|
private _opacity;
|
|
@@ -2313,109 +2308,6 @@ declare class SpotLightMaterial extends MeshBasicNodeMaterial {
|
|
|
2313
2308
|
set resolution(v: THREE.Vector2);
|
|
2314
2309
|
}
|
|
2315
2310
|
|
|
2316
|
-
interface WireframeMaterialProps {
|
|
2317
|
-
fillOpacity?: number;
|
|
2318
|
-
fillMix?: number;
|
|
2319
|
-
strokeOpacity?: number;
|
|
2320
|
-
thickness?: number;
|
|
2321
|
-
colorBackfaces?: boolean;
|
|
2322
|
-
dashInvert?: boolean;
|
|
2323
|
-
dash?: boolean;
|
|
2324
|
-
dashRepeats?: number;
|
|
2325
|
-
dashLength?: number;
|
|
2326
|
-
squeeze?: boolean;
|
|
2327
|
-
squeezeMin?: number;
|
|
2328
|
-
squeezeMax?: number;
|
|
2329
|
-
stroke?: THREE.ColorRepresentation;
|
|
2330
|
-
backfaceStroke?: THREE.ColorRepresentation;
|
|
2331
|
-
fill?: THREE.ColorRepresentation;
|
|
2332
|
-
}
|
|
2333
|
-
type WireframeMaterialType = Omit<ThreeElements['meshBasicMaterial'], 'args'> & WireframeMaterialProps;
|
|
2334
|
-
declare module '@react-three/fiber' {
|
|
2335
|
-
interface ThreeElements {
|
|
2336
|
-
wireframeMaterial: WireframeMaterialType;
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
declare class WireframeMaterialImpl extends MeshBasicNodeMaterial {
|
|
2340
|
-
private _strokeOpacity;
|
|
2341
|
-
private _fillOpacity;
|
|
2342
|
-
private _fillMix;
|
|
2343
|
-
private _thickness;
|
|
2344
|
-
private _colorBackfaces;
|
|
2345
|
-
private _dashInvert;
|
|
2346
|
-
private _dash;
|
|
2347
|
-
private _dashRepeats;
|
|
2348
|
-
private _dashLength;
|
|
2349
|
-
private _squeeze;
|
|
2350
|
-
private _squeezeMin;
|
|
2351
|
-
private _squeezeMax;
|
|
2352
|
-
private _stroke;
|
|
2353
|
-
private _backfaceStroke;
|
|
2354
|
-
private _fill;
|
|
2355
|
-
readonly isWireframeMaterial = true;
|
|
2356
|
-
constructor();
|
|
2357
|
-
private _buildWireframeShader;
|
|
2358
|
-
get strokeOpacity(): number;
|
|
2359
|
-
set strokeOpacity(v: number);
|
|
2360
|
-
get fillOpacity(): number;
|
|
2361
|
-
set fillOpacity(v: number);
|
|
2362
|
-
get fillMix(): number;
|
|
2363
|
-
set fillMix(v: number);
|
|
2364
|
-
get thickness(): number;
|
|
2365
|
-
set thickness(v: number);
|
|
2366
|
-
get colorBackfaces(): boolean;
|
|
2367
|
-
set colorBackfaces(v: boolean);
|
|
2368
|
-
get dashInvert(): boolean;
|
|
2369
|
-
set dashInvert(v: boolean);
|
|
2370
|
-
get dash(): boolean;
|
|
2371
|
-
set dash(v: boolean);
|
|
2372
|
-
get dashRepeats(): number;
|
|
2373
|
-
set dashRepeats(v: number);
|
|
2374
|
-
get dashLength(): number;
|
|
2375
|
-
set dashLength(v: number);
|
|
2376
|
-
get squeeze(): boolean;
|
|
2377
|
-
set squeeze(v: boolean);
|
|
2378
|
-
get squeezeMin(): number;
|
|
2379
|
-
set squeezeMin(v: number);
|
|
2380
|
-
get squeezeMax(): number;
|
|
2381
|
-
set squeezeMax(v: number);
|
|
2382
|
-
get stroke(): THREE.Color;
|
|
2383
|
-
set stroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2384
|
-
get backfaceStroke(): THREE.Color;
|
|
2385
|
-
set backfaceStroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2386
|
-
get fill(): THREE.Color;
|
|
2387
|
-
set fill(v: THREE.Color | THREE.ColorRepresentation);
|
|
2388
|
-
}
|
|
2389
|
-
declare function setBarycentricCoordinates(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
|
|
2390
|
-
declare const WireframeMaterial: ForwardRefComponent<WireframeMaterialProps, WireframeMaterialImpl>;
|
|
2391
|
-
declare const WireframeMaterialShaders: {
|
|
2392
|
-
uniforms: {
|
|
2393
|
-
strokeOpacity: number;
|
|
2394
|
-
fillOpacity: number;
|
|
2395
|
-
fillMix: number;
|
|
2396
|
-
thickness: number;
|
|
2397
|
-
colorBackfaces: boolean;
|
|
2398
|
-
dashInvert: boolean;
|
|
2399
|
-
dash: boolean;
|
|
2400
|
-
dashRepeats: number;
|
|
2401
|
-
dashLength: number;
|
|
2402
|
-
squeeze: boolean;
|
|
2403
|
-
squeezeMin: number;
|
|
2404
|
-
squeezeMax: number;
|
|
2405
|
-
stroke: THREE.Color;
|
|
2406
|
-
backfaceStroke: THREE.Color;
|
|
2407
|
-
fill: THREE.Color;
|
|
2408
|
-
};
|
|
2409
|
-
vertex: string;
|
|
2410
|
-
fragment: string;
|
|
2411
|
-
};
|
|
2412
|
-
declare function setWireframeOverride(_material: THREE.Material, _uniforms: {
|
|
2413
|
-
[key: string]: THREE.Uniform<any>;
|
|
2414
|
-
}): void;
|
|
2415
|
-
declare function useWireframeUniforms(_uniforms: {
|
|
2416
|
-
[key: string]: THREE.Uniform<any>;
|
|
2417
|
-
}, _props: WireframeMaterialProps): void;
|
|
2418
|
-
|
|
2419
2311
|
declare class StarfieldMaterial extends SpriteNodeMaterial {
|
|
2420
2312
|
private _time;
|
|
2421
2313
|
private _fade;
|
|
@@ -2463,6 +2355,13 @@ type GridProps = Omit<ThreeElements['mesh'], 'ref' | 'args'> & GridMaterialType
|
|
|
2463
2355
|
};
|
|
2464
2356
|
declare const Grid: ForwardRefComponent<GridProps, THREE.Mesh>;
|
|
2465
2357
|
|
|
2358
|
+
type SoftShadowsProps = {
|
|
2359
|
+
size?: number;
|
|
2360
|
+
samples?: number;
|
|
2361
|
+
focus?: number;
|
|
2362
|
+
};
|
|
2363
|
+
declare function SoftShadows({ size, samples, focus }: SoftShadowsProps): null;
|
|
2364
|
+
|
|
2466
2365
|
type SpotLightProps = Omit<ThreeElements['spotLight'], 'ref'> & {
|
|
2467
2366
|
depthBuffer?: Texture$1;
|
|
2468
2367
|
attenuation?: number;
|
|
@@ -2508,8 +2407,5 @@ type SparklesProps = Omit<ThreeElements['mesh'], 'ref'> & {
|
|
|
2508
2407
|
};
|
|
2509
2408
|
declare const Sparkles: ForwardRefComponent<SparklesProps, THREE.InstancedMesh>;
|
|
2510
2409
|
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
export { AccumulativeShadows, AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, BakeShadows, Billboard, BlurPass, Bounds, Box, CameraShake, Capsule, CatmullRomLine, Caustics, CausticsMaterial, CausticsNormalMaterial, CausticsProjectionMaterial, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, ContactShadows, ConvolutionMaterial, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, DiscardMaterial, Dodecahedron, DragControls, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, FakeCloudMaterial, Fbo, Fbx, FirstPersonControls, Fisheye, Float, FlyControls, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, GradientTexture, GradientType, Grid, Helper, Html, Hud, Icosahedron, Image, Instance, InstancedAttribute, Instances, IsObject, KeyboardControls, Ktx2, Lathe, Lightformer, Line, Loader, MapControls, Mask, MatcapTexture, Merged, MeshDistortMaterial, MeshPortalMaterial, MeshReflectorMaterial, MeshReflectorMaterial$1 as MeshReflectorMaterialImpl, MeshRefractionMaterial, MeshTransmissionMaterial, MeshWobbleMaterial, MotionPathControls, NormalTexture, Octahedron, OrbitControls, OrthographicCamera, Outlines, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, PointerLockControls, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RandomizedLight, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, ScrollControls, Segment, SegmentObject, Segments, Select, Shadow, Shape, Sky, SoftShadows, Sparkles, SparklesMaterial, Sphere, SpotLight, SpotLightMaterial, SpriteAnimator, Stage, StarfieldMaterial, Stars, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, TrackballControls, Trail, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, Wireframe, WireframeMaterial, WireframeMaterialShaders, accumulativeContext, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, setBarycentricCoordinates, setWireframeOverride, useAnimations, useAspect, useBounds, useContextBridge, useCubeCamera, useCubeTexture, useCursor, useCustomRaycast, useDepthBuffer, useDetectGPU, useEnvironment, useFBO, useFBX, useFont, useGLTF, useGizmoContext, useHelper, useIntersect, useKTX2, useKeyboardControls, useMask, useMatcapTexture, useMotion, useNormalTexture, usePerformanceMonitor, useProgress, useScroll, useSelect, useSpriteAnimator, useSpriteLoader, useSurfaceSampler, useTexture, useTrail, useTrailTexture, useVideoTexture, useWireframeUniforms };
|
|
2515
|
-
export type { AccumulativeShadowsProps, ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BlurPassProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CausticsProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, ContactShadowsProps, ContainerProps, CubeCameraOptions, CubeCameraProps, CubeTextureProps, CubicBezierLineProps, CurveModifierProps, CurveModifierRef, CycleRaycastProps, DecalProps, DetailedProps, DetectGPUProps, DeviceOrientationControlsProps, DragControlsProps, EdgesProps, EnvironmentLoaderProps, EnvironmentProps, ExampleApi, ExampleProps, FboProps, FirstPersonControlsProps, FisheyeProps, FloatProps, FlyControlsProps, FontData, FrameData, GizmoHelperProps, GltfProps, Glyph, GradientTextureProps, GridMaterialType, GridProps, HelperProps, HtmlProps, HudProps, ImageProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, LightProps, LineProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MeshDistortMaterialProps, MeshReflectorMaterialProps, MeshRefractionMaterialProps, MeshRefractionMaterialType, MeshTransmissionMaterialProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OrbitControlsChangeEvent, OrbitControlsProps, OrthographicCameraProps, OutlinesProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointerLockControlsProps, PointsBuffersProps, PointsInstancesProps, PortalProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RandomizedLightProps, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsProps, ScrollControlsState, ScrollProps, SegmentProps, SegmentsProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SoftShadowsProps, SparklesProps, SpotLightProps, SpriteAnimatorProps, SpriteData, StageProps, StarsProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrackballControlsProps, TrailProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, WireframeMaterialProps, WireframeMaterialType, WobbleMaterialProps, useSurfaceSamplerProps };
|
|
2410
|
+
export { AccumulativeShadows, AdaptiveDpr, AdaptiveEvents, BBAnchor, Backdrop, BakeShadows, Billboard, Bounds, Box, CameraShake, Capsule, CatmullRomLine, CausticsMaterial, CausticsNormalMaterial, CausticsProjectionMaterial, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, ContactShadows, ConvolutionMaterial, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, DiscardMaterial, Dodecahedron, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, FakeCloudMaterial, Fbo, Fbx, Fisheye, Float, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, GradientTexture, GradientType, Grid, Helper, Hud, Icosahedron, Image, Instance, InstancedAttribute, Instances, IsObject, Ktx2, Lathe, Lightformer, Line, Loader, Mask, MatcapTexture, Merged, MeshDistortMaterial, MeshPortalMaterial, MeshReflectorMaterial, MeshReflectorMaterial$1 as MeshReflectorMaterialImpl, MeshRefractionMaterial, MeshTransmissionMaterial, MeshWobbleMaterial, MotionPathControls, NormalTexture, Octahedron, OrthographicCamera, Outlines, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RandomizedLight, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, Segment, SegmentObject, Segments, Select, Shadow, Shape, Sky, SoftShadows, Sparkles, SparklesMaterial, Sphere, SpotLight, SpotLightMaterial, SpriteAnimator, Stage, StarfieldMaterial, Stars, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, Trail, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, Wireframe, WireframeMaterial, WireframeMaterialShaders, accumulativeContext, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, setBarycentricCoordinates, setWireframeOverride, useAnimations, useAspect, useBounds, useContextBridge, useCubeCamera, useCubeTexture, useCursor, useCustomRaycast, useDepthBuffer, useDetectGPU, useEnvironment, useFBO, useFBX, useFont, useGLTF, useGizmoContext, useHelper, useIntersect, useKTX2, useKeyboardControls, useMask, useMatcapTexture, useMotion, useNormalTexture, usePerformanceMonitor, useProgress, useScroll, useSelect, useSpriteAnimator, useSpriteLoader, useSurfaceSampler, useTexture, useTrail, useTrailTexture, useVideoTexture, useWireframeUniforms };
|
|
2411
|
+
export type { AccumulativeShadowsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, ContactShadowsProps, ContainerProps, CubeCameraOptions, CubeCameraProps, CubeTextureProps, CubicBezierLineProps, CurveModifierProps, CurveModifierRef, CycleRaycastProps, DecalProps, DetailedProps, DetectGPUProps, DeviceOrientationControlsProps, EdgesProps, EdgesRef, EnvironmentLoaderProps, EnvironmentProps, ExampleApi, ExampleProps, FboProps, FisheyeProps, FloatProps, FontData, FrameData, GizmoHelperProps, GltfProps, Glyph, GradientTextureProps, GridMaterialType, GridProps, HelperProps, HudProps, ImageProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, LightProps, LineProps, LoaderOptions, MaskProps, MergedProps, MeshDistortMaterialProps, MeshReflectorMaterialProps, MeshRefractionMaterialProps, MeshRefractionMaterialType, MeshTransmissionMaterialProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OnDragStartProps, OnHoverProps, OrbitControlsChangeEvent, OrthographicCameraProps, OutlinesProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointsBuffersProps, PointsInstancesProps, PortalProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RandomizedLightProps, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsState, ScrollProps, SegmentProps, SegmentsProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SoftShadowsProps, SparklesProps, SpotLightProps, SpriteAnimatorProps, SpriteData, StageProps, StarsProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrailProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, WireframeMaterialProps, WireframeMaterialType, WobbleMaterialProps, useSurfaceSamplerProps };
|