@react-three/drei 9.109.2 → 9.109.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +7 -0
  2. package/core/Svg.cjs.js +1 -1
  3. package/core/Svg.js +7 -2
  4. package/index.cjs.js +1 -1
  5. package/package.json +3 -2
  6. package/core/AccumulativeShadows.d.ts +0 -61
  7. package/core/AdaptiveDpr.d.ts +0 -3
  8. package/core/AdaptiveEvents.d.ts +0 -1
  9. package/core/ArcballControls.d.ts +0 -15
  10. package/core/AsciiRenderer.d.ts +0 -12
  11. package/core/BBAnchor.d.ts +0 -7
  12. package/core/Backdrop.d.ts +0 -14
  13. package/core/BakeShadows.d.ts +0 -1
  14. package/core/Billboard.d.ts +0 -9
  15. package/core/Bounds.d.ts +0 -35
  16. package/core/Bvh.d.ts +0 -18
  17. package/core/CameraControls.d.ts +0 -22
  18. package/core/CameraShake.d.ts +0 -17
  19. package/core/CatmullRomLine.d.ts +0 -11
  20. package/core/Caustics.d.ts +0 -35
  21. package/core/Center.d.ts +0 -31
  22. package/core/Clone.d.ts +0 -15
  23. package/core/Cloud.d.ts +0 -59
  24. package/core/ComputedAttribute.d.ts +0 -9
  25. package/core/ContactShadows.d.ts +0 -17
  26. package/core/CubeCamera.d.ts +0 -21
  27. package/core/CubeTexture.d.ts +0 -15
  28. package/core/CubicBezierLine.d.ts +0 -13
  29. package/core/CurveModifier.d.ts +0 -10
  30. package/core/Decal.d.ts +0 -16
  31. package/core/Detailed.d.ts +0 -10
  32. package/core/DetectGPU.d.ts +0 -8
  33. package/core/DeviceOrientationControls.d.ts +0 -10
  34. package/core/Edges.d.ts +0 -13
  35. package/core/Effects.d.ts +0 -29
  36. package/core/Environment.d.ts +0 -39
  37. package/core/Example.d.ts +0 -13
  38. package/core/Fbo.d.ts +0 -28
  39. package/core/Fbx.d.ts +0 -11
  40. package/core/FirstPersonControls.d.ts +0 -8
  41. package/core/Fisheye.d.ts +0 -9
  42. package/core/Float.d.ts +0 -13
  43. package/core/FlyControls.d.ts +0 -10
  44. package/core/GizmoHelper.d.ts +0 -15
  45. package/core/GizmoViewcube.d.ts +0 -14
  46. package/core/GizmoViewport.d.ts +0 -16
  47. package/core/Gltf.d.ts +0 -20
  48. package/core/GradientTexture.d.ts +0 -18
  49. package/core/Grid.d.ts +0 -27
  50. package/core/Helper.d.ts +0 -16
  51. package/core/Hud.d.ts +0 -7
  52. package/core/Image.d.ts +0 -40
  53. package/core/Instances.d.ts +0 -43
  54. package/core/Ktx2.d.ts +0 -14
  55. package/core/Lightformer.d.ts +0 -14
  56. package/core/Line.d.ts +0 -13
  57. package/core/MapControls.d.ts +0 -14
  58. package/core/MarchingCubes.d.ts +0 -24
  59. package/core/Mask.d.ts +0 -17
  60. package/core/MatcapTexture.d.ts +0 -9
  61. package/core/MeshDiscardMaterial.d.ts +0 -11
  62. package/core/MeshDistortMaterial.d.ts +0 -41
  63. package/core/MeshPortalMaterial.d.ts +0 -28
  64. package/core/MeshReflectorMaterial.d.ts +0 -27
  65. package/core/MeshRefractionMaterial.d.ts +0 -22
  66. package/core/MeshTransmissionMaterial.d.ts +0 -35
  67. package/core/MeshWobbleMaterial.d.ts +0 -38
  68. package/core/MotionPathControls.d.ts +0 -27
  69. package/core/NormalTexture.d.ts +0 -14
  70. package/core/OrbitControls.d.ts +0 -22
  71. package/core/OrthographicCamera.d.ts +0 -14
  72. package/core/Outlines.d.ts +0 -16
  73. package/core/PerformanceMonitor.d.ts +0 -36
  74. package/core/PerspectiveCamera.d.ts +0 -14
  75. package/core/PointMaterial.d.ts +0 -16
  76. package/core/PointerLockControls.d.ts +0 -15
  77. package/core/Points.d.ts +0 -34
  78. package/core/PositionalAudio.d.ts +0 -9
  79. package/core/Preload.d.ts +0 -8
  80. package/core/Progress.d.ts +0 -14
  81. package/core/QuadraticBezierLine.d.ts +0 -16
  82. package/core/Reflector.d.ts +0 -30
  83. package/core/RenderCubeTexture.d.ts +0 -30
  84. package/core/RenderTexture.d.ts +0 -18
  85. package/core/Resize.d.ts +0 -10
  86. package/core/RoundedBox.d.ts +0 -12
  87. package/core/Sampler.d.ts +0 -28
  88. package/core/ScreenQuad.d.ts +0 -5
  89. package/core/ScreenSizer.d.ts +0 -7
  90. package/core/ScreenSpace.d.ts +0 -6
  91. package/core/Segments.d.ts +0 -31
  92. package/core/Shadow.d.ts +0 -12
  93. package/core/ShadowAlpha.d.ts +0 -8
  94. package/core/Sky.d.ts +0 -17
  95. package/core/Sparkles.d.ts +0 -21
  96. package/core/Splat.d.ts +0 -58
  97. package/core/SpotLight.d.ts +0 -26
  98. package/core/SpriteAnimator.d.ts +0 -38
  99. package/core/Stage.d.ts +0 -26
  100. package/core/Stars.d.ts +0 -24
  101. package/core/Stats.d.ts +0 -8
  102. package/core/StatsGl.d.ts +0 -9
  103. package/core/Svg.d.ts +0 -13
  104. package/core/Text.d.ts +0 -38
  105. package/core/Text3D.d.ts +0 -23
  106. package/core/Texture.d.ts +0 -20
  107. package/core/TrackballControls.d.ts +0 -15
  108. package/core/Trail.d.ts +0 -21
  109. package/core/TrailTexture.d.ts +0 -18
  110. package/core/TransformControls.d.ts +0 -28
  111. package/core/VideoTexture.d.ts +0 -14
  112. package/core/Wireframe.d.ts +0 -17
  113. package/core/calculateScaleFactor.d.ts +0 -3
  114. package/core/index.d.ts +0 -122
  115. package/core/meshBounds.d.ts +0 -2
  116. package/core/shaderMaterial.d.ts +0 -7
  117. package/core/shapes.d.ts +0 -25
  118. package/core/softShadows.d.ts +0 -7
  119. package/core/useAnimations.d.ts +0 -13
  120. package/core/useAspect.d.ts +0 -1
  121. package/core/useBoxProjectedEnv.d.ts +0 -19
  122. package/core/useCamera.d.ts +0 -3
  123. package/core/useContextBridge.d.ts +0 -4
  124. package/core/useDepthBuffer.d.ts +0 -6
  125. package/core/useEnvironment.d.ts +0 -11
  126. package/core/useFont.d.ts +0 -24
  127. package/core/useIntersect.d.ts +0 -3
  128. package/core/useSpriteLoader.d.ts +0 -10
  129. package/helpers/constants.d.ts +0 -1
  130. package/helpers/deprecated.d.ts +0 -8
  131. package/helpers/environment-assets.d.ts +0 -13
  132. package/helpers/ts-utils.d.ts +0 -3
  133. package/helpers/useEffectfulState.d.ts +0 -4
  134. package/index.d.ts +0 -1
  135. package/materials/BlurPass.d.ts +0 -23
  136. package/materials/ConvolutionMaterial.d.ts +0 -7
  137. package/materials/DiscardMaterial.d.ts +0 -3
  138. package/materials/MeshReflectorMaterial.d.ts +0 -66
  139. package/materials/MeshRefractionMaterial.d.ts +0 -7
  140. package/materials/SpotLightMaterial.d.ts +0 -4
  141. package/materials/WireframeMaterial.d.ts +0 -48
  142. package/native/index.d.ts +0 -1
  143. package/web/CycleRaycast.d.ts +0 -10
  144. package/web/DragControls.d.ts +0 -17
  145. package/web/FaceControls.d.ts +0 -42
  146. package/web/FaceLandmarker.d.ts +0 -15
  147. package/web/Facemesh.d.ts +0 -150
  148. package/web/Html.d.ts +0 -34
  149. package/web/KeyboardControls.d.ts +0 -37
  150. package/web/Loader.d.ts +0 -12
  151. package/web/PresentationControls.d.ts +0 -17
  152. package/web/ScrollControls.d.ts +0 -45
  153. package/web/Select.d.ts +0 -14
  154. package/web/View.d.ts +0 -36
  155. package/web/index.d.ts +0 -15
  156. package/web/pivotControls/AxisArrow.d.ts +0 -7
  157. package/web/pivotControls/AxisRotator.d.ts +0 -7
  158. package/web/pivotControls/PlaneSlider.d.ts +0 -7
  159. package/web/pivotControls/ScalingSphere.d.ts +0 -7
  160. package/web/pivotControls/context.d.ts +0 -32
  161. package/web/pivotControls/index.d.ts +0 -39
  162. package/web/useCursor.d.ts +0 -1
