@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.
- package/README.md +7 -0
- package/core/Svg.cjs.js +1 -1
- package/core/Svg.js +7 -2
- package/index.cjs.js +1 -1
- package/package.json +3 -2
- package/core/AccumulativeShadows.d.ts +0 -61
- package/core/AdaptiveDpr.d.ts +0 -3
- package/core/AdaptiveEvents.d.ts +0 -1
- package/core/ArcballControls.d.ts +0 -15
- package/core/AsciiRenderer.d.ts +0 -12
- package/core/BBAnchor.d.ts +0 -7
- package/core/Backdrop.d.ts +0 -14
- package/core/BakeShadows.d.ts +0 -1
- package/core/Billboard.d.ts +0 -9
- package/core/Bounds.d.ts +0 -35
- package/core/Bvh.d.ts +0 -18
- package/core/CameraControls.d.ts +0 -22
- package/core/CameraShake.d.ts +0 -17
- package/core/CatmullRomLine.d.ts +0 -11
- package/core/Caustics.d.ts +0 -35
- package/core/Center.d.ts +0 -31
- package/core/Clone.d.ts +0 -15
- package/core/Cloud.d.ts +0 -59
- package/core/ComputedAttribute.d.ts +0 -9
- package/core/ContactShadows.d.ts +0 -17
- package/core/CubeCamera.d.ts +0 -21
- package/core/CubeTexture.d.ts +0 -15
- package/core/CubicBezierLine.d.ts +0 -13
- package/core/CurveModifier.d.ts +0 -10
- package/core/Decal.d.ts +0 -16
- package/core/Detailed.d.ts +0 -10
- package/core/DetectGPU.d.ts +0 -8
- package/core/DeviceOrientationControls.d.ts +0 -10
- package/core/Edges.d.ts +0 -13
- package/core/Effects.d.ts +0 -29
- package/core/Environment.d.ts +0 -39
- package/core/Example.d.ts +0 -13
- package/core/Fbo.d.ts +0 -28
- package/core/Fbx.d.ts +0 -11
- package/core/FirstPersonControls.d.ts +0 -8
- package/core/Fisheye.d.ts +0 -9
- package/core/Float.d.ts +0 -13
- package/core/FlyControls.d.ts +0 -10
- package/core/GizmoHelper.d.ts +0 -15
- package/core/GizmoViewcube.d.ts +0 -14
- package/core/GizmoViewport.d.ts +0 -16
- package/core/Gltf.d.ts +0 -20
- package/core/GradientTexture.d.ts +0 -18
- package/core/Grid.d.ts +0 -27
- package/core/Helper.d.ts +0 -16
- package/core/Hud.d.ts +0 -7
- package/core/Image.d.ts +0 -40
- package/core/Instances.d.ts +0 -43
- package/core/Ktx2.d.ts +0 -14
- package/core/Lightformer.d.ts +0 -14
- package/core/Line.d.ts +0 -13
- package/core/MapControls.d.ts +0 -14
- package/core/MarchingCubes.d.ts +0 -24
- package/core/Mask.d.ts +0 -17
- package/core/MatcapTexture.d.ts +0 -9
- package/core/MeshDiscardMaterial.d.ts +0 -11
- package/core/MeshDistortMaterial.d.ts +0 -41
- package/core/MeshPortalMaterial.d.ts +0 -28
- package/core/MeshReflectorMaterial.d.ts +0 -27
- package/core/MeshRefractionMaterial.d.ts +0 -22
- package/core/MeshTransmissionMaterial.d.ts +0 -35
- package/core/MeshWobbleMaterial.d.ts +0 -38
- package/core/MotionPathControls.d.ts +0 -27
- package/core/NormalTexture.d.ts +0 -14
- package/core/OrbitControls.d.ts +0 -22
- package/core/OrthographicCamera.d.ts +0 -14
- package/core/Outlines.d.ts +0 -16
- package/core/PerformanceMonitor.d.ts +0 -36
- package/core/PerspectiveCamera.d.ts +0 -14
- package/core/PointMaterial.d.ts +0 -16
- package/core/PointerLockControls.d.ts +0 -15
- package/core/Points.d.ts +0 -34
- package/core/PositionalAudio.d.ts +0 -9
- package/core/Preload.d.ts +0 -8
- package/core/Progress.d.ts +0 -14
- package/core/QuadraticBezierLine.d.ts +0 -16
- package/core/Reflector.d.ts +0 -30
- package/core/RenderCubeTexture.d.ts +0 -30
- package/core/RenderTexture.d.ts +0 -18
- package/core/Resize.d.ts +0 -10
- package/core/RoundedBox.d.ts +0 -12
- package/core/Sampler.d.ts +0 -28
- package/core/ScreenQuad.d.ts +0 -5
- package/core/ScreenSizer.d.ts +0 -7
- package/core/ScreenSpace.d.ts +0 -6
- package/core/Segments.d.ts +0 -31
- package/core/Shadow.d.ts +0 -12
- package/core/ShadowAlpha.d.ts +0 -8
- package/core/Sky.d.ts +0 -17
- package/core/Sparkles.d.ts +0 -21
- package/core/Splat.d.ts +0 -58
- package/core/SpotLight.d.ts +0 -26
- package/core/SpriteAnimator.d.ts +0 -38
- package/core/Stage.d.ts +0 -26
- package/core/Stars.d.ts +0 -24
- package/core/Stats.d.ts +0 -8
- package/core/StatsGl.d.ts +0 -9
- package/core/Svg.d.ts +0 -13
- package/core/Text.d.ts +0 -38
- package/core/Text3D.d.ts +0 -23
- package/core/Texture.d.ts +0 -20
- package/core/TrackballControls.d.ts +0 -15
- package/core/Trail.d.ts +0 -21
- package/core/TrailTexture.d.ts +0 -18
- package/core/TransformControls.d.ts +0 -28
- package/core/VideoTexture.d.ts +0 -14
- package/core/Wireframe.d.ts +0 -17
- package/core/calculateScaleFactor.d.ts +0 -3
- package/core/index.d.ts +0 -122
- package/core/meshBounds.d.ts +0 -2
- package/core/shaderMaterial.d.ts +0 -7
- package/core/shapes.d.ts +0 -25
- package/core/softShadows.d.ts +0 -7
- package/core/useAnimations.d.ts +0 -13
- package/core/useAspect.d.ts +0 -1
- package/core/useBoxProjectedEnv.d.ts +0 -19
- package/core/useCamera.d.ts +0 -3
- package/core/useContextBridge.d.ts +0 -4
- package/core/useDepthBuffer.d.ts +0 -6
- package/core/useEnvironment.d.ts +0 -11
- package/core/useFont.d.ts +0 -24
- package/core/useIntersect.d.ts +0 -3
- package/core/useSpriteLoader.d.ts +0 -10
- package/helpers/constants.d.ts +0 -1
- package/helpers/deprecated.d.ts +0 -8
- package/helpers/environment-assets.d.ts +0 -13
- package/helpers/ts-utils.d.ts +0 -3
- package/helpers/useEffectfulState.d.ts +0 -4
- package/index.d.ts +0 -1
- package/materials/BlurPass.d.ts +0 -23
- package/materials/ConvolutionMaterial.d.ts +0 -7
- package/materials/DiscardMaterial.d.ts +0 -3
- package/materials/MeshReflectorMaterial.d.ts +0 -66
- package/materials/MeshRefractionMaterial.d.ts +0 -7
- package/materials/SpotLightMaterial.d.ts +0 -4
- package/materials/WireframeMaterial.d.ts +0 -48
- package/native/index.d.ts +0 -1
- package/web/CycleRaycast.d.ts +0 -10
- package/web/DragControls.d.ts +0 -17
- package/web/FaceControls.d.ts +0 -42
- package/web/FaceLandmarker.d.ts +0 -15
- package/web/Facemesh.d.ts +0 -150
- package/web/Html.d.ts +0 -34
- package/web/KeyboardControls.d.ts +0 -37
- package/web/Loader.d.ts +0 -12
- package/web/PresentationControls.d.ts +0 -17
- package/web/ScrollControls.d.ts +0 -45
- package/web/Select.d.ts +0 -14
- package/web/View.d.ts +0 -36
- package/web/index.d.ts +0 -15
- package/web/pivotControls/AxisArrow.d.ts +0 -7
- package/web/pivotControls/AxisRotator.d.ts +0 -7
- package/web/pivotControls/PlaneSlider.d.ts +0 -7
- package/web/pivotControls/ScalingSphere.d.ts +0 -7
- package/web/pivotControls/context.d.ts +0 -32
- package/web/pivotControls/index.d.ts +0 -39
- package/web/useCursor.d.ts +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
type MotionPathProps = JSX.IntrinsicElements['group'] & {
|
|
4
|
-
curves?: THREE.Curve<THREE.Vector3>[];
|
|
5
|
-
debug?: boolean;
|
|
6
|
-
object?: React.MutableRefObject<THREE.Object3D>;
|
|
7
|
-
focus?: [x: number, y: number, z: number] | React.MutableRefObject<THREE.Object3D>;
|
|
8
|
-
offset?: number;
|
|
9
|
-
smooth?: boolean | number;
|
|
10
|
-
eps?: number;
|
|
11
|
-
damping?: number;
|
|
12
|
-
focusDamping?: number;
|
|
13
|
-
maxSpeed?: number;
|
|
14
|
-
};
|
|
15
|
-
type MotionState = {
|
|
16
|
-
current: number;
|
|
17
|
-
path: THREE.CurvePath<THREE.Vector3>;
|
|
18
|
-
focus: React.MutableRefObject<THREE.Object3D> | [x: number, y: number, z: number] | undefined;
|
|
19
|
-
object: React.MutableRefObject<THREE.Object3D>;
|
|
20
|
-
offset: number;
|
|
21
|
-
point: THREE.Vector3;
|
|
22
|
-
tangent: THREE.Vector3;
|
|
23
|
-
next: THREE.Vector3;
|
|
24
|
-
};
|
|
25
|
-
export declare function useMotion(): MotionState;
|
|
26
|
-
export declare const MotionPathControls: React.ForwardRefExoticComponent<Omit<MotionPathProps, "ref"> & React.RefAttributes<THREE.Group>>;
|
|
27
|
-
export {};
|
package/core/NormalTexture.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Texture } from 'three';
|
|
3
|
-
type Settings = {
|
|
4
|
-
repeat?: number[];
|
|
5
|
-
anisotropy?: number;
|
|
6
|
-
offset?: number[];
|
|
7
|
-
};
|
|
8
|
-
export declare function useNormalTexture(id?: number, settings?: Settings, onLoad?: (texture: Texture | Texture[]) => void): [Texture, string, number];
|
|
9
|
-
export declare const NormalTexture: ({ children, id, onLoad, ...settings }: {
|
|
10
|
-
children?: (texture: ReturnType<typeof useNormalTexture>) => React.ReactNode;
|
|
11
|
-
id?: Parameters<typeof useNormalTexture>[0];
|
|
12
|
-
onLoad?: Parameters<typeof useNormalTexture>[2];
|
|
13
|
-
} & Settings) => React.JSX.Element;
|
|
14
|
-
export {};
|
package/core/OrbitControls.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import type { Camera, Event } from 'three';
|
|
3
|
-
import { OrbitControls as OrbitControlsImpl } from 'three-stdlib';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
export type OrbitControlsChangeEvent = Event & {
|
|
6
|
-
target: EventTarget & {
|
|
7
|
-
object: Camera;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type OrbitControlsProps = Omit<ReactThreeFiber.Overwrite<ReactThreeFiber.Object3DNode<OrbitControlsImpl, typeof OrbitControlsImpl>, {
|
|
11
|
-
camera?: Camera;
|
|
12
|
-
domElement?: HTMLElement;
|
|
13
|
-
enableDamping?: boolean;
|
|
14
|
-
makeDefault?: boolean;
|
|
15
|
-
onChange?: (e?: OrbitControlsChangeEvent) => void;
|
|
16
|
-
onEnd?: (e?: Event) => void;
|
|
17
|
-
onStart?: (e?: Event) => void;
|
|
18
|
-
regress?: boolean;
|
|
19
|
-
target?: ReactThreeFiber.Vector3;
|
|
20
|
-
keyEvents?: boolean | HTMLElement;
|
|
21
|
-
}>, 'ref'>;
|
|
22
|
-
export declare const OrbitControls: ForwardRefComponent<OrbitControlsProps, OrbitControlsImpl>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { OrthographicCamera as OrthographicCameraImpl } from 'three';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
type Props = Omit<JSX.IntrinsicElements['orthographicCamera'], 'children'> & {
|
|
6
|
-
makeDefault?: boolean;
|
|
7
|
-
manual?: boolean;
|
|
8
|
-
children?: React.ReactNode | ((texture: THREE.Texture) => React.ReactNode);
|
|
9
|
-
frames?: number;
|
|
10
|
-
resolution?: number;
|
|
11
|
-
envMap?: THREE.Texture;
|
|
12
|
-
};
|
|
13
|
-
export declare const OrthographicCamera: ForwardRefComponent<Props, OrthographicCameraImpl>;
|
|
14
|
-
export {};
|
package/core/Outlines.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ReactThreeFiber } from '@react-three/fiber';
|
|
3
|
-
type OutlinesProps = JSX.IntrinsicElements['group'] & {
|
|
4
|
-
color?: ReactThreeFiber.Color;
|
|
5
|
-
screenspace?: boolean;
|
|
6
|
-
opacity?: number;
|
|
7
|
-
transparent?: boolean;
|
|
8
|
-
thickness?: number;
|
|
9
|
-
angle?: number;
|
|
10
|
-
toneMapped?: boolean;
|
|
11
|
-
polygonOffset?: boolean;
|
|
12
|
-
polygonOffsetFactor?: number;
|
|
13
|
-
renderOrder?: number;
|
|
14
|
-
};
|
|
15
|
-
export declare function Outlines({ color, opacity, transparent, screenspace, toneMapped, polygonOffset, polygonOffsetFactor, renderOrder, thickness, angle, ...props }: OutlinesProps): React.JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type PerformanceMonitorHookApi = {
|
|
3
|
-
onIncline: (api: PerformanceMonitorApi) => void;
|
|
4
|
-
onDecline: (api: PerformanceMonitorApi) => void;
|
|
5
|
-
onChange: (api: PerformanceMonitorApi) => void;
|
|
6
|
-
onFallback: (api: PerformanceMonitorApi) => void;
|
|
7
|
-
};
|
|
8
|
-
export type PerformanceMonitorApi = {
|
|
9
|
-
fps: number;
|
|
10
|
-
factor: number;
|
|
11
|
-
refreshrate: number;
|
|
12
|
-
frames: number[];
|
|
13
|
-
averages: number[];
|
|
14
|
-
index: number;
|
|
15
|
-
flipped: number;
|
|
16
|
-
fallback: boolean;
|
|
17
|
-
subscriptions: Map<Symbol, Partial<PerformanceMonitorHookApi>>;
|
|
18
|
-
subscribe: (ref: React.MutableRefObject<Partial<PerformanceMonitorHookApi>>) => () => void;
|
|
19
|
-
};
|
|
20
|
-
type PerformanceMonitorProps = {
|
|
21
|
-
ms?: number;
|
|
22
|
-
iterations?: number;
|
|
23
|
-
threshold?: number;
|
|
24
|
-
bounds?: (refreshrate: number) => [lower: number, upper: number];
|
|
25
|
-
flipflops?: number;
|
|
26
|
-
factor?: number;
|
|
27
|
-
step?: number;
|
|
28
|
-
onIncline?: (api: PerformanceMonitorApi) => void;
|
|
29
|
-
onDecline?: (api: PerformanceMonitorApi) => void;
|
|
30
|
-
onChange?: (api: PerformanceMonitorApi) => void;
|
|
31
|
-
onFallback?: (api: PerformanceMonitorApi) => void;
|
|
32
|
-
children?: React.ReactNode;
|
|
33
|
-
};
|
|
34
|
-
export declare function PerformanceMonitor({ iterations, ms, threshold, step, factor: _factor, flipflops, bounds, onIncline, onDecline, onChange, onFallback, children, }: PerformanceMonitorProps): React.JSX.Element;
|
|
35
|
-
export declare function usePerformanceMonitor({ onIncline, onDecline, onChange, onFallback, }: Partial<PerformanceMonitorHookApi>): void;
|
|
36
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { PerspectiveCamera as PerspectiveCameraImpl } from 'three';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
type Props = Omit<JSX.IntrinsicElements['perspectiveCamera'], 'children'> & {
|
|
6
|
-
makeDefault?: boolean;
|
|
7
|
-
manual?: boolean;
|
|
8
|
-
children?: React.ReactNode | ((texture: THREE.Texture) => React.ReactNode);
|
|
9
|
-
frames?: number;
|
|
10
|
-
resolution?: number;
|
|
11
|
-
envMap?: THREE.Texture;
|
|
12
|
-
};
|
|
13
|
-
export declare const PerspectiveCamera: ForwardRefComponent<Props, PerspectiveCameraImpl>;
|
|
14
|
-
export {};
|
package/core/PointMaterial.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { PrimitiveProps } from '@react-three/fiber';
|
|
3
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
-
type PointMaterialType = JSX.IntrinsicElements['pointsMaterial'];
|
|
5
|
-
declare global {
|
|
6
|
-
namespace JSX {
|
|
7
|
-
interface IntrinsicElements {
|
|
8
|
-
pointMaterialImpl: PointMaterialType;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export declare class PointMaterialImpl extends THREE.PointsMaterial {
|
|
13
|
-
constructor(props: any);
|
|
14
|
-
}
|
|
15
|
-
export declare const PointMaterial: ForwardRefComponent<Omit<PrimitiveProps, 'object' | 'attach'>, PointMaterialImpl>;
|
|
16
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
import { PointerLockControls as PointerLockControlsImpl } from 'three-stdlib';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
export type PointerLockControlsProps = ReactThreeFiber.Object3DNode<PointerLockControlsImpl, typeof PointerLockControlsImpl> & {
|
|
6
|
-
domElement?: HTMLElement;
|
|
7
|
-
selector?: string;
|
|
8
|
-
enabled?: boolean;
|
|
9
|
-
camera?: THREE.Camera;
|
|
10
|
-
onChange?: (e?: THREE.Event) => void;
|
|
11
|
-
onLock?: (e?: THREE.Event) => void;
|
|
12
|
-
onUnlock?: (e?: THREE.Event) => void;
|
|
13
|
-
makeDefault?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const PointerLockControls: ForwardRefComponent<PointerLockControlsProps, PointerLockControlsImpl>;
|
package/core/Points.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ReactThreeFiber } from '@react-three/fiber';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
declare global {
|
|
6
|
-
namespace JSX {
|
|
7
|
-
interface IntrinsicElements {
|
|
8
|
-
positionPoint: ReactThreeFiber.Object3DNode<PositionPoint, typeof PositionPoint>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
type PointsInstancesProps = JSX.IntrinsicElements['points'] & {
|
|
13
|
-
range?: number;
|
|
14
|
-
limit?: number;
|
|
15
|
-
};
|
|
16
|
-
export declare class PositionPoint extends THREE.Group {
|
|
17
|
-
size: number;
|
|
18
|
-
color: THREE.Color;
|
|
19
|
-
instance: React.MutableRefObject<THREE.Points | undefined>;
|
|
20
|
-
instanceKey: React.MutableRefObject<JSX.IntrinsicElements['positionPoint'] | undefined>;
|
|
21
|
-
constructor();
|
|
22
|
-
get geometry(): THREE.BufferGeometry | undefined;
|
|
23
|
-
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
24
|
-
}
|
|
25
|
-
export declare const Point: ForwardRefComponent<JSX.IntrinsicElements['positionPoint'], PositionPoint>;
|
|
26
|
-
type PointsBuffersProps = JSX.IntrinsicElements['points'] & {
|
|
27
|
-
positions: Float32Array;
|
|
28
|
-
colors?: Float32Array;
|
|
29
|
-
sizes?: Float32Array;
|
|
30
|
-
stride?: 2 | 3;
|
|
31
|
-
};
|
|
32
|
-
export declare const PointsBuffer: ForwardRefComponent<PointsBuffersProps, THREE.Points>;
|
|
33
|
-
export declare const Points: ForwardRefComponent<PointsBuffersProps | PointsInstancesProps, THREE.Points>;
|
|
34
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PositionalAudio as PositionalAudioImpl } from 'three';
|
|
2
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
3
|
-
type Props = JSX.IntrinsicElements['positionalAudio'] & {
|
|
4
|
-
url: string;
|
|
5
|
-
distance?: number;
|
|
6
|
-
loop?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const PositionalAudio: ForwardRefComponent<Props, PositionalAudioImpl>;
|
|
9
|
-
export {};
|
package/core/Preload.d.ts
DELETED
package/core/Progress.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type Data = {
|
|
3
|
-
errors: string[];
|
|
4
|
-
active: boolean;
|
|
5
|
-
progress: number;
|
|
6
|
-
item: string;
|
|
7
|
-
loaded: number;
|
|
8
|
-
total: number;
|
|
9
|
-
};
|
|
10
|
-
declare const useProgress: import("zustand").UseBoundStore<Data, import("zustand").StoreApi<Data>>;
|
|
11
|
-
export { useProgress };
|
|
12
|
-
export declare function Progress({ children }: {
|
|
13
|
-
children?: (result: Data) => React.ReactNode;
|
|
14
|
-
}): React.JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Vector3 } from 'three';
|
|
2
|
-
import { Line2 } from 'three-stdlib';
|
|
3
|
-
import { LineProps } from './Line';
|
|
4
|
-
import { Object3DNode } from '@react-three/fiber';
|
|
5
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
6
|
-
type Props = Omit<LineProps, 'points' | 'ref'> & {
|
|
7
|
-
start: Vector3 | [number, number, number];
|
|
8
|
-
end: Vector3 | [number, number, number];
|
|
9
|
-
mid?: Vector3 | [number, number, number];
|
|
10
|
-
segments?: number;
|
|
11
|
-
};
|
|
12
|
-
export type Line2Props = Object3DNode<Line2, typeof Line2> & {
|
|
13
|
-
setPoints: (start: Vector3 | [number, number, number], end: Vector3 | [number, number, number], mid: Vector3 | [number, number, number]) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const QuadraticBezierLine: ForwardRefComponent<Props, Line2Props>;
|
|
16
|
-
export {};
|
package/core/Reflector.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Mesh, Texture } from 'three';
|
|
3
|
-
import { MeshReflectorMaterialProps } from '../materials/MeshReflectorMaterial';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
export type ReflectorProps = Omit<JSX.IntrinsicElements['mesh'], 'args' | 'children'> & Pick<JSX.IntrinsicElements['planeGeometry'], 'args'> & {
|
|
6
|
-
resolution?: number;
|
|
7
|
-
mixBlur?: number;
|
|
8
|
-
mixStrength?: number;
|
|
9
|
-
blur?: [number, number] | number;
|
|
10
|
-
mirror: number;
|
|
11
|
-
minDepthThreshold?: number;
|
|
12
|
-
maxDepthThreshold?: number;
|
|
13
|
-
depthScale?: number;
|
|
14
|
-
depthToBlurRatioBias?: number;
|
|
15
|
-
debug?: number;
|
|
16
|
-
distortionMap?: Texture;
|
|
17
|
-
distortion?: number;
|
|
18
|
-
mixContrast?: number;
|
|
19
|
-
children?: {
|
|
20
|
-
(Component: React.ElementType<JSX.IntrinsicElements['meshReflectorMaterial']>, ComponentProps: MeshReflectorMaterialProps): JSX.Element | null;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
declare global {
|
|
24
|
-
namespace JSX {
|
|
25
|
-
interface IntrinsicElements {
|
|
26
|
-
meshReflectorMaterial: MeshReflectorMaterialProps;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export declare const Reflector: ForwardRefComponent<ReflectorProps, Mesh>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ComputeFunction, ReactThreeFiber } from '@react-three/fiber';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
export type RenderCubeTextureProps = Omit<JSX.IntrinsicElements['texture'], 'rotation'> & {
|
|
6
|
-
stencilBuffer?: boolean;
|
|
7
|
-
depthBuffer?: boolean;
|
|
8
|
-
generateMipmaps?: boolean;
|
|
9
|
-
renderPriority?: number;
|
|
10
|
-
eventPriority?: number;
|
|
11
|
-
frames?: number;
|
|
12
|
-
compute?: ComputeFunction;
|
|
13
|
-
flip?: boolean;
|
|
14
|
-
resolution?: number;
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
near?: number;
|
|
17
|
-
far?: number;
|
|
18
|
-
position?: ReactThreeFiber.Vector3;
|
|
19
|
-
rotation?: ReactThreeFiber.Euler;
|
|
20
|
-
scale?: ReactThreeFiber.Vector3;
|
|
21
|
-
quaternion?: ReactThreeFiber.Quaternion;
|
|
22
|
-
matrix?: ReactThreeFiber.Matrix4;
|
|
23
|
-
matrixAutoUpdate?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export type RenderCubeTextureApi = {
|
|
26
|
-
scene: THREE.Scene;
|
|
27
|
-
fbo: THREE.WebGLCubeRenderTarget;
|
|
28
|
-
camera: THREE.CubeCamera;
|
|
29
|
-
};
|
|
30
|
-
export declare const RenderCubeTexture: ForwardRefComponent<RenderCubeTextureProps, RenderCubeTextureApi>;
|
package/core/RenderTexture.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
-
type Props = JSX.IntrinsicElements['texture'] & {
|
|
5
|
-
width?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
samples?: number;
|
|
8
|
-
stencilBuffer?: boolean;
|
|
9
|
-
depthBuffer?: boolean;
|
|
10
|
-
generateMipmaps?: boolean;
|
|
11
|
-
renderPriority?: number;
|
|
12
|
-
eventPriority?: number;
|
|
13
|
-
frames?: number;
|
|
14
|
-
compute?: (event: any, state: any, previous: any) => false | undefined;
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
};
|
|
17
|
-
export declare const RenderTexture: ForwardRefComponent<Props, THREE.Texture>;
|
|
18
|
-
export {};
|
package/core/Resize.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export type ResizeProps = JSX.IntrinsicElements['group'] & {
|
|
4
|
-
width?: boolean;
|
|
5
|
-
height?: boolean;
|
|
6
|
-
depth?: boolean;
|
|
7
|
-
box3?: THREE.Box3;
|
|
8
|
-
precise?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const Resize: React.ForwardRefExoticComponent<Omit<ResizeProps, "ref"> & React.RefAttributes<THREE.Group>>;
|
package/core/RoundedBox.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Mesh } from 'three';
|
|
2
|
-
import { ForwardRefComponent, NamedArrayTuple } from '../helpers/ts-utils';
|
|
3
|
-
type Props = {
|
|
4
|
-
args?: NamedArrayTuple<(width?: number, height?: number, depth?: number) => void>;
|
|
5
|
-
radius?: number;
|
|
6
|
-
smoothness?: number;
|
|
7
|
-
bevelSegments?: number;
|
|
8
|
-
steps?: number;
|
|
9
|
-
creaseAngle?: number;
|
|
10
|
-
} & Omit<JSX.IntrinsicElements['mesh'], 'args'>;
|
|
11
|
-
export declare const RoundedBox: ForwardRefComponent<Props, Mesh>;
|
|
12
|
-
export {};
|
package/core/Sampler.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Color, InstancedBufferAttribute, InstancedMesh, Mesh, Object3D, Vector3 } from 'three';
|
|
3
|
-
import { GroupProps } from '@react-three/fiber';
|
|
4
|
-
type SamplePayload = {
|
|
5
|
-
position: Vector3;
|
|
6
|
-
normal: Vector3;
|
|
7
|
-
color: Color;
|
|
8
|
-
};
|
|
9
|
-
export type TransformFn = (payload: TransformPayload, i: number) => void;
|
|
10
|
-
type TransformPayload = SamplePayload & {
|
|
11
|
-
dummy: Object3D;
|
|
12
|
-
sampledMesh: Mesh;
|
|
13
|
-
};
|
|
14
|
-
type Props = {
|
|
15
|
-
mesh?: React.RefObject<Mesh>;
|
|
16
|
-
instances?: React.RefObject<InstancedMesh>;
|
|
17
|
-
weight?: string;
|
|
18
|
-
transform?: TransformFn;
|
|
19
|
-
count?: number;
|
|
20
|
-
};
|
|
21
|
-
export interface useSurfaceSamplerProps {
|
|
22
|
-
transform?: TransformFn;
|
|
23
|
-
weight?: string;
|
|
24
|
-
count?: number;
|
|
25
|
-
}
|
|
26
|
-
export declare function useSurfaceSampler(mesh: React.MutableRefObject<Mesh>, count?: number, transform?: TransformFn, weight?: string, instanceMesh?: React.MutableRefObject<InstancedMesh> | null): InstancedBufferAttribute;
|
|
27
|
-
export declare function Sampler({ children, weight, transform, instances, mesh, count, ...props }: React.PropsWithChildren<Props & GroupProps>): React.JSX.Element;
|
|
28
|
-
export {};
|
package/core/ScreenQuad.d.ts
DELETED
package/core/ScreenSizer.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Object3DProps } from '@react-three/fiber';
|
|
2
|
-
import { Object3D } from 'three';
|
|
3
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
-
export interface ScreenSizerProps extends Object3DProps {
|
|
5
|
-
scale?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const ScreenSizer: ForwardRefComponent<ScreenSizerProps, Object3D>;
|
package/core/ScreenSpace.d.ts
DELETED
package/core/Segments.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ReactThreeFiber } from '@react-three/fiber';
|
|
4
|
-
import { Line2, LineMaterialParameters } from 'three-stdlib';
|
|
5
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
6
|
-
type SegmentsProps = LineMaterialParameters & {
|
|
7
|
-
limit?: number;
|
|
8
|
-
lineWidth?: number;
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
};
|
|
11
|
-
type SegmentProps = Omit<JSX.IntrinsicElements['segmentObject'], 'start' | 'end' | 'color'> & {
|
|
12
|
-
start: ReactThreeFiber.Vector3;
|
|
13
|
-
end: ReactThreeFiber.Vector3;
|
|
14
|
-
color?: ReactThreeFiber.Color;
|
|
15
|
-
};
|
|
16
|
-
declare const Segments: ForwardRefComponent<SegmentsProps, Line2>;
|
|
17
|
-
declare global {
|
|
18
|
-
namespace JSX {
|
|
19
|
-
interface IntrinsicElements {
|
|
20
|
-
segmentObject: ReactThreeFiber.Object3DNode<SegmentObject, typeof SegmentObject>;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export declare class SegmentObject {
|
|
25
|
-
color: THREE.Color;
|
|
26
|
-
start: THREE.Vector3;
|
|
27
|
-
end: THREE.Vector3;
|
|
28
|
-
constructor();
|
|
29
|
-
}
|
|
30
|
-
declare const Segment: ForwardRefComponent<SegmentProps, SegmentObject>;
|
|
31
|
-
export { Segments, Segment };
|
package/core/Shadow.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Mesh, Color, type PlaneGeometry, type MeshBasicMaterial } from 'three';
|
|
2
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
3
|
-
type Props = JSX.IntrinsicElements['mesh'] & {
|
|
4
|
-
colorStop?: number;
|
|
5
|
-
fog?: boolean;
|
|
6
|
-
color?: Color | number | string;
|
|
7
|
-
opacity?: number;
|
|
8
|
-
depthWrite?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type ShadowType = Mesh<PlaneGeometry, MeshBasicMaterial>;
|
|
11
|
-
export declare const Shadow: ForwardRefComponent<Props, ShadowType>;
|
|
12
|
-
export {};
|
package/core/ShadowAlpha.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
interface ShadowAlphaProps {
|
|
4
|
-
opacity?: number;
|
|
5
|
-
alphaMap?: THREE.Texture | boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function ShadowAlpha({ opacity, alphaMap }: ShadowAlphaProps): React.JSX.Element;
|
|
8
|
-
export {};
|
package/core/Sky.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import { Sky as SkyImpl } from 'three-stdlib';
|
|
3
|
-
import { Vector3 } from 'three';
|
|
4
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
-
type Props = {
|
|
6
|
-
distance?: number;
|
|
7
|
-
sunPosition?: ReactThreeFiber.Vector3;
|
|
8
|
-
inclination?: number;
|
|
9
|
-
azimuth?: number;
|
|
10
|
-
mieCoefficient?: number;
|
|
11
|
-
mieDirectionalG?: number;
|
|
12
|
-
rayleigh?: number;
|
|
13
|
-
turbidity?: number;
|
|
14
|
-
};
|
|
15
|
-
export declare function calcPosFromAngles(inclination: number, azimuth: number, vector?: Vector3): Vector3;
|
|
16
|
-
export declare const Sky: ForwardRefComponent<Props, SkyImpl>;
|
|
17
|
-
export {};
|
package/core/Sparkles.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { PointsProps, Node } from '@react-three/fiber';
|
|
3
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
-
interface Props {
|
|
5
|
-
count?: number;
|
|
6
|
-
speed?: number | Float32Array;
|
|
7
|
-
opacity?: number | Float32Array;
|
|
8
|
-
color?: THREE.ColorRepresentation | Float32Array;
|
|
9
|
-
size?: number | Float32Array;
|
|
10
|
-
scale?: number | [number, number, number] | THREE.Vector3;
|
|
11
|
-
noise?: number | [number, number, number] | THREE.Vector3 | Float32Array;
|
|
12
|
-
}
|
|
13
|
-
declare global {
|
|
14
|
-
namespace JSX {
|
|
15
|
-
interface IntrinsicElements {
|
|
16
|
-
sparklesImplMaterial: Node<any, any>;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export declare const Sparkles: ForwardRefComponent<Props & PointsProps, THREE.Points>;
|
|
21
|
-
export {};
|
package/core/Splat.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export type SplatMaterialType = {
|
|
4
|
-
alphaTest?: number;
|
|
5
|
-
alphaHash?: boolean;
|
|
6
|
-
centerAndScaleTexture?: THREE.DataTexture;
|
|
7
|
-
covAndColorTexture?: THREE.DataTexture;
|
|
8
|
-
viewport?: THREE.Vector2;
|
|
9
|
-
focal?: number;
|
|
10
|
-
};
|
|
11
|
-
export type TargetMesh = THREE.Mesh<THREE.InstancedBufferGeometry, THREE.ShaderMaterial & SplatMaterialType> & {
|
|
12
|
-
ready: boolean;
|
|
13
|
-
sorted: boolean;
|
|
14
|
-
pm: THREE.Matrix4;
|
|
15
|
-
vm1: THREE.Matrix4;
|
|
16
|
-
vm2: THREE.Matrix4;
|
|
17
|
-
viewport: THREE.Vector4;
|
|
18
|
-
};
|
|
19
|
-
export type SharedState = {
|
|
20
|
-
url: string;
|
|
21
|
-
gl: THREE.WebGLRenderer;
|
|
22
|
-
worker: Worker;
|
|
23
|
-
manager: THREE.LoadingManager;
|
|
24
|
-
stream: ReadableStreamDefaultReader<Uint8Array>;
|
|
25
|
-
loading: boolean;
|
|
26
|
-
loaded: boolean;
|
|
27
|
-
loadedVertexCount: number;
|
|
28
|
-
rowLength: number;
|
|
29
|
-
maxVertexes: number;
|
|
30
|
-
chunkSize: number;
|
|
31
|
-
totalDownloadBytes: number;
|
|
32
|
-
numVertices: number;
|
|
33
|
-
bufferTextureWidth: number;
|
|
34
|
-
bufferTextureHeight: number;
|
|
35
|
-
centerAndScaleData: Float32Array;
|
|
36
|
-
covAndColorData: Uint32Array;
|
|
37
|
-
covAndColorTexture: THREE.DataTexture;
|
|
38
|
-
centerAndScaleTexture: THREE.DataTexture;
|
|
39
|
-
connect(target: TargetMesh): () => void;
|
|
40
|
-
update(target: TargetMesh, camera: THREE.Camera, hashed: boolean): void;
|
|
41
|
-
onProgress?: (event: ProgressEvent) => void;
|
|
42
|
-
};
|
|
43
|
-
declare global {
|
|
44
|
-
namespace JSX {
|
|
45
|
-
interface IntrinsicElements {
|
|
46
|
-
splatMaterial: SplatMaterialType & JSX.IntrinsicElements['shaderMaterial'];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
type SplatProps = {
|
|
51
|
-
src: string;
|
|
52
|
-
toneMapped?: boolean;
|
|
53
|
-
alphaTest?: number;
|
|
54
|
-
alphaHash?: boolean;
|
|
55
|
-
chunkSize?: number;
|
|
56
|
-
} & JSX.IntrinsicElements['mesh'];
|
|
57
|
-
export declare function Splat({ src, toneMapped, alphaTest, alphaHash, chunkSize, ...props }: SplatProps): React.JSX.Element;
|
|
58
|
-
export {};
|
package/core/SpotLight.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DepthTexture, SpotLight as SpotLightImpl, Texture } from 'three';
|
|
3
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
-
type SpotLightProps = JSX.IntrinsicElements['spotLight'] & {
|
|
5
|
-
depthBuffer?: DepthTexture;
|
|
6
|
-
attenuation?: number;
|
|
7
|
-
anglePower?: number;
|
|
8
|
-
radiusTop?: number;
|
|
9
|
-
radiusBottom?: number;
|
|
10
|
-
opacity?: number;
|
|
11
|
-
color?: string | number;
|
|
12
|
-
volumetric?: boolean;
|
|
13
|
-
debug?: boolean;
|
|
14
|
-
};
|
|
15
|
-
interface ShadowMeshProps {
|
|
16
|
-
distance?: number;
|
|
17
|
-
alphaTest?: number;
|
|
18
|
-
scale?: number;
|
|
19
|
-
map?: Texture;
|
|
20
|
-
shader?: string;
|
|
21
|
-
width?: number;
|
|
22
|
-
height?: number;
|
|
23
|
-
}
|
|
24
|
-
export declare function SpotLightShadow(props: React.PropsWithChildren<ShadowMeshProps>): React.JSX.Element;
|
|
25
|
-
declare const SpotLight: ForwardRefComponent<React.PropsWithChildren<SpotLightProps>, SpotLightImpl>;
|
|
26
|
-
export { SpotLight };
|
package/core/SpriteAnimator.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type SpriteAnimatorProps = {
|
|
3
|
-
startFrame?: number;
|
|
4
|
-
endFrame?: number;
|
|
5
|
-
fps?: number;
|
|
6
|
-
frameName?: string;
|
|
7
|
-
textureDataURL?: string;
|
|
8
|
-
textureImageURL?: string;
|
|
9
|
-
loop?: boolean;
|
|
10
|
-
numberOfFrames?: number;
|
|
11
|
-
autoPlay?: boolean;
|
|
12
|
-
animationNames?: Array<string>;
|
|
13
|
-
onStart?: Function;
|
|
14
|
-
onEnd?: Function;
|
|
15
|
-
onLoopEnd?: Function;
|
|
16
|
-
onFrame?: Function;
|
|
17
|
-
play?: boolean;
|
|
18
|
-
pause?: boolean;
|
|
19
|
-
flipX?: boolean;
|
|
20
|
-
position?: Array<number>;
|
|
21
|
-
alphaTest?: number;
|
|
22
|
-
asSprite?: boolean;
|
|
23
|
-
offset?: number;
|
|
24
|
-
playBackwards?: boolean;
|
|
25
|
-
resetOnEnd?: boolean;
|
|
26
|
-
maxItems?: number;
|
|
27
|
-
instanceItems?: any[];
|
|
28
|
-
spriteDataset?: any;
|
|
29
|
-
} & JSX.IntrinsicElements['group'];
|
|
30
|
-
type SpriteAnimatorState = {
|
|
31
|
-
current: number | undefined;
|
|
32
|
-
offset: number | undefined;
|
|
33
|
-
hasEnded: boolean | undefined;
|
|
34
|
-
ref: React.MutableRefObject<any> | undefined | null | ((instance: any) => void);
|
|
35
|
-
};
|
|
36
|
-
export declare function useSpriteAnimator(): SpriteAnimatorState;
|
|
37
|
-
export declare const SpriteAnimator: React.FC<SpriteAnimatorProps>;
|
|
38
|
-
export {};
|