mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
101.95k stars 35.32k forks source link

Remove level in LOD? #29074

Closed JaimeTorrealba closed 2 weeks ago

JaimeTorrealba commented 1 month ago

Description

Hi, are you interesting in a small feature for the LOD instance, that remove a specific level based on the distance? I notice that currently there's none

I would like to take this one if you agree

Solution

LOD.removeLevel(10) // 10 should be the distance, which is the level to delete

Alternatives

Any other alternative, please feel free to comment here

Additional context

As I'm working to add LOD on tresjs, I would like to have reactivity, to be able to modify the level or the hysteresis. To do this, I should remove the current instance and create a new one

Mugen87 commented 1 month ago

Adding removeLevel() sounds good to me.