Skip to content

Attribute

In Hakowan, an attribute specifies a specific "column" of the data (i.e. mesh attribute) that will be used to encode various visual channels and textures. Each attribute consists of a name and a scale. The name is the name of the mesh attribute used as data, and the scale defines a "column"-specific transformation applied to the attribute before mapping to visual channels.

# To specify an attribute from name alone.
By default, scale is identity.
attr = hkw.attribute(name="normal")

# To specify an attribute from both name and scale.
attr = hkw.attribute(name="normal", scale=hkw.scale.Uniform(factor=2))