@react-three/drei 11.0.0-alpha.4 → 11.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/webgpu/index.d.ts CHANGED
@@ -3,11 +3,10 @@ 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, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Event, Camera, Matrix4, Vector3 as Vector3$1, Group, 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, WebGLRenderer, WebGLRenderTarget, SpriteNodeMaterial, SpotLight as SpotLight$1 } from 'three/webgpu';
6
+ import { MeshBasicNodeMaterial, MeshNormalNodeMaterial, MeshPhysicalNodeMaterial, Material, Color, ColorRepresentation, Object3D, Texture as Texture$1, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Event, EventDispatcher, Camera, Matrix4, Vector3 as Vector3$1, Group, 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
7
  import { reflector, uniform, Fn } from 'three/tsl';
8
8
  import { LineSegments2 } from 'three/examples/jsm/lines/webgpu/LineSegments2.js';
9
9
  import { ArcballControls as ArcballControls$1 } from 'three/examples/jsm/controls/ArcballControls.js';
10
- import { DeviceOrientationControls as DeviceOrientationControls$1 } from 'three-stdlib';
11
10
  import { DragConfig } from '@use-gesture/react';
12
11
  import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls.js';
13
12
  import { FlyControls as FlyControls$1 } from 'three/examples/jsm/controls/FlyControls.js';
@@ -28,6 +27,7 @@ import { Falsey, Assign } from 'utility-types';
28
27
  import * as hls_js from 'hls.js';
29
28
  import hls_js__default from 'hls.js';
30
29
  import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
30
+ import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
31
31
  import * as detect_gpu from 'detect-gpu';
32
32
  import { GetGPUTier } from 'detect-gpu';
33
33
  import Stats$1 from 'stats-gl';
@@ -76,24 +76,13 @@ interface AccumulativeContext {
76
76
  frames: number;
77
77
  blend: number;
78
78
  count: number;
79
- getMesh: () => THREE.Mesh<THREE.PlaneGeometry, SoftShadowMaterialProps & THREE.ShaderMaterial>;
79
+ getMesh: () => THREE.Mesh<THREE.PlaneGeometry, THREE.ShaderMaterial>;
80
80
  reset: () => void;
81
81
  update: (frames?: number) => void;
82
82
  }
83
83
  interface AccumulativeLightContext {
84
84
  update: () => void;
85
85
  }
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
86
  declare const accumulativeContext: React.Context<AccumulativeContext>;
98
87
  declare const AccumulativeShadows: ForwardRefComponent<AccumulativeShadowsProps, AccumulativeContext>;
99
88
  type RandomizedLightProps = Omit<ThreeElements['group'], 'ref'> & {
@@ -566,8 +555,8 @@ type SegmentsProps = {
566
555
  children: React.ReactNode;
567
556
  };
568
557
  type SegmentProps = Omit<ThreeElements['segmentObject'], 'ref' | 'start' | 'end' | 'color'> & {
569
- start: ReactThreeFiber.Vector3;
570
- end: ReactThreeFiber.Vector3;
558
+ start?: ReactThreeFiber.Vector3;
559
+ end?: ReactThreeFiber.Vector3;
571
560
  color?: ReactThreeFiber.Color;
572
561
  };
573
562
  declare const Segments: ForwardRefComponent<SegmentsProps, LineSegments2>;
@@ -578,8 +567,8 @@ declare module '@react-three/fiber' {
578
567
  }
579
568
  declare class SegmentObject {
580
569
  color: THREE.Color;
581
- start: THREE.Vector3;
582
- end: THREE.Vector3;
570
+ start?: THREE.Vector3;
571
+ end?: THREE.Vector3;
583
572
  constructor();
584
573
  }
585
574
  declare const Segment: ForwardRefComponent<SegmentProps, SegmentObject>;
@@ -650,6 +639,34 @@ type ArcballControlsProps = Omit<Overwrite<ThreeElement<typeof ArcballControls$1
650
639
  }>, 'ref' | 'args'>;
651
640
  declare const ArcballControls: ForwardRefComponent<ArcballControlsProps, ArcballControls$1>;
652
641
 
642
+ interface StandardControlsEventMap {
643
+ change: {};
644
+ start: {};
645
+ end: {};
646
+ }
647
+ declare class DeviceOrientationControls$1 extends EventDispatcher<StandardControlsEventMap> {
648
+ object: Camera;
649
+ private changeEvent;
650
+ private EPS;
651
+ enabled: boolean;
652
+ deviceOrientation: Partial<DeviceOrientationEvent>;
653
+ screenOrientation: string | number;
654
+ alphaOffset: number;
655
+ constructor(object: Camera);
656
+ private onDeviceOrientationChangeEvent;
657
+ private onScreenOrientationChangeEvent;
658
+ private zee;
659
+ private euler;
660
+ private q0;
661
+ private q1;
662
+ private setObjectQuaternion;
663
+ connect: () => void;
664
+ disconnect: () => void;
665
+ private lastQuaternion;
666
+ update: () => void;
667
+ dispose: () => void;
668
+ }
669
+
653
670
  type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientationControls$1>, 'ref' | 'args'> & {
654
671
  camera?: THREE.Camera;
655
672
  onChange?: (e?: THREE.Event) => void;
@@ -657,6 +674,9 @@ type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientation
657
674
  };
658
675
  declare const DeviceOrientationControls: ForwardRefComponent<DeviceOrientationControlsProps, DeviceOrientationControls$1>;
659
676
 
677
+ type ExpandedDragConfig = DragConfig & {
678
+ preventOverlap?: boolean;
679
+ };
660
680
  type DragControlsProps = {
661
681
  autoTransform?: boolean;
662
682
  matrix?: THREE.Matrix4;
@@ -667,7 +687,7 @@ type DragControlsProps = {
667
687
  onDrag?: (localMatrix: THREE.Matrix4, deltaLocalMatrix: THREE.Matrix4, worldMatrix: THREE.Matrix4, deltaWorldMatrix: THREE.Matrix4) => void;
668
688
  onDragEnd?: () => void;
669
689
  children: React.ReactNode;
670
- dragConfig?: DragConfig;
690
+ dragConfig?: ExpandedDragConfig;
671
691
  };
672
692
  declare const DragControls: ForwardRefComponent<DragControlsProps, THREE.Group>;
673
693
 
@@ -816,6 +836,7 @@ type ScrollControlsProps = {
816
836
  maxSpeed?: number;
817
837
  prepend?: boolean;
818
838
  enabled?: boolean;
839
+ pixelPerfect?: boolean;
819
840
  style?: React.CSSProperties;
820
841
  children: React.ReactNode;
821
842
  };
@@ -832,9 +853,10 @@ type ScrollControlsState = {
832
853
  range(from: number, distance: number, margin?: number): number;
833
854
  curve(from: number, distance: number, margin?: number): number;
834
855
  visible(from: number, distance: number, margin?: number): boolean;
856
+ pixelPerfect: boolean;
835
857
  };
836
858
  declare function useScroll(): ScrollControlsState;
837
- declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, style, children, }: ScrollControlsProps): React.JSX.Element;
859
+ declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, pixelPerfect, style, children, }: ScrollControlsProps): React.JSX.Element;
838
860
  interface ScrollPropsWithFalseHtml {
839
861
  children?: React.ReactNode;
840
862
  html?: false;
@@ -1108,54 +1130,6 @@ declare const Text3D: ForwardRefComponent<React.PropsWithChildren<Text3DProps &
1108
1130
  lineHeight?: number;
1109
1131
  }>, THREE.Mesh>;
