@react-three/drei 11.0.0-alpha.3 → 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/core/index.d.mts CHANGED
@@ -3,14 +3,13 @@ import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, CSSPropertie
3
3
  import * as _react_three_fiber from '@react-three/fiber';
4
4
  import { ThreeElements, ReactThreeFiber, ThreeElement, Vector2, Vector3, ThreeEvent, Color as Color$1, ObjectMap, ComputeFunction, Euler } from '@react-three/fiber';
5
5
  import * as THREE from 'three';
6
- import { MeshStandardMaterial, Texture as Texture$1, Matrix4, Color, ColorRepresentation, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Event, Camera, Material, Vector3 as Vector3$1, Group, Object3D, 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 } from 'three';
7
- import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass';
8
- import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass';
9
- import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
6
+ import { MeshStandardMaterial, Texture as Texture$1, Matrix4, Color, ColorRepresentation, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Event, EventDispatcher, Camera, Material, Vector3 as Vector3$1, Group, Object3D, 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 } from 'three';
7
+ import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
8
+ import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';
9
+ import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
10
10
  import { ArcballControls as ArcballControls$1 } from 'three/examples/jsm/controls/ArcballControls.js';
11
- import { DeviceOrientationControls as DeviceOrientationControls$1 } from 'three-stdlib';
12
11
  import { DragConfig } from '@use-gesture/react';
13
- import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls';
12
+ import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls.js';
14
13
  import { FlyControls as FlyControls$1 } from 'three/examples/jsm/controls/FlyControls.js';
15
14
  import * as zustand from 'zustand';
16
15
  import { StoreApi } from 'zustand';
@@ -20,18 +19,19 @@ import { PointerLockControls as PointerLockControls$1 } from 'three/examples/jsm
20
19
  import { TrackballControls as TrackballControls$1 } from 'three/examples/jsm/controls/TrackballControls.js';
21
20
  import { Line2 } from 'three/examples/jsm/lines/Line2.js';
22
21
  import { LineMaterialParameters, LineMaterial } from 'three/examples/jsm/lines/LineMaterial.js';
23
- import { Flow } from 'three/examples/jsm/modifiers/CurveModifier';
24
- import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry';
25
- import * as three_examples_jsm_loaders_FontLoader from 'three/examples/jsm/loaders/FontLoader';
26
- import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls';
22
+ import { Flow } from 'three/examples/jsm/modifiers/CurveModifier.js';
23
+ import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry.js';
24
+ import * as three_examples_jsm_loaders_FontLoader_js from 'three/examples/jsm/loaders/FontLoader.js';
25
+ import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls.js';
27
26
  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
- import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
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';
34
- import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox';
34
+ import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
35
35
  import { Sky as Sky$1 } from 'three/examples/jsm/objects/Sky.js';
36
36
 
37
37
  type NamedArrayTuple<T extends (...args: any) => any> = Parameters<T>;
