const defaultColor = [1,1,1]; const ExampleCommand = regl => ({ vert: "…", frag: "…", uniforms: { color: ({color}) => color || defaultColor, }, attributes: { position: …, }, // Apart from this part everything here is standard regl instancedAttributes: { translation: new Float32Array(3), }, }); const Example = () => { const { Element, Batch } = useCommand(ExampleCommand); // 1 = 1 instance added to the command, or the closest of the command that contains the return ( {/* Batch props get added to the command's context */} {/* Element props are sent to the command's buffers in `instancedAttributes` */} ); }