react-three-nurbs
Version:
A React component library for NURBS (Non-Uniform Rational B-Spline) curves, surfaces, and solids in Three.js. Built with React Three Fiber, zero external NURBS dependencies — all math implemented from scratch. Boolean operations powered by OpenCASCADE WAS
9 lines (8 loc) • 366 B
TypeScript
import type { ReactElement } from "react";
/**
* Checks whether a React element is a Three.js material.
* Handles both:
* - R3F JSX intrinsic elements (e.g. <meshPhongMaterial>) where type is a string
* - Class-based material components where type has isMaterial on prototype
*/
export declare function isMaterialElement(child: unknown): child is ReactElement;