@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
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
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 {};
|
package/core/TrailTexture.d.ts
DELETED
|
@@ -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>;
|
package/core/VideoTexture.d.ts
DELETED
|
@@ -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 {};
|
package/core/Wireframe.d.ts
DELETED
|
@@ -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 {};
|
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';
|
package/core/meshBounds.d.ts
DELETED
package/core/shaderMaterial.d.ts
DELETED
|
@@ -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[]>>;
|
package/core/softShadows.d.ts
DELETED
package/core/useAnimations.d.ts
DELETED
|
@@ -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 {};
|
package/core/useAspect.d.ts
DELETED
|
@@ -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 {};
|
package/core/useCamera.d.ts
DELETED
package/core/useDepthBuffer.d.ts
DELETED
package/core/useEnvironment.d.ts
DELETED
|
@@ -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 {};
|
package/core/useIntersect.d.ts
DELETED
|
@@ -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
|
-
}
|
package/helpers/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const version: number;
|
package/helpers/deprecated.d.ts
DELETED
|
@@ -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;
|
package/helpers/ts-utils.d.ts
DELETED
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './web';
|