HighlightLayer: Clear meshes functionality

I have a highlight layer to which I add meshes.
But more often I want to reset/delete the list of added meshes. But don’t find any functionality for it at the moment. A function like clear(); or removeAllMeshes();
The only solution would be to just do that about dispose();?

That would be a nice addition for the Highlightlayer. :slight_smile:

Thank you!

Agree! want to do a PR?


Line 121. After 3 secs, hili._meshes = [];

clear() :smiley:

Maybe bestog will do glowLayer as well… which would be… umm…


Line 121 again… clear() :slight_smile:

glow._includedOnlyMeshes = [null];

I dunno why that null has to be there, but it does. hmm. I think the glowLayer “updater” only triggers an update… when ._includedOnlyMeshes has .length. So the null gives length to the array… and then the 3-second-delayed glowLayer clear()… works. YAY!

Yeah, @bestog wiil install new clear() feature… on BOTH highLight and glow layers… I know he will. (ahem) :slight_smile:

Ok, I don’t know why I butted-in, but it seems I did. I was doing some work on a glowLayer nearby, even doing some “clearing”… and I came across this thread. It was on-topic for what my brain was doing… so I decided to water your fire hydrants. :slight_smile:

But don’t do PR’s like I code “hacks”. I’m a sloppy darkside bootleg child-with-power-tools kind of person… the kind of programmer that mothers warn their daughters-about. :open_mouth: In other words, smashing an array with a big rock, like I did in those PG’s… that’s not necessarily good data handling. It’s like mowing the lawn with a grenade. :smiley: kbye

@Deltakosh Okay. I think on monday/tuesday. Should I create an issue in repo?
@Wingnut I love your posts. :smiley:

No need to create an issue, just submit your PR when you want