@octanejs/drei 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/UPSTREAM.md +92 -0
  4. package/package.json +96 -0
  5. package/src/config.ts +14 -0
  6. package/src/core/AccumulativeShadows.three.tsrx +313 -0
  7. package/src/core/AdaptivePerformance.three.tsrx +49 -0
  8. package/src/core/AsciiRenderer.three.tsrx +61 -0
  9. package/src/core/Bounds.three.tsrx +323 -0
  10. package/src/core/Bvh.three.tsrx +116 -0
  11. package/src/core/CameraControls.three.tsrx +181 -0
  12. package/src/core/CameraShake.three.tsrx +104 -0
  13. package/src/core/Caustics.three.tsrx +107 -0
  14. package/src/core/Center.three.tsrx +145 -0
  15. package/src/core/Clone.three.tsrx +167 -0
  16. package/src/core/Cloud.three.tsrx +314 -0
  17. package/src/core/ComputedAttribute.three.tsrx +27 -0
  18. package/src/core/ContactShadows.three.tsrx +106 -0
  19. package/src/core/CubeTexture.three.tsrx +32 -0
  20. package/src/core/CurveModifier.three.tsrx +37 -0
  21. package/src/core/Decal.three.tsrx +132 -0
  22. package/src/core/Detailed.three.tsrx +28 -0
  23. package/src/core/DetectGPU.three.tsrx +22 -0
  24. package/src/core/Effects.three.tsrx +123 -0
  25. package/src/core/Environment.three.tsrx +220 -0
  26. package/src/core/Example.three.tsrx +56 -0
  27. package/src/core/Fbo.three.tsrx +70 -0
  28. package/src/core/Fbx.three.tsrx +25 -0
  29. package/src/core/Fisheye.three.tsrx +82 -0
  30. package/src/core/GizmoHelper.three.tsrx +115 -0
  31. package/src/core/GizmoViewcube.three.tsrx +82 -0
  32. package/src/core/GizmoViewport.three.tsrx +122 -0
  33. package/src/core/Gltf.three.tsrx +62 -0
  34. package/src/core/GradientTexture.three.tsrx +66 -0
  35. package/src/core/Grid.three.tsrx +170 -0
  36. package/src/core/Helper.three.tsrx +56 -0
  37. package/src/core/Hud.three.tsrx +52 -0
  38. package/src/core/Image.three.tsrx +146 -0
  39. package/src/core/Instances.three.tsrx +332 -0
  40. package/src/core/Ktx2.three.tsrx +59 -0
  41. package/src/core/Lightformer.three.tsrx +75 -0
  42. package/src/core/MarchingCubes.three.tsrx +125 -0
  43. package/src/core/MeshPortalMaterial.three.tsrx +103 -0
  44. package/src/core/MeshReflectorMaterial.three.tsrx +67 -0
  45. package/src/core/MeshRefractionMaterial.three.tsrx +70 -0
  46. package/src/core/MeshTransmissionMaterial.three.tsrx +71 -0
  47. package/src/core/MotionPathControls.three.tsrx +139 -0
  48. package/src/core/MultiMaterial.three.tsrx +32 -0
  49. package/src/core/Outlines.three.tsrx +162 -0
  50. package/src/core/PerformanceMonitor.three.tsrx +144 -0
  51. package/src/core/PointerLockControls.three.tsrx +84 -0
  52. package/src/core/Points.three.tsrx +242 -0
  53. package/src/core/PositionalAudio.three.tsrx +76 -0
  54. package/src/core/Preload.three.tsrx +40 -0
  55. package/src/core/Progress.three.tsrx +47 -0
  56. package/src/core/RenderCubeTexture.three.tsrx +111 -0
  57. package/src/core/RenderTexture.three.tsrx +102 -0
  58. package/src/core/Resize.three.tsrx +59 -0
  59. package/src/core/RoundedBox.three.tsrx +106 -0
  60. package/src/core/Sampler.three.tsrx +116 -0
  61. package/src/core/ScreenSizer.three.tsrx +43 -0
  62. package/src/core/ScreenSpace.three.tsrx +21 -0
  63. package/src/core/Segments.three.tsrx +119 -0
  64. package/src/core/Sky.three.tsrx +63 -0
  65. package/src/core/Sparkles.three.tsrx +145 -0
  66. package/src/core/Splat.three.tsrx +52 -0
  67. package/src/core/SpotLight.three.tsrx +350 -0
  68. package/src/core/SpriteAnimator.three.tsrx +338 -0
  69. package/src/core/Stage.three.tsrx +112 -0
  70. package/src/core/Stars.three.tsrx +103 -0
  71. package/src/core/Stats.three.tsrx +35 -0
  72. package/src/core/StatsGl.three.tsrx +60 -0
  73. package/src/core/Svg.three.tsrx +82 -0
  74. package/src/core/Text.three.tsrx +96 -0
  75. package/src/core/Text3D.three.tsrx +90 -0
  76. package/src/core/Texture.three.tsrx +72 -0
  77. package/src/core/Trail.three.tsrx +167 -0
  78. package/src/core/TrailTexture.three.tsrx +171 -0
  79. package/src/core/TransformControls.three.tsrx +155 -0
  80. package/src/core/VideoTexture.three.tsrx +116 -0
  81. package/src/core/Wireframe.three.tsrx +92 -0
  82. package/src/core/basic-controls.three.tsrx +353 -0
  83. package/src/core/calculateScaleFactor.ts +42 -0
  84. package/src/core/cameras.three.tsrx +230 -0
  85. package/src/core/catalog-resource.ts +12 -0
  86. package/src/core/catalog-textures.three.tsrx +105 -0
  87. package/src/core/compiler-slot.ts +9 -0
  88. package/src/core/effects-utils.ts +8 -0
  89. package/src/core/environment-loader.ts +87 -0
  90. package/src/core/font-resource.ts +31 -0
  91. package/src/core/gltf-loader.ts +33 -0
  92. package/src/core/gradient-types.ts +4 -0
  93. package/src/core/index.ts +295 -0
  94. package/src/core/lines.three.tsrx +329 -0
  95. package/src/core/meshBounds.ts +26 -0
  96. package/src/core/motion-materials.three.tsrx +93 -0
  97. package/src/core/octane-children.ts +18 -0
  98. package/src/core/octane-element.ts +16 -0
  99. package/src/core/resource.ts +29 -0
  100. package/src/core/scene-motion.three.tsrx +183 -0
  101. package/src/core/shaderMaterial.ts +50 -0
  102. package/src/core/shadows.three.tsrx +164 -0
  103. package/src/core/shapes.three.tsrx +170 -0
  104. package/src/core/simple-materials.three.tsrx +124 -0
  105. package/src/core/softShadows.three.tsrx +151 -0
  106. package/src/core/splat-resource.ts +598 -0
  107. package/src/core/useAnimations.three.tsrx +57 -0
  108. package/src/core/useAspect.three.tsrx +10 -0
  109. package/src/core/useBoxProjectedEnv.three.tsrx +113 -0
  110. package/src/core/useCamera.three.tsrx +26 -0
  111. package/src/core/useContextBridge.three.tsrx +25 -0
  112. package/src/core/useDepthBuffer.three.tsrx +35 -0
  113. package/src/core/useEnvironment.three.tsrx +81 -0
  114. package/src/core/useFont.three.tsrx +12 -0
  115. package/src/core/useIntersect.three.tsrx +38 -0
  116. package/src/core/useSpriteLoader.three.tsrx +249 -0
  117. package/src/core/video-texture-resource.ts +14 -0
  118. package/src/index.ts +2 -0
  119. package/src/materials/BlurPass.ts +94 -0
  120. package/src/materials/CausticsMaterials.ts +197 -0
  121. package/src/materials/ConvolutionMaterial.ts +65 -0
  122. package/src/materials/MeshReflectorMaterial.ts +180 -0
  123. package/src/materials/MeshRefractionMaterial.ts +131 -0
  124. package/src/materials/MeshTransmissionMaterial.ts +182 -0
  125. package/src/materials/PortalMaterial.ts +38 -0
  126. package/src/materials/WireframeMaterial.ts +241 -0
  127. package/src/materials/makeSDFGenerator.ts +155 -0
  128. package/src/troika-three-text.d.ts +19 -0
  129. package/src/web/CycleRaycast.three.tsrx +81 -0
  130. package/src/web/DragControls.three.tsrx +82 -0
  131. package/src/web/FaceControls.three.tsrx +178 -0
  132. package/src/web/FaceLandmarker.three.tsrx +48 -0
  133. package/src/web/Facemesh.three.tsrx +464 -0
  134. package/src/web/Html.three.tsrx +390 -0
  135. package/src/web/KeyboardControls.three.tsrx +98 -0
  136. package/src/web/Loader.tsrx +61 -0
  137. package/src/web/PresentationControls.three.tsrx +63 -0
  138. package/src/web/ScrollControls.three.tsrx +120 -0
  139. package/src/web/Select.three.tsrx +155 -0
  140. package/src/web/View.three.tsrx +46 -0
  141. package/src/web/face-landmarker-resource.ts +18 -0
  142. package/src/web/facemesh-data.ts +54 -0
  143. package/src/web/index.ts +41 -0
  144. package/src/web/keyboard-controls-types.ts +33 -0
  145. package/src/web/media-textures.three.tsrx +50 -0
  146. package/src/web/pivotControls/annotation.tsrx +17 -0
  147. package/src/web/pivotControls/context.ts +38 -0
  148. package/src/web/pivotControls/index.three.tsrx +877 -0
  149. package/src/web/scroll-html-root.tsrx +27 -0
  150. package/src/web/useCursor.three.tsrx +19 -0
  151. package/src/web/useGesture.ts +27 -0
  152. package/status.json +14 -0
