@saitonakamura/react-three-flex
Version:
`<Flex />` component for the 3D World.
23 lines (22 loc) • 945 B
TypeScript
/// <reference types="react" />
/// <reference types="yoga-layout" />
import { Mesh } from 'three';
export declare function useContext<T extends {
notInitialized?: boolean;
}>(context: React.Context<T>): T;
export declare function useReflow(): () => void;
/**
* @returns [width, height, centerAnchor]
*/
export declare function useFlexSize(): readonly [number, number, boolean | undefined];
export declare function useFlexNode(): import("yoga-layout").YogaNode | null;
/**
* explicitly set the size of the box's yoga node
* @requires that the surrounding Flex-Element has `disableSizeRecalc` set to `true`
*/
export declare function useSetSize(): (width: number, height: number) => void;
/**
* explicitly sync the yoga node size with a mesh's geometry and uniform global scale
* @requires that the surrounding Flex-Element has `disableSizeRecalc` set to `true`
*/
export declare function useSyncGeometrySize(): (mesh: Mesh) => void;