function createMultiMaterialObject( geometry, materials ) {

	const group = new Group();

	for ( let i = 0, l = materials.length; i < l; i ++ ) {

		group.add( new Mesh( geometry, materials[ i ] ) );

	}

	return group;

}
This function represents an alternative way to create 3D objects with multiple materials.
Normally, {@link BufferGeometry#groups} are used which might introduce issues e.g. when
exporting the object to a 3D format. This function accepts a geometry and an array of
materials and creates for each material a mesh that is added to a group.

@param {BufferGeometry} geometry - The geometry.
@param {Array<Material>} materials - An array of materials.
@return {Group} A group representing a multi-material object.