LavaUI docs GitHub

struct Material3D

Swift

struct Material3D

How a 3D object's faces are coloured.

Sources/LavaUI/Spatial.swift:225

Constructors

init(color: Color = Color(r: 1, g: 1, b: 1), texture: UIImage? = nil, edgeColor: Color? = nil)

Creates a material. edgeColor defaults to color.

Sources/LavaUI/Spatial.swift:234

Properties

var color: Color

Colour of the front face.

Sources/LavaUI/Spatial.swift:227

var edgeColor: Color

Colour of the other faces of a box: its edges, sides and back.

Sources/LavaUI/Spatial.swift:231

var frontTexture: UIImage?

Picture drawn on the front face (+z), or nil for the flat color.

Sources/LavaUI/Spatial.swift:229

Methods

static func albumCover(front: UIImage, edgeColor: Color = Color(r: 0.12, g: 0.12, b: 0.14)) -> Material3D

A cover picture on the front with dark edges, for album and poster cards.

Sources/LavaUI/Spatial.swift:245