@react-three/drei 11.0.0-alpha.3 → 11.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/index.d.mts +76 -78
- package/core/index.d.ts +76 -78
- package/core/index.mjs +414 -490
- package/experimental/index.d.mts +8 -8
- package/experimental/index.d.ts +8 -8
- package/experimental/index.mjs +3 -2
- package/external/index.d.mts +7 -7
- package/external/index.d.ts +7 -7
- package/external/index.mjs +1 -0
- package/index.d.mts +77 -79
- package/index.d.ts +77 -79
- package/index.mjs +415 -491
- package/legacy/index.d.mts +152 -105
- package/legacy/index.d.ts +152 -105
- package/legacy/index.mjs +1290 -985
- package/native/index.d.mts +185 -378
- package/native/index.d.ts +185 -378
- package/native/index.mjs +1244 -2440
- package/package.json +2 -3
- package/webgpu/index.d.mts +187 -223
- package/webgpu/index.d.ts +187 -223
- package/webgpu/index.mjs +1244 -1803
package/native/index.d.ts
CHANGED
|
@@ -3,43 +3,33 @@ import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, CSSPropertie
|
|
|
3
3
|
import * as _react_three_fiber from '@react-three/fiber';
|
|
4
4
|
import { ThreeElements, ReactThreeFiber, ComputeFunction, Vector2, Vector3, ThreeElement, ThreeEvent, Color as Color$1, ObjectMap, Euler } from '@react-three/fiber';
|
|
5
5
|
import * as THREE from 'three/webgpu';
|
|
6
|
-
import { MeshBasicNodeMaterial, MeshNormalNodeMaterial, MeshPhysicalNodeMaterial, Material, Color, ColorRepresentation, Object3D, Texture as Texture$1, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1,
|
|
6
|
+
import { MeshBasicNodeMaterial, MeshNormalNodeMaterial, MeshPhysicalNodeMaterial, Material, Color, ColorRepresentation, Object3D, Texture as Texture$1, Fog, FogExp2, WebGLCubeRenderTarget, CubeCamera as CubeCamera$1, OrthographicCamera as OrthographicCamera$1, PerspectiveCamera as PerspectiveCamera$1, EventDispatcher, Camera, Matrix4, Vector3 as Vector3$1, Group, LOD, Mesh, ExtrudeGeometry, PositionalAudio as PositionalAudio$1, AnimationClip, AnimationMixer, AnimationAction, BufferGeometry, BufferAttribute, InstancedMesh as InstancedMesh$1, InstancedBufferAttribute, DepthTexture, CubeTexture as CubeTexture$1, Raycaster, Intersection, RenderTargetOptions, Box3, Sphere as Sphere$1, Loader as Loader$1, ColorSpace, Scene, PlaneGeometry, MeshBasicMaterial, SpriteNodeMaterial, SpotLight as SpotLight$1 } from 'three/webgpu';
|
|
7
7
|
import { reflector, uniform, Fn } from 'three/tsl';
|
|
8
8
|
import { LineSegments2 } from 'three/examples/jsm/lines/webgpu/LineSegments2.js';
|
|
9
|
-
import { ArcballControls as ArcballControls$1 } from 'three/examples/jsm/controls/ArcballControls.js';
|
|
10
|
-
import { DeviceOrientationControls as DeviceOrientationControls$1 } from 'three-stdlib';
|
|
11
9
|
import { DragConfig } from '@use-gesture/react';
|
|
12
|
-
import { FirstPersonControls as FirstPersonControls$1 } from 'three/examples/jsm/controls/FirstPersonControls';
|
|
13
|
-
import { FlyControls as FlyControls$1 } from 'three/examples/jsm/controls/FlyControls.js';
|
|
14
10
|
import * as zustand from 'zustand';
|
|
15
11
|
import { StoreApi } from 'zustand';
|
|
16
|
-
import {
|
|
17
|
-
import { OrbitControls as OrbitControls$1 } from 'three/addons/controls/OrbitControls.js';
|
|
18
|
-
import { PointerLockControls as PointerLockControls$1 } from 'three/examples/jsm/controls/PointerLockControls.js';
|
|
19
|
-
import { TrackballControls as TrackballControls$1 } from 'three/examples/jsm/controls/TrackballControls.js';
|
|
12
|
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
20
13
|
import * as three from 'three';
|
|
21
14
|
import { Line2 as Line2$1 } from 'three/examples/jsm/lines/Line2.js';
|
|
22
15
|
import { Line2 } from 'three/examples/jsm/lines/webgpu/Line2.js';
|
|
23
|
-
import { Flow } from 'three/examples/jsm/modifiers/CurveModifier';
|
|
24
|
-
import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry';
|
|
25
|
-
import * as
|
|
26
|
-
import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls';
|
|
27
|
-
import { Falsey
|
|
16
|
+
import { Flow } from 'three/examples/jsm/modifiers/CurveModifier.js';
|
|
17
|
+
import { TextGeometry, TextGeometryParameters } from 'three/examples/jsm/geometries/TextGeometry.js';
|
|
18
|
+
import * as three_examples_jsm_loaders_FontLoader_js from 'three/examples/jsm/loaders/FontLoader.js';
|
|
19
|
+
import { TransformControls as TransformControls$1 } from 'three/examples/jsm/controls/TransformControls.js';
|
|
20
|
+
import { Falsey } from 'utility-types';
|
|
28
21
|
import * as hls_js from 'hls.js';
|
|
29
22
|
import hls_js__default from 'hls.js';
|
|
30
|
-
import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
23
|
+
import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
24
|
+
import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
|
|
31
25
|
import * as detect_gpu from 'detect-gpu';
|
|
32
26
|
import { GetGPUTier } from 'detect-gpu';
|
|
33
27
|
import Stats$1 from 'stats-gl';
|
|
34
|
-
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox';
|
|
28
|
+
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js';
|
|
35
29
|
import { Sky as Sky$1 } from 'three/examples/jsm/objects/Sky.js';
|
|
36
30
|
|
|
37
31
|
type NamedArrayTuple<T extends (...args: any) => any> = Parameters<T>;
|
|
38
32
|
type ForwardRefComponent<P, T> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
|
|
39
|
-
type NonFunctionKeys<T> = {
|
|
40
|
-
[K in keyof T]-?: T[K] extends Function ? never : K;
|
|
41
|
-
}[keyof T];
|
|
42
|
-
type Overwrite<T, O> = Omit<T, NonFunctionKeys<O>> & O;
|
|
43
33
|
|
|
44
34
|
type ContactShadowsProps = Omit<ThreeElements['group'], 'ref' | 'scale'> & {
|
|
45
35
|
opacity?: number;
|
|
@@ -76,24 +66,13 @@ interface AccumulativeContext {
|
|
|
76
66
|
frames: number;
|
|
77
67
|
blend: number;
|
|
78
68
|
count: number;
|
|
79
|
-
getMesh: () => THREE.Mesh<THREE.PlaneGeometry,
|
|
69
|
+
getMesh: () => THREE.Mesh<THREE.PlaneGeometry, THREE.ShaderMaterial>;
|
|
80
70
|
reset: () => void;
|
|
81
71
|
update: (frames?: number) => void;
|
|
82
72
|
}
|
|
83
73
|
interface AccumulativeLightContext {
|
|
84
74
|
update: () => void;
|
|
85
75
|
}
|
|
86
|
-
type SoftShadowMaterialProps = {
|
|
87
|
-
map: THREE.Texture;
|
|
88
|
-
color?: ReactThreeFiber.Color;
|
|
89
|
-
alphaTest?: number;
|
|
90
|
-
blend?: number;
|
|
91
|
-
};
|
|
92
|
-
declare module '@react-three/fiber' {
|
|
93
|
-
interface ThreeElements {
|
|
94
|
-
softShadowMaterial: ThreeElements['shaderMaterial'] & SoftShadowMaterialProps;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
76
|
declare const accumulativeContext: React.Context<AccumulativeContext>;
|
|
98
77
|
declare const AccumulativeShadows: ForwardRefComponent<AccumulativeShadowsProps, AccumulativeContext>;
|
|
99
78
|
type RandomizedLightProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
@@ -112,19 +91,6 @@ type RandomizedLightProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
112
91
|
};
|
|
113
92
|
declare const RandomizedLight: ForwardRefComponent<RandomizedLightProps, AccumulativeLightContext>;
|
|
114
93
|
|
|
115
|
-
type CausticsProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
116
|
-
frames?: number;
|
|
117
|
-
debug?: boolean;
|
|
118
|
-
causticsOnly?: boolean;
|
|
119
|
-
backside?: boolean;
|
|
120
|
-
ior?: number;
|
|
121
|
-
backsideIOR?: number;
|
|
122
|
-
worldRadius?: number;
|
|
123
|
-
intensity?: number;
|
|
124
|
-
color?: ReactThreeFiber.Color;
|
|
125
|
-
resolution?: number;
|
|
126
|
-
lightSource?: [x: number, y: number, z: number] | React.RefObject<THREE.Object3D>;
|
|
127
|
-
};
|
|
128
94
|
declare class CausticsProjectionMaterial extends MeshBasicNodeMaterial {
|
|
129
95
|
private _causticsTexture;
|
|
130
96
|
private _causticsTextureB;
|
|
@@ -565,8 +531,8 @@ type SegmentsProps = {
|
|
|
565
531
|
children: React.ReactNode;
|
|
566
532
|
};
|
|
567
533
|
type SegmentProps = Omit<ThreeElements['segmentObject'], 'ref' | 'start' | 'end' | 'color'> & {
|
|
568
|
-
start
|
|
569
|
-
end
|
|
534
|
+
start?: ReactThreeFiber.Vector3;
|
|
535
|
+
end?: ReactThreeFiber.Vector3;
|
|
570
536
|
color?: ReactThreeFiber.Color;
|
|
571
537
|
};
|
|
572
538
|
declare const Segments: ForwardRefComponent<SegmentsProps, LineSegments2>;
|
|
@@ -577,8 +543,8 @@ declare module '@react-three/fiber' {
|
|
|
577
543
|
}
|
|
578
544
|
declare class SegmentObject {
|
|
579
545
|
color: THREE.Color;
|
|
580
|
-
start
|
|
581
|
-
end
|
|
546
|
+
start?: THREE.Vector3;
|
|
547
|
+
end?: THREE.Vector3;
|
|
582
548
|
constructor();
|
|
583
549
|
}
|
|
584
550
|
declare const Segment: ForwardRefComponent<SegmentProps, SegmentObject>;
|
|
@@ -637,17 +603,33 @@ type PerspectiveCameraProps = Omit<ThreeElements['perspectiveCamera'], 'ref' | '
|
|
|
637
603
|
};
|
|
638
604
|
declare const PerspectiveCamera: ForwardRefComponent<PerspectiveCameraProps, PerspectiveCamera$1>;
|
|
639
605
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
606
|
+
interface StandardControlsEventMap {
|
|
607
|
+
change: {};
|
|
608
|
+
start: {};
|
|
609
|
+
end: {};
|
|
610
|
+
}
|
|
611
|
+
declare class DeviceOrientationControls$1 extends EventDispatcher<StandardControlsEventMap> {
|
|
612
|
+
object: Camera;
|
|
613
|
+
private changeEvent;
|
|
614
|
+
private EPS;
|
|
615
|
+
enabled: boolean;
|
|
616
|
+
deviceOrientation: Partial<DeviceOrientationEvent>;
|
|
617
|
+
screenOrientation: string | number;
|
|
618
|
+
alphaOffset: number;
|
|
619
|
+
constructor(object: Camera);
|
|
620
|
+
private onDeviceOrientationChangeEvent;
|
|
621
|
+
private onScreenOrientationChangeEvent;
|
|
622
|
+
private zee;
|
|
623
|
+
private euler;
|
|
624
|
+
private q0;
|
|
625
|
+
private q1;
|
|
626
|
+
private setObjectQuaternion;
|
|
627
|
+
connect: () => void;
|
|
628
|
+
disconnect: () => void;
|
|
629
|
+
private lastQuaternion;
|
|
630
|
+
update: () => void;
|
|
631
|
+
dispose: () => void;
|
|
632
|
+
}
|
|
651
633
|
|
|
652
634
|
type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientationControls$1>, 'ref' | 'args'> & {
|
|
653
635
|
camera?: THREE.Camera;
|
|
@@ -656,32 +638,9 @@ type DeviceOrientationControlsProps = Omit<ThreeElement<typeof DeviceOrientation
|
|
|
656
638
|
};
|
|
657
639
|
declare const DeviceOrientationControls: ForwardRefComponent<DeviceOrientationControlsProps, DeviceOrientationControls$1>;
|
|
658
640
|
|
|
659
|
-
type
|
|
660
|
-
|
|
661
|
-
matrix?: THREE.Matrix4;
|
|
662
|
-
axisLock?: 'x' | 'y' | 'z';
|
|
663
|
-
dragLimits?: [[number, number] | undefined, [number, number] | undefined, [number, number] | undefined];
|
|
664
|
-
onHover?: (hovering: boolean) => void;
|
|
665
|
-
onDragStart?: (origin: THREE.Vector3) => void;
|
|
666
|
-
onDrag?: (localMatrix: THREE.Matrix4, deltaLocalMatrix: THREE.Matrix4, worldMatrix: THREE.Matrix4, deltaWorldMatrix: THREE.Matrix4) => void;
|
|
667
|
-
onDragEnd?: () => void;
|
|
668
|
-
children: React.ReactNode;
|
|
669
|
-
dragConfig?: DragConfig;
|
|
641
|
+
type ExpandedDragConfig = DragConfig & {
|
|
642
|
+
preventOverlap?: boolean;
|
|
670
643
|
};
|
|
671
|
-
declare const DragControls: ForwardRefComponent<DragControlsProps, THREE.Group>;
|
|
672
|
-
|
|
673
|
-
type FirstPersonControlsProps = Omit<ThreeElement<typeof FirstPersonControls$1>, 'ref' | 'args'> & {
|
|
674
|
-
domElement?: HTMLElement;
|
|
675
|
-
makeDefault?: boolean;
|
|
676
|
-
};
|
|
677
|
-
declare const FirstPersonControls: ForwardRefComponent<FirstPersonControlsProps, FirstPersonControls$1>;
|
|
678
|
-
|
|
679
|
-
type FlyControlsProps = Omit<ThreeElement<typeof FlyControls$1>, 'ref' | 'args'> & {
|
|
680
|
-
onChange?: (e?: THREE.Event) => void;
|
|
681
|
-
domElement?: HTMLElement;
|
|
682
|
-
makeDefault?: boolean;
|
|
683
|
-
};
|
|
684
|
-
declare const FlyControls: ForwardRefComponent<FlyControlsProps, FlyControls$1>;
|
|
685
644
|
|
|
686
645
|
type State = object;
|
|
687
646
|
type StateSelector<T extends State, U> = (state: T) => U;
|
|
@@ -704,13 +663,6 @@ type KeyboardControlsEntry<T extends string = string> = {
|
|
|
704
663
|
keys: string[];
|
|
705
664
|
up?: boolean;
|
|
706
665
|
};
|
|
707
|
-
type KeyboardControlsProps = {
|
|
708
|
-
map: KeyboardControlsEntry[];
|
|
709
|
-
children: React.ReactNode;
|
|
710
|
-
onChange?: (name: string, pressed: boolean, state: KeyboardControlsState) => void;
|
|
711
|
-
domElement?: HTMLElement;
|
|
712
|
-
};
|
|
713
|
-
declare function KeyboardControls({ map, children, onChange, domElement }: KeyboardControlsProps): React.JSX.Element;
|
|
714
666
|
type Selector<T extends string = string> = (state: KeyboardControlsState<T>) => boolean;
|
|
715
667
|
declare function useKeyboardControls<T extends string = string>(): [
|
|
716
668
|
StoreApiWithSubscribeWithSelector<KeyboardControlsState<T>>['subscribe'],
|
|
@@ -718,17 +670,6 @@ declare function useKeyboardControls<T extends string = string>(): [
|
|
|
718
670
|
];
|
|
719
671
|
declare function useKeyboardControls<T extends string = string>(sel: Selector<T>): ReturnType<Selector<T>>;
|
|
720
672
|
|
|
721
|
-
type MapControlsProps = Omit<Overwrite<ThreeElement<typeof MapControls$1>, {
|
|
722
|
-
target?: ReactThreeFiber.Vector3;
|
|
723
|
-
camera?: THREE.Camera;
|
|
724
|
-
makeDefault?: boolean;
|
|
725
|
-
onChange?: (e?: THREE.Event) => void;
|
|
726
|
-
onStart?: (e?: THREE.Event) => void;
|
|
727
|
-
onEnd?: (e?: THREE.Event) => void;
|
|
728
|
-
domElement?: HTMLElement;
|
|
729
|
-
}>, 'ref' | 'args'>;
|
|
730
|
-
declare const MapControls: ForwardRefComponent<MapControlsProps, MapControls$1>;
|
|
731
|
-
|
|
732
673
|
type MotionPathProps = ThreeElements['group'] & {
|
|
733
674
|
curves?: THREE.Curve<THREE.Vector3>[];
|
|
734
675
|
debug?: boolean;
|
|
@@ -762,32 +703,7 @@ declare const MotionPathControls: React.ForwardRefExoticComponent<Omit<MotionPat
|
|
|
762
703
|
type ExtractCallback<T, E extends string> = T extends {
|
|
763
704
|
addEventListener(event: E, callback: infer C): void;
|
|
764
705
|
} ? C : never;
|
|
765
|
-
type OrbitControlsChangeEvent = Parameters<ExtractCallback<OrbitControls
|
|
766
|
-
type OrbitControlsProps = Omit<Overwrite<ThreeElement<typeof OrbitControls$1>, {
|
|
767
|
-
camera?: Camera;
|
|
768
|
-
domElement?: HTMLElement;
|
|
769
|
-
enableDamping?: boolean;
|
|
770
|
-
makeDefault?: boolean;
|
|
771
|
-
onChange?: (e?: OrbitControlsChangeEvent) => void;
|
|
772
|
-
onEnd?: (e?: Event) => void;
|
|
773
|
-
onStart?: (e?: Event) => void;
|
|
774
|
-
regress?: boolean;
|
|
775
|
-
target?: ReactThreeFiber.Vector3;
|
|
776
|
-
keyEvents?: boolean | HTMLElement;
|
|
777
|
-
}>, 'ref' | 'args'>;
|
|
778
|
-
declare const OrbitControls: ForwardRefComponent<OrbitControlsProps, OrbitControls$1>;
|
|
779
|
-
|
|
780
|
-
type PointerLockControlsProps = Omit<ThreeElement<typeof PointerLockControls$1>, 'ref' | 'args'> & {
|
|
781
|
-
domElement?: HTMLElement;
|
|
782
|
-
selector?: string;
|
|
783
|
-
enabled?: boolean;
|
|
784
|
-
camera?: THREE.Camera;
|
|
785
|
-
onChange?: (e?: THREE.Event) => void;
|
|
786
|
-
onLock?: (e?: THREE.Event) => void;
|
|
787
|
-
onUnlock?: (e?: THREE.Event) => void;
|
|
788
|
-
makeDefault?: boolean;
|
|
789
|
-
};
|
|
790
|
-
declare const PointerLockControls: ForwardRefComponent<PointerLockControlsProps, PointerLockControls$1>;
|
|
706
|
+
type OrbitControlsChangeEvent = Parameters<ExtractCallback<OrbitControls, 'change'>>[0];
|
|
791
707
|
|
|
792
708
|
type PresentationControlProps = {
|
|
793
709
|
snap?: Boolean | number;
|
|
@@ -805,19 +721,6 @@ type PresentationControlProps = {
|
|
|
805
721
|
};
|
|
806
722
|
declare function PresentationControls({ enabled, snap, global, domElement, cursor, children, speed, rotation, zoom, polar, azimuth, damping, }: PresentationControlProps): React.JSX.Element;
|
|
807
723
|
|
|
808
|
-
type ScrollControlsProps = {
|
|
809
|
-
eps?: number;
|
|
810
|
-
horizontal?: boolean;
|
|
811
|
-
infinite?: boolean;
|
|
812
|
-
pages?: number;
|
|
813
|
-
distance?: number;
|
|
814
|
-
damping?: number;
|
|
815
|
-
maxSpeed?: number;
|
|
816
|
-
prepend?: boolean;
|
|
817
|
-
enabled?: boolean;
|
|
818
|
-
style?: React.CSSProperties;
|
|
819
|
-
children: React.ReactNode;
|
|
820
|
-
};
|
|
821
724
|
type ScrollControlsState = {
|
|
822
725
|
el: HTMLDivElement;
|
|
823
726
|
eps: number;
|
|
@@ -831,9 +734,9 @@ type ScrollControlsState = {
|
|
|
831
734
|
range(from: number, distance: number, margin?: number): number;
|
|
832
735
|
curve(from: number, distance: number, margin?: number): number;
|
|
833
736
|
visible(from: number, distance: number, margin?: number): boolean;
|
|
737
|
+
pixelPerfect: boolean;
|
|
834
738
|
};
|
|
835
739
|
declare function useScroll(): ScrollControlsState;
|
|
836
|
-
declare function ScrollControls({ eps, enabled, infinite, horizontal, pages, distance, damping, maxSpeed, prepend, style, children, }: ScrollControlsProps): React.JSX.Element;
|
|
837
740
|
interface ScrollPropsWithFalseHtml {
|
|
838
741
|
children?: React.ReactNode;
|
|
839
742
|
html?: false;
|
|
@@ -847,18 +750,6 @@ interface ScrollPropsWithTrueHtml {
|
|
|
847
750
|
type ScrollProps = ScrollPropsWithFalseHtml | ScrollPropsWithTrueHtml;
|
|
848
751
|
declare const Scroll: ForwardRefComponent<ScrollProps, THREE.Group & HTMLDivElement>;
|
|
849
752
|
|
|
850
|
-
type TrackballControlsProps = Omit<Overwrite<ThreeElement<typeof TrackballControls$1>, {
|
|
851
|
-
target?: ReactThreeFiber.Vector3;
|
|
852
|
-
camera?: THREE.Camera;
|
|
853
|
-
domElement?: HTMLElement;
|
|
854
|
-
regress?: boolean;
|
|
855
|
-
makeDefault?: boolean;
|
|
856
|
-
onChange?: (e?: THREE.Event) => void;
|
|
857
|
-
onStart?: (e?: THREE.Event) => void;
|
|
858
|
-
onEnd?: (e?: THREE.Event) => void;
|
|
859
|
-
}>, 'ref' | 'args'>;
|
|
860
|
-
declare const TrackballControls: ForwardRefComponent<TrackballControlsProps, TrackballControls$1>;
|
|
861
|
-
|
|
862
753
|
interface ShakeController {
|
|
863
754
|
getIntensity: () => number;
|
|
864
755
|
setIntensity: (val: number) => void;
|
|
@@ -1086,7 +977,7 @@ type FontData = {
|
|
|
1086
977
|
original_font_information?: Record<string, unknown>;
|
|
1087
978
|
};
|
|
1088
979
|
type FontInput = string | FontData;
|
|
1089
|
-
declare function useFont(font: FontInput):
|
|
980
|
+
declare function useFont(font: FontInput): three_examples_jsm_loaders_FontLoader_js.Font;
|
|
1090
981
|
declare namespace useFont {
|
|
1091
982
|
var preload: (font: FontInput) => undefined;
|
|
1092
983
|
var clear: (font: FontInput) => void;
|
|
@@ -1107,54 +998,6 @@ declare const Text3D: ForwardRefComponent<React.PropsWithChildren<Text3DProps &
|
|
|
1107
998
|
lineHeight?: number;
|
|
1108
999
|
}>, THREE.Mesh>;
|
|
1109
1000
|
|
|
1110
|
-
interface WireframeMaterialProps$1 extends THREE.ShaderMaterialParameters {
|
|
1111
|
-
fillOpacity?: number;
|
|
1112
|
-
fillMix?: number;
|
|
1113
|
-
strokeOpacity?: number;
|
|
1114
|
-
thickness?: number;
|
|
1115
|
-
colorBackfaces?: boolean;
|
|
1116
|
-
dashInvert?: boolean;
|
|
1117
|
-
dash?: boolean;
|
|
1118
|
-
dashRepeats?: number;
|
|
1119
|
-
dashLength?: number;
|
|
1120
|
-
squeeze?: boolean;
|
|
1121
|
-
squeezeMin?: number;
|
|
1122
|
-
squeezeMax?: number;
|
|
1123
|
-
stroke?: THREE.ColorRepresentation;
|
|
1124
|
-
backfaceStroke?: THREE.ColorRepresentation;
|
|
1125
|
-
fill?: THREE.ColorRepresentation;
|
|
1126
|
-
}
|
|
1127
|
-
declare const WireframeMaterial$1: _react_three_fiber.ConstructorRepresentation<THREE.ShaderMaterial & {
|
|
1128
|
-
strokeOpacity: number;
|
|
1129
|
-
fillOpacity: number;
|
|
1130
|
-
fillMix: number;
|
|
1131
|
-
thickness: number;
|
|
1132
|
-
colorBackfaces: boolean;
|
|
1133
|
-
dashInvert: boolean;
|
|
1134
|
-
dash: boolean;
|
|
1135
|
-
dashRepeats: number;
|
|
1136
|
-
dashLength: number;
|
|
1137
|
-
squeeze: boolean;
|
|
1138
|
-
squeezeMin: number;
|
|
1139
|
-
squeezeMax: number;
|
|
1140
|
-
stroke: THREE.Color;
|
|
1141
|
-
backfaceStroke: THREE.Color;
|
|
1142
|
-
fill: THREE.Color;
|
|
1143
|
-
}> & {
|
|
1144
|
-
key: string;
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
declare module '@react-three/fiber' {
|
|
1148
|
-
interface ThreeElements {
|
|
1149
|
-
meshWireframeMaterial: ThreeElement<typeof WireframeMaterial$1>;
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
interface WireframeProps {
|
|
1153
|
-
geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
|
|
1154
|
-
simplify?: boolean;
|
|
1155
|
-
}
|
|
1156
|
-
declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps$1): React.JSX.Element;
|
|
1157
|
-
|
|
1158
1001
|
type GizmoHelperContext = {
|
|
1159
1002
|
tweenCamera: (direction: Vector3$1) => void;
|
|
1160
1003
|
};
|
|
@@ -1201,6 +1044,11 @@ type OnDragStartProps = {
|
|
|
1201
1044
|
origin: THREE.Vector3;
|
|
1202
1045
|
directions: THREE.Vector3[];
|
|
1203
1046
|
};
|
|
1047
|
+
type OnHoverProps = {
|
|
1048
|
+
component: 'Arrow' | 'Slider' | 'Rotator' | 'Sphere';
|
|
1049
|
+
axis: 0 | 1 | 2;
|
|
1050
|
+
hovering: boolean;
|
|
1051
|
+
};
|
|
1204
1052
|
|
|
1205
1053
|
type PivotControlsProps = {
|
|
1206
1054
|
enabled?: boolean;
|
|
@@ -1210,6 +1058,7 @@ type PivotControlsProps = {
|
|
|
1210
1058
|
offset?: [number, number, number];
|
|
1211
1059
|
rotation?: [number, number, number];
|
|
1212
1060
|
matrix?: THREE.Matrix4;
|
|
1061
|
+
object?: THREE.Object3D | React.MutableRefObject<THREE.Object3D>;
|
|
1213
1062
|
anchor?: [number, number, number];
|
|
1214
1063
|
autoTransform?: boolean;
|
|
1215
1064
|
activeAxes?: [boolean, boolean, boolean];
|
|
@@ -1227,6 +1076,7 @@ type PivotControlsProps = {
|
|
|
1227
1076
|
onDragStart?: (props: OnDragStartProps) => void;
|
|
1228
1077
|
onDrag?: (l: THREE.Matrix4, deltaL: THREE.Matrix4, w: THREE.Matrix4, deltaW: THREE.Matrix4) => void;
|
|
1229
1078
|
onDragEnd?: () => void;
|
|
1079
|
+
onHover?: (props: OnHoverProps) => void;
|
|
1230
1080
|
depthTest?: boolean;
|
|
1231
1081
|
renderOrder?: number;
|
|
1232
1082
|
opacity?: number;
|
|
@@ -1312,6 +1162,7 @@ type InstancedAttributeProps = Omit<ThreeElements['instancedBufferAttribute'], '
|
|
|
1312
1162
|
defaultValue: any;
|
|
1313
1163
|
normalized?: boolean;
|
|
1314
1164
|
usage?: number;
|
|
1165
|
+
type?: 'float' | 'int' | 'uint' | 'short' | 'ushort' | 'byte';
|
|
1315
1166
|
};
|
|
1316
1167
|
type InstancedMesh = Omit<THREE.InstancedMesh, 'instanceMatrix' | 'instanceColor'> & {
|
|
1317
1168
|
instanceMatrix: THREE.InstancedBufferAttribute;
|
|
@@ -1626,10 +1477,10 @@ declare function Fbx({ path, ...props }: {
|
|
|
1626
1477
|
type Path = string | string[];
|
|
1627
1478
|
type UseDraco = boolean | string;
|
|
1628
1479
|
type UseMeshopt = boolean;
|
|
1629
|
-
type ExtendLoader = (loader: GLTFLoader) => void;
|
|
1480
|
+
type ExtendLoader$1 = (loader: GLTFLoader) => void;
|
|
1630
1481
|
declare const useGLTF: {
|
|
1631
|
-
<T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
|
|
1632
|
-
preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader): void;
|
|
1482
|
+
<T extends Path>(path: T, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap;
|
|
1483
|
+
preload(path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader$1): void;
|
|
1633
1484
|
clear(path: Path): void;
|
|
1634
1485
|
setDecoderPath(path: string): void;
|
|
1635
1486
|
};
|
|
@@ -1637,22 +1488,26 @@ type GltfProps = Omit<CloneProps, 'object'> & {
|
|
|
1637
1488
|
src: string;
|
|
1638
1489
|
useDraco?: UseDraco;
|
|
1639
1490
|
useMeshOpt?: UseMeshopt;
|
|
1640
|
-
extendLoader?: ExtendLoader;
|
|
1491
|
+
extendLoader?: ExtendLoader$1;
|
|
1641
1492
|
};
|
|
1642
1493
|
declare const Gltf: React.ForwardRefExoticComponent<Omit<GltfProps, "ref"> & React.RefAttributes<three.Group<three.Object3DEventMap>>>;
|
|
1643
1494
|
|
|
1644
|
-
|
|
1495
|
+
type ExtendLoader = (loader: KTX2Loader) => void;
|
|
1496
|
+
declare function useKTX2<Url extends string[] | string | Record<string, string>>(input: Url, basisPath?: boolean | string, extendLoader?: ExtendLoader): Url extends any[] ? Texture$1[] : Url extends object ? {
|
|
1645
1497
|
[key in keyof Url]: Texture$1;
|
|
1646
1498
|
} : Texture$1;
|
|
1647
1499
|
declare namespace useKTX2 {
|
|
1648
|
-
var preload: (url: string extends any[] ? string[] : string, basisPath?: string) => void;
|
|
1500
|
+
var preload: (url: string extends any[] ? string[] : string, basisPath?: boolean | string, extendLoader?: ExtendLoader) => void;
|
|
1649
1501
|
var clear: (input: string | string[]) => void;
|
|
1502
|
+
var setTranscoderPath: (path: string) => void;
|
|
1650
1503
|
}
|
|
1651
|
-
|
|
1504
|
+
type Ktx2Props = {
|
|
1652
1505
|
children?: (texture: ReturnType<typeof useKTX2>) => React.ReactNode;
|
|
1653
1506
|
input: Parameters<typeof useKTX2>[0];
|
|
1654
1507
|
basisPath?: Parameters<typeof useKTX2>[1];
|
|
1655
|
-
|
|
1508
|
+
extendLoader?: ExtendLoader;
|
|
1509
|
+
};
|
|
1510
|
+
declare const Ktx2: ({ children, input, basisPath, extendLoader }: Ktx2Props) => React.JSX.Element;
|
|
1656
1511
|
|
|
1657
1512
|
type Data = {
|
|
1658
1513
|
errors: string[];
|
|
@@ -1802,7 +1657,7 @@ declare const Mask: ForwardRefComponent<MaskProps, THREE.Mesh>;
|
|
|
1802
1657
|
declare function useMask(id: number, inverse?: boolean): {
|
|
1803
1658
|
stencilWrite: boolean;
|
|
1804
1659
|
stencilRef: number;
|
|
1805
|
-
stencilFunc:
|
|
1660
|
+
stencilFunc: 517 | 514;
|
|
1806
1661
|
stencilFail: 7680;
|
|
1807
1662
|
stencilZFail: 7680;
|
|
1808
1663
|
stencilZPass: 7680;
|
|
@@ -1955,7 +1810,7 @@ type EnvironmentLoaderProps = {
|
|
|
1955
1810
|
extensions?: (loader: Loader$1) => void;
|
|
1956
1811
|
colorSpace?: ColorSpace;
|
|
1957
1812
|
};
|
|
1958
|
-
declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>):
|
|
1813
|
+
declare function useEnvironment({ files, path, preset, colorSpace, extensions, }?: Partial<EnvironmentLoaderProps>): Texture$1<unknown> | CubeTexture$1<unknown>;
|
|
1959
1814
|
declare namespace useEnvironment {
|
|
1960
1815
|
var preload: (preloadOptions?: EnvironmentLoaderPreloadOptions) => void;
|
|
1961
1816
|
var clear: (clearOptions?: EnvironmentLoaderClearOptions) => void;
|
|
@@ -2110,28 +1965,6 @@ declare function defaultCalculatePosition(el: Object3D, camera: Camera, size: {
|
|
|
2110
1965
|
height: number;
|
|
2111
1966
|
}): number[];
|
|
2112
1967
|
type CalculatePosition = typeof defaultCalculatePosition;
|
|
2113
|
-
type PointerEventsProperties = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit';
|
|
2114
|
-
interface HtmlProps extends Omit<Assign<React.HTMLAttributes<HTMLDivElement>, ThreeElements['group']>, 'ref'> {
|
|
2115
|
-
prepend?: boolean;
|
|
2116
|
-
center?: boolean;
|
|
2117
|
-
fullscreen?: boolean;
|
|
2118
|
-
eps?: number;
|
|
2119
|
-
portal?: React.RefObject<HTMLElement>;
|
|
2120
|
-
distanceFactor?: number;
|
|
2121
|
-
sprite?: boolean;
|
|
2122
|
-
transform?: boolean;
|
|
2123
|
-
zIndexRange?: Array<number>;
|
|
2124
|
-
calculatePosition?: CalculatePosition;
|
|
2125
|
-
as?: string;
|
|
2126
|
-
wrapperClass?: string;
|
|
2127
|
-
pointerEvents?: PointerEventsProperties;
|
|
2128
|
-
occlude?: React.RefObject<Object3D>[] | boolean | 'raycast' | 'blending';
|
|
2129
|
-
onOcclude?: (hidden: boolean) => void;
|
|
2130
|
-
material?: React.ReactNode;
|
|
2131
|
-
geometry?: React.ReactNode;
|
|
2132
|
-
castShadow?: boolean;
|
|
2133
|
-
receiveShadow?: boolean;
|
|
2134
|
-
}
|
|
2135
1968
|
|
|
2136
1969
|
declare function useAspect(width: number, height: number, factor?: number): [number, number, number];
|
|
2137
1970
|
|
|
@@ -2156,36 +1989,116 @@ type SelectProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
|
2156
1989
|
declare function Select({ box, multiple, children, onChange, onChangePointerUp, border, backgroundColor, filter: customFilter, ...props }: SelectProps): React.JSX.Element;
|
|
2157
1990
|
declare function useSelect(): THREE.Object3D[];
|
|
2158
1991
|
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
1992
|
+
interface WireframeMaterialProps {
|
|
1993
|
+
fillOpacity?: number;
|
|
1994
|
+
fillMix?: number;
|
|
1995
|
+
strokeOpacity?: number;
|
|
1996
|
+
thickness?: number;
|
|
1997
|
+
colorBackfaces?: boolean;
|
|
1998
|
+
dashInvert?: boolean;
|
|
1999
|
+
dash?: boolean;
|
|
2000
|
+
dashRepeats?: number;
|
|
2001
|
+
dashLength?: number;
|
|
2002
|
+
squeeze?: boolean;
|
|
2003
|
+
squeezeMin?: number;
|
|
2004
|
+
squeezeMax?: number;
|
|
2005
|
+
stroke?: THREE.ColorRepresentation;
|
|
2006
|
+
backfaceStroke?: THREE.ColorRepresentation;
|
|
2007
|
+
fill?: THREE.ColorRepresentation;
|
|
2166
2008
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2009
|
+
type WireframeMaterialType = Omit<ThreeElements['meshBasicMaterial'], 'args'> & WireframeMaterialProps;
|
|
2010
|
+
declare module '@react-three/fiber' {
|
|
2011
|
+
interface ThreeElements {
|
|
2012
|
+
wireframeMaterial: WireframeMaterialType;
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
declare class WireframeMaterialImpl extends MeshBasicNodeMaterial {
|
|
2016
|
+
private _strokeOpacity;
|
|
2017
|
+
private _fillOpacity;
|
|
2018
|
+
private _fillMix;
|
|
2019
|
+
private _thickness;
|
|
2020
|
+
private _colorBackfaces;
|
|
2021
|
+
private _dashInvert;
|
|
2022
|
+
private _dash;
|
|
2023
|
+
private _dashRepeats;
|
|
2024
|
+
private _dashLength;
|
|
2025
|
+
private _squeeze;
|
|
2026
|
+
private _squeezeMin;
|
|
2027
|
+
private _squeezeMax;
|
|
2028
|
+
private _stroke;
|
|
2029
|
+
private _backfaceStroke;
|
|
2030
|
+
private _fill;
|
|
2031
|
+
readonly isWireframeMaterial = true;
|
|
2032
|
+
constructor();
|
|
2033
|
+
private _buildWireframeShader;
|
|
2034
|
+
get strokeOpacity(): number;
|
|
2035
|
+
set strokeOpacity(v: number);
|
|
2036
|
+
get fillOpacity(): number;
|
|
2037
|
+
set fillOpacity(v: number);
|
|
2038
|
+
get fillMix(): number;
|
|
2039
|
+
set fillMix(v: number);
|
|
2040
|
+
get thickness(): number;
|
|
2041
|
+
set thickness(v: number);
|
|
2042
|
+
get colorBackfaces(): boolean;
|
|
2043
|
+
set colorBackfaces(v: boolean);
|
|
2044
|
+
get dashInvert(): boolean;
|
|
2045
|
+
set dashInvert(v: boolean);
|
|
2046
|
+
get dash(): boolean;
|
|
2047
|
+
set dash(v: boolean);
|
|
2048
|
+
get dashRepeats(): number;
|
|
2049
|
+
set dashRepeats(v: number);
|
|
2050
|
+
get dashLength(): number;
|
|
2051
|
+
set dashLength(v: number);
|
|
2052
|
+
get squeeze(): boolean;
|
|
2053
|
+
set squeeze(v: boolean);
|
|
2054
|
+
get squeezeMin(): number;
|
|
2055
|
+
set squeezeMin(v: number);
|
|
2056
|
+
get squeezeMax(): number;
|
|
2057
|
+
set squeezeMax(v: number);
|
|
2058
|
+
get stroke(): THREE.Color;
|
|
2059
|
+
set stroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2060
|
+
get backfaceStroke(): THREE.Color;
|
|
2061
|
+
set backfaceStroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2062
|
+
get fill(): THREE.Color;
|
|
2063
|
+
set fill(v: THREE.Color | THREE.ColorRepresentation);
|
|
2177
2064
|
}
|
|
2178
|
-
declare
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2065
|
+
declare function setBarycentricCoordinates(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
|
|
2066
|
+
declare const WireframeMaterial: ForwardRefComponent<WireframeMaterialProps, WireframeMaterialImpl>;
|
|
2067
|
+
declare const WireframeMaterialShaders: {
|
|
2068
|
+
uniforms: {
|
|
2069
|
+
strokeOpacity: number;
|
|
2070
|
+
fillOpacity: number;
|
|
2071
|
+
fillMix: number;
|
|
2072
|
+
thickness: number;
|
|
2073
|
+
colorBackfaces: boolean;
|
|
2074
|
+
dashInvert: boolean;
|
|
2075
|
+
dash: boolean;
|
|
2076
|
+
dashRepeats: number;
|
|
2077
|
+
dashLength: number;
|
|
2078
|
+
squeeze: boolean;
|
|
2079
|
+
squeezeMin: number;
|
|
2080
|
+
squeezeMax: number;
|
|
2081
|
+
stroke: THREE.Color;
|
|
2082
|
+
backfaceStroke: THREE.Color;
|
|
2083
|
+
fill: THREE.Color;
|
|
2084
|
+
};
|
|
2085
|
+
vertex: string;
|
|
2086
|
+
fragment: string;
|
|
2087
|
+
};
|
|
2088
|
+
declare function setWireframeOverride(_material: THREE.Material, _uniforms: {
|
|
2089
|
+
[key: string]: THREE.Uniform<any>;
|
|
2090
|
+
}): void;
|
|
2091
|
+
declare function useWireframeUniforms(_uniforms: {
|
|
2092
|
+
[key: string]: THREE.Uniform<any>;
|
|
2093
|
+
}, _props: WireframeMaterialProps): void;
|
|
2094
|
+
|
|
2095
|
+
interface WireframeProps {
|
|
2096
|
+
geometry?: THREE.BufferGeometry | React.RefObject<THREE.BufferGeometry>;
|
|
2097
|
+
simplify?: boolean;
|
|
2188
2098
|
}
|
|
2099
|
+
declare function Wireframe({ geometry: customGeometry, ...props }: WireframeProps & WireframeMaterialProps): React.JSX.Element;
|
|
2100
|
+
|
|
2101
|
+
declare function BakeShadows(): null;
|
|
2189
2102
|
|
|
2190
2103
|
declare class ConvolutionMaterial extends MeshBasicNodeMaterial {
|
|
2191
2104
|
private _inputBuffer;
|
|
@@ -2274,13 +2187,6 @@ type ImageProps = Omit<ThreeElements['mesh'], 'scale'> & {
|
|
|
2274
2187
|
});
|
|
2275
2188
|
declare const Image: ForwardRefComponent<ImageProps, THREE.Mesh>;
|
|
2276
2189
|
|
|
2277
|
-
type SoftShadowsProps = {
|
|
2278
|
-
size?: number;
|
|
2279
|
-
samples?: number;
|
|
2280
|
-
focus?: number;
|
|
2281
|
-
};
|
|
2282
|
-
declare function SoftShadows({ focus, samples, size }: SoftShadowsProps): null;
|
|
2283
|
-
|
|
2284
2190
|
declare class SpotLightMaterial extends MeshBasicNodeMaterial {
|
|
2285
2191
|
private _depth;
|
|
2286
2192
|
private _opacity;
|
|
@@ -2313,109 +2219,6 @@ declare class SpotLightMaterial extends MeshBasicNodeMaterial {
|
|
|
2313
2219
|
set resolution(v: THREE.Vector2);
|
|
2314
2220
|
}
|
|
2315
2221
|
|
|
2316
|
-
interface WireframeMaterialProps {
|
|
2317
|
-
fillOpacity?: number;
|
|
2318
|
-
fillMix?: number;
|
|
2319
|
-
strokeOpacity?: number;
|
|
2320
|
-
thickness?: number;
|
|
2321
|
-
colorBackfaces?: boolean;
|
|
2322
|
-
dashInvert?: boolean;
|
|
2323
|
-
dash?: boolean;
|
|
2324
|
-
dashRepeats?: number;
|
|
2325
|
-
dashLength?: number;
|
|
2326
|
-
squeeze?: boolean;
|
|
2327
|
-
squeezeMin?: number;
|
|
2328
|
-
squeezeMax?: number;
|
|
2329
|
-
stroke?: THREE.ColorRepresentation;
|
|
2330
|
-
backfaceStroke?: THREE.ColorRepresentation;
|
|
2331
|
-
fill?: THREE.ColorRepresentation;
|
|
2332
|
-
}
|
|
2333
|
-
type WireframeMaterialType = Omit<ThreeElements['meshBasicMaterial'], 'args'> & WireframeMaterialProps;
|
|
2334
|
-
declare module '@react-three/fiber' {
|
|
2335
|
-
interface ThreeElements {
|
|
2336
|
-
wireframeMaterial: WireframeMaterialType;
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
declare class WireframeMaterialImpl extends MeshBasicNodeMaterial {
|
|
2340
|
-
private _strokeOpacity;
|
|
2341
|
-
private _fillOpacity;
|
|
2342
|
-
private _fillMix;
|
|
2343
|
-
private _thickness;
|
|
2344
|
-
private _colorBackfaces;
|
|
2345
|
-
private _dashInvert;
|
|
2346
|
-
private _dash;
|
|
2347
|
-
private _dashRepeats;
|
|
2348
|
-
private _dashLength;
|
|
2349
|
-
private _squeeze;
|
|
2350
|
-
private _squeezeMin;
|
|
2351
|
-
private _squeezeMax;
|
|
2352
|
-
private _stroke;
|
|
2353
|
-
private _backfaceStroke;
|
|
2354
|
-
private _fill;
|
|
2355
|
-
readonly isWireframeMaterial = true;
|
|
2356
|
-
constructor();
|
|
2357
|
-
private _buildWireframeShader;
|
|
2358
|
-
get strokeOpacity(): number;
|
|
2359
|
-
set strokeOpacity(v: number);
|
|
2360
|
-
get fillOpacity(): number;
|
|
2361
|
-
set fillOpacity(v: number);
|
|
2362
|
-
get fillMix(): number;
|
|
2363
|
-
set fillMix(v: number);
|
|
2364
|
-
get thickness(): number;
|
|
2365
|
-
set thickness(v: number);
|
|
2366
|
-
get colorBackfaces(): boolean;
|
|
2367
|
-
set colorBackfaces(v: boolean);
|
|
2368
|
-
get dashInvert(): boolean;
|
|
2369
|
-
set dashInvert(v: boolean);
|
|
2370
|
-
get dash(): boolean;
|
|
2371
|
-
set dash(v: boolean);
|
|
2372
|
-
get dashRepeats(): number;
|
|
2373
|
-
set dashRepeats(v: number);
|
|
2374
|
-
get dashLength(): number;
|
|
2375
|
-
set dashLength(v: number);
|
|
2376
|
-
get squeeze(): boolean;
|
|
2377
|
-
set squeeze(v: boolean);
|
|
2378
|
-
get squeezeMin(): number;
|
|
2379
|
-
set squeezeMin(v: number);
|
|
2380
|
-
get squeezeMax(): number;
|
|
2381
|
-
set squeezeMax(v: number);
|
|
2382
|
-
get stroke(): THREE.Color;
|
|
2383
|
-
set stroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2384
|
-
get backfaceStroke(): THREE.Color;
|
|
2385
|
-
set backfaceStroke(v: THREE.Color | THREE.ColorRepresentation);
|
|
2386
|
-
get fill(): THREE.Color;
|
|
2387
|
-
set fill(v: THREE.Color | THREE.ColorRepresentation);
|
|
2388
|
-
}
|
|
2389
|
-
declare function setBarycentricCoordinates(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
|
|
2390
|
-
declare const WireframeMaterial: ForwardRefComponent<WireframeMaterialProps, WireframeMaterialImpl>;
|
|
2391
|
-
declare const WireframeMaterialShaders: {
|
|
2392
|
-
uniforms: {
|
|
2393
|
-
strokeOpacity: number;
|
|
2394
|
-
fillOpacity: number;
|
|
2395
|
-
fillMix: number;
|
|
2396
|
-
thickness: number;
|
|
2397
|
-
colorBackfaces: boolean;
|
|
2398
|
-
dashInvert: boolean;
|
|
2399
|
-
dash: boolean;
|
|
2400
|
-
dashRepeats: number;
|
|
2401
|
-
dashLength: number;
|
|
2402
|
-
squeeze: boolean;
|
|
2403
|
-
squeezeMin: number;
|
|
2404
|
-
squeezeMax: number;
|
|
2405
|
-
stroke: THREE.Color;
|
|
2406
|
-
backfaceStroke: THREE.Color;
|
|
2407
|
-
fill: THREE.Color;
|
|
2408
|
-
};
|
|
2409
|
-
vertex: string;
|
|
2410
|
-
fragment: string;
|
|
2411
|
-
};
|
|
2412
|
-
declare function setWireframeOverride(_material: THREE.Material, _uniforms: {
|
|
2413
|
-
[key: string]: THREE.Uniform<any>;
|
|
2414
|
-
}): void;
|
|
2415
|
-
declare function useWireframeUniforms(_uniforms: {
|
|
2416
|
-
[key: string]: THREE.Uniform<any>;
|
|
2417
|
-
}, _props: WireframeMaterialProps): void;
|
|
2418
|
-
|
|
2419
2222
|
declare class StarfieldMaterial extends SpriteNodeMaterial {
|
|
2420
2223
|
private _time;
|
|
2421
2224
|
private _fade;
|
|
@@ -2463,6 +2266,13 @@ type GridProps = Omit<ThreeElements['mesh'], 'ref' | 'args'> & GridMaterialType
|
|
|
2463
2266
|
};
|
|
2464
2267
|
declare const Grid: ForwardRefComponent<GridProps, THREE.Mesh>;
|
|
2465
2268
|
|
|
2269
|
+
type SoftShadowsProps = {
|
|
2270
|
+
size?: number;
|
|
2271
|
+
samples?: number;
|
|
2272
|
+
focus?: number;
|
|
2273
|
+
};
|
|
2274
|
+
declare function SoftShadows(props: SoftShadowsProps): null;
|
|
2275
|
+
|
|
2466
2276
|
type SpotLightProps = Omit<ThreeElements['spotLight'], 'ref'> & {
|
|
2467
2277
|
depthBuffer?: Texture$1;
|
|
2468
2278
|
attenuation?: number;
|
|
@@ -2508,8 +2318,5 @@ type SparklesProps = Omit<ThreeElements['mesh'], 'ref'> & {
|
|
|
2508
2318
|
};
|
|
2509
2319
|
declare const Sparkles: ForwardRefComponent<SparklesProps, THREE.InstancedMesh>;
|
|
2510
2320
|
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
export { AccumulativeShadows, AdaptiveDpr, AdaptiveEvents, ArcballControls, BBAnchor, Backdrop, BakeShadows, Billboard, BlurPass, Bounds, Box, CameraShake, Capsule, CatmullRomLine, Caustics, CausticsMaterial, CausticsNormalMaterial, CausticsProjectionMaterial, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, ContactShadows, ConvolutionMaterial, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, DiscardMaterial, Dodecahedron, DragControls, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, FakeCloudMaterial, Fbo, Fbx, FirstPersonControls, Fisheye, Float, FlyControls, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, GradientTexture, GradientType, Grid, Helper, Html, Hud, Icosahedron, Image, Instance, InstancedAttribute, Instances, IsObject, KeyboardControls, Ktx2, Lathe, Lightformer, Line, Loader, MapControls, Mask, MatcapTexture, Merged, MeshDistortMaterial, MeshPortalMaterial, MeshReflectorMaterial, MeshReflectorMaterial$1 as MeshReflectorMaterialImpl, MeshRefractionMaterial, MeshTransmissionMaterial, MeshWobbleMaterial, MotionPathControls, NormalTexture, Octahedron, OrbitControls, OrthographicCamera, Outlines, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, PointerLockControls, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RandomizedLight, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, ScrollControls, Segment, SegmentObject, Segments, Select, Shadow, Shape, Sky, SoftShadows, Sparkles, SparklesMaterial, Sphere, SpotLight, SpotLightMaterial, SpriteAnimator, Stage, StarfieldMaterial, Stars, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, TrackballControls, Trail, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, Wireframe, WireframeMaterial, WireframeMaterialShaders, accumulativeContext, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, setBarycentricCoordinates, setWireframeOverride, useAnimations, useAspect, useBounds, useContextBridge, useCubeCamera, useCubeTexture, useCursor, useCustomRaycast, useDepthBuffer, useDetectGPU, useEnvironment, useFBO, useFBX, useFont, useGLTF, useGizmoContext, useHelper, useIntersect, useKTX2, useKeyboardControls, useMask, useMatcapTexture, useMotion, useNormalTexture, usePerformanceMonitor, useProgress, useScroll, useSelect, useSpriteAnimator, useSpriteLoader, useSurfaceSampler, useTexture, useTrail, useTrailTexture, useVideoTexture, useWireframeUniforms };
|
|
2515
|
-
export type { AccumulativeShadowsProps, ArcballControlsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BlurPassProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CausticsProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, ContactShadowsProps, ContainerProps, CubeCameraOptions, CubeCameraProps, CubeTextureProps, CubicBezierLineProps, CurveModifierProps, CurveModifierRef, CycleRaycastProps, DecalProps, DetailedProps, DetectGPUProps, DeviceOrientationControlsProps, DragControlsProps, EdgesProps, EnvironmentLoaderProps, EnvironmentProps, ExampleApi, ExampleProps, FboProps, FirstPersonControlsProps, FisheyeProps, FloatProps, FlyControlsProps, FontData, FrameData, GizmoHelperProps, GltfProps, Glyph, GradientTextureProps, GridMaterialType, GridProps, HelperProps, HtmlProps, HudProps, ImageProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, KeyboardControlsProps, LightProps, LineProps, LoaderOptions, MapControlsProps, MaskProps, MergedProps, MeshDistortMaterialProps, MeshReflectorMaterialProps, MeshRefractionMaterialProps, MeshRefractionMaterialType, MeshTransmissionMaterialProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OrbitControlsChangeEvent, OrbitControlsProps, OrthographicCameraProps, OutlinesProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointerLockControlsProps, PointsBuffersProps, PointsInstancesProps, PortalProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RandomizedLightProps, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsProps, ScrollControlsState, ScrollProps, SegmentProps, SegmentsProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SoftShadowsProps, SparklesProps, SpotLightProps, SpriteAnimatorProps, SpriteData, StageProps, StarsProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrackballControlsProps, TrailProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, WireframeMaterialProps, WireframeMaterialType, WobbleMaterialProps, useSurfaceSamplerProps };
|
|
2321
|
+
export { AccumulativeShadows, AdaptiveDpr, AdaptiveEvents, BBAnchor, Backdrop, BakeShadows, Billboard, Bounds, Box, CameraShake, Capsule, CatmullRomLine, CausticsMaterial, CausticsNormalMaterial, CausticsProjectionMaterial, Center, Circle, Clone, Cloud, CloudInstance, Clouds, ComputedAttribute, Cone, ContactShadows, ConvolutionMaterial, CubeCamera, CubeTexture, CubicBezierLine, CurveModifier, CycleRaycast, Cylinder, Decal, Detailed, DetectGPU, DeviceOrientationControls, DiscardMaterial, Dodecahedron, Edges, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, Example, Extrude, FakeCloudMaterial, Fbo, Fbx, Fisheye, Float, GizmoHelper, GizmoViewcube, GizmoViewport, Gltf, GradientTexture, GradientType, Grid, Helper, Hud, Icosahedron, Image, Instance, InstancedAttribute, Instances, IsObject, Ktx2, Lathe, Lightformer, Line, Loader, Mask, MatcapTexture, Merged, MeshDistortMaterial, MeshPortalMaterial, MeshReflectorMaterial, MeshReflectorMaterial$1 as MeshReflectorMaterialImpl, MeshRefractionMaterial, MeshTransmissionMaterial, MeshWobbleMaterial, MotionPathControls, NormalTexture, Octahedron, OrthographicCamera, Outlines, PerformanceMonitor, PerspectiveCamera, PivotControls, Plane, Point, PointMaterial, PointMaterialImpl, Points, PointsBuffer, Polyhedron, PositionMesh, PositionPoint, PositionalAudio, Preload, PresentationControls, Progress, QuadraticBezierLine, RandomizedLight, RenderCubeTexture, RenderTexture, Resize, Ring, RoundedBox, RoundedBoxGeometry, Sampler, ScreenQuad, ScreenSizer, ScreenSpace, ScreenVideoTexture, Scroll, Segment, SegmentObject, Segments, Select, Shadow, Shape, Sky, SoftShadows, Sparkles, SparklesMaterial, Sphere, SpotLight, SpotLightMaterial, SpriteAnimator, Stage, StarfieldMaterial, Stars, Stats, StatsGl, Svg, Tetrahedron, Text3D, Texture, Torus, TorusKnot, Trail, TrailTexture, TransformControls, Tube, VideoTexture, View, WebcamVideoTexture, Wireframe, WireframeMaterial, WireframeMaterialShaders, accumulativeContext, calcPosFromAngles, checkIfFrameIsEmpty, createInstances, getFirstFrame, meshBounds, presetsObj, setBarycentricCoordinates, setWireframeOverride, useAnimations, useAspect, useBounds, useContextBridge, useCubeCamera, useCubeTexture, useCursor, useCustomRaycast, useDepthBuffer, useDetectGPU, useEnvironment, useFBO, useFBX, useFont, useGLTF, useGizmoContext, useHelper, useIntersect, useKTX2, useKeyboardControls, useMask, useMatcapTexture, useMotion, useNormalTexture, usePerformanceMonitor, useProgress, useScroll, useSelect, useSpriteAnimator, useSpriteLoader, useSurfaceSampler, useTexture, useTrail, useTrailTexture, useVideoTexture, useWireframeUniforms };
|
|
2322
|
+
export type { AccumulativeShadowsProps, Args, BBAnchorProps, BackdropProps, BillboardProps, BoundsApi, BoundsProps, CalculatePosition, CameraShakeProps, CatmullRomLineProps, CenterProps, CloneProps, CloudProps, CloudsProps, ComputedAttributeProps, ContactShadowsProps, ContainerProps, CubeCameraOptions, CubeCameraProps, CubeTextureProps, CubicBezierLineProps, CurveModifierProps, CurveModifierRef, CycleRaycastProps, DecalProps, DetailedProps, DetectGPUProps, DeviceOrientationControlsProps, EdgesProps, EdgesRef, EnvironmentLoaderProps, EnvironmentProps, ExampleApi, ExampleProps, ExpandedDragConfig, FboProps, FisheyeProps, FloatProps, FontData, FrameData, GizmoHelperProps, GltfProps, Glyph, GradientTextureProps, GridMaterialType, GridProps, HelperProps, HudProps, ImageProps, InstanceProps, InstancedAttributeProps, InstancesProps, KeyboardControlsEntry, LightProps, LineProps, LoaderOptions, MaskProps, MergedProps, MeshDistortMaterialProps, MeshReflectorMaterialProps, MeshRefractionMaterialProps, MeshRefractionMaterialType, MeshTransmissionMaterialProps, MetaData, MotionPathProps, MotionPathRef, OnCenterCallbackProps, OnDragStartProps, OnHoverProps, OrbitControlsChangeEvent, OrthographicCameraProps, OutlinesProps, PerformanceMonitorApi, PerformanceMonitorProps, PerspectiveCameraProps, PivotControlsProps, PointMaterialProps, PointsBuffersProps, PointsInstancesProps, PortalProps, PositionalAudioProps, PreloadProps, PresentationControlProps, PresetsType, QuadraticBezierLineProps, QuadraticBezierLineRef, RandomizedLightProps, RenderCubeTextureApi, RenderCubeTextureProps, RenderTextureProps, ResizeProps, RoundedBoxGeometryProps, RoundedBoxProps, SamplerProps, ScreenQuadProps, ScreenSizerProps, ScreenSpaceProps, ScreenVideoTextureProps, ScrollControlsState, ScrollProps, SegmentProps, SegmentsProps, SelectProps, ShadowProps, ShadowType, ShakeController, ShapeProps, Size, SizeProps, SkyProps, SoftShadowsProps, SparklesProps, SpotLightProps, SpriteAnimatorProps, SpriteData, StageProps, StarsProps, StatsGlProps, StatsProps, SvgProps, Text3DProps, TrailProps, TrailTextureProps, TransformControlsProps, TransformFn, VideoTextureProps, ViewProps, ViewportProps, WebcamVideoTextureProps, WireframeMaterialProps, WireframeMaterialType, WobbleMaterialProps, useSurfaceSamplerProps };
|