@react-three/drei 9.109.3 → 9.109.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.
Files changed (161) hide show
  1. package/core/AccumulativeShadows.d.ts +61 -0
  2. package/core/AdaptiveDpr.d.ts +3 -0
  3. package/core/AdaptiveEvents.d.ts +1 -0
  4. package/core/ArcballControls.d.ts +15 -0
  5. package/core/AsciiRenderer.d.ts +12 -0
  6. package/core/BBAnchor.d.ts +7 -0
  7. package/core/Backdrop.d.ts +14 -0
  8. package/core/BakeShadows.d.ts +1 -0
  9. package/core/Billboard.cjs.js +1 -1
  10. package/core/Billboard.d.ts +9 -0
  11. package/core/Billboard.js +1 -3
  12. package/core/Bounds.d.ts +35 -0
  13. package/core/Bvh.d.ts +18 -0
  14. package/core/CameraControls.d.ts +22 -0
  15. package/core/CameraShake.d.ts +17 -0
  16. package/core/CatmullRomLine.d.ts +11 -0
  17. package/core/Caustics.d.ts +35 -0
  18. package/core/Center.d.ts +31 -0
  19. package/core/Clone.d.ts +15 -0
  20. package/core/Cloud.d.ts +59 -0
  21. package/core/ComputedAttribute.d.ts +9 -0
  22. package/core/ContactShadows.d.ts +17 -0
  23. package/core/CubeCamera.d.ts +21 -0
  24. package/core/CubeTexture.d.ts +15 -0
  25. package/core/CubicBezierLine.d.ts +13 -0
  26. package/core/CurveModifier.d.ts +10 -0
  27. package/core/Decal.d.ts +16 -0
  28. package/core/Detailed.d.ts +10 -0
  29. package/core/DetectGPU.d.ts +8 -0
  30. package/core/DeviceOrientationControls.d.ts +10 -0
  31. package/core/Edges.d.ts +13 -0
  32. package/core/Effects.d.ts +29 -0
  33. package/core/Environment.d.ts +39 -0
  34. package/core/Example.d.ts +13 -0
  35. package/core/Fbo.d.ts +28 -0
  36. package/core/Fbx.d.ts +11 -0
  37. package/core/FirstPersonControls.d.ts +8 -0
  38. package/core/Fisheye.d.ts +9 -0
  39. package/core/Float.d.ts +13 -0
  40. package/core/FlyControls.d.ts +10 -0
  41. package/core/GizmoHelper.d.ts +15 -0
  42. package/core/GizmoViewcube.d.ts +14 -0
  43. package/core/GizmoViewport.d.ts +16 -0
  44. package/core/Gltf.d.ts +20 -0
  45. package/core/GradientTexture.d.ts +18 -0
  46. package/core/Grid.d.ts +27 -0
  47. package/core/Helper.d.ts +16 -0
  48. package/core/Hud.d.ts +7 -0
  49. package/core/Image.d.ts +40 -0
  50. package/core/Instances.d.ts +43 -0
  51. package/core/Ktx2.d.ts +14 -0
  52. package/core/Lightformer.d.ts +14 -0
  53. package/core/Line.d.ts +13 -0
  54. package/core/MapControls.d.ts +14 -0
  55. package/core/MarchingCubes.d.ts +24 -0
  56. package/core/Mask.d.ts +17 -0
  57. package/core/MatcapTexture.d.ts +9 -0
  58. package/core/MeshDiscardMaterial.d.ts +11 -0
  59. package/core/MeshDistortMaterial.d.ts +41 -0
  60. package/core/MeshPortalMaterial.d.ts +28 -0
  61. package/core/MeshReflectorMaterial.d.ts +27 -0
  62. package/core/MeshRefractionMaterial.d.ts +22 -0
  63. package/core/MeshTransmissionMaterial.d.ts +35 -0
  64. package/core/MeshWobbleMaterial.d.ts +38 -0
  65. package/core/MotionPathControls.d.ts +27 -0
  66. package/core/NormalTexture.d.ts +14 -0
  67. package/core/OrbitControls.d.ts +22 -0
  68. package/core/OrthographicCamera.d.ts +14 -0
  69. package/core/Outlines.d.ts +16 -0
  70. package/core/PerformanceMonitor.d.ts +36 -0
  71. package/core/PerspectiveCamera.d.ts +14 -0
  72. package/core/PointMaterial.d.ts +16 -0
  73. package/core/PointerLockControls.d.ts +15 -0
  74. package/core/Points.d.ts +34 -0
  75. package/core/PositionalAudio.d.ts +9 -0
  76. package/core/Preload.d.ts +8 -0
  77. package/core/Progress.d.ts +14 -0
  78. package/core/QuadraticBezierLine.d.ts +16 -0
  79. package/core/Reflector.d.ts +30 -0
  80. package/core/RenderCubeTexture.d.ts +30 -0
  81. package/core/RenderTexture.d.ts +18 -0
  82. package/core/Resize.d.ts +10 -0
  83. package/core/RoundedBox.d.ts +12 -0
  84. package/core/Sampler.d.ts +28 -0
  85. package/core/ScreenQuad.d.ts +5 -0
  86. package/core/ScreenSizer.d.ts +7 -0
  87. package/core/ScreenSpace.d.ts +6 -0
  88. package/core/Segments.d.ts +31 -0
  89. package/core/Shadow.d.ts +12 -0
  90. package/core/ShadowAlpha.d.ts +8 -0
  91. package/core/Sky.d.ts +17 -0
  92. package/core/Sparkles.d.ts +21 -0
  93. package/core/Splat.d.ts +58 -0
  94. package/core/SpotLight.d.ts +26 -0
  95. package/core/SpriteAnimator.d.ts +38 -0
  96. package/core/Stage.d.ts +26 -0
  97. package/core/Stars.d.ts +24 -0
  98. package/core/Stats.d.ts +8 -0
  99. package/core/StatsGl.d.ts +9 -0
  100. package/core/Svg.d.ts +13 -0
  101. package/core/Text.d.ts +38 -0
  102. package/core/Text3D.d.ts +23 -0
  103. package/core/Texture.d.ts +20 -0
  104. package/core/TrackballControls.d.ts +15 -0
  105. package/core/Trail.d.ts +21 -0
  106. package/core/TrailTexture.d.ts +18 -0
  107. package/core/TransformControls.d.ts +28 -0
  108. package/core/VideoTexture.d.ts +14 -0
  109. package/core/Wireframe.d.ts +17 -0
  110. package/core/calculateScaleFactor.d.ts +3 -0
  111. package/core/index.d.ts +122 -0
  112. package/core/meshBounds.d.ts +2 -0
  113. package/core/shaderMaterial.d.ts +7 -0
  114. package/core/shapes.d.ts +25 -0
  115. package/core/softShadows.d.ts +7 -0
  116. package/core/useAnimations.d.ts +13 -0
  117. package/core/useAspect.d.ts +1 -0
  118. package/core/useBoxProjectedEnv.d.ts +19 -0
  119. package/core/useCamera.d.ts +3 -0
  120. package/core/useContextBridge.d.ts +4 -0
  121. package/core/useDepthBuffer.d.ts +6 -0
  122. package/core/useEnvironment.d.ts +11 -0
  123. package/core/useFont.d.ts +24 -0
  124. package/core/useIntersect.d.ts +3 -0
  125. package/core/useSpriteLoader.d.ts +10 -0
  126. package/helpers/constants.d.ts +1 -0
  127. package/helpers/deprecated.d.ts +8 -0
  128. package/helpers/environment-assets.d.ts +13 -0
  129. package/helpers/ts-utils.d.ts +3 -0
  130. package/helpers/useEffectfulState.d.ts +4 -0
  131. package/index.cjs.js +1 -1
  132. package/index.d.ts +1 -0
  133. package/materials/BlurPass.d.ts +23 -0
  134. package/materials/ConvolutionMaterial.d.ts +7 -0
  135. package/materials/DiscardMaterial.d.ts +3 -0
  136. package/materials/MeshReflectorMaterial.d.ts +66 -0
  137. package/materials/MeshRefractionMaterial.d.ts +7 -0
  138. package/materials/SpotLightMaterial.d.ts +4 -0
  139. package/materials/WireframeMaterial.d.ts +48 -0
  140. package/native/index.d.ts +1 -0
  141. package/package.json +1 -1
  142. package/web/CycleRaycast.d.ts +10 -0
  143. package/web/DragControls.d.ts +17 -0
  144. package/web/FaceControls.d.ts +42 -0
  145. package/web/FaceLandmarker.d.ts +15 -0
  146. package/web/Facemesh.d.ts +150 -0
  147. package/web/Html.d.ts +34 -0
  148. package/web/KeyboardControls.d.ts +37 -0
  149. package/web/Loader.d.ts +12 -0
  150. package/web/PresentationControls.d.ts +17 -0
  151. package/web/ScrollControls.d.ts +45 -0
  152. package/web/Select.d.ts +14 -0
  153. package/web/View.d.ts +36 -0
  154. package/web/index.d.ts +15 -0
  155. package/web/pivotControls/AxisArrow.d.ts +7 -0
  156. package/web/pivotControls/AxisRotator.d.ts +7 -0
  157. package/web/pivotControls/PlaneSlider.d.ts +7 -0
  158. package/web/pivotControls/ScalingSphere.d.ts +7 -0
  159. package/web/pivotControls/context.d.ts +32 -0
  160. package/web/pivotControls/index.d.ts +39 -0
  161. package/web/useCursor.d.ts +1 -0
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as THREE from 'three';
3
+ export declare const calculateOffset: (clickPoint: THREE.Vector3, normal: THREE.Vector3, rayStart: THREE.Vector3, rayDir: THREE.Vector3) => number;
4
+ export declare const ScalingSphere: React.FC<{
5
+ direction: THREE.Vector3;
6
+ axis: 0 | 1 | 2;
7
+ }>;
@@ -0,0 +1,32 @@
1
+ import * as THREE from 'three';
2
+ import * as React from 'react';
3
+ export type OnDragStartProps = {
4
+ component: 'Arrow' | 'Slider' | 'Rotator' | 'Sphere';
5
+ axis: 0 | 1 | 2;
6
+ origin: THREE.Vector3;
7
+ directions: THREE.Vector3[];
8
+ };
9
+ export type PivotContext = {
10
+ onDragStart: (props: OnDragStartProps) => void;
11
+ onDrag: (mdW: THREE.Matrix4) => void;
12
+ onDragEnd: () => void;
13
+ translation: {
14
+ current: [number, number, number];
15
+ };
16
+ translationLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
17
+ rotationLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
18
+ scaleLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
19
+ axisColors: [string | number, string | number, string | number];
20
+ hoveredColor: string | number;
21
+ opacity: number;
22
+ scale: number;
23
+ lineWidth: number;
24
+ fixed: boolean;
25
+ depthTest: boolean;
26
+ userData?: {
27
+ [key: string]: any;
28
+ };
29
+ annotations?: boolean;
30
+ annotationsClass?: string;
31
+ };
32
+ export declare const context: React.Context<PivotContext>;
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import * as THREE from 'three';
3
+ import { ForwardRefComponent } from '../../helpers/ts-utils';
4
+ import { OnDragStartProps } from './context';
5
+ type PivotControlsProps = {
6
+ enabled?: boolean;
7
+ scale?: number;
8
+ lineWidth?: number;
9
+ fixed?: boolean;
10
+ offset?: [number, number, number];
11
+ rotation?: [number, number, number];
12
+ matrix?: THREE.Matrix4;
13
+ anchor?: [number, number, number];
14
+ autoTransform?: boolean;
15
+ activeAxes?: [boolean, boolean, boolean];
16
+ disableAxes?: boolean;
17
+ disableSliders?: boolean;
18
+ disableRotations?: boolean;
19
+ disableScaling?: boolean;
20
+ translationLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
21
+ rotationLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
22
+ scaleLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
23
+ axisColors?: [string | number, string | number, string | number];
24
+ hoveredColor?: string | number;
25
+ annotations?: boolean;
26
+ annotationsClass?: string;
27
+ onDragStart?: (props: OnDragStartProps) => void;
28
+ onDrag?: (l: THREE.Matrix4, deltaL: THREE.Matrix4, w: THREE.Matrix4, deltaW: THREE.Matrix4) => void;
29
+ onDragEnd?: () => void;
30
+ depthTest?: boolean;
31
+ opacity?: number;
32
+ visible?: boolean;
33
+ userData?: {
34
+ [key: string]: any;
35
+ };
36
+ children?: React.ReactNode;
37
+ };
38
+ export declare const PivotControls: ForwardRefComponent<PivotControlsProps, THREE.Group>;
39
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useCursor(hovered: boolean, onPointerOver?: string, onPointerOut?: string, container?: HTMLElement): void;