Skip to content

Commit 66913cf

Browse files
committed
only return positions
1 parent 2585f1b commit 66913cf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/basic_types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Tables.schema(mesh::Mesh) = Tables.schema(getfield(mesh, :simplices))
354354
function Base.getproperty(mesh::Mesh, name::Symbol)
355355
if name === :position
356356
# a mesh always has position defined by coordinates...
357-
return coordinates(mesh)
357+
return metafree(coordinates(mesh))
358358
else
359359
return getproperty(getfield(mesh, :simplices), name)
360360
end

test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,4 +334,7 @@ end
334334
@test meta(x) === x
335335
@test meta(x, value=[1]).position === x
336336
end
337+
pos = Point2f0[(10, 2)]
338+
m = Mesh(meta(pos, uv=[Vec2f0(1, 1)]), [GLTriangleFace(1, 1, 1)])
339+
@test m.position === pos
337340
end

0 commit comments

Comments
 (0)