import { ReactElement } from 'react'; import { Matrix16T, VuerProps } from '../../vuer/interfaces'; import { Group as ThreeGroup } from 'three'; import { ThreeElements } from '@react-three/fiber'; /** * VuerGroup - A flexible 3D group component with matrix and transform support * * ## Common Use Cases * * ### 1. Simple positioning and rotation (no matrix) * ```tsx * * {children} * * ``` * * ### 2. Using a transformation matrix (position + rotation + scale) * ```tsx * // Matrix is a 16-element array in row-major order * * {children} * * ``` * * ### 3. Matrix with scale override * ```tsx * // Matrix defines position and rotation, scale parameter OVERRIDES any scale in the matrix * * {children} * * ``` * When both matrix and scale are provided, scale takes precedence and overwrites * the scale component of the matrix, keeping position and rotation intact. * * ### 4. Scale without matrix * ```tsx * * {children} * * ``` */ export type VuerGroupProps = VuerProps<{ /** * 16-element transformation matrix in row-major order (4x4 matrix flattened) * Format: [m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33] * Includes position (m30, m31, m32), rotation (3x3 submatrix), and scale. * When matrix is provided, position, rotation, and quaternion are ignored. * @dial transform * @dial-dtype matrix */ matrix?: Matrix16T; /** * Position of the group in 3D space * @dial transform * @dial-cols 3 * @dial-dtype vector3 * @dial-default [0, 0, 0] * @dial-step 0.001 */ position?: [number, number, number]; /** * Rotation in Euler angles (X, Y, Z) in radians * @dial transform * @dial-dtype vector3 * @dial-step 0.001 * @dial-default [0, 0, 0] */ rotation?: [number, number, number]; /** * Rotation as quaternion (X, Y, Z, W) * @dial transform * @dial-dtype vector4 */ quaternion?: [number, number, number, number]; /** * Scale factor for the group in each axis. * When both matrix and scale are provided, scale OVERRIDES the scale component of the matrix. * @dial transform * @dial-dtype vector3 * @dial-default [1, 1, 1] * @dial-min 0 * @dial-step 0.01 */ scale?: [number, number, number]; /** * Name of the group (useful for identification in scene hierarchy) * @dial general * @dial-dtype string */ name?: string; /** * Hide the group and its children * @dial visibility * @dial-dtype boolean */ hide?: boolean; } & Omit, ThreeGroup>; export declare const VuerGroup: ({ _ref, _key, matrix, name, hide, ...rest }: VuerGroupProps) => ReactElement; export declare const Group: ({ _ref, _key, matrix, name, hide, ...rest }: VuerGroupProps) => ReactElement;