// With custom PivotControls
<VertexHandle
vertex={vertex}
selected={isSelected}
onSelect={handleSelect}
onMove={handleMove}
renderControl={({ vertex, onMove }) => (
<PivotControls
anchor={[0, 0, 0]}
onDrag={(matrix) => {
const pos = new Vector3().setFromMatrixPosition(matrix);
onMove([pos.x, pos.y, pos.z]);
}}
>
{children}
</PivotControls>
)}
/>
Interactive vertex handle component.
Renders a cube at the vertex position that can be selected. Use the
renderControlprop to provide custom transform controls.