@@ -190,8 +190,8 @@ declare module '@react-three/fiber' {
190
190
  interface ThreeElements {
191
191
  portalMaterialImpl: ThreeElements['shaderMaterial'] & {
192
192
  resolution: ReactThreeFiber.Vector2;
193
- blur: number;
194
- blend: number;
193
+ blur?: number;
194
+ blend?: number;
195
195
  size?: number;
196
196
  sdf?: THREE.Texture;
197
197
  map?: THREE.Texture;
@@ -258,8 +258,8 @@ declare module '@react-three/fiber' {
258
258
  }
259
259
  declare class SegmentObject {
260
260
  color: THREE.Color;
261
- start: THREE.Vector3;
262
- end: THREE.Vector3;
261
+ start?: THREE.Vector3;
262
+ end?: THREE.Vector3;
263
263
  constructor();
264
264
  }
265
265
 
@@ -313,6 +313,34 @@ type ArcballControlsProps = Omit<Overwrite<ThreeElement<typeof ArcballControls$1
313
313
  }>, 'ref' | 'args'>;
314
314
  declare const ArcballControls: ForwardRefComponent<ArcballControlsProps, ArcballControls$1>;
315
315
 
316
+ interface StandardControlsEventMap {
317
+ change: {};
318
+ start: {};
319
+ end: {};
320
+ }
321
+ declare class DeviceOrientationControls$1 extends EventDispatcher<StandardControlsEventMap> {
322
+ object: Camera;
323
+ private changeEvent;
324
+ private EPS;
325
+ enabled: boolean;
326
+ deviceOrientation: Partial<DeviceOrientationEvent>;
327
+ screenOrientation: string | number;
328
+ alphaOffset: number;
329
+ constructor(object: Camera);
330
+ private onDeviceOrientationChangeEvent;
331
+ private onScreenOrientationChangeEvent;
332
+ private zee;
333
+ private euler;
334
+ private q0;
335
+ private q1;
336
+ private setObjectQuaternion;
337
+ connect: () => void;
338
+ disconnect: () => void;
339
+ private lastQuaternion;
340
+ update: () => void;
341
+ dispose: () => void;
342
+ }
343
+
316
344
  type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientationControls$1>, 'ref' | 'args'> & {
317
345
  camera?: THREE.Camera;
318
346
  onChange?: (e?: THREE.Event) => void;
@@ -320,6 +348,9 @@ type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientation
320
348
  };
321
349
  declare const DeviceOrientationControls: ForwardRefComponent<DeviceOrientationControlsProps, DeviceOrientationControls$1>;
322
350
 
351
+ type ExpandedDragConfig = DragConfig & {
352
+ preventOverlap?: boolean;
353
+ };
323
354
  type DragControlsProps = {
324
355
  autoTransform?: boolean;
325
356
  matrix?: THREE.Matrix4;
@@ -330,7 +361,7 @@ type DragControlsProps = {
330
361
  onDrag?: (localMatrix: THREE.Matrix4, deltaLocalMatrix: THREE.Matrix4, worldMatrix: THREE.Matrix4, deltaWorldMatrix: THREE.Matrix4) => void;
331
362
  onDragEnd?: () => void;
332
363
  children: React.ReactNode;
333
- dragConfig?: DragConfig;
364
+ dragConfig?: ExpandedDragConfig;
334
365
  };
335
366
  declare const DragControls: ForwardRefComponent<DragControlsProps, THREE.Group>;
336
367
 
@@ -479,6 +510,7 @@ type ScrollControlsProps = {
479
510
  maxSpeed?: number;
480
511
  prepend?: boolean;
481
512
  enabled?: boolean;
513
+ pixelPerfect?: boolean;
482
514
  style?: React.CSSProperties;
483
515
  children: React.ReactNode;
484
516
  };
@@ -495,9 +527,10 @@ type ScrollControlsState = {
495
527
  range(from: number, distance: number, margin?: number): number;
496
528
  curve(from: number, distance: number, margin?: number): number;
497
529
  visible(from: number, distance: number, margin?: number): boolean;
530
+ pixelPerfect: boolean;
498
531
  };
499
532
  declare function useScroll(): ScrollControlsState;
500
- declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, style, children, }: ScrollControlsProps): React.JSX.Element;
533
+ declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, pixelPerfect, style, children, }: ScrollControlsProps): React.JSX.Element;
501
534
  interface ScrollPropsWithFalseHtml {
502
535
  children?: React.ReactNode;
503
536
  html?: false;
@@ -750,7 +783,7 @@ type FontData = {
750
783
  original_font_information?: Record<string, unknown>;
751
784
  };
752
785
  type FontInput = string | FontData;
753
- declare function useFont(font: FontInput): three_examples_jsm_loaders_FontLoader.Font;
786
+ declare function useFont(font: FontInput): three_examples_jsm_loaders_FontLoader_js.Font;
754
787
  declare namespace useFont {
755
788
  var preload: (font: FontInput) => undefined;
756
789
  var clear: (font: FontInput) => void;
@@ -771,54 +804,6 @@ declare const Text3D: ForwardRefComponent<React.PropsWithChildren<Text3DProps &
771
804
  lineHeight?: number;
772
805
  }>, THREE.Mesh>;
773
806
 
774
- interface WireframeMaterialProps extends THREE.ShaderMaterialParameters {
775
- fillOpacity?: number;
776
- fillMix?: number;
777
- strokeOpacity?: number;
778
- thickness?: number;
779
- colorBackfaces?: boolean;
780
- dashInvert?: boolean;
781
- dash?: boolean;
782
- dashRepeats?: number;
783
- dashLength?: number;
784
- squeeze?: boolean;
785
- squeezeMin?: number;
786
- squeezeMax?: number;
787
- stroke?: THREE.ColorRepresentation;
788
- backfaceStroke?: THREE.ColorRepresentation;
789
- fill?: THREE.ColorRepresentation;
790
- }
791
- declare const WireframeMaterial: _react_three_fiber.ConstructorRepresentation<THREE.ShaderMaterial & {
792
- strokeOpacity: number;
793
- fillOpacity: number;
794
- fillMix: number;
795
- thickness: number;
796
- colorBackfaces: boolean;
797
- dashInvert: boolean;
798
- dash: boolean;
799
- dashRepeats: number;
800
- dashLength: number;
801
- squeeze: boolean;
802
- squeezeMin: number;
803
- squeezeMax: number;
804
- stroke: THREE.Color;
805
- backfaceStroke: THREE.Color;
806
- fill: THREE.Color;
807
- }> & {
808
- key: string;
809
- };
810
-
811
- declare module '@react-three/fiber' {
812
- interface ThreeElements {
813
- meshWireframeMaterial: ThreeElement<typeof WireframeMaterial>;
814
- }
815
- }
816
- interface WireframeProps {
817
- geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
818
- simplify?: boolean;
819
- }
820
- declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps): React.JSX.Element;
821
-
822
807
  type GizmoHelperContext = {
823
808
  tweenCamera: (direction: Vector3$1) => void;
824
809
  };
