I want to create a material for my object to be appeared like below, How should I config my material object? This is what I've done but didn't work:
let colors = [UIColor.green,
UIColor.red,
UIColor.blue,
UIColor.yellow,
UIColor.purple,
UIColor.gray]
let materials = colors.map { color -> SCNMaterial in
let material = SCNMaterial()
material.diffuse.contents = color
return material
}
myObject.geometry.materials = materials