@react-three/fiber 10.0.0-canary.c3fa45d → 10.0.0-canary.d6fdf72
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/dist/index.cjs +77 -97
- package/dist/index.d.cts +81 -54
- package/dist/index.d.mts +81 -54
- package/dist/index.d.ts +81 -54
- package/dist/index.mjs +77 -97
- package/dist/legacy.cjs +77 -97
- package/dist/legacy.d.cts +81 -54
- package/dist/legacy.d.mts +81 -54
- package/dist/legacy.d.ts +81 -54
- package/dist/legacy.mjs +77 -97
- package/dist/webgpu/index.cjs +77 -97
- package/dist/webgpu/index.d.cts +81 -54
- package/dist/webgpu/index.d.mts +81 -54
- package/dist/webgpu/index.d.ts +81 -54
- package/dist/webgpu/index.mjs +77 -97
- package/package.json +1 -1
package/dist/legacy.d.cts
CHANGED
|
@@ -800,8 +800,10 @@ interface RootState {
|
|
|
800
800
|
buffers: BufferStore
|
|
801
801
|
/** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
|
|
802
802
|
gpuStorage: StorageStore
|
|
803
|
-
/** Global
|
|
804
|
-
textures: Map<string,
|
|
803
|
+
/** Global Texture registry (key → Texture, usually keyed by URL) - use useTextures() hook for access + lifecycle */
|
|
804
|
+
textures: Map<string, THREE$1.Texture>
|
|
805
|
+
/** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
|
|
806
|
+
_textureRefs: Map<string, number>
|
|
805
807
|
/** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
|
|
806
808
|
renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
|
|
807
809
|
/** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
|
|
@@ -2572,11 +2574,16 @@ type UseTextureOptions<Url extends string[] | string | Record<string, string>> =
|
|
|
2572
2574
|
/** Callback when texture(s) finish loading */
|
|
2573
2575
|
onLoad?: (texture: MappedTextureType<Url>) => void;
|
|
2574
2576
|
/**
|
|
2575
|
-
*
|
|
2576
|
-
* When true:
|
|
2577
|
+
* Register the texture(s) in R3F's global texture registry for access via useTextures().
|
|
2578
|
+
* When true (the default):
|
|
2577
2579
|
* - Textures persist until explicitly disposed
|
|
2578
|
-
* -
|
|
2579
|
-
*
|
|
2580
|
+
* - On mount, returns existing registered textures if available (preserving modifications like colorSpace)
|
|
2581
|
+
*
|
|
2582
|
+
* Reads are taken once at mount — a mounted `useTexture` does not re-render when the registry
|
|
2583
|
+
* changes. To react to registry swaps, use `useTextures(s => s.get(key))` instead.
|
|
2584
|
+
*
|
|
2585
|
+
* Pass `false` to opt out of registry enrollment entirely.
|
|
2586
|
+
* @default true
|
|
2580
2587
|
*/
|
|
2581
2588
|
cache?: boolean;
|
|
2582
2589
|
};
|
|
@@ -2600,15 +2607,18 @@ type UseTextureOptions<Url extends string[] | string | Record<string, string>> =
|
|
|
2600
2607
|
* normal: '/normal.png'
|
|
2601
2608
|
* })
|
|
2602
2609
|
*
|
|
2603
|
-
* //
|
|
2604
|
-
* //
|
|
2605
|
-
* const diffuse = useTexture('/diffuse.png'
|
|
2610
|
+
* // Textures are registered in the global registry by default — the same texture
|
|
2611
|
+
* // object is shared across components and modifications (colorSpace, wrapS, etc.) are preserved
|
|
2612
|
+
* const diffuse = useTexture('/diffuse.png')
|
|
2606
2613
|
* diffuse.colorSpace = THREE.SRGBColorSpace
|
|
2607
2614
|
*
|
|
2608
2615
|
* // Another component gets the SAME texture with colorSpace already set
|
|
2609
|
-
* const sameDiffuse = useTexture('/diffuse.png'
|
|
2616
|
+
* const sameDiffuse = useTexture('/diffuse.png')
|
|
2610
2617
|
*
|
|
2611
|
-
* //
|
|
2618
|
+
* // Opt out of registry enrollment for a one-off texture
|
|
2619
|
+
* const scratch = useTexture('/scratch.png', { cache: false })
|
|
2620
|
+
*
|
|
2621
|
+
* // Access the registry directly
|
|
2612
2622
|
* const { get } = useTextures()
|
|
2613
2623
|
* const cached = get('/diffuse.png')
|
|
2614
2624
|
* ```
|
|
@@ -2625,63 +2635,80 @@ declare const Texture: ({ children, input, onLoad, cache, }: {
|
|
|
2625
2635
|
cache?: boolean;
|
|
2626
2636
|
}) => react_jsx_runtime.JSX.Element;
|
|
2627
2637
|
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2638
|
+
/** Accepted shapes for a registry read: a single key, a list of keys, or a name→key map. */
|
|
2639
|
+
type TextureInput = string | string[] | Record<string, string>;
|
|
2640
|
+
/** Result of a `get()` read, mirroring the input shape. */
|
|
2641
|
+
type TextureResult<Input extends TextureInput> = Input extends string ? Texture$1 | undefined : Input extends string[] ? (Texture$1 | undefined)[] : {
|
|
2642
|
+
[K in keyof Input]: Texture$1 | undefined;
|
|
2631
2643
|
};
|
|
2644
|
+
/** Options for `dispose()`. */
|
|
2645
|
+
interface DisposeOptions {
|
|
2646
|
+
/** Dispose even if the texture still has active references (default false). */
|
|
2647
|
+
force?: boolean;
|
|
2648
|
+
}
|
|
2632
2649
|
interface UseTexturesReturn {
|
|
2633
|
-
/** Map
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
get
|
|
2637
|
-
/** Check
|
|
2638
|
-
has
|
|
2639
|
-
/**
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2650
|
+
/** The live registry Map (key → Texture). Treat as read-only. */
|
|
2651
|
+
readonly all: Map<string, Texture$1>;
|
|
2652
|
+
/** Read one texture, an array of textures, or a name→texture record (mirrors the input shape). */
|
|
2653
|
+
get<Input extends TextureInput>(input: Input): TextureResult<Input>;
|
|
2654
|
+
/** Check whether a key exists in the registry. */
|
|
2655
|
+
has(key: string): boolean;
|
|
2656
|
+
/**
|
|
2657
|
+
* Register a texture (or a record of textures) that has no URL — e.g. a render
|
|
2658
|
+
* target or procedural texture. URL-loaded textures are registered automatically
|
|
2659
|
+
* by `useTexture` (registry enrollment is on by default).
|
|
2660
|
+
*/
|
|
2661
|
+
add(key: string, texture: Texture$1): void;
|
|
2662
|
+
add(record: Record<string, Texture$1>): void;
|
|
2663
|
+
/**
|
|
2664
|
+
* Dispose a texture's GPU resources and remove it from the registry.
|
|
2665
|
+
* Refcount-aware: if the key is still in use by a mounted `useTexture` consumer it is
|
|
2666
|
+
* skipped (with a warning) unless `{ force: true }` is passed.
|
|
2667
|
+
* @returns true if disposed, false if skipped.
|
|
2668
|
+
*/
|
|
2669
|
+
dispose(key: string, options?: DisposeOptions): boolean;
|
|
2670
|
+
/** Dispose every texture in the registry and clear it. Use on scene teardown. */
|
|
2671
|
+
disposeAll(): void;
|
|
2653
2672
|
}
|
|
2654
2673
|
/**
|
|
2655
|
-
*
|
|
2674
|
+
* Reactive Texture registry — load once with `useTexture`, reach the textures from anywhere.
|
|
2675
|
+
*
|
|
2676
|
+
* This is a registry of plain `Texture` objects (not TSL nodes), so the same texture can feed
|
|
2677
|
+
* a material map, a heightmap sampler, or anything else. It does **not** load — pair it with
|
|
2678
|
+
* `useTexture` for loading (registry enrollment is on by default); `useTextures` is for access and lifecycle.
|
|
2656
2679
|
*
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2680
|
+
* The returned handle is **reactive**: the calling component re-renders when the registry
|
|
2681
|
+
* changes. Pass a selector to scope the subscription to a single read.
|
|
2659
2682
|
*
|
|
2660
2683
|
* @example
|
|
2661
2684
|
* ```tsx
|
|
2662
|
-
*
|
|
2663
|
-
*
|
|
2664
|
-
* // Check if texture is already cached
|
|
2665
|
-
* if (!has('/textures/diffuse.png')) {
|
|
2666
|
-
* // Load with useTexture and cache: true, or manually add
|
|
2667
|
-
* const tex = useTexture('/textures/diffuse.png', { cache: true })
|
|
2668
|
-
* }
|
|
2685
|
+
* // Load + register once (anywhere in the tree) — registered by default
|
|
2686
|
+
* useTexture({ map: '/diffuse.jpg', normalMap: '/normal.jpg' })
|
|
2669
2687
|
*
|
|
2670
|
-
* //
|
|
2671
|
-
* const
|
|
2672
|
-
*
|
|
2688
|
+
* // Reach them from another component — record form lands straight into a material
|
|
2689
|
+
* const { map, normalMap } = useTextures().get({ map: '/diffuse.jpg', normalMap: '/normal.jpg' })
|
|
2690
|
+
* return <meshStandardMaterial map={map} normalMap={normalMap} />
|
|
2673
2691
|
*
|
|
2674
|
-
* //
|
|
2675
|
-
*
|
|
2692
|
+
* // A set of heightmaps at once
|
|
2693
|
+
* const [a, b, c] = useTextures().get(['/h0.png', '/h1.png', '/h2.png'])
|
|
2676
2694
|
*
|
|
2677
|
-
* //
|
|
2678
|
-
*
|
|
2695
|
+
* // Register a non-URL texture (render target / procedural)
|
|
2696
|
+
* useTextures().add('rt-main', renderTarget.texture)
|
|
2679
2697
|
*
|
|
2680
|
-
* //
|
|
2681
|
-
*
|
|
2698
|
+
* // Deliberate GPU cleanup (refcount-aware; force to override)
|
|
2699
|
+
* useTextures().dispose('/diffuse.jpg')
|
|
2700
|
+
* useTextures().disposeAll() // scene teardown
|
|
2682
2701
|
* ```
|
|
2702
|
+
*
|
|
2703
|
+
* @remarks
|
|
2704
|
+
* **Future expansion:** an imperative async loader (e.g. `await useTextures().load('/x.jpg')`) is
|
|
2705
|
+
* intentionally not included yet. It would let non-React code (loading screens, dynamic streaming)
|
|
2706
|
+
* populate the registry without Suspense, at the cost of putting loading back into this hook. It
|
|
2707
|
+
* will be added only if a concrete consumer needs imperative loading; for now, loading lives in
|
|
2708
|
+
* `useTexture`.
|
|
2683
2709
|
*/
|
|
2684
2710
|
declare function useTextures(): UseTexturesReturn;
|
|
2711
|
+
declare function useTextures<T>(selector: (registry: UseTexturesReturn) => T): T;
|
|
2685
2712
|
|
|
2686
2713
|
/**
|
|
2687
2714
|
* Creates a render target compatible with the current renderer.
|
|
@@ -4378,4 +4405,4 @@ declare function isOnce(value: unknown): value is {
|
|
|
4378
4405
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
4379
4406
|
|
|
4380
4407
|
export { Block, Canvas, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, ErrorBoundary, FROM_REF, IsObject, ONCE, Portal, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, REACT_INTERNAL_PROPS, RESERVED_PROPS, three_d as ReactThreeFiber, Scheduler, Texture, _roots, act, addAfterEffect, addEffect, addTail, advance, applyProps, attach, buildGraph, calculateDpr, context, createEvents, createPointerEvents, createPortal, createRoot, createStore, detach, diffProps, dispose, createPointerEvents as events, extend, findInitialRoot, flushSync, fromRef, getInstanceProps, getPrimary, getPrimaryIds, getRootState, getScheduler, getUuidPrefix, hasConstructor, hasPrimary, invalidate, invalidateInstance, is, isColorRepresentation, isCopyable, isFromRef, isObject3D, isOnce, isOrthographicCamera, isRef, isRenderer, isTexture, isVectorLike, once, prepare, presetsObj, reconciler, registerPrimary, removeInteractivity, resolve, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useEnvironment, useFrame, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useMutableCallback, useRenderTarget, useStore, useTexture, useTextures, useThree, waitForPrimary };
|
|
4381
|
-
export type { Act, AddPhaseOptions, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameControls, FrameNextCallback, FrameNextControls, FrameNextState, FrameState, FrameTimingState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootOptions, LegacyRootState as RootState, RootStore, SchedulerApi, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput,
|
|
4408
|
+
export type { Act, AddPhaseOptions, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameControls, FrameNextCallback, FrameNextControls, FrameNextState, FrameState, FrameTimingState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootOptions, LegacyRootState as RootState, RootStore, SchedulerApi, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseFrameNextOptions, UseFrameOptions, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
|
package/dist/legacy.d.mts
CHANGED
|
@@ -800,8 +800,10 @@ interface RootState {
|
|
|
800
800
|
buffers: BufferStore
|
|
801
801
|
/** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
|
|
802
802
|
gpuStorage: StorageStore
|
|
803
|
-
/** Global
|
|
804
|
-
textures: Map<string,
|
|
803
|
+
/** Global Texture registry (key → Texture, usually keyed by URL) - use useTextures() hook for access + lifecycle */
|
|
804
|
+
textures: Map<string, THREE$1.Texture>
|
|
805
|
+
/** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
|
|
806
|
+
_textureRefs: Map<string, number>
|
|
805
807
|
/** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
|
|
806
808
|
renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
|
|
807
809
|
/** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
|
|
@@ -2572,11 +2574,16 @@ type UseTextureOptions<Url extends string[] | string | Record<string, string>> =
|
|
|
2572
2574
|
/** Callback when texture(s) finish loading */
|
|
2573
2575
|
onLoad?: (texture: MappedTextureType<Url>) => void;
|
|
2574
2576
|
/**
|
|
2575
|
-
*
|
|
2576
|
-
* When true:
|
|
2577
|
+
* Register the texture(s) in R3F's global texture registry for access via useTextures().
|
|
2578
|
+
* When true (the default):
|
|
2577
2579
|
* - Textures persist until explicitly disposed
|
|
2578
|
-
* -
|
|
2579
|
-
*
|
|
2580
|
+
* - On mount, returns existing registered textures if available (preserving modifications like colorSpace)
|
|
2581
|
+
*
|
|
2582
|
+
* Reads are taken once at mount — a mounted `useTexture` does not re-render when the registry
|
|
2583
|
+
* changes. To react to registry swaps, use `useTextures(s => s.get(key))` instead.
|
|
2584
|
+
*
|
|
2585
|
+
* Pass `false` to opt out of registry enrollment entirely.
|
|
2586
|
+
* @default true
|
|
2580
2587
|
*/
|
|
2581
2588
|
cache?: boolean;
|
|
2582
2589
|
};
|
|
@@ -2600,15 +2607,18 @@ type UseTextureOptions<Url extends string[] | string | Record<string, string>> =
|
|
|
2600
2607
|
* normal: '/normal.png'
|
|
2601
2608
|
* })
|
|
2602
2609
|
*
|
|
2603
|
-
* //
|
|
2604
|
-
* //
|
|
2605
|
-
* const diffuse = useTexture('/diffuse.png'
|
|
2610
|
+
* // Textures are registered in the global registry by default — the same texture
|
|
2611
|
+
* // object is shared across components and modifications (colorSpace, wrapS, etc.) are preserved
|
|
2612
|
+
* const diffuse = useTexture('/diffuse.png')
|
|
2606
2613
|
* diffuse.colorSpace = THREE.SRGBColorSpace
|
|
2607
2614
|
*
|
|
2608
2615
|
* // Another component gets the SAME texture with colorSpace already set
|
|
2609
|
-
* const sameDiffuse = useTexture('/diffuse.png'
|
|
2616
|
+
* const sameDiffuse = useTexture('/diffuse.png')
|
|
2610
2617
|
*
|
|
2611
|
-
* //
|
|
2618
|
+
* // Opt out of registry enrollment for a one-off texture
|
|
2619
|
+
* const scratch = useTexture('/scratch.png', { cache: false })
|
|
2620
|
+
*
|
|
2621
|
+
* // Access the registry directly
|
|
2612
2622
|
* const { get } = useTextures()
|
|
2613
2623
|
* const cached = get('/diffuse.png')
|
|
2614
2624
|
* ```
|
|
@@ -2625,63 +2635,80 @@ declare const Texture: ({ children, input, onLoad, cache, }: {
|
|
|
2625
2635
|
cache?: boolean;
|
|
2626
2636
|
}) => react_jsx_runtime.JSX.Element;
|
|
2627
2637
|
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2638
|
+
/** Accepted shapes for a registry read: a single key, a list of keys, or a name→key map. */
|
|
2639
|
+
type TextureInput = string | string[] | Record<string, string>;
|
|
2640
|
+
/** Result of a `get()` read, mirroring the input shape. */
|
|
2641
|
+
type TextureResult<Input extends TextureInput> = Input extends string ? Texture$1 | undefined : Input extends string[] ? (Texture$1 | undefined)[] : {
|
|
2642
|
+
[K in keyof Input]: Texture$1 | undefined;
|
|
2631
2643
|
};
|
|
2644
|
+
/** Options for `dispose()`. */
|
|
2645
|
+
interface DisposeOptions {
|
|
2646
|
+
/** Dispose even if the texture still has active references (default false). */
|
|
2647
|
+
force?: boolean;
|
|
2648
|
+
}
|
|
2632
2649
|
interface UseTexturesReturn {
|
|
2633
|
-
/** Map
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
get
|
|
2637
|
-
/** Check
|
|
2638
|
-
has
|
|
2639
|
-
/**
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2650
|
+
/** The live registry Map (key → Texture). Treat as read-only. */
|
|
2651
|
+
readonly all: Map<string, Texture$1>;
|
|
2652
|
+
/** Read one texture, an array of textures, or a name→texture record (mirrors the input shape). */
|
|
2653
|
+
get<Input extends TextureInput>(input: Input): TextureResult<Input>;
|
|
2654
|
+
/** Check whether a key exists in the registry. */
|
|
2655
|
+
has(key: string): boolean;
|
|
2656
|
+
/**
|
|
2657
|
+
* Register a texture (or a record of textures) that has no URL — e.g. a render
|
|
2658
|
+
* target or procedural texture. URL-loaded textures are registered automatically
|
|
2659
|
+
* by `useTexture` (registry enrollment is on by default).
|
|
2660
|
+
*/
|
|
2661
|
+
add(key: string, texture: Texture$1): void;
|
|
2662
|
+
add(record: Record<string, Texture$1>): void;
|
|
2663
|
+
/**
|
|
2664
|
+
* Dispose a texture's GPU resources and remove it from the registry.
|
|
2665
|
+
* Refcount-aware: if the key is still in use by a mounted `useTexture` consumer it is
|
|
2666
|
+
* skipped (with a warning) unless `{ force: true }` is passed.
|
|
2667
|
+
* @returns true if disposed, false if skipped.
|
|
2668
|
+
*/
|
|
2669
|
+
dispose(key: string, options?: DisposeOptions): boolean;
|
|
2670
|
+
/** Dispose every texture in the registry and clear it. Use on scene teardown. */
|
|
2671
|
+
disposeAll(): void;
|
|
2653
2672
|
}
|
|
2654
2673
|
/**
|
|
2655
|
-
*
|
|
2674
|
+
* Reactive Texture registry — load once with `useTexture`, reach the textures from anywhere.
|
|
2675
|
+
*
|
|
2676
|
+
* This is a registry of plain `Texture` objects (not TSL nodes), so the same texture can feed
|
|
2677
|
+
* a material map, a heightmap sampler, or anything else. It does **not** load — pair it with
|
|
2678
|
+
* `useTexture` for loading (registry enrollment is on by default); `useTextures` is for access and lifecycle.
|
|
2656
2679
|
*
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2680
|
+
* The returned handle is **reactive**: the calling component re-renders when the registry
|
|
2681
|
+
* changes. Pass a selector to scope the subscription to a single read.
|
|
2659
2682
|
*
|
|
2660
2683
|
* @example
|
|
2661
2684
|
* ```tsx
|
|
2662
|
-
*
|
|
2663
|
-
*
|
|
2664
|
-
* // Check if texture is already cached
|
|
2665
|
-
* if (!has('/textures/diffuse.png')) {
|
|
2666
|
-
* // Load with useTexture and cache: true, or manually add
|
|
2667
|
-
* const tex = useTexture('/textures/diffuse.png', { cache: true })
|
|
2668
|
-
* }
|
|
2685
|
+
* // Load + register once (anywhere in the tree) — registered by default
|
|
2686
|
+
* useTexture({ map: '/diffuse.jpg', normalMap: '/normal.jpg' })
|
|
2669
2687
|
*
|
|
2670
|
-
* //
|
|
2671
|
-
* const
|
|
2672
|
-
*
|
|
2688
|
+
* // Reach them from another component — record form lands straight into a material
|
|
2689
|
+
* const { map, normalMap } = useTextures().get({ map: '/diffuse.jpg', normalMap: '/normal.jpg' })
|
|
2690
|
+
* return <meshStandardMaterial map={map} normalMap={normalMap} />
|
|
2673
2691
|
*
|
|
2674
|
-
* //
|
|
2675
|
-
*
|
|
2692
|
+
* // A set of heightmaps at once
|
|
2693
|
+
* const [a, b, c] = useTextures().get(['/h0.png', '/h1.png', '/h2.png'])
|
|
2676
2694
|
*
|
|
2677
|
-
* //
|
|
2678
|
-
*
|
|
2695
|
+
* // Register a non-URL texture (render target / procedural)
|
|
2696
|
+
* useTextures().add('rt-main', renderTarget.texture)
|
|
2679
2697
|
*
|
|
2680
|
-
* //
|
|
2681
|
-
*
|
|
2698
|
+
* // Deliberate GPU cleanup (refcount-aware; force to override)
|
|
2699
|
+
* useTextures().dispose('/diffuse.jpg')
|
|
2700
|
+
* useTextures().disposeAll() // scene teardown
|
|
2682
2701
|
* ```
|
|
2702
|
+
*
|
|
2703
|
+
* @remarks
|
|
2704
|
+
* **Future expansion:** an imperative async loader (e.g. `await useTextures().load('/x.jpg')`) is
|
|
2705
|
+
* intentionally not included yet. It would let non-React code (loading screens, dynamic streaming)
|
|
2706
|
+
* populate the registry without Suspense, at the cost of putting loading back into this hook. It
|
|
2707
|
+
* will be added only if a concrete consumer needs imperative loading; for now, loading lives in
|
|
2708
|
+
* `useTexture`.
|
|
2683
2709
|
*/
|
|
2684
2710
|
declare function useTextures(): UseTexturesReturn;
|
|
2711
|
+
declare function useTextures<T>(selector: (registry: UseTexturesReturn) => T): T;
|
|
2685
2712
|
|
|
2686
2713
|
/**
|
|
2687
2714
|
* Creates a render target compatible with the current renderer.
|
|
@@ -4378,4 +4405,4 @@ declare function isOnce(value: unknown): value is {
|
|
|
4378
4405
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
4379
4406
|
|
|
4380
4407
|
export { Block, Canvas, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, ErrorBoundary, FROM_REF, IsObject, ONCE, Portal, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, REACT_INTERNAL_PROPS, RESERVED_PROPS, three_d as ReactThreeFiber, Scheduler, Texture, _roots, act, addAfterEffect, addEffect, addTail, advance, applyProps, attach, buildGraph, calculateDpr, context, createEvents, createPointerEvents, createPortal, createRoot, createStore, detach, diffProps, dispose, createPointerEvents as events, extend, findInitialRoot, flushSync, fromRef, getInstanceProps, getPrimary, getPrimaryIds, getRootState, getScheduler, getUuidPrefix, hasConstructor, hasPrimary, invalidate, invalidateInstance, is, isColorRepresentation, isCopyable, isFromRef, isObject3D, isOnce, isOrthographicCamera, isRef, isRenderer, isTexture, isVectorLike, once, prepare, presetsObj, reconciler, registerPrimary, removeInteractivity, resolve, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useEnvironment, useFrame, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useMutableCallback, useRenderTarget, useStore, useTexture, useTextures, useThree, waitForPrimary };
|
|
4381
|
-
export type { Act, AddPhaseOptions, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameControls, FrameNextCallback, FrameNextControls, FrameNextState, FrameState, FrameTimingState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootOptions, LegacyRootState as RootState, RootStore, SchedulerApi, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput,
|
|
4408
|
+
export type { Act, AddPhaseOptions, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameControls, FrameNextCallback, FrameNextControls, FrameNextState, FrameState, FrameTimingState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootOptions, LegacyRootState as RootState, RootStore, SchedulerApi, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseFrameNextOptions, UseFrameOptions, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
|
package/dist/legacy.d.ts
CHANGED
|
@@ -800,8 +800,10 @@ interface RootState {
|
|
|
800
800
|
buffers: BufferStore
|
|
801
801
|
/** Global GPU storage (textures, etc.) - root-level storage + scoped sub-objects. Use useGPUStorage() hook */
|
|
802
802
|
gpuStorage: StorageStore
|
|
803
|
-
/** Global
|
|
804
|
-
textures: Map<string,
|
|
803
|
+
/** Global Texture registry (key → Texture, usually keyed by URL) - use useTextures() hook for access + lifecycle */
|
|
804
|
+
textures: Map<string, THREE$1.Texture>
|
|
805
|
+
/** Internal: refcount per texture key, driven by mounted useTexture consumers (registry enrollment is on by default) */
|
|
806
|
+
_textureRefs: Map<string, number>
|
|
805
807
|
/** WebGPU RenderPipeline instance - use useRenderPipeline() hook */
|
|
806
808
|
renderPipeline: any | null // THREE.PostProcessing (will be THREE.RenderPipeline in future Three.js release)
|
|
807
809
|
/** Global TSL pass nodes for render pipeline - use useRenderPipeline() hook */
|
|
@@ -2572,11 +2574,16 @@ type UseTextureOptions<Url extends string[] | string | Record<string, string>> =
|
|
|
2572
2574
|
/** Callback when texture(s) finish loading */
|
|
2573
2575
|
onLoad?: (texture: MappedTextureType<Url>) => void;
|
|
2574
2576
|
/**
|
|
2575
|
-
*
|
|
2576
|
-
* When true:
|
|
2577
|
+
* Register the texture(s) in R3F's global texture registry for access via useTextures().
|
|
2578
|
+
* When true (the default):
|
|
2577
2579
|
* - Textures persist until explicitly disposed
|
|
2578
|
-
* -
|
|
2579
|
-
*
|
|
2580
|
+
* - On mount, returns existing registered textures if available (preserving modifications like colorSpace)
|
|
2581
|
+
*
|
|
2582
|
+
* Reads are taken once at mount — a mounted `useTexture` does not re-render when the registry
|
|
2583
|
+
* changes. To react to registry swaps, use `useTextures(s => s.get(key))` instead.
|
|
2584
|
+
*
|
|
2585
|
+
* Pass `false` to opt out of registry enrollment entirely.
|
|
2586
|
+
* @default true
|
|
2580
2587
|
*/
|
|
2581
2588
|
cache?: boolean;
|
|
2582
2589
|
};
|
|
@@ -2600,15 +2607,18 @@ type UseTextureOptions<Url extends string[] | string | Record<string, string>> =
|
|
|
2600
2607
|
* normal: '/normal.png'
|
|
2601
2608
|
* })
|
|
2602
2609
|
*
|
|
2603
|
-
* //
|
|
2604
|
-
* //
|
|
2605
|
-
* const diffuse = useTexture('/diffuse.png'
|
|
2610
|
+
* // Textures are registered in the global registry by default — the same texture
|
|
2611
|
+
* // object is shared across components and modifications (colorSpace, wrapS, etc.) are preserved
|
|
2612
|
+
* const diffuse = useTexture('/diffuse.png')
|
|
2606
2613
|
* diffuse.colorSpace = THREE.SRGBColorSpace
|
|
2607
2614
|
*
|
|
2608
2615
|
* // Another component gets the SAME texture with colorSpace already set
|
|
2609
|
-
* const sameDiffuse = useTexture('/diffuse.png'
|
|
2616
|
+
* const sameDiffuse = useTexture('/diffuse.png')
|
|
2610
2617
|
*
|
|
2611
|
-
* //
|
|
2618
|
+
* // Opt out of registry enrollment for a one-off texture
|
|
2619
|
+
* const scratch = useTexture('/scratch.png', { cache: false })
|
|
2620
|
+
*
|
|
2621
|
+
* // Access the registry directly
|
|
2612
2622
|
* const { get } = useTextures()
|
|
2613
2623
|
* const cached = get('/diffuse.png')
|
|
2614
2624
|
* ```
|
|
@@ -2625,63 +2635,80 @@ declare const Texture: ({ children, input, onLoad, cache, }: {
|
|
|
2625
2635
|
cache?: boolean;
|
|
2626
2636
|
}) => react_jsx_runtime.JSX.Element;
|
|
2627
2637
|
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2638
|
+
/** Accepted shapes for a registry read: a single key, a list of keys, or a name→key map. */
|
|
2639
|
+
type TextureInput = string | string[] | Record<string, string>;
|
|
2640
|
+
/** Result of a `get()` read, mirroring the input shape. */
|
|
2641
|
+
type TextureResult<Input extends TextureInput> = Input extends string ? Texture$1 | undefined : Input extends string[] ? (Texture$1 | undefined)[] : {
|
|
2642
|
+
[K in keyof Input]: Texture$1 | undefined;
|
|
2631
2643
|
};
|
|
2644
|
+
/** Options for `dispose()`. */
|
|
2645
|
+
interface DisposeOptions {
|
|
2646
|
+
/** Dispose even if the texture still has active references (default false). */
|
|
2647
|
+
force?: boolean;
|
|
2648
|
+
}
|
|
2632
2649
|
interface UseTexturesReturn {
|
|
2633
|
-
/** Map
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
get
|
|
2637
|
-
/** Check
|
|
2638
|
-
has
|
|
2639
|
-
/**
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2650
|
+
/** The live registry Map (key → Texture). Treat as read-only. */
|
|
2651
|
+
readonly all: Map<string, Texture$1>;
|
|
2652
|
+
/** Read one texture, an array of textures, or a name→texture record (mirrors the input shape). */
|
|
2653
|
+
get<Input extends TextureInput>(input: Input): TextureResult<Input>;
|
|
2654
|
+
/** Check whether a key exists in the registry. */
|
|
2655
|
+
has(key: string): boolean;
|
|
2656
|
+
/**
|
|
2657
|
+
* Register a texture (or a record of textures) that has no URL — e.g. a render
|
|
2658
|
+
* target or procedural texture. URL-loaded textures are registered automatically
|
|
2659
|
+
* by `useTexture` (registry enrollment is on by default).
|
|
2660
|
+
*/
|
|
2661
|
+
add(key: string, texture: Texture$1): void;
|
|
2662
|
+
add(record: Record<string, Texture$1>): void;
|
|
2663
|
+
/**
|
|
2664
|
+
* Dispose a texture's GPU resources and remove it from the registry.
|
|
2665
|
+
* Refcount-aware: if the key is still in use by a mounted `useTexture` consumer it is
|
|
2666
|
+
* skipped (with a warning) unless `{ force: true }` is passed.
|
|
2667
|
+
* @returns true if disposed, false if skipped.
|
|
2668
|
+
*/
|
|
2669
|
+
dispose(key: string, options?: DisposeOptions): boolean;
|
|
2670
|
+
/** Dispose every texture in the registry and clear it. Use on scene teardown. */
|
|
2671
|
+
disposeAll(): void;
|
|
2653
2672
|
}
|
|
2654
2673
|
/**
|
|
2655
|
-
*
|
|
2674
|
+
* Reactive Texture registry — load once with `useTexture`, reach the textures from anywhere.
|
|
2675
|
+
*
|
|
2676
|
+
* This is a registry of plain `Texture` objects (not TSL nodes), so the same texture can feed
|
|
2677
|
+
* a material map, a heightmap sampler, or anything else. It does **not** load — pair it with
|
|
2678
|
+
* `useTexture` for loading (registry enrollment is on by default); `useTextures` is for access and lifecycle.
|
|
2656
2679
|
*
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2680
|
+
* The returned handle is **reactive**: the calling component re-renders when the registry
|
|
2681
|
+
* changes. Pass a selector to scope the subscription to a single read.
|
|
2659
2682
|
*
|
|
2660
2683
|
* @example
|
|
2661
2684
|
* ```tsx
|
|
2662
|
-
*
|
|
2663
|
-
*
|
|
2664
|
-
* // Check if texture is already cached
|
|
2665
|
-
* if (!has('/textures/diffuse.png')) {
|
|
2666
|
-
* // Load with useTexture and cache: true, or manually add
|
|
2667
|
-
* const tex = useTexture('/textures/diffuse.png', { cache: true })
|
|
2668
|
-
* }
|
|
2685
|
+
* // Load + register once (anywhere in the tree) — registered by default
|
|
2686
|
+
* useTexture({ map: '/diffuse.jpg', normalMap: '/normal.jpg' })
|
|
2669
2687
|
*
|
|
2670
|
-
* //
|
|
2671
|
-
* const
|
|
2672
|
-
*
|
|
2688
|
+
* // Reach them from another component — record form lands straight into a material
|
|
2689
|
+
* const { map, normalMap } = useTextures().get({ map: '/diffuse.jpg', normalMap: '/normal.jpg' })
|
|
2690
|
+
* return <meshStandardMaterial map={map} normalMap={normalMap} />
|
|
2673
2691
|
*
|
|
2674
|
-
* //
|
|
2675
|
-
*
|
|
2692
|
+
* // A set of heightmaps at once
|
|
2693
|
+
* const [a, b, c] = useTextures().get(['/h0.png', '/h1.png', '/h2.png'])
|
|
2676
2694
|
*
|
|
2677
|
-
* //
|
|
2678
|
-
*
|
|
2695
|
+
* // Register a non-URL texture (render target / procedural)
|
|
2696
|
+
* useTextures().add('rt-main', renderTarget.texture)
|
|
2679
2697
|
*
|
|
2680
|
-
* //
|
|
2681
|
-
*
|
|
2698
|
+
* // Deliberate GPU cleanup (refcount-aware; force to override)
|
|
2699
|
+
* useTextures().dispose('/diffuse.jpg')
|
|
2700
|
+
* useTextures().disposeAll() // scene teardown
|
|
2682
2701
|
* ```
|
|
2702
|
+
*
|
|
2703
|
+
* @remarks
|
|
2704
|
+
* **Future expansion:** an imperative async loader (e.g. `await useTextures().load('/x.jpg')`) is
|
|
2705
|
+
* intentionally not included yet. It would let non-React code (loading screens, dynamic streaming)
|
|
2706
|
+
* populate the registry without Suspense, at the cost of putting loading back into this hook. It
|
|
2707
|
+
* will be added only if a concrete consumer needs imperative loading; for now, loading lives in
|
|
2708
|
+
* `useTexture`.
|
|
2683
2709
|
*/
|
|
2684
2710
|
declare function useTextures(): UseTexturesReturn;
|
|
2711
|
+
declare function useTextures<T>(selector: (registry: UseTexturesReturn) => T): T;
|
|
2685
2712
|
|
|
2686
2713
|
/**
|
|
2687
2714
|
* Creates a render target compatible with the current renderer.
|
|
@@ -4378,4 +4405,4 @@ declare function isOnce(value: unknown): value is {
|
|
|
4378
4405
|
declare function Canvas(props: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
4379
4406
|
|
|
4380
4407
|
export { Block, Canvas, Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal, ErrorBoundary, FROM_REF, IsObject, ONCE, Portal, R3F_BUILD_LEGACY, R3F_BUILD_WEBGPU, REACT_INTERNAL_PROPS, RESERVED_PROPS, three_d as ReactThreeFiber, Scheduler, Texture, _roots, act, addAfterEffect, addEffect, addTail, advance, applyProps, attach, buildGraph, calculateDpr, context, createEvents, createPointerEvents, createPortal, createRoot, createStore, detach, diffProps, dispose, createPointerEvents as events, extend, findInitialRoot, flushSync, fromRef, getInstanceProps, getPrimary, getPrimaryIds, getRootState, getScheduler, getUuidPrefix, hasConstructor, hasPrimary, invalidate, invalidateInstance, is, isColorRepresentation, isCopyable, isFromRef, isObject3D, isOnce, isOrthographicCamera, isRef, isRenderer, isTexture, isVectorLike, once, prepare, presetsObj, reconciler, registerPrimary, removeInteractivity, resolve, unmountComponentAtNode, unregisterPrimary, updateCamera, updateFrustum, useBridge, useEnvironment, useFrame, useGraph, useInstanceHandle, useIsomorphicLayoutEffect, useLoader, useMutableCallback, useRenderTarget, useStore, useTexture, useTextures, useThree, waitForPrimary };
|
|
4381
|
-
export type { Act, AddPhaseOptions, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameControls, FrameNextCallback, FrameNextControls, FrameNextState, FrameState, FrameTimingState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootOptions, LegacyRootState as RootState, RootStore, SchedulerApi, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput,
|
|
4408
|
+
export type { Act, AddPhaseOptions, Args, ArgsProp, AttachFnType, AttachType, BackgroundConfig, BackgroundProp, BaseRendererProps, Bridge, BufferLike, BufferRecord, BufferStore, Camera, CameraProps, CanvasProps, CanvasSchedulerConfig, Catalogue, Color, ColorManagementConfig, ComputeFunction, ConstructorRepresentation, DefaultGLProps, DefaultRendererProps, Disposable, DisposeOptions, DomEvent, Dpr, ElementProps, EnvironmentLoaderProps, EnvironmentProps, EquConfig, Euler, EventHandlers, EventManager, EventProps, Events, Extensions, FiberRoot, FilterFunction, FrameCallback, FrameControls, FrameNextCallback, FrameNextControls, FrameNextState, FrameState, FrameTimingState, Frameloop, GLProps, GLTFLike, GeometryProps, GeometryTransformProps, GlobalEffectType, GlobalRenderCallback, HostConfig, InferLoadResult, InjectState, InputLike, Instance, InstanceProps, LegacyInternalState as InternalState, Intersection, IntersectionEvent, IsAllOptional, IsOptional, Layers, LegacyInternalState, LegacyRenderer, LegacyRootState, LoaderInstance, LoaderLike, LoaderResult, MappedTextureType, MathProps, MathRepresentation, MathType, MathTypes, Matrix3, Matrix4, Mutable, MutableOrReadonlyParameters, NodeProps, NonFunctionKeys, ObjectMap, OffscreenCanvas$1 as OffscreenCanvas, Overwrite, Performance, PointerCaptureTarget, PointerState, PresetsType, PrimaryCanvasEntry, Properties, Quaternion, LegacyRenderer as R3FRenderer, RaycastableRepresentation, ReactProps, ReconcilerRoot, RenderCallback, RenderProps, RenderTargetOptions, Renderer, RendererConfigExtended, RendererFactory, RendererProps, Root, RootOptions, LegacyRootState as RootState, RootStore, SchedulerApi, SetBlock, Size, StorageLike, StorageRecord, StorageStore, Subscription, TSLNodeInput, TextureInput, TextureResult, ThreeCamera, ThreeElement, ThreeElements, ThreeElementsImpl, ThreeEvent, ThreeExports, ThreeToJSXElements, UnblockProps, UseFrameNextOptions, UseFrameOptions, UseTextureOptions, UseTexturesReturn, Vector2, Vector3, Vector4, VectorRepresentation, Viewport, VisibilityEntry, WebGLDefaultProps, WebGLProps, WebGLShadowConfig, XRManager, XRPointerConfig };
|