@@ -865,6 +850,11 @@ type OnDragStartProps = {
865
850
  origin: THREE.Vector3;
866
851
  directions: THREE.Vector3[];
867
852
  };
853
+ type OnHoverProps = {
854
+ component: 'Arrow' | 'Slider' | 'Rotator' | 'Sphere';
855
+ axis: 0 | 1 | 2;
856
+ hovering: boolean;
857
+ };
868
858
 
869
859
  type PivotControlsProps = {
870
860
  enabled?: boolean;
@@ -874,6 +864,7 @@ type PivotControlsProps = {
874
864
  offset?: [number, number, number];
875
865
  rotation?: [number, number, number];
876
866
  matrix?: THREE.Matrix4;
867
+ object?: THREE.Object3D | React.MutableRefObject<THREE.Object3D>;
877
868
  anchor?: [number, number, number];
878
869
  autoTransform?: boolean;
879
870
  activeAxes?: [boolean, boolean, boolean];
@@ -891,6 +882,7 @@ type PivotControlsProps = {
891
882
  onDragStart?: (props: OnDragStartProps) => void;
892
883
  onDrag?: (l: THREE.Matrix4, deltaL: THREE.Matrix4, w: THREE.Matrix4, deltaW: THREE.Matrix4) => void;
893
884
  onDragEnd?: () => void;
885
+ onHover?: (props: OnHoverProps) => void;
894
886
  depthTest?: boolean;
895
887
  renderOrder?: number;
896
888
  opacity?: number;
@@ -976,6 +968,7 @@ type InstancedAttributeProps = Omit<ThreeElements['instancedBufferAttribute'], '
976
968
  defaultValue: any;
977
969
  normalized?: boolean;
978
970
  usage?: number;
971
+ type?: 'float' | 'int' | 'uint' | 'short' | 'ushort' | 'byte';
979
972
  };
980
973
  type InstancedMesh = Omit<THREE.InstancedMesh, 'instanceMatrix' | 'instanceColor'> & {
981
974
  instanceMatrix: THREE.InstancedBufferAttribute;
@@ -1290,10 +1283,10 @@ declare function Fbx({ path, ...props }: {
1290
1283
  type Path = string | string[];
1291
1284
  type UseDraco = boolean | string;
1292
1285
  type UseMeshopt = boolean;
1293
- type ExtendLoader = (loader: GLTFLoader) => void;
1286
+ type ExtendLoader$1 = (loader: GLTFLoader) => void;
1294
1287
  declare const useGLTF: {
1295
- <T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
1296
- preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): void;
1288
+ <T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
1289
+ preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): void;
1297
1290
  clear(path: Path): void;
1298
1291
  setDecoderPath(path: string): void;
1299
1292
  };
@@ -1301,22 +1294,26 @@ type GltfProps = Omit<CloneProps, 'object'> & {
1301
1294
  src: string;
1302
1295
  useDraco?: UseDraco;
1303
1296
  useMeshOpt?: UseMeshopt;
1304
- extendLoader?: ExtendLoader;
1297
+ extendLoader?: ExtendLoader$1;
1305
1298
  };
1306
1299
  declare const Gltf: React.ForwardRefExoticComponent<Omit<GltfProps, "ref"> & React.RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
1307
1300
 
1308
- declare function useKTX2<Url extends string[] | string | Record<string, string>>(input: Url, basisPath?: string): Url extends any[] ? Texture$1[] : Url extends object ? {
1301
+ type ExtendLoader = (loader: KTX2Loader) => void;
1302
+ 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 ? {
1309
1303
  [key in keyof Url]: Texture$1;
1310
1304
  } : Texture$1;
1311
1305
  declare namespace useKTX2 {
1312
- var preload: (url: string extends any[] ? string[] : string, basisPath?: string) => void;
1306
+ var preload: (url: string extends any[] ? string[] : string, basisPath?: boolean | string, extendLoader?: ExtendLoader) => void;
1313
1307
  var clear: (input: string | string[]) => void;
1308
+ var setTranscoderPath: (path: string) => void;
1314
1309
  }
1315
- declare const Ktx2: ({ children, input, basisPath, }: {
1310
+ type Ktx2Props = {
1316
1311
  children?: (texture: ReturnType<typeof useKTX2>) => React.ReactNode;
1317
1312
  input: Parameters<typeof useKTX2>[0];
1318
1313
  basisPath?: Parameters<typeof useKTX2>[1];
1319
- }) => React.JSX.Element;
1314
+ extendLoader?: ExtendLoader;
1315
+ };
1316
+ declare const Ktx2: ({ children, input, basisPath, extendLoader }: Ktx2Props) => React.JSX.Element;
1320
1317
 
1321
1318
  type Data = {
1322
1319
  errors: string[];
@@ -1652,7 +1649,7 @@ type EnvironmentLoaderProps = {
1652
1649
  extensions?: (loader: Loader$1) => void;
1653
1650
  colorSpace?: ColorSpace;
1654
1651
  };
1655
- declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): CubeTexture$1<unknown> | Texture$1<unknown>;
1652
+ declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture$1<unknown>;
1656
1653
  declare namespace useEnvironment {
1657
1654
  var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
1658
1655
  var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
@@ -1828,6 +1825,7 @@ interface HtmlProps extends Omit<Assign<React.HTMLAttributes<HTMLDivElement>, Th
1828
1825
  geometry?: React.ReactNode;
1829
1826
  castShadow?: boolean;
1830
1827
  receiveShadow?: boolean;
1828
+ pixelPerfect?: boolean;
1831
1829
  }
1832
1830
  declare const Html: ForwardRefComponent<HtmlProps, HTMLDivElement>;
1833
1831
 
@@ -1854,5 +1852,5 @@ type SelectProps = Omit<ThreeElements['group'], 'ref'> & {
1854
1852
  declare function Select({ box, multiple, children, onChange, onChangePointerUp, border, backgroundColor, filter: customFilter, ...props }: SelectProps): React.JSX.Element;
1855
1853
  declare function useSelect(): THREE.Object3D[];
1856
1854
 
1857
- export { AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, Billboard, Bounds, Box, CameraShake, Capsule, CatmullRomLine, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, Dodecahedron, DragControls, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, Fbo, Fbx, FirstPersonControls, Fisheye, Float, FlyControls, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, Helper, Html, Hud, Icosahedron, Instance, InstancedAttribute, Instances, IsObject, KeyboardControls, Ktx2, Lathe, Lightformer, Loader, MapControls, Mask, MatcapTexture, Merged, MotionPathControls, NormalTexture, Octahedron, OrbitControls, OrthographicCamera, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, PointerLockControls, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, ScrollControls, Select, Shadow, Shape, Sky, Sphere, SpriteAnimator, Stage, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, TrackballControls, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, Wireframe, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, 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, useTrailTexture, useVideoTexture };
1858
- export type { ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, 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, HelperProps, HtmlProps, HudProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, LightProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OrbitControlsChangeEvent, OrbitControlsProps, OrthographicCameraProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointerLockControlsProps, PointsBuffersProps, PointsInstancesProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsProps, ScrollControlsState, ScrollProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SpriteAnimatorProps, SpriteData, StageProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrackballControlsProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, useSurfaceSamplerProps };
1855
+ export { AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, Billboard, Bounds, Box, CameraShake, Capsule, CatmullRomLine, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, Dodecahedron, DragControls, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, Fbo, Fbx, FirstPersonControls, Fisheye, Float, FlyControls, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, Helper, Html, Hud, Icosahedron, Instance, InstancedAttribute, Instances, IsObject, KeyboardControls, Ktx2, Lathe, Lightformer, Loader, MapControls, Mask, MatcapTexture, Merged, MotionPathControls, NormalTexture, Octahedron, OrbitControls, OrthographicCamera, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, PointerLockControls, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, ScrollControls, Select, Shadow, Shape, Sky, Sphere, SpriteAnimator, Stage, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, TrackballControls, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, 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, useTrailTexture, useVideoTexture };
1856
+ export type { ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, 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, HelperProps, HtmlProps, HudProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, Ktx2Props, LightProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OnDragStartProps, OnHoverProps, OrbitControlsChangeEvent, OrbitControlsProps, OrthographicCameraProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointerLockControlsProps, PointsBuffersProps, PointsInstancesProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsProps, ScrollControlsState, ScrollProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SpriteAnimatorProps, SpriteData, StageProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrackballControlsProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, useSurfaceSamplerProps };
package/core/index.d.ts CHANGED
@@ -3,14 +3,13 @@ import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, CSSPropertie
3
3
  import * as _react_three_fiber from '@react-three/fiber';
4
4
  import { ThreeElements, ReactThreeFiber, ThreeElement, Vector2, Vector3, ThreeEvent, Color as Color$1, ObjectMap, ComputeFunction, Euler } from '@react-three/fiber';
5
5
  import * as THREE from 'three';
6
- import { MeshStandardMaterial, Texture as Texture$1, Matrix4, Color, ColorRepresentation, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Event, Camera, Material, Vector3 as Vector3$1, Group, Object3D, 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 } from 'three';
7
- import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass';
8
- import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass';
9
- import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
6
+ import { MeshStandardMaterial, Texture as Texture$1, Matrix4, Color, ColorRepresentation, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, Event, EventDispatcher, Camera, Material, Vector3 as Vector3$1, Group, Object3D, 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 } from 'three';
7
+ import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
8
+ import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';
9
+ import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
10
10
  import { ArcballControls as ArcballControls$1 } from 'three/examples/jsm/controls/ArcballControls.js';
11
- import { DeviceOrientationControls as DeviceOrientationControls$1 } from 'three-stdlib';
12
11
  import { DragConfig } from '@use-gesture/react';
13
- import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls';
12
+ import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls.js';
14
13
  import { FlyControls as FlyControls$1 } from 'three/examples/jsm/controls/FlyControls.js';
15
14
  import * as zustand from 'zustand';
16
15
  import { StoreApi } from 'zustand';
@@ -20,18 +19,19 @@ import { PointerLockControls as PointerLockControls$1 } from 'three/examples/jsm
20
19
  import { TrackballControls as TrackballControls$1 } from 'three/examples/jsm/controls/TrackballControls.js';
21
20
  import { Line2 } from 'three/examples/jsm/lines/Line2.js';
22
21
  import { LineMaterialParameters, LineMaterial } from 'three/examples/jsm/lines/LineMaterial.js';
23
- import { Flow } from 'three/examples/jsm/modifiers/CurveModifier';
24
- import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry';
25
- import * as three_examples_jsm_loaders_FontLoader from 'three/examples/jsm/loaders/FontLoader';
26
- import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls';
22
+ import { Flow } from 'three/examples/jsm/modifiers/CurveModifier.js';
23
+ import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry.js';
24
+ import * as three_examples_jsm_loaders_FontLoader_js from 'three/examples/jsm/loaders/FontLoader.js';
25
+ import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls.js';
27
26
  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
- import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
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';
34
- import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox';
34
+ import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
35
35
  import { Sky as Sky$1 } from 'three/examples/jsm/objects/Sky.js';
36
36
 
37
37
  type NamedArrayTuple<T extends (...args: any) => any> = Parameters<T>;
@@ -190,8 +190,8 @@ declare module '@react-three/fiber' {
190
190
  interface ThreeElements {
191
191
  portalMaterialImpl: ThreeElements['shaderMaterial'] & {
192
192
  resolution: ReactThreeFiber.Vector2;
193
- blur: number;
194
- blend: number;
193
+ blur?: number;
194
+ blend?: number;
195
195
  size?: number;
196
196
  sdf?: THREE.Texture;
197
197
  map?: THREE.Texture;
@@ -258,8 +258,8 @@ declare module '@react-three/fiber' {
258
258
  }
259
259
  declare class SegmentObject {
260
260
  color: THREE.Color;
261
- start: THREE.Vector3;
262
- end: THREE.Vector3;
261
+ start?: THREE.Vector3;
262
+ end?: THREE.Vector3;
263
263
  constructor();
264
264
  }
265
265
 
@@ -313,6 +313,34 @@ type ArcballControlsProps = Omit<Overwrite<ThreeElement<typeof ArcballControls$1
313
313
  }>, 'ref' | 'args'>;
314
314
  declare const ArcballControls: ForwardRefComponent<ArcballControlsProps, ArcballControls$1>;
315
315
 
316
+ interface StandardControlsEventMap {
317
+ change: {};
318
+ start: {};
319
+ end: {};
320
+ }
321
+ declare class DeviceOrientationControls$1 extends EventDispatcher<StandardControlsEventMap> {
322
+ object: Camera;
323
+ private changeEvent;
324
+ private EPS;
325
+ enabled: boolean;
326
+ deviceOrientation: Partial<DeviceOrientationEvent>;
327
+ screenOrientation: string | number;
328
+ alphaOffset: number;
329
+ constructor(object: Camera);
330
+ private onDeviceOrientationChangeEvent;
331
+ private onScreenOrientationChangeEvent;
332
+ private zee;
333
+ private euler;
334
+ private q0;
335
+ private q1;
336
+ private setObjectQuaternion;
337
+ connect: () => void;
338
+ disconnect: () => void;
339
+ private lastQuaternion;
340
+ update: () => void;
341
+ dispose: () => void;
342
+ }
343
+
316
344
  type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientationControls$1>, 'ref' | 'args'> & {
317
345
  camera?: THREE.Camera;
318
346
  onChange?: (e?: THREE.Event) => void;
@@ -320,6 +348,9 @@ type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientation
320
348
  };
321
349
  declare const DeviceOrientationControls: ForwardRefComponent<DeviceOrientationControlsProps, DeviceOrientationControls$1>;
322
350
 
351
+ type ExpandedDragConfig = DragConfig & {
352
+ preventOverlap?: boolean;
353
+ };
323
354
  type DragControlsProps = {
324
355
  autoTransform?: boolean;
325
356
  matrix?: THREE.Matrix4;
@@ -330,7 +361,7 @@ type DragControlsProps = {
330
361
  onDrag?: (localMatrix: THREE.Matrix4, deltaLocalMatrix: THREE.Matrix4, worldMatrix: THREE.Matrix4, deltaWorldMatrix: THREE.Matrix4) => void;
331
362
  onDragEnd?: () => void;
332
363
  children: React.ReactNode;
333
- dragConfig?: DragConfig;
364
+ dragConfig?: ExpandedDragConfig;
334
365
  };
335
366
  declare const DragControls: ForwardRefComponent<DragControlsProps, THREE.Group>;
336
367
 
@@ -479,6 +510,7 @@ type ScrollControlsProps = {
479
510
  maxSpeed?: number;
480
511
  prepend?: boolean;
481
512
  enabled?: boolean;
513
+ pixelPerfect?: boolean;
482
514
  style?: React.CSSProperties;
483
515
  children: React.ReactNode;
484
516
  };
@@ -495,9 +527,10 @@ type ScrollControlsState = {
495
527
  range(from: number, distance: number, margin?: number): number;
496
528
  curve(from: number, distance: number, margin?: number): number;
497
529
  visible(from: number, distance: number, margin?: number): boolean;
530
+ pixelPerfect: boolean;
498
531
  };
499
532
  declare function useScroll(): ScrollControlsState;
500
- declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, style, children, }: ScrollControlsProps): React.JSX.Element;
533
+ declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, pixelPerfect, style, children, }: ScrollControlsProps): React.JSX.Element;
501
534
  interface ScrollPropsWithFalseHtml {
502
535
  children?: React.ReactNode;
503
536
  html?: false;
@@ -750,7 +783,7 @@ type FontData = {
750
783
  original_font_information?: Record<string, unknown>;
751
784
  };
752
785
  type FontInput = string | FontData;
753
- declare function useFont(font: FontInput): three_examples_jsm_loaders_FontLoader.Font;
786
+ declare function useFont(font: FontInput): three_examples_jsm_loaders_FontLoader_js.Font;
754
787
  declare namespace useFont {
755
788
  var preload: (font: FontInput) => undefined;
756
789
  var clear: (font: FontInput) => void;
@@ -771,54 +804,6 @@ declare const Text3D: ForwardRefComponent<React.PropsWithChildren<Text3DProps &
771
804
  lineHeight?: number;
772
805
  }>, THREE.Mesh>;
773
806
 
774
- interface WireframeMaterialProps extends THREE.ShaderMaterialParameters {
775
- fillOpacity?: number;
776
- fillMix?: number;
777
- strokeOpacity?: number;
778
- thickness?: number;
779
- colorBackfaces?: boolean;
780
- dashInvert?: boolean;
781
- dash?: boolean;
782
- dashRepeats?: number;
783
- dashLength?: number;
784
- squeeze?: boolean;
785
- squeezeMin?: number;
786
- squeezeMax?: number;
787
- stroke?: THREE.ColorRepresentation;
788
- backfaceStroke?: THREE.ColorRepresentation;
789
- fill?: THREE.ColorRepresentation;
790
- }
791
- declare const WireframeMaterial: _react_three_fiber.ConstructorRepresentation<THREE.ShaderMaterial & {
792
- strokeOpacity: number;
793
- fillOpacity: number;
794
- fillMix: number;
795
- thickness: number;
796
- colorBackfaces: boolean;
797
- dashInvert: boolean;
798
- dash: boolean;
799
- dashRepeats: number;
800
- dashLength: number;
801
- squeeze: boolean;
802
- squeezeMin: number;
803
- squeezeMax: number;
804
- stroke: THREE.Color;
805
- backfaceStroke: THREE.Color;
806
- fill: THREE.Color;
807
- }> & {
808
- key: string;
809
- };
810
-
811
- declare module '@react-three/fiber' {
812
- interface ThreeElements {
813
- meshWireframeMaterial: ThreeElement<typeof WireframeMaterial>;
814
- }
815
- }
816
- interface WireframeProps {
817
- geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
818
- simplify?: boolean;
819
- }
820
- declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps): React.JSX.Element;
821
-
822
807
  type GizmoHelperContext = {
823
808
  tweenCamera: (direction: Vector3$1) => void;
824
809
  };
@@ -865,6 +850,11 @@ type OnDragStartProps = {
865
850
  origin: THREE.Vector3;
866
851
  directions: THREE.Vector3[];
867
852
  };
853
+ type OnHoverProps = {
854
+ component: 'Arrow' | 'Slider' | 'Rotator' | 'Sphere';
855
+ axis: 0 | 1 | 2;
856
+ hovering: boolean;
857
+ };
868
858
 
869
859
  type PivotControlsProps = {
870
860
  enabled?: boolean;
@@ -874,6 +864,7 @@ type PivotControlsProps = {
874
864
  offset?: [number, number, number];
875
865
  rotation?: [number, number, number];
876
866
  matrix?: THREE.Matrix4;
867
+ object?: THREE.Object3D | React.MutableRefObject<THREE.Object3D>;
877
868
  anchor?: [number, number, number];
878
869
  autoTransform?: boolean;
879
870
  activeAxes?: [boolean, boolean, boolean];
@@ -891,6 +882,7 @@ type PivotControlsProps = {
891
882
  onDragStart?: (props: OnDragStartProps) => void;
892
883
  onDrag?: (l: THREE.Matrix4, deltaL: THREE.Matrix4, w: THREE.Matrix4, deltaW: THREE.Matrix4) => void;
893
884
  onDragEnd?: () => void;
885
+ onHover?: (props: OnHoverProps) => void;
894
886
  depthTest?: boolean;
895
887
  renderOrder?: number;
896
888
  opacity?: number;
@@ -976,6 +968,7 @@ type InstancedAttributeProps = Omit<ThreeElements['instancedBufferAttribute'], '
976
968
  defaultValue: any;
977
969
  normalized?: boolean;
978
970
  usage?: number;
971
+ type?: 'float' | 'int' | 'uint' | 'short' | 'ushort' | 'byte';
979
972
  };
980
973
  type InstancedMesh = Omit<THREE.InstancedMesh, 'instanceMatrix' | 'instanceColor'> & {
981
974
  instanceMatrix: THREE.InstancedBufferAttribute;
@@ -1290,10 +1283,10 @@ declare function Fbx({ path, ...props }: {
1290
1283
  type Path = string | string[];
1291
1284
  type UseDraco = boolean | string;
1292
1285
  type UseMeshopt = boolean;
1293
- type ExtendLoader = (loader: GLTFLoader) => void;
1286
+ type ExtendLoader$1 = (loader: GLTFLoader) => void;
1294
1287
  declare const useGLTF: {
1295
- <T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
1296
- preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): void;
1288
+ <T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
1289
+ preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): void;
1297
1290
  clear(path: Path): void;
1298
1291
  setDecoderPath(path: string): void;
1299
1292
  };
@@ -1301,22 +1294,26 @@ type GltfProps = Omit<CloneProps, 'object'> & {
1301
1294
  src: string;
1302
1295
  useDraco?: UseDraco;
1303
1296
  useMeshOpt?: UseMeshopt;
1304
- extendLoader?: ExtendLoader;
1297
+ extendLoader?: ExtendLoader$1;
1305
1298
  };
1306
1299
  declare const Gltf: React.ForwardRefExoticComponent<Omit<GltfProps, "ref"> & React.RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
1307
1300
 
1308
- declare function useKTX2<Url extends string[] | string | Record<string, string>>(input: Url, basisPath?: string): Url extends any[] ? Texture$1[] : Url extends object ? {
1301
+ type ExtendLoader = (loader: KTX2Loader) => void;
1302
+ 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 ? {
1309
1303
  [key in keyof Url]: Texture$1;
1310
1304
  } : Texture$1;
1311
1305
  declare namespace useKTX2 {
1312
- var preload: (url: string extends any[] ? string[] : string, basisPath?: string) => void;
1306
+ var preload: (url: string extends any[] ? string[] : string, basisPath?: boolean | string, extendLoader?: ExtendLoader) => void;
1313
1307
  var clear: (input: string | string[]) => void;
1308
+ var setTranscoderPath: (path: string) => void;
1314
1309
  }
1315
- declare const Ktx2: ({ children, input, basisPath, }: {
1310
+ type Ktx2Props = {
1316
1311
  children?: (texture: ReturnType<typeof useKTX2>) => React.ReactNode;
1317
1312
  input: Parameters<typeof useKTX2>[0];
1318
1313
  basisPath?: Parameters<typeof useKTX2>[1];
1319
- }) => React.JSX.Element;
1314
+ extendLoader?: ExtendLoader;
1315
+ };
1316
+ declare const Ktx2: ({ children, input, basisPath, extendLoader }: Ktx2Props) => React.JSX.Element;
1320
1317
 
1321
1318
  type Data = {
1322
1319
  errors: string[];
@@ -1652,7 +1649,7 @@ type EnvironmentLoaderProps = {
1652
1649
  extensions?: (loader: Loader$1) => void;
1653
1650
  colorSpace?: ColorSpace;
1654
1651
  };
1655
- declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): CubeTexture$1<unknown> | Texture$1<unknown>;
1652
+ declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture$1<unknown>;
1656
1653
  declare namespace useEnvironment {
1657
1654
  var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
1658
1655
  var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
@@ -1828,6 +1825,7 @@ interface HtmlProps extends Omit<Assign<React.HTMLAttributes<HTMLDivElement>, Th
1828
1825
  geometry?: React.ReactNode;
1829
1826
  castShadow?: boolean;
1830
1827
  receiveShadow?: boolean;
1828
+ pixelPerfect?: boolean;
1831
1829
  }
1832
1830
  declare const Html: ForwardRefComponent<HtmlProps, HTMLDivElement>;
1833
1831
 
@@ -1854,5 +1852,5 @@ type SelectProps = Omit<ThreeElements['group'], 'ref'> & {
1854
1852
  declare function Select({ box, multiple, children, onChange, onChangePointerUp, border, backgroundColor, filter: customFilter, ...props }: SelectProps): React.JSX.Element;
1855
1853
  declare function useSelect(): THREE.Object3D[];
1856
1854
 
1857
- export { AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, Billboard, Bounds, Box, CameraShake, Capsule, CatmullRomLine, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, Dodecahedron, DragControls, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, Fbo, Fbx, FirstPersonControls, Fisheye, Float, FlyControls, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, Helper, Html, Hud, Icosahedron, Instance, InstancedAttribute, Instances, IsObject, KeyboardControls, Ktx2, Lathe, Lightformer, Loader, MapControls, Mask, MatcapTexture, Merged, MotionPathControls, NormalTexture, Octahedron, OrbitControls, OrthographicCamera, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, PointerLockControls, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, ScrollControls, Select, Shadow, Shape, Sky, Sphere, SpriteAnimator, Stage, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, TrackballControls, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, Wireframe, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, 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, useTrailTexture, useVideoTexture };
1858
- export type { ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, 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, HelperProps, HtmlProps, HudProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, LightProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OrbitControlsChangeEvent, OrbitControlsProps, OrthographicCameraProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointerLockControlsProps, PointsBuffersProps, PointsInstancesProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsProps, ScrollControlsState, ScrollProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SpriteAnimatorProps, SpriteData, StageProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrackballControlsProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, useSurfaceSamplerProps };
1855
+ export { AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, Billboard, Bounds, Box, CameraShake, Capsule, CatmullRomLine, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, Dodecahedron, DragControls, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, Fbo, Fbx, FirstPersonControls, Fisheye, Float, FlyControls, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, Helper, Html, Hud, Icosahedron, Instance, InstancedAttribute, Instances, IsObject, KeyboardControls, Ktx2, Lathe, Lightformer, Loader, MapControls, Mask, MatcapTexture, Merged, MotionPathControls, NormalTexture, Octahedron, OrbitControls, OrthographicCamera, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, PointerLockControls, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, ScrollControls, Select, Shadow, Shape, Sky, Sphere, SpriteAnimator, Stage, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, TrackballControls, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, 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, useTrailTexture, useVideoTexture };
1856
+ export type { ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, 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, HelperProps, HtmlProps, HudProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, Ktx2Props, LightProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OnDragStartProps, OnHoverProps, OrbitControlsChangeEvent, OrbitControlsProps, OrthographicCameraProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointerLockControlsProps, PointsBuffersProps, PointsInstancesProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsProps, ScrollControlsState, ScrollProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SpriteAnimatorProps, SpriteData, StageProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrackballControlsProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, useSurfaceSamplerProps };