Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/basic_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ struct Mesh{
Dim, T <: Real,
FT <: AbstractFace,
Names,
VAT <: Tuple{<: AbstractVector{Point{Dim, T}}, Vararg{VertexAttributeType}},
VAT <: Tuple{<:AbstractVector{Point{Dim, T}}, Vararg{VertexAttributeType}},
FVT <: AbstractVector{FT}
} <: AbstractMesh{Dim, T}

Expand All @@ -527,17 +527,17 @@ struct Mesh{
}

va = vertex_attributes
names = Names

# verify type
if !haskey(va, :position )
if !haskey(va, :position)
error("Vertex attributes must have a :position attribute.")
end

if haskey(va, :normals)
@warn "`normals` as a vertex attribute name has been deprecated in favor of `normal` to bring it in line with mesh.position and mesh.uv"
names = ntuple(i -> ifelse(names[i] == :normal, :normal, names[i]), length(names))
names = ntuple(i -> ifelse(Names[i] == :normals, :normal, Names[i]), length(Names))
va = NamedTuple{names}(values(va))
return new{Dim, T, FT, names, VAT, FVT}(va, fs, views)
end

# verify that all vertex attributes refer to the same number of vertices
Expand All @@ -556,7 +556,7 @@ struct Mesh{
end
end

return new{Dim, T, FT, names, VAT, FVT}(va, fs, views)
return new{Dim, T, FT, Names, VAT, FVT}(va, fs, views)
end
end

Expand Down
Loading