1110
1132
 
1111
- interface WireframeMaterialProps$1 extends THREE.ShaderMaterialParameters {
1112
- fillOpacity?: number;
1113
- fillMix?: number;
1114
- strokeOpacity?: number;
1115
- thickness?: number;
1116
- colorBackfaces?: boolean;
1117
- dashInvert?: boolean;
1118
- dash?: boolean;
1119
- dashRepeats?: number;
1120
- dashLength?: number;
1121
- squeeze?: boolean;
1122
- squeezeMin?: number;
1123
- squeezeMax?: number;
1124
- stroke?: THREE.ColorRepresentation;
1125
- backfaceStroke?: THREE.ColorRepresentation;
1126
- fill?: THREE.ColorRepresentation;
1127
- }
1128
- declare const WireframeMaterial$1: _react_three_fiber.ConstructorRepresentation<THREE.ShaderMaterial & {
1129
- strokeOpacity: number;
1130
- fillOpacity: number;
1131
- fillMix: number;
1132
- thickness: number;
1133
- colorBackfaces: boolean;
1134
- dashInvert: boolean;
1135
- dash: boolean;
1136
- dashRepeats: number;
1137
- dashLength: number;
1138
- squeeze: boolean;
1139
- squeezeMin: number;
1140
- squeezeMax: number;
1141
- stroke: THREE.Color;
1142
- backfaceStroke: THREE.Color;
1143
- fill: THREE.Color;
1144
- }> & {
1145
- key: string;
1146
- };
1147
-
1148
- declare module '@react-three/fiber' {
1149
- interface ThreeElements {
1150
- meshWireframeMaterial: ThreeElement<typeof WireframeMaterial$1>;
1151
- }
1152
- }
1153
- interface WireframeProps {
1154
- geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
1155
- simplify?: boolean;
1156
- }
1157
- declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps$1): React.JSX.Element;
1158
-
1159
1133
  type GizmoHelperContext = {
1160
1134
  tweenCamera: (direction: Vector3$1) => void;
1161
1135
  };