@@ -0,0 +1,105 @@
1
+ import { useLayoutEffect, useMemo, use } from '@octanejs/three/renderer';
2
+ import { RepeatWrapping, type Texture, Vector2 } from 'three';
3
+ import { slotDefault } from './compiler-slot.js';
4
+ import { resolveRenderChildren, type RenderChildren } from './octane-children.js';
5
+ import { resourcePromise } from './resource.js';
6
+ import { useTexture } from './Texture.three.tsrx';
7
+ import {
8
+ loadCatalogList,
9
+ MATCAP_LIST_URL,
10
+ MATCAP_ROOT,
11
+ NORMAL_LIST_URL,
12
+ NORMAL_ROOT,
13
+ } from './catalog-resource.js';
14
+
15
+ function getFormatString(format: number) {
16
+ switch (format) {
17
+ case 64:
18
+ return '-64px';
19
+ case 128:
20
+ return '-128px';
21
+ case 256:
22
+ return '-256px';
23
+ case 512:
24
+ return '-512px';
25
+ default:
26
+ return '';
27
+ }
28
+ }
29
+
30
+ export function useMatcapTexture(
31
+ id: number | string = 0,
32
+ format = 1024,
33
+ onLoad?: (texture: Texture | Texture[]) => void,
34
+ ): [Texture, string, number] {
35
+ id = slotDefault(id, 0);
36
+ format = slotDefault(format, 1024);
37
+ onLoad = slotDefault(onLoad, undefined);
38
+ const matcapList = use(resourcePromise(loadCatalogList, [MATCAP_LIST_URL]));
39
+ const defaultMatcap = matcapList[0];
40
+ const total = useMemo(() => Object.keys(matcapList).length, []);
41
+ const fileHash = useMemo(() => {
42
+ if (typeof id === 'string') return id;
43
+ if (typeof id === 'number') return matcapList[id];
44
+ return null;
45
+ }, [id]);
46
+ const fileName = `${fileHash || defaultMatcap}${getFormatString(format)}.png`;
47
+ const url = `${MATCAP_ROOT}/${format}/${fileName}`;
48
+ const texture = useTexture(url, onLoad) as Texture;
49
+ return [texture, url, total];
50
+ }
51
+
52
+ export function MatcapTexture({
53
+ children,
54
+ id,
55
+ format,
56
+ onLoad,
57
+ }: {
58
+ children?: RenderChildren<ReturnType<typeof useMatcapTexture>>;
59
+ id?: Parameters<typeof useMatcapTexture>[0];
60
+ format?: Parameters<typeof useMatcapTexture>[1];
61
+ onLoad?: Parameters<typeof useMatcapTexture>[2];
62
+ }) @{
63
+ const texture = useMatcapTexture(id, format, onLoad);
64
+ <>{resolveRenderChildren(children, texture)}</>
65
+ }
66
+
67
+ type Settings = {
68
+ repeat?: number[];
69
+ anisotropy?: number;
70
+ offset?: number[];
71
+ };
72
+
73
+ export function useNormalTexture(
74
+ id = 0,
75
+ settings: Settings = {},
76
+ onLoad?: (texture: Texture | Texture[]) => void,
77
+ ): [Texture, string, number] {
78
+ id = slotDefault(id, 0);
79
+ settings = slotDefault(settings, {});
80
+ onLoad = slotDefault(onLoad, undefined);
81
+ const { repeat = [1, 1], anisotropy = 1, offset = [0, 0] } = settings;
82
+ const normalsList = use(resourcePromise(loadCatalogList, [NORMAL_LIST_URL]));
83
+ const total = useMemo(() => Object.keys(normalsList).length, []);
84
+ const defaultNormal = normalsList[0];
85
+ const imageName = normalsList[id] || defaultNormal;
86
+ const url = `${NORMAL_ROOT}/normals/${imageName}`;
87
+ const texture = useTexture(url, onLoad) as Texture;
88
+ useLayoutEffect(() => {
89
+ if (!texture) return;
90
+ texture.wrapS = texture.wrapT = RepeatWrapping;
91
+ texture.repeat = new Vector2(repeat[0], repeat[1]);
92
+ texture.offset = new Vector2(offset[0], offset[1]);
93
+ texture.anisotropy = anisotropy;
94
+ }, [texture, anisotropy, repeat, offset]);
95
+ return [texture, url, total];
96
+ }
97
+
98
+ export function NormalTexture({ children, id, onLoad, ...settings }: {
99
+ children?: RenderChildren<ReturnType<typeof useNormalTexture>>;
100
+ id?: Parameters<typeof useNormalTexture>[0];
101
+ onLoad?: Parameters<typeof useNormalTexture>[2];
102
+ } & Settings) @{
103
+ const value = useNormalTexture(id, settings, onLoad);
104
+ <>{resolveRenderChildren(children, value)}</>
105
+ }
@@ -0,0 +1,9 @@
1
+ /** Restore an omitted optional argument when the TSRX compiler supplied its call-site slot. */
2
+ export function slotDefault<T>(value: T, fallback: T): T {
3
+ return typeof value === 'symbol' ? fallback : value;
4
+ }
5
+
6
+ /** Remove the TSRX compiler's trailing call-site slot from a variadic argument list. */
7
+ export function stripTrailingSlot<T>(values: T[]): T[] {
8
+ return typeof values.at(-1) === 'symbol' ? values.slice(0, -1) : values;
9
+ }
@@ -0,0 +1,8 @@
1
+ export function isWebGL2Available(): boolean {
2
+ try {
3
+ const canvas = document.createElement('canvas');
4
+ return Boolean(window.WebGL2RenderingContext && canvas.getContext('webgl2'));
5
+ } catch {
6
+ return false;
7
+ }
8
+ }
@@ -0,0 +1,87 @@
1
+ import { GainMapLoader, HDRJPGLoader } from '@monogrid/gainmap-js';
2
+ import { CubeTextureLoader, type ColorSpace, type Loader } from 'three';
3
+ import { EXRLoader, RGBELoader } from 'three-stdlib';
4
+
5
+ export const CUBEMAP_ROOT =
6
+ 'https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/';
7
+ export const defaultEnvironmentFiles = [
8
+ '/px.png',
9
+ '/nx.png',
10
+ '/py.png',
11
+ '/ny.png',
12
+ '/pz.png',
13
+ '/nz.png',
14
+ ];
15
+
16
+ export const environmentPresets = {
17
+ apartment: 'lebombo_1k.hdr',
18
+ city: 'potsdamer_platz_1k.hdr',
19
+ dawn: 'kiara_1_dawn_1k.hdr',
20
+ forest: 'forest_slope_1k.hdr',
21
+ lobby: 'st_fagans_interior_1k.hdr',
22
+ night: 'dikhololo_night_1k.hdr',
23
+ park: 'rooitou_park_1k.hdr',
24
+ studio: 'studio_small_03_1k.hdr',
25
+ sunset: 'venice_sunset_1k.hdr',
26
+ warehouse: 'empty_warehouse_01_1k.hdr',
27
+ };
28
+
29
+ type Preset = keyof typeof environmentPresets;
30
+
31
+ export interface EnvironmentLoaderProps {
32
+ files?: string | string[];
33
+ path?: string;
34
+ preset?: Preset;
35
+ extensions?: (loader: Loader) => void;
36
+ colorSpace?: ColorSpace;
37
+ }
38
+
39
+ export function validateEnvironmentPreset(preset: string): asserts preset is Preset {
40
+ if (!(preset in environmentPresets)) {
41
+ throw new Error(`Preset must be one of: ${Object.keys(environmentPresets).join(', ')}`);
42
+ }
43
+ }
44
+
45
+ export function resolveEnvironmentOptions(options: Partial<EnvironmentLoaderProps> = {}) {
46
+ let files = options.files ?? defaultEnvironmentFiles;
47
+ let path = options.path ?? '';
48
+ if (options.preset) {
49
+ validateEnvironmentPreset(options.preset);
50
+ files = environmentPresets[options.preset];
51
+ path = CUBEMAP_ROOT;
52
+ }
53
+ return { ...options, files, path };
54
+ }
55
+
56
+ export function environmentExtension(files: string | string[]) {
57
+ const multiple = Array.isArray(files);
58
+ const isCubemap = multiple && files.length === 6;
59
+ const isGainmap = multiple && files.length === 3 && files.some((file) => file.endsWith('json'));
60
+ const firstEntry = multiple ? files[0] : files;
61
+ const extension: string | undefined = isCubemap
62
+ ? 'cube'
63
+ : isGainmap
64
+ ? 'webp'
65
+ : firstEntry.startsWith('data:application/exr')
66
+ ? 'exr'
67
+ : firstEntry.startsWith('data:application/hdr')
68
+ ? 'hdr'
69
+ : firstEntry.startsWith('data:image/jpeg')
70
+ ? 'jpg'
71
+ : firstEntry.split('.').pop()?.split('?').shift()?.toLowerCase();
72
+ return { extension, isCubemap, isGainmap, multiple };
73
+ }
74
+
75
+ export function environmentLoader(extension: string | undefined) {
76
+ return extension === 'cube'
77
+ ? CubeTextureLoader
78
+ : extension === 'hdr'
79
+ ? RGBELoader
80
+ : extension === 'exr'
81
+ ? EXRLoader
82
+ : extension === 'jpg' || extension === 'jpeg'
83
+ ? HDRJPGLoader
84
+ : extension === 'webp'
85
+ ? GainMapLoader
86
+ : null;
87
+ }
@@ -0,0 +1,31 @@
1
+ import { FontLoader } from 'three-stdlib';
2
+
3
+ export interface Glyph {
4
+ _cachedOutline: string[];
5
+ ha: number;
6
+ o: string;
7
+ }
8
+
9
+ export interface FontData {
10
+ boundingBox: { yMax: number; yMin: number };
11
+ familyName: string;
12
+ glyphs: { [key: string]: Glyph };
13
+ resolution: number;
14
+ underlineThickness: number;
15
+ }
16
+
17
+ export type FontInput = string | FontData;
18
+ let fontLoader: FontLoader | null = null;
19
+
20
+ async function loadFontData(font: FontInput): Promise<FontData> {
21
+ return typeof font === 'string' ? await (await fetch(font)).json() : font;
22
+ }
23
+
24
+ function parseFontData(fontData: FontData) {
25
+ fontLoader ??= new FontLoader();
26
+ return fontLoader.parse(fontData);
27
+ }
28
+
29
+ export async function loadFont(font: FontInput) {
30
+ return parseFontData(await loadFontData(font));
31
+ }
@@ -0,0 +1,33 @@
1
+ import { DRACOLoader, GLTFLoader, MeshoptDecoder } from 'three-stdlib';
2
+
3
+ export type Path = string | string[];
4
+ export type UseDraco = boolean | string;
5
+ export type UseMeshopt = boolean;
6
+ export type ExtendLoader = (loader: GLTFLoader) => void;
7
+
8
+ let dracoLoader: DRACOLoader | null = null;
9
+ let decoderPath = 'https://www.gstatic.com/draco/versioned/decoders/1.5.5/';
10
+
11
+ export function gltfExtensions(
12
+ useDraco: UseDraco = true,
13
+ useMeshopt: UseMeshopt = true,
14
+ extendLoader?: ExtendLoader,
15
+ ) {
16
+ return (loader: GLTFLoader) => {
17
+ extendLoader?.(loader);
18
+ if (useDraco) {
19
+ dracoLoader ??= new DRACOLoader();
20
+ dracoLoader.setDecoderPath(typeof useDraco === 'string' ? useDraco : decoderPath);
21
+ loader.setDRACOLoader(dracoLoader);
22
+ }
23
+ if (useMeshopt) {
24
+ loader.setMeshoptDecoder(
25
+ typeof MeshoptDecoder === 'function' ? MeshoptDecoder() : MeshoptDecoder,
26
+ );
27
+ }
28
+ };
29
+ }
30
+
31
+ export function setGltfDecoderPath(path: string): void {
32
+ decoderPath = path;
33
+ }
@@ -0,0 +1,4 @@
1
+ export enum GradientType {
2
+ Linear = 'linear',
3
+ Radial = 'radial',
4
+ }
@@ -0,0 +1,295 @@
1
+ export { calculateScaleFactor } from './calculateScaleFactor.js';
2
+ export { meshBounds } from './meshBounds.js';
3
+ export { shaderMaterial } from './shaderMaterial.js';
4
+ export { RoundedBox, RoundedBoxGeometry } from './RoundedBox.three.tsrx';
5
+ export type { RoundedBoxGeometryProps, RoundedBoxProps } from './RoundedBox.three.tsrx';
6
+ export { GizmoViewcube } from './GizmoViewcube.three.tsrx';
7
+ export { GizmoViewport } from './GizmoViewport.three.tsrx';
8
+ export { useContextBridge } from './useContextBridge.three.tsrx';
9
+ export { Text } from './Text.three.tsrx';
10
+ export type { TextProps } from './Text.three.tsrx';
11
+ export { MeshRefractionMaterial } from './MeshRefractionMaterial.three.tsrx';
12
+ export type { MeshRefractionMaterialProps } from './MeshRefractionMaterial.three.tsrx';
13
+ export { MeshReflectorMaterial } from './MeshReflectorMaterial.three.tsrx';
14
+ export type { MeshReflectorMaterialProps } from './MeshReflectorMaterial.three.tsrx';
15
+ export { Wireframe } from './Wireframe.three.tsrx';
16
+ export { Caustics } from './Caustics.three.tsrx';
17
+ export type { CausticsProps } from './Caustics.three.tsrx';
18
+ export { MeshTransmissionMaterial } from './MeshTransmissionMaterial.three.tsrx';
19
+ export type { MeshTransmissionMaterialProps } from './MeshTransmissionMaterial.three.tsrx';
20
+ export { MeshPortalMaterial } from './MeshPortalMaterial.three.tsrx';
21
+ export type { PortalProps } from './MeshPortalMaterial.three.tsrx';
22
+ export {
23
+ Box,
24
+ Capsule,
25
+ Circle,
26
+ Cone,
27
+ Cylinder,
28
+ Dodecahedron,
29
+ Extrude,
30
+ Icosahedron,
31
+ Lathe,
32
+ Octahedron,
33
+ Plane,
34
+ Polyhedron,
35
+ Ring,
36
+ Shape,
37
+ Sphere,
38
+ Tetrahedron,
39
+ Torus,
40
+ TorusKnot,
41
+ Tube,
42
+ } from './shapes.three.tsrx';
43
+ export type { Args, ShapeProps } from './shapes.three.tsrx';
44
+ export { Progress, useProgress } from './Progress.three.tsrx';
45
+ export { IsObject, Texture, useTexture } from './Texture.three.tsrx';
46
+ export type { MappedTextureType } from './Texture.three.tsrx';
47
+ export { CubeTexture, useCubeTexture } from './CubeTexture.three.tsrx';
48
+ export type { CubeTextureOptions, CubeTextureProps } from './CubeTexture.three.tsrx';
49
+ export { Ktx2, useKTX2 } from './Ktx2.three.tsrx';
50
+ export { useFont } from './useFont.three.tsrx';
51
+ export type { FontData, Glyph } from './useFont.three.tsrx';
52
+ export { Clone } from './Clone.three.tsrx';
53
+ export type { CloneProps } from './Clone.three.tsrx';
54
+ export { Gltf, useGLTF } from './Gltf.three.tsrx';
55
+ export type { GltfProps } from './Gltf.three.tsrx';
56
+ export { Fbx, useFBX } from './Fbx.three.tsrx';
57
+ export { useEnvironment } from './useEnvironment.three.tsrx';
58
+ export type { EnvironmentLoaderProps } from './environment-loader.js';
59
+ export { useAspect } from './useAspect.three.tsrx';
60
+ export { AdaptiveDpr, AdaptiveEvents, BakeShadows } from './AdaptivePerformance.three.tsrx';
61
+ export { ScreenSpace } from './ScreenSpace.three.tsrx';
62
+ export type { ScreenSpaceProps } from './ScreenSpace.three.tsrx';
63
+ export { Detailed } from './Detailed.three.tsrx';
64
+ export type { DetailedProps } from './Detailed.three.tsrx';
65
+ export { ComputedAttribute } from './ComputedAttribute.three.tsrx';
66
+ export type { ComputedAttributeProps } from './ComputedAttribute.three.tsrx';
67
+ export { MultiMaterial } from './MultiMaterial.three.tsrx';
68
+ export type { MultiMaterialProps } from './MultiMaterial.three.tsrx';
69
+ export { useCamera } from './useCamera.three.tsrx';
70
+ export { useIntersect } from './useIntersect.three.tsrx';
71
+ export {
72
+ Mask,
73
+ MeshDiscardMaterial,
74
+ PointMaterial,
75
+ PointMaterialImpl,
76
+ ScreenQuad,
77
+ useMask,
78
+ } from './simple-materials.three.tsrx';
79
+ export { Backdrop, BBAnchor, Billboard, Float } from './scene-motion.three.tsrx';
80
+ export type {
81
+ BackdropProps,
82
+ BBAnchorProps,
83
+ BillboardProps,
84
+ FloatProps,
85
+ } from './scene-motion.three.tsrx';
86
+ export { Fbo, useFBO } from './Fbo.three.tsrx';
87
+ export type { FboProps } from './Fbo.three.tsrx';
88
+ export {
89
+ CubeCamera,
90
+ OrthographicCamera,
91
+ PerspectiveCamera,
92
+ useCubeCamera,
93
+ } from './cameras.three.tsrx';
94
+ export { useDepthBuffer } from './useDepthBuffer.three.tsrx';
95
+ export {
96
+ MatcapTexture,
97
+ NormalTexture,
98
+ useMatcapTexture,
99
+ useNormalTexture,
100
+ } from './catalog-textures.three.tsrx';
101
+ export { GradientTexture, GradientType } from './GradientTexture.three.tsrx';
102
+ export type { GradientTextureProps } from './GradientTexture.three.tsrx';
103
+ export {
104
+ CatmullRomLine,
105
+ CubicBezierLine,
106
+ Edges,
107
+ Line,
108
+ QuadraticBezierLine,
109
+ } from './lines.three.tsrx';
110
+ export {
111
+ ArcballControls,
112
+ DeviceOrientationControls,
113
+ FirstPersonControls,
114
+ FlyControls,
115
+ MapControls,
116
+ OrbitControls,
117
+ TrackballControls,
118
+ } from './basic-controls.three.tsrx';
119
+ export { PointerLockControls } from './PointerLockControls.three.tsrx';
120
+ export type { PointerLockControlsProps } from './PointerLockControls.three.tsrx';
121
+ export { Center } from './Center.three.tsrx';
122
+ export type { CenterProps, OnCenterCallbackProps } from './Center.three.tsrx';
123
+ export { Bounds, useBounds } from './Bounds.three.tsrx';
124
+ export type { BoundsApi, BoundsProps, SizeProps } from './Bounds.three.tsrx';
125
+ export { useAnimations } from './useAnimations.three.tsrx';
126
+ export { useBoxProjectedEnv } from './useBoxProjectedEnv.three.tsrx';
127
+ export { Resize } from './Resize.three.tsrx';
128
+ export type { ResizeProps } from './Resize.three.tsrx';
129
+ export { CameraShake } from './CameraShake.three.tsrx';
130
+ export type { CameraShakeProps, ShakeController } from './CameraShake.three.tsrx';
131
+ export { Decal } from './Decal.three.tsrx';
132
+ export type { DecalProps } from './Decal.three.tsrx';
133
+ export { Shadow, ShadowAlpha } from './shadows.three.tsrx';
134
+ export type { ShadowAlphaProps, ShadowProps, ShadowType } from './shadows.three.tsrx';
135
+ export { Grid } from './Grid.three.tsrx';
136
+ export type { GridMaterialType, GridProps } from './Grid.three.tsrx';
137
+ export { Helper, useHelper } from './Helper.three.tsrx';
138
+ export type { HelperProps } from './Helper.three.tsrx';
139
+ export { ScreenSizer } from './ScreenSizer.three.tsrx';
140
+ export type { ScreenSizerProps } from './ScreenSizer.three.tsrx';
141
+ export { Preload } from './Preload.three.tsrx';
142
+ export type { PreloadProps } from './Preload.three.tsrx';
143
+ export { Bvh, useBVH } from './Bvh.three.tsrx';
144
+ export type { BVHOptions, BvhProps } from './Bvh.three.tsrx';
145
+ export { Sky, calcPosFromAngles } from './Sky.three.tsrx';
146
+ export type { SkyProps } from './Sky.three.tsrx';
147
+ export { checkIfFrameIsEmpty, getFirstFrame, useSpriteLoader } from './useSpriteLoader.three.tsrx';
148
+ export type { FrameData, MetaData, Size, SpriteData } from './useSpriteLoader.three.tsrx';
149
+ export { SpriteAnimator, useSpriteAnimator } from './SpriteAnimator.three.tsrx';
150
+ export type { SpriteAnimatorProps } from './SpriteAnimator.three.tsrx';
151
+ export { SpotLight, SpotLightShadow } from './SpotLight.three.tsrx';
152
+ export type { SpotLightProps } from './SpotLight.three.tsrx';
153
+ export { Splat } from './Splat.three.tsrx';
154
+ export type { SharedState, SplatMaterialType, SplatProps, TargetMesh } from './Splat.three.tsrx';
155
+ export { Lightformer } from './Lightformer.three.tsrx';
156
+ export type { LightProps } from './Lightformer.three.tsrx';
157
+ export { MeshDistortMaterial, MeshWobbleMaterial } from './motion-materials.three.tsrx';
158
+ export type { MeshDistortMaterialProps, WobbleMaterialProps } from './motion-materials.three.tsrx';
159
+ export { isWebGL2Available } from './effects-utils.js';
160
+ export { Effects } from './Effects.three.tsrx';
161
+ export type { EffectsProps } from './Effects.three.tsrx';
162
+ export { Hud } from './Hud.three.tsrx';
163
+ export type { HudProps } from './Hud.three.tsrx';
164
+ export { Sparkles } from './Sparkles.three.tsrx';
165
+ export type { SparklesProps } from './Sparkles.three.tsrx';
166
+ export { CurveModifier } from './CurveModifier.three.tsrx';
167
+ export type { CurveModifierProps, CurveModifierRef } from './CurveModifier.three.tsrx';
168
+ export { Stars } from './Stars.three.tsrx';
169
+ export type { StarsProps } from './Stars.three.tsrx';
170
+ export { Segment, SegmentObject, Segments } from './Segments.three.tsrx';
171
+ export type { SegmentProps, SegmentsProps } from './Segments.three.tsrx';
172
+ export { MarchingCube, MarchingCubes, MarchingPlane } from './MarchingCubes.three.tsrx';
173
+ export type {
174
+ MarchingCubeProps,
175
+ MarchingCubesProps,
176
+ MarchingPlaneProps,
177
+ } from './MarchingCubes.three.tsrx';
178
+ export { PositionalAudio } from './PositionalAudio.three.tsrx';
179
+ export type { PositionalAudioProps } from './PositionalAudio.three.tsrx';
180
+ export { AsciiRenderer } from './AsciiRenderer.three.tsrx';
181
+ export type { AsciiRendererProps } from './AsciiRenderer.three.tsrx';
182
+ export { TransformControls } from './TransformControls.three.tsrx';
183
+ export type { TransformControlsProps } from './TransformControls.three.tsrx';
184
+ export { SoftShadows } from './softShadows.three.tsrx';
185
+ export type { SoftShadowsProps } from './softShadows.three.tsrx';
186
+ export { PerformanceMonitor, usePerformanceMonitor } from './PerformanceMonitor.three.tsrx';
187
+ export type {
188
+ PerformanceMonitorApi,
189
+ PerformanceMonitorProps,
190
+ } from './PerformanceMonitor.three.tsrx';
191
+ export { CameraControls, CameraControlsImpl } from './CameraControls.three.tsrx';
192
+ export type { CameraControlsProps } from './CameraControls.three.tsrx';
193
+ export { DetectGPU, useDetectGPU } from './DetectGPU.three.tsrx';
194
+ export type { DetectGPUProps } from './DetectGPU.three.tsrx';
195
+ export { Stats } from './Stats.three.tsrx';
196
+ export type { StatsProps } from './Stats.three.tsrx';
197
+ export { StatsGl } from './StatsGl.three.tsrx';
198
+ export type { StatsGlProps } from './StatsGl.three.tsrx';
199
+ export { VideoTexture, useVideoTexture } from './VideoTexture.three.tsrx';
200
+ export type { VideoTextureProps } from './VideoTexture.three.tsrx';
201
+ export { TrailTexture, useTrailTexture } from './TrailTexture.three.tsrx';
202
+ export type { TrailTextureProps } from './TrailTexture.three.tsrx';
203
+ export { Point, Points, PointsBuffer, PositionPoint } from './Points.three.tsrx';
204
+ export type { PointsBuffersProps, PointsInstancesProps } from './Points.three.tsrx';
205
+ export {
206
+ createInstances,
207
+ Instance,
208
+ InstancedAttribute,
209
+ Instances,
210
+ Merged,
211
+ PositionMesh,
212
+ } from './Instances.three.tsrx';
213
+ export type {
214
+ InstanceProps,
215
+ InstancedAttributeProps,
216
+ InstancesProps,
217
+ MergedProps,
218
+ } from './Instances.three.tsrx';
219
+ export { Sampler, useSurfaceSampler } from './Sampler.three.tsrx';
220
+ export type { SamplerProps, TransformFn, useSurfaceSamplerProps } from './Sampler.three.tsrx';
221
+ export { Cloud, CloudInstance, Clouds } from './Cloud.three.tsrx';
222
+ export type { CloudProps, CloudsProps } from './Cloud.three.tsrx';
223
+ export { Trail, useTrail } from './Trail.three.tsrx';
224
+ export type { MeshLineGeometry, TrailProps } from './Trail.three.tsrx';
225
+ export {
226
+ Environment,
227
+ EnvironmentCube,
228
+ EnvironmentMap,
229
+ EnvironmentPortal,
230
+ } from './Environment.three.tsrx';
231
+ export type { EnvironmentProps } from './Environment.three.tsrx';
232
+ export { Text3D } from './Text3D.three.tsrx';
233
+ export type { Text3DProps } from './Text3D.three.tsrx';
234
+ export { Example } from './Example.three.tsrx';
235
+ export type { ExampleApi, ExampleProps } from './Example.three.tsrx';
236
+ export { Svg } from './Svg.three.tsrx';
237
+ export type { SvgProps } from './Svg.three.tsrx';
238
+ export { RenderTexture } from './RenderTexture.three.tsrx';
239
+ export type { RenderTextureProps } from './RenderTexture.three.tsrx';
240
+ export { RenderCubeTexture } from './RenderCubeTexture.three.tsrx';
241
+ export type { RenderCubeTextureApi, RenderCubeTextureProps } from './RenderCubeTexture.three.tsrx';
242
+ export { Fisheye } from './Fisheye.three.tsrx';
243
+ export type { FisheyeProps } from './Fisheye.three.tsrx';
244
+ export { Outlines } from './Outlines.three.tsrx';
245
+ export type { OutlinesProps } from './Outlines.three.tsrx';
246
+ export { ContactShadows } from './ContactShadows.three.tsrx';
247
+ export type { ContactShadowsProps } from './ContactShadows.three.tsrx';
248
+ export {
249
+ AccumulativeShadows,
250
+ RandomizedLight,
251
+ accumulativeContext,
252
+ } from './AccumulativeShadows.three.tsrx';
253
+ export type {
254
+ AccumulativeShadowsProps,
255
+ RandomizedLightProps,
256
+ } from './AccumulativeShadows.three.tsrx';
257
+ export { Stage } from './Stage.three.tsrx';
258
+ export type { StageProps } from './Stage.three.tsrx';
259
+ export { Image } from './Image.three.tsrx';
260
+ export type { ImageProps } from './Image.three.tsrx';
261
+ export { MotionPathControls, useMotion } from './MotionPathControls.three.tsrx';
262
+ export type { MotionPathProps, MotionPathRef } from './MotionPathControls.three.tsrx';
263
+ export { GizmoHelper, useGizmoContext } from './GizmoHelper.three.tsrx';
264
+ export type { GizmoHelperProps } from './GizmoHelper.three.tsrx';
265
+ export type {
266
+ ArcballControlsProps,
267
+ DeviceOrientationControlsProps,
268
+ FirstPersonControlsProps,
269
+ FlyControlsProps,
270
+ MapControlsProps,
271
+ OrbitControlsChangeEvent,
272
+ OrbitControlsProps,
273
+ TrackballControlsProps,
274
+ } from './basic-controls.three.tsrx';
275
+ export type {
276
+ CatmullRomLineProps,
277
+ CubicBezierLineProps,
278
+ EdgesProps,
279
+ EdgesRef,
280
+ LineProps,
281
+ QuadraticBezierLineProps,
282
+ QuadraticBezierLineRef,
283
+ } from './lines.three.tsrx';
284
+ export type {
285
+ CubeCameraOptions,
286
+ CubeCameraProps,
287
+ OrthographicCameraProps,
288
+ PerspectiveCameraProps,
289
+ } from './cameras.three.tsrx';
290
+ export type {
291
+ MaskProps,
292
+ MeshDiscardMaterialProps,
293
+ PointMaterialProps,
294
+ ScreenQuadProps,
295
+ } from './simple-materials.three.tsrx';