package/core/Stage.d.ts DELETED
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import { EnvironmentProps } from './Environment';
3
- import { ContactShadowsProps } from './ContactShadows';
4
- import { CenterProps } from './Center';
5
- import { AccumulativeShadowsProps, RandomizedLightProps } from './AccumulativeShadows';
6
- import { PresetsType } from '../helpers/environment-assets';
7
- type StageShadows = Partial<AccumulativeShadowsProps> & Partial<RandomizedLightProps> & Partial<ContactShadowsProps> & {
8
- type: 'contact' | 'accumulative';
9
- offset?: number;
10
- bias?: number;
11
- normalBias?: number;
12
- size?: number;
13
- };
14
- type StageProps = {
15
- preset?: 'rembrandt' | 'portrait' | 'upfront' | 'soft' | {
16
- main: [x: number, y: number, z: number];
17
- fill: [x: number, y: number, z: number];
18
- };
19
- shadows?: boolean | 'contact' | 'accumulative' | StageShadows;
20
- adjustCamera?: boolean | number;
21
- environment?: PresetsType | Partial<EnvironmentProps> | null;
22
- intensity?: number;
23
- center?: Partial<CenterProps>;
24
- };
25
- export declare function Stage({ children, center, adjustCamera, intensity, shadows, environment, preset, ...props }: JSX.IntrinsicElements['group'] & StageProps): React.JSX.Element;
26
- export {};
package/core/Stars.d.ts DELETED
@@ -1,24 +0,0 @@
1
- import { ReactThreeFiber } from '@react-three/fiber';
2
- import { Points, ShaderMaterial } from 'three';
3
- import { ForwardRefComponent } from '../helpers/ts-utils';
4
- type Props = {
5
- radius?: number;
6
- depth?: number;
7
- count?: number;
8
- factor?: number;
9
- saturation?: number;
10
- fade?: boolean;
11
- speed?: number;
12
- };
13
- declare class StarfieldMaterial extends ShaderMaterial {
14
- constructor();
15
- }
16
- declare global {
17
- namespace JSX {
18
- interface IntrinsicElements {
19
- starfieldMaterial: ReactThreeFiber.MaterialNode<StarfieldMaterial, []>;
20
- }
21
- }
22
- }
23
- export declare const Stars: ForwardRefComponent<Props, Points>;
24
- export {};
package/core/Stats.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- type Props = {
3
- showPanel?: number;
4
- className?: string;
5
- parent?: React.RefObject<HTMLElement>;
6
- };
7
- export declare function Stats({ showPanel, className, parent }: Props): null;
8
- export {};
package/core/StatsGl.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import Stats from 'stats-gl';
3
- type Props = Partial<Stats> & {
4
- showPanel?: number;
5
- className?: string;
6
- parent?: React.RefObject<HTMLElement>;
7
- };
8
- export declare function StatsGl({ className, parent, ...props }: Props): null;
9
- export {};
package/core/Svg.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { MeshBasicMaterialProps, MeshProps, Object3DProps } from '@react-three/fiber';
2
- import { Object3D } from 'three';
3
- import { ForwardRefComponent } from '../helpers/ts-utils';
4
- export interface SvgProps extends Omit<Object3DProps, 'ref'> {
5
- src: string;
6
- skipFill?: boolean;
7
- skipStrokes?: boolean;
8
- fillMaterial?: MeshBasicMaterialProps;
9
- strokeMaterial?: MeshBasicMaterialProps;
10
- fillMeshProps?: MeshProps;
11
- strokeMeshProps?: MeshProps;
12
- }
13
- export declare const Svg: ForwardRefComponent<SvgProps, Object3D>;
package/core/Text.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import * as React from 'react';
2
- import { ReactThreeFiber } from '@react-three/fiber';
3
- import { ForwardRefComponent } from '../helpers/ts-utils';
4
- type Props = JSX.IntrinsicElements['mesh'] & {
5
- children: React.ReactNode;
6
- characters?: string;
7
- color?: ReactThreeFiber.Color;
8
- fontSize?: number;
9
- fontWeight?: number | string;
10
- fontStyle?: 'italic' | 'normal';
11
- maxWidth?: number;
12
- lineHeight?: number;
13
- letterSpacing?: number;
14
- textAlign?: 'left' | 'right' | 'center' | 'justify';
15
- font?: string;
16
- anchorX?: number | 'left' | 'center' | 'right';
17
- anchorY?: number | 'top' | 'top-baseline' | 'middle' | 'bottom-baseline' | 'bottom';
18
- clipRect?: [number, number, number, number];
19
- depthOffset?: number;
20
- direction?: 'auto' | 'ltr' | 'rtl';
21
- overflowWrap?: 'normal' | 'break-word';
22
- whiteSpace?: 'normal' | 'overflowWrap' | 'nowrap';
23
- outlineWidth?: number | string;
24
- outlineOffsetX?: number | string;
25
- outlineOffsetY?: number | string;
26
- outlineBlur?: number | string;
27
- outlineColor?: ReactThreeFiber.Color;
28
- outlineOpacity?: number;
29
- strokeWidth?: number | string;
30
- strokeColor?: ReactThreeFiber.Color;
31
- strokeOpacity?: number;
32
- fillOpacity?: number;
33
- sdfGlyphSize?: number;
34
- debugSDF?: boolean;
35
- onSync?: (troika: any) => void;
36
- };
37
- export declare const Text: ForwardRefComponent<Props, any>;
38
- export {};
package/core/Text3D.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- import * as THREE from 'three';
3
- import { MeshProps, Node } from '@react-three/fiber';
4
- import { TextGeometryParameters } from 'three-stdlib';
5
- import { FontData } from './useFont';
6
- import { ForwardRefComponent } from '../helpers/ts-utils';
7
- declare global {
8
- namespace JSX {
9
- interface IntrinsicElements {
10
- renamedTextGeometry: Node<any, any>;
11
- }
12
- }
13
- }
14
- type Text3DProps = {
15
- font: FontData | string;
16
- bevelSegments?: number;
17
- smooth?: number;
18
- } & Omit<TextGeometryParameters, 'font'> & MeshProps;
19
- export declare const Text3D: ForwardRefComponent<React.PropsWithChildren<Text3DProps & {
20
- letterSpacing?: number;
21
- lineHeight?: number;
22
- }>, THREE.Mesh>;
23
- export {};
package/core/Texture.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- import { Texture as _Texture } from 'three';
3
- export declare const IsObject: (url: unknown) => url is Record<string, string>;
4
- type TextureArray<T> = T extends string[] ? _Texture[] : never;
5
- type TextureRecord<T> = T extends Record<string, string> ? {
6
- [key in keyof T]: _Texture;
7
- } : never;
8
- type SingleTexture<T> = T extends string ? _Texture : never;
9
- export type MappedTextureType<T extends string[] | string | Record<string, string>> = TextureArray<T> | TextureRecord<T> | SingleTexture<T>;
10
- export declare function useTexture<Url extends string[] | string | Record<string, string>>(input: Url, onLoad?: (texture: MappedTextureType<Url>) => void): MappedTextureType<Url>;
11
- export declare namespace useTexture {
12
- var preload: (url: string | string[]) => undefined;
13
- var clear: (input: string | string[]) => void;
14
- }
15
- export declare const Texture: ({ children, input, onLoad, }: {
16
- children?: (texture: ReturnType<typeof useTexture>) => React.ReactNode;
17
- input: Parameters<typeof useTexture>[0];
18
- onLoad?: Parameters<typeof useTexture>[1];
19
- }) => React.JSX.Element;
20
- export {};
@@ -1,15 +0,0 @@
1
- import { ReactThreeFiber } from '@react-three/fiber';
2
- import * as THREE from 'three';
3
- import { TrackballControls as TrackballControlsImpl } from 'three-stdlib';
4
- import { ForwardRefComponent } from '../helpers/ts-utils';
5
- export type TrackballControlsProps = ReactThreeFiber.Overwrite<ReactThreeFiber.Object3DNode<TrackballControlsImpl, typeof TrackballControlsImpl>, {
6
- target?: ReactThreeFiber.Vector3;
7
- camera?: THREE.Camera;
8
- domElement?: HTMLElement;
9
- regress?: boolean;
10
- makeDefault?: boolean;
11
- onChange?: (e?: THREE.Event) => void;
12
- onStart?: (e?: THREE.Event) => void;
13
- onEnd?: (e?: THREE.Event) => void;
14
- }>;
15
- export declare const TrackballControls: ForwardRefComponent<TrackballControlsProps, TrackballControlsImpl>;
package/core/Trail.d.ts DELETED
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { ColorRepresentation, Mesh, Object3D } from 'three';
3
- import { MeshLineGeometry as MeshLineGeometryImpl } from 'meshline';
4
- import { ForwardRefComponent } from '../helpers/ts-utils';
5
- type Settings = {
6
- width: number;
7
- length: number;
8
- decay: number;
9
- local: boolean;
10
- stride: number;
11
- interval: number;
12
- };
13
- type TrailProps = {
14
- color?: ColorRepresentation;
15
- attenuation?: (width: number) => number;
16
- target?: React.MutableRefObject<Object3D>;
17
- } & Partial<Settings>;
18
- export declare function useTrail(target: Object3D, settings: Partial<Settings>): React.MutableRefObject<Float32Array | undefined>;
19
- export type MeshLineGeometry = Mesh & MeshLineGeometryImpl;
20
- export declare const Trail: ForwardRefComponent<React.PropsWithChildren<TrailProps>, MeshLineGeometry>;
21
- export {};
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- import { Texture } from 'three';
3
- type TrailConfig = {
4
- size?: number;
5
- maxAge?: number;
6
- radius?: number;
7
- intensity?: number;
8
- interpolate?: number;
9
- smoothing?: number;
10
- minForce?: number;
11
- blend?: CanvasRenderingContext2D['globalCompositeOperation'];
12
- ease?: (t: number) => number;
13
- };
14
- export declare function useTrailTexture(config?: Partial<TrailConfig>): [Texture, (ThreeEvent: any) => void];
15
- export declare const TrailTexture: ({ children, ...config }: {
16
- children?: (texture: ReturnType<typeof useTrailTexture>) => React.ReactNode;
17
- } & TrailConfig) => React.JSX.Element;
18
- export {};
@@ -1,28 +0,0 @@
1
- import { ReactThreeFiber } from '@react-three/fiber';
2
- import * as React from 'react';
3
- import * as THREE from 'three';
4
- import { TransformControls as TransformControlsImpl } from 'three-stdlib';
5
- import { ForwardRefComponent } from '../helpers/ts-utils';
6
- export type TransformControlsProps = ReactThreeFiber.Object3DNode<TransformControlsImpl, typeof TransformControlsImpl> & JSX.IntrinsicElements['group'] & {
7
- object?: THREE.Object3D | React.MutableRefObject<THREE.Object3D>;
8
- enabled?: boolean;
9
- axis?: string | null;
10
- domElement?: HTMLElement;
11
- mode?: 'translate' | 'rotate' | 'scale';
12
- translationSnap?: number | null;
13
- rotationSnap?: number | null;
14
- scaleSnap?: number | null;
15
- space?: 'world' | 'local';
16
- size?: number;
17
- showX?: boolean;
18
- showY?: boolean;
19
- showZ?: boolean;
20
- children?: React.ReactElement<THREE.Object3D>;
21
- camera?: THREE.Camera;
22
- onChange?: (e?: THREE.Event) => void;
23
- onMouseDown?: (e?: THREE.Event) => void;
24
- onMouseUp?: (e?: THREE.Event) => void;
25
- onObjectChange?: (e?: THREE.Event) => void;
26
- makeDefault?: boolean;
27
- };
28
- export declare const TransformControls: ForwardRefComponent<TransformControlsProps, TransformControlsImpl>;
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import * as THREE from 'three';
3
- import type { HlsConfig } from 'hls.js';
4
- type Config = {
5
- unsuspend?: 'canplay' | 'canplaythrough' | 'loadstart' | 'loadedmetadata';
6
- start?: boolean;
7
- hls?: Partial<HlsConfig>;
8
- } & Partial<Omit<HTMLVideoElement, 'children'>>;
9
- export declare function useVideoTexture(src: string | MediaStream, { unsuspend, start, crossOrigin, muted, loop, hls, ...videoProps }?: Config): THREE.VideoTexture;
10
- export declare const VideoTexture: ({ children, src, ...config }: {
11
- children?: (texture: ReturnType<typeof useVideoTexture>) => React.ReactNode;
12
- src: Parameters<typeof useVideoTexture>[0];
13
- } & Parameters<typeof useVideoTexture>[1]) => React.JSX.Element;
14
- export {};
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import * as THREE from 'three';
3
- import { MaterialNode } from '@react-three/fiber';
4
- import { WireframeMaterialProps } from '../materials/WireframeMaterial';
5
- declare global {
6
- namespace JSX {
7
- interface IntrinsicElements {
8
- meshWireframeMaterial: MaterialNode<THREE.ShaderMaterial, WireframeMaterialProps>;
9
- }
10
- }
11
- }
12
- interface WireframeProps {
13
- geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
14
- simplify?: boolean;
15
- }
16
- export declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps): React.JSX.Element;
17
- export {};
@@ -1,3 +0,0 @@
1
- import { Size } from '@react-three/fiber';
2
- import * as THREE from 'three';
3
- export declare const calculateScaleFactor: (point3: THREE.Vector3, radiusPx: number, camera: THREE.Camera, size: Size) => number;
package/core/index.d.ts DELETED
@@ -1,122 +0,0 @@
1
- export * from './Billboard';
2
- export * from './ScreenSpace';
3
- export * from './ScreenSizer';
4
- export * from './QuadraticBezierLine';
5
- export * from './CubicBezierLine';
6
- export * from './CatmullRomLine';
7
- export * from './Line';
8
- export * from './PositionalAudio';
9
- export * from './Text';
10
- export * from './Text3D';
11
- export * from './Effects';
12
- export * from './GradientTexture';
13
- export * from './Image';
14
- export * from './Edges';
15
- export * from './Outlines';
16
- export * from './Trail';
17
- export * from './Sampler';
18
- export * from './ComputedAttribute';
19
- export * from './Clone';
20
- export * from './MarchingCubes';
21
- export * from './Decal';
22
- export * from './Svg';
23
- export * from './Gltf';
24
- export * from './AsciiRenderer';
25
- export * from './Splat';
26
- export * from './OrthographicCamera';
27
- export * from './PerspectiveCamera';
28
- export * from './CubeCamera';
29
- export * from './DeviceOrientationControls';
30
- export * from './FlyControls';
31
- export * from './MapControls';
32
- export * from './OrbitControls';
33
- export * from './TrackballControls';
34
- export * from './ArcballControls';
35
- export * from './TransformControls';
36
- export * from './PointerLockControls';
37
- export * from './FirstPersonControls';
38
- export * from './CameraControls';
39
- export * from './MotionPathControls';
40
- export * from './GizmoHelper';
41
- export * from './GizmoViewcube';
42
- export * from './GizmoViewport';
43
- export * from './Grid';
44
- export * from './CubeTexture';
45
- export * from './Fbx';
46
- export * from './Ktx2';
47
- export * from './Progress';
48
- export * from './Texture';
49
- export * from './VideoTexture';
50
- export * from './useFont';
51
- export * from './useSpriteLoader';
52
- export * from './Helper';
53
- export * from './Stats';
54
- export * from './StatsGl';
55
- export * from './useDepthBuffer';
56
- export * from './useAspect';
57
- export * from './useCamera';
58
- export * from './DetectGPU';
59
- export * from './Bvh';
60
- export * from './useContextBridge';
61
- export * from './useAnimations';
62
- export * from './Fbo';
63
- export * from './useIntersect';
64
- export * from './useBoxProjectedEnv';
65
- export * from './BBAnchor';
66
- export * from './TrailTexture';
67
- export * from './Example';
68
- export * from './SpriteAnimator';
69
- export * from './CurveModifier';
70
- export * from './MeshDistortMaterial';
71
- export * from './MeshWobbleMaterial';
72
- export * from './MeshReflectorMaterial';
73
- export * from './MeshRefractionMaterial';
74
- export * from './MeshTransmissionMaterial';
75
- export * from './MeshDiscardMaterial';
76
- export * from './PointMaterial';
77
- export * from './shaderMaterial';
78
- export * from './softShadows';
79
- export * from './shapes';
80
- export * from './RoundedBox';
81
- export * from './ScreenQuad';
82
- export * from './Center';
83
- export * from './Resize';
84
- export * from './Bounds';
85
- export * from './CameraShake';
86
- export * from './Float';
87
- export * from './Stage';
88
- export * from './Backdrop';
89
- export * from './Shadow';
90
- export * from './Caustics';
91
- export * from './ContactShadows';
92
- export * from './AccumulativeShadows';
93
- export * from './Reflector';
94
- export * from './SpotLight';
95
- export * from './Environment';
96
- export * from './Lightformer';
97
- export * from './Sky';
98
- export * from './Stars';
99
- export * from './Cloud';
100
- export * from './Sparkles';
101
- export * from './useEnvironment';
102
- export * from './MatcapTexture';
103
- export * from './NormalTexture';
104
- export * from './Wireframe';
105
- export * from './ShadowAlpha';
106
- export * from './Points';
107
- export * from './Instances';
108
- export * from './Segments';
109
- export * from './Detailed';
110
- export * from './Preload';
111
- export * from './BakeShadows';
112
- export * from './meshBounds';
113
- export * from './AdaptiveDpr';
114
- export * from './AdaptiveEvents';
115
- export * from './PerformanceMonitor';
116
- export * from './RenderTexture';
117
- export * from './RenderCubeTexture';
118
- export * from './Mask';
119
- export * from './Hud';
120
- export * from './Fisheye';
121
- export * from './MeshPortalMaterial';
122
- export * from './calculateScaleFactor';
@@ -1,2 +0,0 @@
1
- import { Raycaster, Intersection } from 'three';
2
- export declare function meshBounds(raycaster: Raycaster, intersects: Intersection[]): void;
@@ -1,7 +0,0 @@
1
- import * as THREE from 'three';
2
- import { MeshBVHUniformStruct } from 'three-mesh-bvh';
3
- export declare function shaderMaterial(uniforms: {
4
- [name: string]: THREE.CubeTexture | THREE.Texture | Int32Array | Float32Array | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 | THREE.Color | MeshBVHUniformStruct | number | boolean | Array<any> | null;
5
- }, vertexShader: string, fragmentShader: string, onInit?: (material?: THREE.ShaderMaterial) => void): typeof THREE.ShaderMaterial & {
6
- key: string;
7
- };
package/core/shapes.d.ts DELETED
@@ -1,25 +0,0 @@
1
- import * as THREE from 'three';
2
- import { ForwardRefComponent } from '../helpers/ts-utils';
3
- export type Args<T> = T extends new (...args: any) => any ? ConstructorParameters<T> : T;
4
- export type ShapeProps<T> = Omit<JSX.IntrinsicElements['mesh'], 'args'> & {
5
- args?: Args<T>;
6
- };
7
- export declare const Box: ForwardRefComponent<ShapeProps<typeof THREE.BoxGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
8
- export declare const Circle: ForwardRefComponent<ShapeProps<typeof THREE.CircleGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
9
- export declare const Cone: ForwardRefComponent<ShapeProps<typeof THREE.ConeGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
10
- export declare const Cylinder: ForwardRefComponent<ShapeProps<typeof THREE.CylinderGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
11
- export declare const Sphere: ForwardRefComponent<ShapeProps<typeof THREE.SphereGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
12
- export declare const Plane: ForwardRefComponent<ShapeProps<typeof THREE.PlaneGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
13
- export declare const Tube: ForwardRefComponent<ShapeProps<typeof THREE.TubeGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
14
- export declare const Torus: ForwardRefComponent<ShapeProps<typeof THREE.TorusGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
15
- export declare const TorusKnot: ForwardRefComponent<ShapeProps<typeof THREE.TorusKnotGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
16
- export declare const Tetrahedron: ForwardRefComponent<ShapeProps<typeof THREE.TetrahedronGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
17
- export declare const Ring: ForwardRefComponent<ShapeProps<typeof THREE.RingGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
18
- export declare const Polyhedron: ForwardRefComponent<ShapeProps<typeof THREE.PolyhedronGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
19
- export declare const Icosahedron: ForwardRefComponent<ShapeProps<typeof THREE.IcosahedronGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
20
- export declare const Octahedron: ForwardRefComponent<ShapeProps<typeof THREE.OctahedronGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
21
- export declare const Dodecahedron: ForwardRefComponent<ShapeProps<typeof THREE.DodecahedronGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
22
- export declare const Extrude: ForwardRefComponent<ShapeProps<typeof THREE.ExtrudeGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
23
- export declare const Lathe: ForwardRefComponent<ShapeProps<typeof THREE.LatheGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
24
- export declare const Capsule: ForwardRefComponent<ShapeProps<typeof THREE.CapsuleGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
25
- export declare const Shape: ForwardRefComponent<ShapeProps<typeof THREE.ShapeGeometry>, THREE.Mesh<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
@@ -1,7 +0,0 @@
1
- type SoftShadowsProps = {
2
- size?: number;
3
- samples?: number;
4
- focus?: number;
5
- };
6
- export declare function SoftShadows({ focus, samples, size }: SoftShadowsProps): null;
7
- export {};
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import { Object3D, AnimationClip, AnimationAction, AnimationMixer } from 'three';
3
- type Api<T extends AnimationClip> = {
4
- ref: React.MutableRefObject<Object3D | undefined | null>;
5
- clips: AnimationClip[];
6
- mixer: AnimationMixer;
7
- names: T['name'][];
8
- actions: {
9
- [key in T['name']]: AnimationAction | null;
10
- };
11
- };
12
- export declare function useAnimations<T extends AnimationClip>(clips: T[], root?: React.MutableRefObject<Object3D | undefined | null> | Object3D): Api<T>;
13
- export {};
@@ -1 +0,0 @@
1
- export declare function useAspect(width: number, height: number, factor?: number): [number, number, number];
@@ -1,19 +0,0 @@
1
- import * as THREE from 'three';
2
- import * as React from 'react';
3
- import { ReactThreeFiber } from '@react-three/fiber';
4
- interface MaterialShader {
5
- vertexShader: string;
6
- fragmentShader: string;
7
- defines: {
8
- [define: string]: string | number | boolean;
9
- } | undefined;
10
- uniforms: {
11
- [uniform: string]: THREE.IUniform;
12
- };
13
- }
14
- export declare function useBoxProjectedEnv(position?: ReactThreeFiber.Vector3, size?: ReactThreeFiber.Vector3): {
15
- ref: React.MutableRefObject<THREE.Material>;
16
- onBeforeCompile: (shader: MaterialShader) => void;
17
- customProgramCacheKey: () => string;
18
- };
19
- export {};
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { Raycaster, Camera, Intersection } from 'three';
3
- export declare function useCamera(camera: Camera | React.MutableRefObject<Camera>, props?: Partial<Raycaster>): (_: Raycaster, intersects: Intersection[]) => void;
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- export declare function useContextBridge(...contexts: Array<React.Context<any>>): ({ children }: {
3
- children: React.ReactNode;
4
- }) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import { DepthTexture } from 'three';
2
- declare function useDepthBuffer({ size, frames }?: {
3
- size?: number;
4
- frames?: number;
5
- }): DepthTexture;
6
- export { useDepthBuffer };
@@ -1,11 +0,0 @@
1
- import { Texture, Loader } from 'three';
2
- import { PresetsType } from '../helpers/environment-assets';
3
- import { TextureEncoding } from '../helpers/deprecated';
4
- export type EnvironmentLoaderProps = {
5
- files?: string | string[];
6
- path?: string;
7
- preset?: PresetsType;
8
- extensions?: (loader: Loader) => void;
9
- encoding?: TextureEncoding;
10
- };
11
- export declare function useEnvironment({ files, path, preset, encoding, extensions, }?: Partial<EnvironmentLoaderProps>): Texture;
package/core/useFont.d.ts DELETED
@@ -1,24 +0,0 @@
1
- export type Glyph = {
2
- _cachedOutline: string[];
3
- ha: number;
4
- o: string;
5
- };
6
- export type FontData = {
7
- boundingBox: {
8
- yMax: number;
9
- yMin: number;
10
- };
11
- familyName: string;
12
- glyphs: {
13
- [k: string]: Glyph;
14
- };
15
- resolution: number;
16
- underlineThickness: number;
17
- };
18
- type FontInput = string | FontData;
19
- export declare function useFont(font: FontInput): import("three-stdlib").Font;
20
- export declare namespace useFont {
21
- var preload: (font: FontInput) => undefined;
22
- var clear: (font: FontInput) => void;
23
- }
24
- export {};
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { Object3D } from 'three';
3
- export declare function useIntersect<T extends Object3D>(onChange: (visible: boolean) => void): React.MutableRefObject<T>;
@@ -1,10 +0,0 @@
1
- import { Texture } from 'three';
2
- import * as THREE from 'three';
3
- export declare const getFirstItem: (param: any) => any;
4
- export declare const checkIfFrameIsEmpty: (frameData: Uint8ClampedArray) => boolean;
5
- export declare const calculateAspectRatio: (width: number, height: number, factor: number, v: any) => THREE.Vector3;
6
- export declare function useSpriteLoader<Url extends string>(input?: Url | null, json?: string | null, animationNames?: string[] | null, numberOfFrames?: number | null, onLoad?: (texture: Texture, textureData?: any) => void): any;
7
- export declare namespace useSpriteLoader {
8
- var preload: (url: string) => undefined;
9
- var clear: (input: string) => void;
10
- }
@@ -1 +0,0 @@
1
- export declare const version: number;
@@ -1,8 +0,0 @@
1
- import * as THREE from 'three';
2
- export declare const setUpdateRange: (attribute: THREE.BufferAttribute, updateRange: {
3
- offset: number;
4
- count: number;
5
- }) => void;
6
- export declare const LinearEncoding = 3000;
7
- export declare const sRGBEncoding = 3001;
8
- export type TextureEncoding = typeof LinearEncoding | typeof sRGBEncoding;
@@ -1,13 +0,0 @@
1
- export declare const presetsObj: {
2
- apartment: string;
3
- city: string;
4
- dawn: string;
5
- forest: string;
6
- lobby: string;
7
- night: string;
8
- park: string;
9
- studio: string;
10
- sunset: string;
11
- warehouse: string;
12
- };
13
- export type PresetsType = keyof typeof presetsObj;
@@ -1,3 +0,0 @@
1
- import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
2
- export type NamedArrayTuple<T extends (...args: any) => any> = Parameters<T>;
3
- export type ForwardRefComponent<P, T> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- type RefType<T> = React.MutableRefObject<T> | ((state: T) => void);
3
- export declare function useEffectfulState<T>(fn: () => T, deps?: React.DependencyList, cb?: RefType<T>): T | undefined;
4
- export {};
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './web';