@@ -1202,6 +1176,11 @@ type OnDragStartProps = {
1202
1176
  origin: THREE.Vector3;
1203
1177
  directions: THREE.Vector3[];
1204
1178
  };
1179
+ type OnHoverProps = {
1180
+ component: 'Arrow' | 'Slider' | 'Rotator' | 'Sphere';
1181
+ axis: 0 | 1 | 2;
1182
+ hovering: boolean;
1183
+ };
1205
1184
 
1206
1185
  type PivotControlsProps = {
1207
1186
  enabled?: boolean;
@@ -1211,6 +1190,7 @@ type PivotControlsProps = {
1211
1190
  offset?: [number, number, number];
1212
1191
  rotation?: [number, number, number];
1213
1192
  matrix?: THREE.Matrix4;
1193
+ object?: THREE.Object3D | React.MutableRefObject<THREE.Object3D>;
1214
1194
  anchor?: [number, number, number];
1215
1195
  autoTransform?: boolean;
1216
1196
  activeAxes?: [boolean, boolean, boolean];
@@ -1228,6 +1208,7 @@ type PivotControlsProps = {
1228
1208
  onDragStart?: (props: OnDragStartProps) => void;
1229
1209
  onDrag?: (l: THREE.Matrix4, deltaL: THREE.Matrix4, w: THREE.Matrix4, deltaW: THREE.Matrix4) => void;
1230
1210
  onDragEnd?: () => void;
1211
+ onHover?: (props: OnHoverProps) => void;
1231
1212
  depthTest?: boolean;
1232
1213
  renderOrder?: number;
1233
1214
  opacity?: number;
@@ -1313,6 +1294,7 @@ type InstancedAttributeProps = Omit<ThreeElements['instancedBufferAttribute'], '
1313
1294
  defaultValue: any;
1314
1295
  normalized?: boolean;
1315
1296
  usage?: number;
1297
+ type?: 'float' | 'int' | 'uint' | 'short' | 'ushort' | 'byte';
1316
1298
  };
1317
1299
  type InstancedMesh = Omit<THREE.InstancedMesh, 'instanceMatrix' | 'instanceColor'> & {
1318
1300
  instanceMatrix: THREE.InstancedBufferAttribute;
@@ -1627,10 +1609,10 @@ declare function Fbx({ path, ...props }: {
1627
1609
  type Path = string | string[];
1628
1610
  type UseDraco = boolean | string;
1629
1611
  type UseMeshopt = boolean;
1630
- type ExtendLoader = (loader: GLTFLoader) => void;
1612
+ type ExtendLoader$1 = (loader: GLTFLoader) => void;
1631
1613
  declare const useGLTF: {
1632
- <T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
1633
- preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): void;
1614
+ <T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
1615
+ preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): void;
1634
1616
  clear(path: Path): void;
1635
1617
  setDecoderPath(path: string): void;
1636
1618
  };
@@ -1638,22 +1620,26 @@ type GltfProps = Omit<CloneProps, 'object'> & {
1638
1620
  src: string;
1639
1621
  useDraco?: UseDraco;
1640
1622
  useMeshOpt?: UseMeshopt;
1641
- extendLoader?: ExtendLoader;
1623
+ extendLoader?: ExtendLoader$1;
1642
1624
  };
1643
1625
  declare const Gltf: React.ForwardRefExoticComponent<Omit<GltfProps, "ref"> & React.RefAttributes<three.Group<three.Object3DEventMap>>>;
1644
1626
 
1645
- declare function useKTX2<Url extends string[] | string | Record<string, string>>(input: Url, basisPath?: string): Url extends any[] ? Texture$1[] : Url extends object ? {
1627
+ type ExtendLoader = (loader: KTX2Loader) => void;
1628
+ 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 ? {
1646
1629
  [key in keyof Url]: Texture$1;
1647
1630
  } : Texture$1;
1648
1631
  declare namespace useKTX2 {
1649
- var preload: (url: string extends any[] ? string[] : string, basisPath?: string) => void;
1632
+ var preload: (url: string extends any[] ? string[] : string, basisPath?: boolean | string, extendLoader?: ExtendLoader) => void;
1650
1633
  var clear: (input: string | string[]) => void;
1634
+ var setTranscoderPath: (path: string) => void;
1651
1635
  }
1652
- declare const Ktx2: ({ children, input, basisPath, }: {
1636
+ type Ktx2Props = {
1653
1637
  children?: (texture: ReturnType<typeof useKTX2>) => React.ReactNode;
1654
1638
  input: Parameters<typeof useKTX2>[0];
1655
1639
  basisPath?: Parameters<typeof useKTX2>[1];
1656
- }) => React.JSX.Element;
1640
+ extendLoader?: ExtendLoader;
1641
+ };
1642
+ declare const Ktx2: ({ children, input, basisPath, extendLoader }: Ktx2Props) => React.JSX.Element;
1657
1643
 
1658
1644
  type Data = {
1659
1645
  errors: string[];
@@ -1803,7 +1789,7 @@ declare const Mask: ForwardRefComponent<MaskProps, THREE.Mesh>;
1803
1789
  declare function useMask(id: number, inverse?: boolean): {
1804
1790
  stencilWrite: boolean;
1805
1791
  stencilRef: number;
1806
- stencilFunc: 517 | 514;
1792
+ stencilFunc: 514 | 517;
1807
1793
  stencilFail: 7680;
1808
1794
  stencilZFail: 7680;
1809
1795
  stencilZPass: 7680;
@@ -2132,6 +2118,7 @@ interface HtmlProps extends Omit<Assign<React.HTMLAttributes<HTMLDivElement>, Th
2132
2118
  geometry?: React.ReactNode;
2133
2119
  castShadow?: boolean;
2134
2120
  receiveShadow?: boolean;
2121
+ pixelPerfect?: boolean;
2135
2122
  }
2136
2123
  declare const Html: ForwardRefComponent<HtmlProps, HTMLDivElement>;
2137
2124
 
@@ -2158,36 +2145,116 @@ type SelectProps = Omit<ThreeElements['group'], 'ref'> & {
2158
2145
  declare function Select({ box, multiple, children, onChange, onChangePointerUp, border, backgroundColor, filter: customFilter, ...props }: SelectProps): React.JSX.Element;
2159
2146
  declare function useSelect(): THREE.Object3D[];
2160
2147
 
2161
- declare function BakeShadows(): null;
2162
-
2163
- declare class ConvolutionMaterial$1 extends THREE.ShaderMaterial {
2164
- readonly kernel: Float32Array;
2165
- constructor(texelSize?: THREE.Vector2);
2166
- setTexelSize(x: number, y: number): void;
2167
- setResolution(resolution: THREE.Vector2): void;
2148
+ interface WireframeMaterialProps {
2149
+ fillOpacity?: number;
2150
+ fillMix?: number;
2151
+ strokeOpacity?: number;
2152
+ thickness?: number;
2153
+ colorBackfaces?: boolean;
2154
+ dashInvert?: boolean;
2155
+ dash?: boolean;
2156
+ dashRepeats?: number;
2157
+ dashLength?: number;
2158
+ squeeze?: boolean;
2159
+ squeezeMin?: number;
2160
+ squeezeMax?: number;
2161
+ stroke?: THREE.ColorRepresentation;
2162
+ backfaceStroke?: THREE.ColorRepresentation;
2163
+ fill?: THREE.ColorRepresentation;
2168
2164
  }
2169
-
2170
- interface BlurPassProps {
2171
- gl: WebGLRenderer;
2172
- resolution: number;
2173
- width?: number;
2174
- height?: number;
2175
- minDepthThreshold?: number;
2176
- maxDepthThreshold?: number;
2177
- depthScale?: number;
2178
- depthToBlurRatioBias?: number;
2165
+ type WireframeMaterialType = Omit<ThreeElements['meshBasicMaterial'], 'args'> & WireframeMaterialProps;
2166
+ declare module '@react-three/fiber' {
2167
+ interface ThreeElements {
2168
+ wireframeMaterial: WireframeMaterialType;
2169
+ }
2170
+ }
2171
+ declare class WireframeMaterialImpl extends MeshBasicNodeMaterial {
2172
+ private _strokeOpacity;
2173
+ private _fillOpacity;
2174
+ private _fillMix;
2175
+ private _thickness;
2176
+ private _colorBackfaces;
2177
+ private _dashInvert;
2178
+ private _dash;
2179
+ private _dashRepeats;
2180
+ private _dashLength;
2181
+ private _squeeze;
2182
+ private _squeezeMin;
2183
+ private _squeezeMax;
2184
+ private _stroke;
2185
+ private _backfaceStroke;
2186
+ private _fill;
2187
+ readonly isWireframeMaterial = true;
2188
+ constructor();
2189
+ private _buildWireframeShader;
2190
+ get strokeOpacity(): number;
2191
+ set strokeOpacity(v: number);
2192
+ get fillOpacity(): number;
2193
+ set fillOpacity(v: number);
2194
+ get fillMix(): number;
2195
+ set fillMix(v: number);
2196
+ get thickness(): number;
2197
+ set thickness(v: number);
2198
+ get colorBackfaces(): boolean;
2199
+ set colorBackfaces(v: boolean);
2200
+ get dashInvert(): boolean;
2201
+ set dashInvert(v: boolean);
2202
+ get dash(): boolean;
2203
+ set dash(v: boolean);
2204
+ get dashRepeats(): number;
2205
+ set dashRepeats(v: number);
2206
+ get dashLength(): number;
2207
+ set dashLength(v: number);
2208
+ get squeeze(): boolean;
2209
+ set squeeze(v: boolean);
2210
+ get squeezeMin(): number;
2211
+ set squeezeMin(v: number);
2212
+ get squeezeMax(): number;
2213
+ set squeezeMax(v: number);
2214
+ get stroke(): THREE.Color;
2215
+ set stroke(v: THREE.Color | THREE.ColorRepresentation);
2216
+ get backfaceStroke(): THREE.Color;
2217
+ set backfaceStroke(v: THREE.Color | THREE.ColorRepresentation);
2218
+ get fill(): THREE.Color;
2219
+ set fill(v: THREE.Color | THREE.ColorRepresentation);
2179
2220
  }
2180
- declare class BlurPass {
2181
- readonly renderTargetA: WebGLRenderTarget;
2182
- readonly renderTargetB: WebGLRenderTarget;
2183
- readonly convolutionMaterial: ConvolutionMaterial$1;
2184
- readonly scene: Scene;
2185
- readonly camera: Camera;
2186
- readonly screen: Mesh;
2187
- renderToScreen: boolean;
2188
- constructor({ gl, resolution, width, height, minDepthThreshold, maxDepthThreshold, depthScale, depthToBlurRatioBias, }: BlurPassProps);
2189
- render(renderer: any, inputBuffer: any, outputBuffer: any): void;
2221
+ declare function setBarycentricCoordinates(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
2222
+ declare const WireframeMaterial: ForwardRefComponent<WireframeMaterialProps, WireframeMaterialImpl>;
2223
+ declare const WireframeMaterialShaders: {
2224
+ uniforms: {
2225
+ strokeOpacity: number;
2226
+ fillOpacity: number;
2227
+ fillMix: number;
2228
+ thickness: number;
2229
+ colorBackfaces: boolean;
2230
+ dashInvert: boolean;
2231
+ dash: boolean;
2232
+ dashRepeats: number;
2233
+ dashLength: number;
2234
+ squeeze: boolean;
2235
+ squeezeMin: number;
2236
+ squeezeMax: number;
2237
+ stroke: THREE.Color;
2238
+ backfaceStroke: THREE.Color;
2239
+ fill: THREE.Color;
2240
+ };
2241
+ vertex: string;
2242
+ fragment: string;
2243
+ };
2244
+ declare function setWireframeOverride(_material: THREE.Material, _uniforms: {
2245
+ [key: string]: THREE.Uniform<any>;
2246
+ }): void;
2247
+ declare function useWireframeUniforms(_uniforms: {
2248
+ [key: string]: THREE.Uniform<any>;
2249
+ }, _props: WireframeMaterialProps): void;
2250
+
2251
+ interface WireframeProps {
2252
+ geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
2253
+ simplify?: boolean;
2190
2254
  }
2255
+ declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps): React.JSX.Element;
2256
+
2257
+ declare function BakeShadows(): null;
2191
2258
 
2192
2259
  declare class ConvolutionMaterial extends MeshBasicNodeMaterial {
2193
2260
  private _inputBuffer;
@@ -2276,13 +2343,6 @@ type ImageProps = Omit<ThreeElements['mesh'], 'scale'> & {
2276
2343
  });
2277
2344
  declare const Image: ForwardRefComponent<ImageProps, THREE.Mesh>;
2278
2345
 
2279
- type SoftShadowsProps = {
2280
- size?: number;
2281
- samples?: number;
2282
- focus?: number;
2283
- };
2284
- declare function SoftShadows({ focus, samples, size }: SoftShadowsProps): null;
2285
-
2286
2346
  declare class SpotLightMaterial extends MeshBasicNodeMaterial {
2287
2347
  private _depth;
2288
2348
  private _opacity;
@@ -2315,109 +2375,6 @@ declare class SpotLightMaterial extends MeshBasicNodeMaterial {
2315
2375
  set resolution(v: THREE.Vector2);
2316
2376
  }
2317
2377
 
2318
- interface WireframeMaterialProps {
2319
- fillOpacity?: number;
2320
- fillMix?: number;
2321
- strokeOpacity?: number;
2322
- thickness?: number;
2323
- colorBackfaces?: boolean;
2324
- dashInvert?: boolean;
2325
- dash?: boolean;
2326
- dashRepeats?: number;
2327
- dashLength?: number;
2328
- squeeze?: boolean;
2329
- squeezeMin?: number;
2330
- squeezeMax?: number;
2331
- stroke?: THREE.ColorRepresentation;
2332
- backfaceStroke?: THREE.ColorRepresentation;
2333
- fill?: THREE.ColorRepresentation;
2334
- }
2335
- type WireframeMaterialType = Omit<ThreeElements['meshBasicMaterial'], 'args'> & WireframeMaterialProps;
2336
- declare module '@react-three/fiber' {
2337
- interface ThreeElements {
2338
- wireframeMaterial: WireframeMaterialType;
2339
- }
2340
- }
2341
- declare class WireframeMaterialImpl extends MeshBasicNodeMaterial {
2342
- private _strokeOpacity;
2343
- private _fillOpacity;
2344
- private _fillMix;
2345
- private _thickness;
2346
- private _colorBackfaces;
2347
- private _dashInvert;
2348
- private _dash;
2349
- private _dashRepeats;
2350
- private _dashLength;
2351
- private _squeeze;
2352
- private _squeezeMin;
2353
- private _squeezeMax;
2354
- private _stroke;
2355
- private _backfaceStroke;
2356
- private _fill;
2357
- readonly isWireframeMaterial = true;
2358
- constructor();
2359
- private _buildWireframeShader;
2360
- get strokeOpacity(): number;
2361
- set strokeOpacity(v: number);
2362
- get fillOpacity(): number;
2363
- set fillOpacity(v: number);
2364
- get fillMix(): number;
2365
- set fillMix(v: number);
2366
- get thickness(): number;
2367
- set thickness(v: number);
2368
- get colorBackfaces(): boolean;
2369
- set colorBackfaces(v: boolean);
2370
- get dashInvert(): boolean;
2371
- set dashInvert(v: boolean);
2372
- get dash(): boolean;
2373
- set dash(v: boolean);
2374
- get dashRepeats(): number;
2375
- set dashRepeats(v: number);
2376
- get dashLength(): number;
2377
- set dashLength(v: number);
2378
- get squeeze(): boolean;
2379
- set squeeze(v: boolean);
2380
- get squeezeMin(): number;
2381
- set squeezeMin(v: number);
2382
- get squeezeMax(): number;
2383
- set squeezeMax(v: number);
2384
- get stroke(): THREE.Color;
2385
- set stroke(v: THREE.Color | THREE.ColorRepresentation);
2386
- get backfaceStroke(): THREE.Color;
2387
- set backfaceStroke(v: THREE.Color | THREE.ColorRepresentation);
2388
- get fill(): THREE.Color;
2389
- set fill(v: THREE.Color | THREE.ColorRepresentation);
2390
- }
2391
- declare function setBarycentricCoordinates(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
2392
- declare const WireframeMaterial: ForwardRefComponent<WireframeMaterialProps, WireframeMaterialImpl>;
2393
- declare const WireframeMaterialShaders: {
2394
- uniforms: {
2395
- strokeOpacity: number;
2396
- fillOpacity: number;
2397
- fillMix: number;
2398
- thickness: number;
2399
- colorBackfaces: boolean;
2400
- dashInvert: boolean;
2401
- dash: boolean;
2402
- dashRepeats: number;
2403
- dashLength: number;
2404
- squeeze: boolean;
2405
- squeezeMin: number;
2406
- squeezeMax: number;
2407
- stroke: THREE.Color;
2408
- backfaceStroke: THREE.Color;
2409
- fill: THREE.Color;
2410
- };
2411
- vertex: string;
2412
- fragment: string;
2413
- };
2414
- declare function setWireframeOverride(_material: THREE.Material, _uniforms: {
2415
- [key: string]: THREE.Uniform<any>;
2416
- }): void;
2417
- declare function useWireframeUniforms(_uniforms: {
2418
- [key: string]: THREE.Uniform<any>;
2419
- }, _props: WireframeMaterialProps): void;
2420
-
2421
2378
  declare class StarfieldMaterial extends SpriteNodeMaterial {
2422
2379
  private _time;
2423
2380
  private _fade;
@@ -2465,6 +2422,13 @@ type GridProps = Omit<ThreeElements['mesh'], 'ref' | 'args'> & GridMaterialType
2465
2422
  };
2466
2423
  declare const Grid: ForwardRefComponent<GridProps, THREE.Mesh>;
2467
2424
 
2425
+ type SoftShadowsProps = {
2426
+ size?: number;
2427
+ samples?: number;
2428
+ focus?: number;
2429
+ };
2430
+ declare function SoftShadows(props: SoftShadowsProps): null;
2431
+
2468
2432
  type SpotLightProps = Omit<ThreeElements['spotLight'], 'ref'> & {
2469
2433
  depthBuffer?: Texture$1;
2470
2434
  attenuation?: number;
@@ -2510,5 +2474,5 @@ type SparklesProps = Omit<ThreeElements['mesh'], 'ref'> & {
2510
2474
  };
2511
2475
  declare const Sparkles: ForwardRefComponent<SparklesProps, THREE.InstancedMesh>;
2512
2476
 
2513
- 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 };
2514
- 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 };
2477
+ export { AccumulativeShadows, AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, BakeShadows, Billboard, 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 };
2478
+ export type { AccumulativeShadowsProps, ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, 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, EdgesRef, EnvironmentLoaderProps, EnvironmentProps, ExampleApi, ExampleProps, ExpandedDragConfig, FboProps, FirstPersonControlsProps, FisheyeProps, FloatProps, FlyControlsProps, FontData, FrameData, GizmoHelperProps, GltfProps, Glyph, GradientTextureProps, GridMaterialType, GridProps, HelperProps, HtmlProps, HudProps, ImageProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, Ktx2Props, LightProps, LineProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MeshDistortMaterialProps, MeshReflectorMaterialProps, MeshRefractionMaterialProps, MeshRefractionMaterialType, MeshTransmissionMaterialProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OnDragStartProps, OnHoverProps, 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 };