GreeseLineMesh does not have correct dispose properties?

GreasedLineMesh seems to have no properties that can be passed to its dispose method. It also has its name as read only.

You should be able to reassign the name, and also the dispose should take these props:

Dispose the line and it's resources

@param doNotRecurse โ€” Set to true to not recurse into each children (recurse into each children by default)

@param disposeMaterialAndTextures โ€” Set to true to also dispose referenced materials and textures (false by default)

I would also like to be able to update the underlying vertex data, but it seems like setVerticesData has no effect on the mesh.

update
I was able to modify the vertex data with the setPoints function so thats not an issue anymore. But the other two items are still on the table.

Seems it is solved here - Potential memory leak when disposing GreasedLine

Should be available with the next release.

2 Likes

setPoints options also expects options.points to be set which is a number[] type not number[][]. This is not allowing me to make sure that the point widths are set correctly when I do setPoints.